From cbece5e2ab15670c31f76e194a82516490760b16 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jan 2025 22:24:51 +0100 Subject: ... --- accounts/gkleen@sif/niri/default.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'accounts/gkleen@sif/niri/default.nix') diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index fc3a0a2b..aa109616 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix @@ -91,7 +91,7 @@ let active_workspace="$(jq -r '.[] | select(.is_focused) | .id' <<<"$workspaces_json")" workspace_json="$(jq -c --arg active_output "$active_output" 'map(select(.output == $active_output and .name == null)) | sort_by(.idx) | .[0]' <<<"$workspaces_json")" - [[ -n $workspace_json && $workspace_json != null && $active_workspace != "$(jq -r '.id' <<<"$workspace_json")" ]] || exit 0 + [[ -n $workspace_json && $workspace_json != null ]] || exit 0 jq --arg active_workspace "$active_workspace" -c "$action" <<<"$workspace_json" | tee /dev/stderr | socat STDIO "$NIRI_SOCKET" ''; }; @@ -174,6 +174,18 @@ in { struts = { left = 0; right = 0; top = 0; bottom = 0; }; focus-ring = { width = 2; + active.gradient = { + from = "hsla(195 100% 60% 0.9)"; + to = "hsla(155 100% 50% 0.9)"; + angle = 45; + relative-to = "workspace-view"; + }; + inactive.gradient = { + from = "hsla(0 0% 42% 0.66)"; + to = "hsla(0 0% 35% 0.66)"; + angle = 45; + relative-to = "workspace-view"; + }; }; preset-column-widths = [ @@ -406,10 +418,14 @@ in { action = spawn (lib.getExe niri) "msg" "action" "power-off-monitors"; allow-when-locked = true; }; - "Mod+Shift+L" = { - action = spawn loginctl "lock-session"; - }; + "Mod+Shift+L".action = spawn loginctl "lock-session"; "Mod+Shift+E".action = quit; + "Mod+Shift+Minus" = { + action = spawn systemctl "suspend"; + }; + "Mod+Shift+Control+Minus" = { + action = spawn systemctl "hibernate"; + }; "XF86MonBrightnessUp" = { action = spawn lightctl "-d" "-e4" "-n1" "up"; -- cgit v1.2.3