diff --git a/.gitattributes b/.gitattributes index c028012..18b7efb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -variables/secrets/** filter=git-crypt diff=git-crypt +modules/extras/variables/secrets/** filter=git-crypt diff=git-crypt diff --git a/hosts/tower/users/jimbo/default.nix b/hosts/tower/users/jimbo/default.nix index 254c09a..2ba733f 100644 --- a/hosts/tower/users/jimbo/default.nix +++ b/hosts/tower/users/jimbo/default.nix @@ -1,6 +1,5 @@ { ... }: { home-manager.users.jimbo = { - }; } diff --git a/modules/home/wms/default.nix b/modules/home/wms/default.nix index 0904940..a137fc5 100644 --- a/modules/home/wms/default.nix +++ b/modules/home/wms/default.nix @@ -1,25 +1,5 @@ -{ lib, ... }: +{ ... }: { - options.home = { - sway.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable SwayWM"; - }; - - niri = { - enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable SwayWM"; - }; - settings = lib.mkOption { - type = lib.types.attrs; - default = {}; - }; - }; - }; - imports = [ ./niri ./programs diff --git a/modules/home/wms/niri/default.nix b/modules/home/wms/niri/default.nix index 58a231f..eb01256 100644 --- a/modules/home/wms/niri/default.nix +++ b/modules/home/wms/niri/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: { imports = [ ./autostart @@ -10,7 +10,12 @@ ./theme ]; - home.file.".config/niri/config.kdl".text = '' + options.home.niri.settings = lib.mkOption { + type = lib.types.attrs; + default = {}; + }; + + config.home.file.".config/niri/config.kdl".text = '' ${builtins.readFile config.home.niri.settings.autostart} ${builtins.readFile config.home.niri.settings.hotkeys} ${builtins.readFile config.home.niri.settings.inputs} diff --git a/modules/home/wms/niri/hotkeys/default.nix b/modules/home/wms/niri/hotkeys/default.nix index eb66543..ef010cb 100644 --- a/modules/home/wms/niri/hotkeys/default.nix +++ b/modules/home/wms/niri/hotkeys/default.nix @@ -144,6 +144,7 @@ ${primeMod}+Shift+f { fullscreen-window; } // Niri specific + ${primeMod}+r { switch-preset-column-width; } ${primeMod}+Shift+r { reset-window-height; } ${primeMod}+Shift+c { center-column; } } diff --git a/modules/home/wms/niri/theme/default.nix b/modules/home/wms/niri/theme/default.nix index eb68d83..2ee2707 100644 --- a/modules/home/wms/niri/theme/default.nix +++ b/modules/home/wms/niri/theme/default.nix @@ -4,19 +4,25 @@ prefer-no-csd layout { - gaps 7 - center-focused-column "never" - default-column-width { proportion 0.5; } - - focus-ring { - off - } - border { width 3 active-color "#${config.look.colors.prime}" inactive-color "#${config.look.colors.split}" } + + focus-ring { + off + } + + gaps 7 + center-focused-column "never" + default-column-width { proportion 0.5; } + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } } ''; } diff --git a/modules/home/wms/programs/waybar/default.nix b/modules/home/wms/programs/waybar/default.nix index 7441c46..0e28c04 100644 --- a/modules/home/wms/programs/waybar/default.nix +++ b/modules/home/wms/programs/waybar/default.nix @@ -87,11 +87,10 @@ # Clocks longClockModule = { exec = pkgs.writeScript "longClock" '' - time=$(date +'%a %b %d %l:%M:%S%p' | tr -s ' ') + time=$(date +'%a %b %-d %-I:%M:%S%p') date=$(date "+%Y-%m-%d") echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}" ''; - on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."''; format = "{}"; return-type = "json"; interval = 1; @@ -100,7 +99,6 @@ shortClockModule = { exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')"; - on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."''; interval = 60; tooltip = false; }; @@ -251,6 +249,7 @@ "bluetooth" = bluetoothModule; "network" = networkModule // { interface = "enp*"; }; }; + display2 = { name = "bar2"; position = "top"; @@ -282,6 +281,7 @@ "custom/vram" = vramModule; "custom/clock-long" = longClockModule; }; + display3 = { name = "bar3"; position = "top"; @@ -363,6 +363,7 @@ "network" = networkModule; }; }; + style = '' * { border: 0; diff --git a/modules/home/wms/sway/default.nix b/modules/home/wms/sway/default.nix index 1c0cdd7..4931b9f 100644 --- a/modules/home/wms/sway/default.nix +++ b/modules/home/wms/sway/default.nix @@ -11,7 +11,7 @@ ]; wayland.windowManager.sway = { - enable = config.home.sway.enable; + enable = config.home.desktop.enable; package = null; wrapperFeatures.gtk = true; checkConfig = false;