From 0e338b03333807f891a8aecbc5cc1dab4ec0892e Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 9 May 2025 18:28:38 -0500 Subject: [PATCH 1/4] feat: added niri --- modules/home/gui/desktop/niri/default.nix | 132 ++++++++++++++-------- 1 file changed, 84 insertions(+), 48 deletions(-) diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index a4da663..6eefe14 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -123,7 +123,7 @@ in "Super+t".action = niri.spawn "zeditor"; "Super+b".action = niri.spawn "floorp"; "Super+x".action = niri.spawn "freetube"; - "Super+v".action = niri.spawn "discordcanary"; + "Super+v".action = niri.spawn "vesktop"; "Super+m".action = niri.spawn "element-desktop"; "Super+d".action = niri.spawn "ghostty"; "Super+p".action = niri.spawn "bitwarden"; @@ -189,64 +189,100 @@ in is-floating = true; is-focused = true; }; + appIDs = [ + ".blueman-manager-wrapped" + "org.gnome.Calculator" + "com.github.wwmm.easyeffects" + "emote" + "mpv" + "vlc" + "org.nomacs.ImageLounge" + "flameshot" + "^.protonvpn-app-wrapped$" + "^Picture-in-Picture$" + "^Discord Popout$" + "^Enter name of file to save to…$" + "^File Upload$" + ".scrcpy-wrapped" + "^Battle.net$" + ]; in - [ - (windowMatch ".blueman-manager-wrapped") - (windowMatch "org.gnome.Calculator") - (windowMatch "com.github.wwmm.easyeffects") - (windowMatch "emote") - (windowMatch "mpv") - (windowMatch "vlc") - (windowMatch "org.nomacs.ImageLounge") - (windowMatch "flameshot") - (windowMatch "^.protonvpn-app-wrapped$") - (windowMatch "^Picture-in-Picture$") - (windowMatch "^Discord Popout$") - (windowMatch "^Enter name of file to save to…$") - (windowMatch "^File Upload$") - (windowMatch ".scrcpy-wrapped") - (windowMatch "^Battle.net$") - ]; + builtins.map windowMatch appIDs; } { - matches = [ - { app-id = "floop"; } - { app-id = "org.kde.kdenlive"; } - { app-id = "krita"; } - { app-id = "mpv"; } - { app-id = "vlc"; } - { app-id = "Brave-browser"; } - { app-id = "org.kde.okular"; } - ]; - opacity = 1.0; + matches = + let + windowMatch = c: { + app-id = c; + opacity = 1.0; + }; + appIDs = [ + "floop" + "org.kde.kdenlive" + "krita" + "mpv" + "vlc" + "Brave-browser" + "org.kde.okular" + ]; + in + builtins.map windowMatch appIDs; } { - matches = [ - { app-id = "signal"; } - { app-id = "vesktop"; } - ]; - open-on-workspace = workspace0; + matches = + let + windowMatch = c: { + app-id = c; + open-on-workspace = workspace0; + }; + appIDs = [ + "signal" + "vesktop" + ]; + in + builtins.map windowMatch appIDs; } { - matches = [ - { app-id = "code"; } - { app-id = "zeditor"; } - ]; - open-on-workspace = workspace1; + matches = + let + windowMatch = c: { + app-id = c; + open-on-workspace = workspace1; + }; + appIDs = [ + "code" + "zeditor" + ]; + in + builtins.map windowMatch appIDs; } { - matches = [ - { app-id = "steam"; } - { app-id = "org.kde.kdenlive"; } - ]; - open-on-workspace = workspace2; + matches = + let + windowMatch = c: { + app-id = c; + open-on-workspace = workspace2; + }; + appIDs = [ + "steam" + "org.kde.kdenlive" + ]; + in + builtins.map windowMatch appIDs; } { - matches = [ - { app-id = "feishin"; } - { app-id = ".scrcpy-wrapped"; } - ]; - open-on-workspace = workspace3; + matches = + let + windowMatch = c: { + app-id = c; + open-on-workspace = workspace3; + }; + appIDs = [ + "feishin" + ".scrcpy-wrapped" + ]; + in + builtins.map windowMatch appIDs; } { clip-to-geometry = true; From 0af81166cd3b737416d15e1a7d1f16f2e44843c9 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 9 May 2025 18:53:41 -0500 Subject: [PATCH 2/4] feat: added niri --- modules/home/gui/desktop/niri/default.nix | 31 ++++++++++------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index 6eefe14..dbcf3fa 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -149,8 +149,8 @@ in "Super+5".action = niri.focus-workspace workspace4; "Super+c".action = niri.focus-column-or-monitor-left; - "Super+a".action = niri.focus-window-or-monitor-up; - "Super+e".action = niri.focus-window-or-monitor-down; + "Super+a".action = niri.focus-window-or-workspace-up; + "Super+e".action = niri.focus-window-or-workspace-down; "Super+i".action = niri.focus-column-or-monitor-right; "Super+Shift+t".action = niri.spawn "ghostty"; @@ -160,8 +160,12 @@ in "Ctrl+Alt+c".action = niri.move-column-left; "Ctrl+Alt+i".action = niri.move-column-right; + "Ctrl+Alt+f".action = niri.set-column-width "-10%"; + "Ctrl+Alt+o".action = niri.set-column-width "+10%"; }; + hotkey-overlay.skip-at-startup = true; + outputs = { "DP-1" = { background-color = makeColour el.base02; @@ -286,15 +290,7 @@ in } { clip-to-geometry = true; - focus-ring = { - active.color = makeColour el.base0E; - inactive.color = makeColour el.base02; - }; - border = { - width = 1; - active.color = makeColour el.base0E; - inactive.color = makeColour el.base02; - }; + focus-ring.enable = false; geometry-corner-radius = let radius = 10.0; @@ -309,14 +305,13 @@ in ]; layout = { + border = { + enable = true; + width = 2; + active.color = makeColour el.base0E; + inactive.color = makeColour el.base02; + }; gaps = 10; - focus-ring.enable = true; - # struts = { - # top = 0; - # bottom = 0; - # left = 0; - # right = 0; - # }; shadow = { enable = true; color = el.base11; From c4c07a043a9554ebd6e38533f9fed3a52e1195b6 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 9 May 2025 23:12:45 -0500 Subject: [PATCH 3/4] feat: tweaking niri --- flake.nix | 1 + modules/home/default.nix | 9 +- modules/home/gui/desktop/niri/default.nix | 11 +- .../wayland/waybar/config/settings.nix | 46 +++--- .../desktop/wayland/waybar/config/style.nix | 135 +++++++++--------- modules/nixos/default.nix | 6 +- .../nixos/desktop/wayland/greetd/default.nix | 2 +- 7 files changed, 107 insertions(+), 103 deletions(-) diff --git a/flake.nix b/flake.nix index 869d5f5..95cab43 100755 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ config.nixosModules.crust inputs.home-manager.nixosModules.home-manager inputs.lix-module.nixosModules.default + inputs.niri.nixosModules.niri inputs.nur.modules.nixos.default inputs.sops-nix.nixosModules.sops ]; diff --git a/modules/home/default.nix b/modules/home/default.nix index fb28f7a..5552742 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -188,7 +188,8 @@ in usbImager virtManager # hypr - # wayland + niri + wayland theming # polychromatic dolphin @@ -215,7 +216,8 @@ in bitwarden emote # hypr - # wayland + wayland + niri theming ; }; @@ -237,6 +239,9 @@ in videoPlaying discord signal + niri + wayland + theming tools ; }; diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index dbcf3fa..935a17c 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -169,6 +169,7 @@ in outputs = { "DP-1" = { background-color = makeColour el.base02; + scale = 1.0; mode = { width = 2560; height = 1080; @@ -218,7 +219,6 @@ in let windowMatch = c: { app-id = c; - opacity = 1.0; }; appIDs = [ "floop" @@ -231,13 +231,13 @@ in ]; in builtins.map windowMatch appIDs; + opacity = 1.0; } { matches = let windowMatch = c: { app-id = c; - open-on-workspace = workspace0; }; appIDs = [ "signal" @@ -245,13 +245,13 @@ in ]; in builtins.map windowMatch appIDs; + open-on-workspace = workspace0; } { matches = let windowMatch = c: { app-id = c; - open-on-workspace = workspace1; }; appIDs = [ "code" @@ -259,13 +259,13 @@ in ]; in builtins.map windowMatch appIDs; + open-on-workspace = workspace1; } { matches = let windowMatch = c: { app-id = c; - open-on-workspace = workspace2; }; appIDs = [ "steam" @@ -273,13 +273,13 @@ in ]; in builtins.map windowMatch appIDs; + open-on-workspace = workspace2; } { matches = let windowMatch = c: { app-id = c; - open-on-workspace = workspace3; }; appIDs = [ "feishin" @@ -287,6 +287,7 @@ in ]; in builtins.map windowMatch appIDs; + open-on-workspace = workspace3; } { clip-to-geometry = true; diff --git a/modules/home/gui/desktop/wayland/waybar/config/settings.nix b/modules/home/gui/desktop/wayland/waybar/config/settings.nix index e24ce88..5c03305 100755 --- a/modules/home/gui/desktop/wayland/waybar/config/settings.nix +++ b/modules/home/gui/desktop/wayland/waybar/config/settings.nix @@ -12,12 +12,13 @@ in margin-left = 5; margin-right = 5; modules-left = [ - "custom/launcher" - "hyprland/workspaces" + "custom/weather" + # "niri/workspaces" ]; modules-center = [ - "custom/weather" + # "custom/launcher" + "clock" ]; modules-right = [ @@ -29,7 +30,7 @@ in "pulseaudio" # "network" "battery" - "clock" + # "clock" ]; clock = { @@ -44,29 +45,20 @@ in format-alt = " {:%d/%m}"; }; - "hyprland/workspaces" = { - active-only = false; - disable-scroll = true; - format = "{icon}"; - on-click = "activate"; - format-icons = { - "1" = "◉"; - "2" = "◉"; - "3" = "◉"; - "4" = "◉"; - "5" = "◉"; - urgent = ""; - default = "◉"; - sort-by-number = true; - }; - persistent-workspaces = { - "1" = [ ]; - "2" = [ ]; - "3" = [ ]; - "4" = [ ]; - "5" = [ ]; - }; - }; + # "niri/workspaces" = { + # active-only = false; + # disable-scroll = true; + # format = "{icon}"; + # on-click = "activate"; + # format-icons = { + # # focused = "◉"; + # # active = "◉"; + # # empty = "◯"; + # # urgent = ""; + # # default = "◯"; + # # sort-by-number = true; + # }; + # }; memory = { format = "󰟜 {}%"; diff --git a/modules/home/gui/desktop/wayland/waybar/config/style.nix b/modules/home/gui/desktop/wayland/waybar/config/style.nix index 5ce2783..c46b407 100755 --- a/modules/home/gui/desktop/wayland/waybar/config/style.nix +++ b/modules/home/gui/desktop/wayland/waybar/config/style.nix @@ -40,82 +40,87 @@ let in '' - * { - min-height: 0px; - font-family: ${custom.font}; - font-weight: ${custom.font_weight}; - } - - window#waybar { - background: #${custom.background_2}; - color: #${custom.background_3}; - border: 2px solid; - border-radius: 30px; - border-color: #${custom.text_color}; - min-height: 100px; - opacity: ${custom.opacityBg}; + * { + min-height: 30px; + border-radius: 0; + font-family: ${custom.font}; + font-weight: ${custom.font_weight}; } - #workspaces { - font-size: 18px; - padding-left: 15px; - margin-bottom: 2px; - } - #workspaces button { - color: #${custom.button_color}; - padding: 5px; - opacity: ${custom.opacityBt}; - } - #workspaces button.empty { - color: #${custom.background_3}; - } - #workspaces button.active { - color: #${custom.text_color}; - } + window#waybar { + background: #${custom.background_2}; + color: #${custom.text_color}; + border: 2px solid; + border-radius: 30px; + border-color: #${custom.text_color}; + opacity: ${custom.opacityBg}; + } - #tray, #pulseaudio, #privacy, #cpu, #memory, #disk, #clock { - font-size: ${custom.font_size}; - color: #${custom.text_color}; - padding-right: 10px; - } + #workspaces { + font-size: 18px; + padding-left: 15px; + margin-bottom: 2px; + } + #workspaces button { + color: #${custom.button_color}; + padding: 5px 0px 5px 0px; + } + #workspaces button.active { + color: #${custom.text_color}; + } + #workspaces button.empty { + color: #${custom.button_color}; + } + #workspaces button.focused { + color: #${custom.text_color}; + } - #privacy { - } + #tray, #pulseaudio, #privacy, #cpu, #memory, #disk, #clock { + font-size: ${custom.font_size}; + color: #${custom.text_color}; + padding-right: 10px; + } - #cpu { - } + #privacy { + } - #memory { - } + #cpu { + } - #disk { - } + #memory { + } - #tray { - } + #disk { + } - #pulseaudio { - } + #tray { + } - #clock { - } + #pulseaudio { + } - #battery { - font-size: ${custom.font_size}; - color: #${custom.text_color}; - padding-right: 10px; - } + #clock { + font-size: 14px; + } - #custom-launcher { - font-size: 20px; - color: #${custom.text_color}; - font-weight: ${custom.font_weight}; - padding-left: 10px; - } + #battery { + font-size: ${custom.font_size}; + color: #${custom.text_color}; + padding-right: 10px; + } - #custom-weather { - font-size: 14px; - color: #${custom.text_color}; - font-weight: ${custom.font_weight}; - } + #custom-launcher { + font-size: 20px; + color: #${custom.text_color}; + font-weight: ${custom.font_weight}; + padding-left: 10px; + padding-right: 10px; + } + + #custom-weather { + font-size: 14px; + color: #${custom.text_color}; + font-weight: ${custom.font_weight}; + padding-left: 10px; + } '' diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 7a25e34..88dfcb7 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -37,9 +37,9 @@ in deimos = { imports = builtins.attrValues { inherit (modules) - # hypr - # wayland - plasma + niri + wayland + # plasma sddm flatpak xserver diff --git a/modules/nixos/desktop/wayland/greetd/default.nix b/modules/nixos/desktop/wayland/greetd/default.nix index 8bc098f..a5cb1b3 100755 --- a/modules/nixos/desktop/wayland/greetd/default.nix +++ b/modules/nixos/desktop/wayland/greetd/default.nix @@ -21,7 +21,7 @@ in { services = { greetd = { - enable = true; + enable = false; vt = 7; settings = { default_session = { From a128d9b7fa3d10fc3b64ada4d713b151f1804ed8 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 10 May 2025 00:21:19 -0500 Subject: [PATCH 4/4] feat: niri isn't for me --- modules/home/default.nix | 4 ++-- modules/home/gui/apps/tools/espanso/default.nix | 1 + modules/home/gui/desktop/niri/default.nix | 8 ++++++-- modules/nixos/default.nix | 8 ++++---- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 5552742..0cd5aaf 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -67,8 +67,8 @@ in zoom academic # hypr - niri - wayland + # niri + # wayland theming ; }; diff --git a/modules/home/gui/apps/tools/espanso/default.nix b/modules/home/gui/apps/tools/espanso/default.nix index a041c08..2423bf4 100755 --- a/modules/home/gui/apps/tools/espanso/default.nix +++ b/modules/home/gui/apps/tools/espanso/default.nix @@ -5,6 +5,7 @@ { services.espanso = { enable = true; + package = pkgs.espanso-wayland; matches = { base = { matches = [ diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index 935a17c..e076fd4 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -64,7 +64,8 @@ in { command = [ "easyeffects -r" ]; } { command = [ "vesktop" ]; } { command = [ "signal" ]; } - { command = [ "floorp" ]; } + { command = [ "feishin" ]; } + { command = [ "zeditor" ]; } ]; animations = { @@ -306,6 +307,9 @@ in ]; layout = { + default-column-width = { + proportion = 0.5; + }; border = { enable = true; width = 2; @@ -324,7 +328,7 @@ in }; workspaces = { - default = { + ${workspace0} = { name = workspace0; }; ${workspace1} = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 88dfcb7..716d325 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -10,11 +10,11 @@ in mullvad syncthing ollama - # plasma - # sddm + plasma + sddm # hypr - niri - wayland + # niri + # wayland searx portals xserver