From d9cc63353ae3aa8c5ef15745dd541b51cc83f407 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:03:37 +0100 Subject: [PATCH 1/8] talos: home: use waybar --- hosts/talos/home.nix | 49 ++++---------------------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index 476df1c..212cd1f 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -67,55 +67,14 @@ in { names = ["Iosevka Fixed" "FontAwesome6Free"]; size = 9.0; }; - bars = [ - { - mode = "dock"; - hiddenState = "hide"; - position = "top"; - workspaceButtons = true; - workspaceNumbers = true; - statusCommand = "${pkgs.i3status}/bin/i3status"; - fonts = { - names = ["Iosevka Fixed" "FontAwesome6Free"]; - size = 9.0; - }; - trayOutput = "primary"; - colors = { - background = "#000000"; - statusline = "#ffffff"; - separator = "#666666"; - focusedWorkspace = { - border = "#4c7899"; - background = "#285577"; - text = "#ffffff"; - }; - activeWorkspace = { - border = "#333333"; - background = "#5f676a"; - text = "#ffffff"; - }; - inactiveWorkspace = { - border = "#333333"; - background = "#222222"; - text = "#888888"; - }; - urgentWorkspace = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - }; - bindingMode = { - border = "#2f343a"; - background = "#900000"; - text = "#ffffff"; - }; - }; - } - ]; + bars = []; keybindings = mkOptionDefault { "Mod4+i" = "exec emacsclient --create-frame"; }; + startup = [ + {command = "waybar";} + ]; }; }; programs = { From 47ab3ef2845662e273c4526143bba1e2aa405b28 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:03:51 +0100 Subject: [PATCH 2/8] talos: home: smaller sway font size --- hosts/talos/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index 212cd1f..c1bec26 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -65,7 +65,7 @@ in { }; fonts = { names = ["Iosevka Fixed" "FontAwesome6Free"]; - size = 9.0; + size = 8.0; }; bars = []; From ea914e9821404e28f8e5251dc61e7091503e899e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:04:36 +0100 Subject: [PATCH 3/8] talos: home: logout mode in sway --- hosts/talos/home.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index c1bec26..abfd952 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -40,7 +40,9 @@ in { ; }; - wayland.windowManager.sway = { + wayland.windowManager.sway = let + logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot"; + in { enable = true; swaynag.enable = true; wrapperFeatures.gtk = true; @@ -70,8 +72,20 @@ in { bars = []; keybindings = mkOptionDefault { + "Mod4+Shift+e" = ''mode "${logoutMode}"''; "Mod4+i" = "exec emacsclient --create-frame"; }; + + modes = mkOptionDefault { + "${logoutMode}" = { + "l" = "exec --no-startup-id swaymsg exit, mode default"; + #"s" = "exec --no-startup-id betterlockscreen --suspend, mode default"; + "p" = "exec --no-startup-id systemctl poweroff, mode default"; + "r" = "exec --no-startup-id systemctl reboot, mode default"; + "Escape" = "mode default"; + "Return" = "mode default"; + }; + }; startup = [ {command = "waybar";} ]; From e02738479991ad82589f8919b641c8a58fbd90ee Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:05:00 +0100 Subject: [PATCH 4/8] talos: home: setup shikane for display autoswitch --- hosts/talos/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index abfd952..e23c301 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -31,6 +31,7 @@ in { (pkgs) ansel chromium # some websites only work there :( + shikane # output autoconfig zotero ; @@ -87,6 +88,7 @@ in { }; }; startup = [ + {command = "shikane";} {command = "waybar";} ]; }; From d52af230e2f99cfc6e122a3f5530ec9f9f155ae5 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:05:57 +0100 Subject: [PATCH 5/8] talos: home: set hyprlock shortcut --- hosts/talos/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index e23c301..06a0ed9 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -31,6 +31,7 @@ in { (pkgs) ansel chromium # some websites only work there :( + hyprlock shikane # output autoconfig zotero ; @@ -75,6 +76,7 @@ in { keybindings = mkOptionDefault { "Mod4+Shift+e" = ''mode "${logoutMode}"''; "Mod4+i" = "exec emacsclient --create-frame"; + "Mod4+Control+l" = "exec hyprlock"; }; modes = mkOptionDefault { From f6306eab82db605a34fddc74fe089be005cb9b1f Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:06:14 +0100 Subject: [PATCH 6/8] talos: home: try fuzzel for menu --- hosts/talos/home.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index 06a0ed9..61bc614 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -89,6 +89,9 @@ in { "Return" = "mode default"; }; }; + + menu = "fuzzel --list-executables-in-path"; + startup = [ {command = "shikane";} {command = "waybar";} From e34b0f85b26058e15609ce312a9d03bb5849b28e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:06:31 +0100 Subject: [PATCH 7/8] talos: home: add nwg-displays to home packages --- hosts/talos/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index 61bc614..834214a 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -32,6 +32,7 @@ in { ansel chromium # some websites only work there :( hyprlock + nwg-displays shikane # output autoconfig zotero ; From e08af2559b0363c81c749635f4d37139aa92a399 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 16 Feb 2025 18:06:46 +0100 Subject: [PATCH 8/8] talos: home: setup sound shortcuts --- hosts/talos/home.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/talos/home.nix b/hosts/talos/home.nix index 834214a..4d7c2b0 100644 --- a/hosts/talos/home.nix +++ b/hosts/talos/home.nix @@ -78,6 +78,9 @@ in { "Mod4+Shift+e" = ''mode "${logoutMode}"''; "Mod4+i" = "exec emacsclient --create-frame"; "Mod4+Control+l" = "exec hyprlock"; + "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2"; + "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2"; }; modes = mkOptionDefault {