From 3dc604a55923588eb4ad6f9147b7e4aee6db89ff Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 30 Nov 2023 08:59:16 +0100 Subject: [PATCH] Replace jq with jaq where possible --- home-manager/modules/eww/config/eww.yuck | 4 ++-- home-manager/modules/sway/default.nix | 4 ++-- home-manager/modules/waybar/default.nix | 2 +- modules/base/default.nix | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/home-manager/modules/eww/config/eww.yuck b/home-manager/modules/eww/config/eww.yuck index ef066e2..6d4ecb1 100644 --- a/home-manager/modules/eww/config/eww.yuck +++ b/home-manager/modules/eww/config/eww.yuck @@ -104,7 +104,7 @@ (box :class "cpu" :space-evenly false :spacing 2 - :tooltip {jq(EWW_CPU, "reduce .cores[] as $core (\"\"; . + $core.core + \": \" + ($core.usage | tostring) + \"%\\n\") | {tooltip:.}").tooltip} + :tooltip {jaq(EWW_CPU, "reduce .cores[] as $core (\"\"; . + $core.core + \": \" + ($core.usage | tostring) + \"%\\n\") | {tooltip:.}").tooltip} (label :class "icon" :text "󰻠") (label :text "${round(EWW_CPU.avg, 2)}%"))) @@ -113,7 +113,7 @@ (box :class "temperature" :space-evenly false :spacing 2 - :tooltip {jq(EWW_TEMPS, ". | to_entries | reduce .[] as $temp (\"\"; . + $temp.key + \": \" + ($temp.value | tostring) + \"\\n\") | {tooltip:.}").tooltip} + :tooltip {jaq(EWW_TEMPS, ". | to_entries | reduce .[] as $temp (\"\"; . + $temp.key + \": \" + ($temp.value | tostring) + \"\\n\") | {tooltip:.}").tooltip} (label :class "icon" :text "󰔏") (label :text "${round(EWW_TEMPS.ZENPOWER_TDIE, 1)}°C"))) diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index 269d377..5f435b9 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -230,8 +230,8 @@ in "${mod}+c" = mkIf config.eboskma.programs.emacs.enable "exec ${config.programs.emacs.package}/bin/emacsclient -c"; - "${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name')"; - "${mod}+Shift+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; + "${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name')"; + "${mod}+Shift+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; "${mod}+Shift+Ctrl+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; "${mod}+Shift+Alt+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\""; diff --git a/home-manager/modules/waybar/default.nix b/home-manager/modules/waybar/default.nix index 720afd1..d206fa6 100644 --- a/home-manager/modules/waybar/default.nix +++ b/home-manager/modules/waybar/default.nix @@ -66,7 +66,7 @@ in }; "custom/keyboard-layout" = { - exec = ''${pkgs.sway}/bin/swaymsg -t get_inputs | ${pkgs.jq}/bin/jq -r '.[] | select(.identifier == "36125:40349:splitkb_Kyria_rev1") | .xkb_active_layout_name' ''; + exec = ''${pkgs.sway}/bin/swaymsg -t get_inputs | ${pkgs.jaq}/bin/jaq -r '.[] | select(.identifier == "36125:40349:splitkb_Kyria_rev1") | .xkb_active_layout_name' ''; interval = 30; format = "󰌌 {}"; # Icon: keyboard # Signal sent by Sway key binding (~/.config/sway/key-bindings) diff --git a/modules/base/default.nix b/modules/base/default.nix index 01ee64a..61c44b4 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -69,7 +69,7 @@ in du-dust file hexyl - jq + jaq lm_sensors man-pages man-pages-posix