diff options
| -rw-r--r-- | hosts/limbo/default.nix | 4 | ||||
| -rw-r--r-- | modules/user/desktop/blossoms.jpg | bin | 524186 -> 0 bytes | |||
| -rw-r--r-- | modules/user/desktop/components/default.nix | 6 | ||||
| -rw-r--r-- | modules/user/desktop/components/waybar/default.nix | 154 | ||||
| -rw-r--r-- | modules/user/desktop/components/waybar/style-blue.css (renamed from modules/user/desktop/waybar.css) | 0 | ||||
| -rw-r--r-- | modules/user/desktop/default.nix | 102 | ||||
| -rw-r--r-- | modules/user/desktop/wallpaper.jpg | bin | 0 -> 204580 bytes | |||
| -rw-r--r-- | modules/user/desktop/window-managers/default.nix | 5 | ||||
| -rw-r--r-- | modules/user/desktop/window-managers/sway.nix (renamed from modules/user/desktop/swayfx.nix) | 218 |
9 files changed, 247 insertions, 242 deletions
diff --git a/hosts/limbo/default.nix b/hosts/limbo/default.nix index 181000c..f24adb3 100644 --- a/hosts/limbo/default.nix +++ b/hosts/limbo/default.nix @@ -16,7 +16,7 @@ ../../modules/user ]; - desktop.windowManager = "swayfx"; + desktop.windowManager = "sway"; }; networking.networkmanager = { @@ -24,7 +24,7 @@ wifi.macAddress = "random"; }; - programs.swayfx.enable = true; + programs.sway.enable = true; services.automatic-timezoned.enable = true; system.stateVersion = "26.05"; } diff --git a/modules/user/desktop/blossoms.jpg b/modules/user/desktop/blossoms.jpg Binary files differdeleted file mode 100644 index a420e12..0000000 --- a/modules/user/desktop/blossoms.jpg +++ /dev/null diff --git a/modules/user/desktop/components/default.nix b/modules/user/desktop/components/default.nix new file mode 100644 index 0000000..6457798 --- /dev/null +++ b/modules/user/desktop/components/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./waybar + #./wofi + ]; +} diff --git a/modules/user/desktop/components/waybar/default.nix b/modules/user/desktop/components/waybar/default.nix new file mode 100644 index 0000000..02747c4 --- /dev/null +++ b/modules/user/desktop/components/waybar/default.nix @@ -0,0 +1,154 @@ +{ + config, + lib, + options, + ... +}: +{ + options.desktop.components.waybar.enable = lib.mkEnableOption "waybar"; + config.programs.waybar = { + enable = config.desktop.components.waybar.enable; + settings = { + main = { + modules-left = [ + "sway/workspaces" + "tray" + ]; + + modules-center = [ "clock" ]; + modules-right = [ + "backlight" + "battery" + "network" + "wireplumber" + "cpu" + "memory" + ]; + + backlight = { + format = "{icon}"; + format-icons = [ + "" + "" + ]; + + tooltip-format = "{percent}%"; + }; + + battery = { + format = "{icon}"; + format-critical = "{icon} ({capacity}%)"; + format-icons = [ + "" + "" + "" + "" + ]; + + format-time = "{H}h{m}m"; + format-warning = "{icon} ({capacity}%)"; + states = { + critical = 15; + warning = 25; + }; + + tooltip-format = "{time} remaining, {health}% battery health"; + tooltip-format-critical = "plug yo shit in NOW!!"; + }; + + cpu.format = "{avg_frequency} GHz"; + clock = { + format = "{:%A, %b %d %Y - %H:%M %Z}"; + # i am the time god. fear me. + timezones = [ + "America/Toronto" + "America/Vancouver" + "America/Edmonton" + "America/Regina" + "America/Toronto" # duplicated so it appears in the list too + "America/Halifax" + "America/St_Johns" + "America/Sao_Paulo" + "Etc/UTC" + "Australia/Perth" + ]; + + tooltip-format = "{tz_list}"; + }; + + memory = { + format = "{used}/{total} GiB"; + states = { + critical = 90; + warning = 70; + }; + + tooltip-format = "{percentage}% used"; + }; + + network = { + format-disabled = ""; + format-disconnected = ""; + format-ethernet = " {ipaddr}/{cidr}"; + format-icons = [ + "" + "" + "" + "" + ]; + + format-wifi = "{icon}"; + interval = 1; + tooltip-format = "{ifname} tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}"; + tooltip-format-wifi = '' + <b>Network:</b> {essid} + <b>{ifname}:</b> {ipaddr}/{cidr} + <b>tx:</b> {bandwidthUpBytes} + <b>rx:</b> {bandwidthDownBytes} + ''; + }; + + position = "bottom"; + "sway/workspaces" = { + all-outputs = true; + disable-scroll = true; + format = ""; + persistent-workspaces = { + "1" = [ + "DP-1" + "eDP-1" + ]; + + "2" = [ + "DP-2" + "eDP-1" + ]; + + "3" = [ ]; + "4" = [ ]; + "5" = [ ]; + "6" = [ ]; + "7" = [ ]; + "8" = [ ]; + "9" = [ ]; + }; + }; + + wireplumber = { + format = "{icon}"; + format-icons = [ + "" + "" + "" + ]; + + format-muted = ""; + on-click = "wpctl set-mute @DEFAULT_SINK@ toggle"; + tooltip-format = "{node_name} - {volume}%"; + }; + }; + }; + + style = builtins.readFile ./style-${config.desktop.accent}.css; + }; +} diff --git a/modules/user/desktop/waybar.css b/modules/user/desktop/components/waybar/style-blue.css index b00c4b3..b00c4b3 100644 --- a/modules/user/desktop/waybar.css +++ b/modules/user/desktop/components/waybar/style-blue.css diff --git a/modules/user/desktop/default.nix b/modules/user/desktop/default.nix index 53911ec..8761029 100644 --- a/modules/user/desktop/default.nix +++ b/modules/user/desktop/default.nix @@ -7,10 +7,22 @@ }: { imports = [ - ./swayfx.nix + ./components + ./window-managers ]; options.desktop = { + accent = lib.mkOption { + description = "The accent colour to use from catppuccin"; + default = "blue"; + type = + with lib.types; + enum [ + "blue" + "pink" + ]; + }; + windowManager = lib.mkOption { description = "Which window manager to use"; default = null; @@ -21,16 +33,16 @@ config = { fonts.fontconfig.enable = true; home = { - file."Pictures/blossoms.jpg" = { + file."Pictures/wallpaper.jpg" = { enable = (config.desktop.windowManager != null); - source = ./blossoms.jpg; + source = ./wallpaper.jpg; }; packages = with pkgs; [ brightnessctl fira-code keepassxc - nerd-fonts.fira-code # monospace font + nerd-fonts.fira-code ]; }; @@ -44,27 +56,33 @@ }; colors = { - alpha = 0.8; - background = "191724"; - foreground = "e0def4"; - regular0 = "26233a"; - regular1 = "eb6f92"; - regular2 = "9ccfd8"; - regular3 = "f6c177"; - regular4 = "31748f"; - regular5 = "c4a7e7"; - regular6 = "ebbcba"; - regular7 = "e0def4"; - bright0 = "47435d"; - bright1 = "ff98ba"; - bright2 = "c5f9ff"; - bright3 = "ffeb9e"; - bright4 = "5b9ab7"; - bright5 = "eed0ff"; - bright6 = "ffe5e3"; - bright7 = "fefcff"; - flash = "f6c177"; - cursor = "191724 e0def4"; + background = "1e1e2e"; + cursor = "11111b f5e0dc"; + foreground = "cdd6f4"; + regular0 = "45475a"; + regular1 = "f38ba8"; + regular2 = "a6e3a1"; + regular3 = "f9e2af"; + regular4 = "89b4fa"; + regular5 = "f5c2e7"; + regular6 = "94e2d5"; + regular7 = "bac2de"; + bright0 = "585b70"; + bright1 = "f38ba8"; + bright2 = "a6e3a1"; + bright3 = "f9e2af"; + bright4 = "89b4fa"; + bright5 = "f5c2e7"; + bright6 = "94e2d5"; + bright7 = "a6adc8"; + "16" = "fab387"; + "17" = "f5e0dc"; + jump-labels = "11111b fab387"; + search-box-match = "cdd6f4 313244"; + search-box-no-match = "11111b f38ba8"; + selection-background = "414356"; + selection-foreground = "cdd6f4"; + urls = "89b4fa"; }; cursor.blink = true; @@ -77,41 +95,16 @@ }; }; - fuzzel = { - enable = lib.mkDefault (config.desktop.windowManager != null); - settings = { - border.width = 2; - colors = { - background = "191724ff"; - border = "ebbcbaff"; - input = "e0def4ff"; - match = "ebbcbaff"; - prompt = "e0def4ff"; - selection = "524f67ff"; - selection-match = "ebbcbaff"; - selection-text = "e0def4ff"; - text = "e0def4ff"; - }; - - main = { - dpi-aware = lib.mkDefault true; - font = lib.mkDefault "Fira Code:size=6"; - show-actions = true; - sort-result = false; - terminal = "foot -a '{cmd}' -T '{cmd}' {cmd}"; - use-bold = true; - }; - }; - }; - librewolf = { enable = lib.mkDefault (config.desktop.windowManager != null); profiles = { - default = { }; + # sidebar visibility keeps getting reset when launching the browser. + default.settings."sidebar.visibility" = "hide-sidebar"; noRFP = { id = 1; settings = { "privacy.resistFingerprinting" = false; + "sidebar.visibility" = "hide-sidebar"; "webgl.disabled" = false; }; }; @@ -122,11 +115,8 @@ "sidebar.animation.enabled" = false; "sidebar.new-sidebar.has-used" = true; "sidebar.verticalTabs" = true; - # this keeps getting randomly reset at runtime. why? idfk. - "sidebar.visibility" = "hide-sidebar"; }; }; }; }; - } diff --git a/modules/user/desktop/wallpaper.jpg b/modules/user/desktop/wallpaper.jpg Binary files differnew file mode 100644 index 0000000..e75494a --- /dev/null +++ b/modules/user/desktop/wallpaper.jpg diff --git a/modules/user/desktop/window-managers/default.nix b/modules/user/desktop/window-managers/default.nix new file mode 100644 index 0000000..47a721a --- /dev/null +++ b/modules/user/desktop/window-managers/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./sway.nix + ]; +} diff --git a/modules/user/desktop/swayfx.nix b/modules/user/desktop/window-managers/sway.nix index 7d8d4c7..5b82ff2 100644 --- a/modules/user/desktop/swayfx.nix +++ b/modules/user/desktop/window-managers/sway.nix @@ -6,9 +6,9 @@ ... }: { - options.desktop.windowManager = lib.mkOption { type = with lib.types; nullOr (enum [ "swayfx" ]); }; - + options.desktop.windowManager = lib.mkOption { type = with lib.types; nullOr (enum [ "sway" ]); }; config = { + desktop.components.waybar.enable = lib.mkDefault (config.desktop.windowManager == "sway"); home.packages = with pkgs; [ grim rose-pine-cursor @@ -17,162 +17,17 @@ programs = { swaylock = { - enable = true; + enable = lib.mkDefault (config.desktop.windowManager == "sway"); settings = { color = "000000"; no-unlock-indicator = true; }; }; - waybar = { - enable = lib.mkDefault (config.desktop.windowManager == "swayfx"); - settings = { - main = { - modules-left = [ - "sway/workspaces" - "tray" - ]; - - modules-center = [ "clock" ]; - modules-right = [ - "backlight" - "battery" - "network" - "wireplumber" - "cpu" - "memory" - ]; - - backlight = { - format = "{icon}"; - format-icons = [ - "" - "" - ]; - - tooltip-format = "{percent}%"; - }; - - battery = { - format = "{icon}"; - format-critical = "{icon} ({capacity}%)"; - format-icons = [ - "" - "" - "" - "" - ]; - - format-time = "{H}h{m}m"; - format-warning = "{icon} ({capacity}%)"; - states = { - critical = 15; - warning = 25; - }; - - tooltip-format = "{time} remaining, {health}% battery health"; - tooltip-format-critical = "plug yo shit in NOW!!"; - }; - - cpu.format = "{avg_frequency} GHz"; - clock = { - format = "{:%A, %b %d %Y - %H:%M %Z}"; - # i am the time god. fear me. - timezones = [ - "America/Toronto" - "America/Vancouver" - "America/Edmonton" - "America/Regina" - "America/Toronto" # duplicated so it appears in the list too - "America/Halifax" - "America/St_Johns" - "America/Sao_Paulo" - "Etc/UTC" - "Australia/Perth" - ]; - - tooltip-format = "{tz_list}"; - }; - - memory = { - format = "{used}/{total} GiB"; - states = { - critical = 90; - warning = 70; - }; - - tooltip-format = "{percentage}% used"; - }; - - network = { - format-disabled = ""; - format-disconnected = ""; - format-ethernet = " {ipaddr}/{cidr}"; - format-icons = [ - "" - "" - "" - "" - ]; - - format-wifi = "{icon}"; - interval = 1; - tooltip-format = "{ifname} tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}"; - tooltip-format-wifi = '' - <b>Network:</b> {essid} - <b>{ifname}:</b> {ipaddr}/{cidr} - <b>tx:</b> {bandwidthUpBytes} - <b>rx:</b> {bandwidthDownBytes} - ''; - }; - - position = "bottom"; - "sway/workspaces" = { - all-outputs = true; - disable-scroll = true; - format = ""; - persistent-workspaces = { - "1" = [ - "DP-1" - "eDP-1" - ]; - - "2" = [ - "DP-2" - "eDP-1" - ]; - - "3" = [ ]; - "4" = [ ]; - "5" = [ ]; - "6" = [ ]; - "7" = [ ]; - "8" = [ ]; - "9" = [ ]; - }; - }; - - wireplumber = { - format = "{icon}"; - format-icons = [ - "" - "" - "" - ]; - - format-muted = ""; - on-click = "wpctl set-mute @DEFAULT_SINK@ toggle"; - tooltip-format = "{node_name} - {volume}%"; - }; - }; - }; - - style = builtins.readFile ./waybar.css; - }; }; wayland.windowManager.sway = - if (config.desktop.windowManager == "swayfx") then + if (config.desktop.windowManager == "sway") then { enable = lib.mkForce true; package = null; # use the nixos module @@ -190,49 +45,51 @@ }; }; - colors = # rose pine theme + colors = # catppuccin mocha let - gold = "#f6c177"; - hl3 = "#524f67"; - love = "#eb6f92"; - muted = "#6e6a86"; + accent = if (config.desktop.accent == "pink") then pink else blue; + base = "#1e1e2e"; + blue = "#89b4fa"; + flamingo = "#f2cdcd"; + indicator = if (config.desktop.accent == "pink") then flamingo else teal; nothing = "#00000000"; - overlay = "#26233a"; - rose = "#ebbcba"; - subtle = "#908caa"; - text = "#e0def4"; + pink = "#f5c2e7"; + red = "#f38ba8"; + surface1 = "#45475a"; + teal = "#94e2d5"; + text = "#cdd6f4"; in { focused = { - background = "${rose}"; - border = "${rose}"; - childBorder = "${rose}"; - indicator = "${gold}"; - text = "${hl3}"; + background = "${accent}"; + border = "${accent}"; + childBorder = "${accent}"; + indicator = "${indicator}"; + text = "${base}"; }; focusedInactive = { - background = "${muted}"; - border = "${nothing}"; + background = "${surface1}"; + border = "${surface1}"; childBorder = "${nothing}"; indicator = "${nothing}"; text = "${text}"; }; unfocused = { - background = "${overlay}"; - border = "${nothing}"; + background = "${base}"; + border = "${base}"; childBorder = "${nothing}"; indicator = "${nothing}"; - text = "${subtle}"; + text = "${text}"; }; urgent = { - background = "${love}"; - border = "${love}"; - childBorder = "${love}"; - indicator = "${love}"; - text = "${text}"; + background = "${red}"; + border = "${red}"; + childBorder = "${red}"; + indicator = "${red}"; + text = "${base}"; }; }; @@ -319,20 +176,20 @@ modifier = "Mod4"; output = { "eDP-1" = { - background = "~/Pictures/blossoms.jpg fill"; + background = "~/Pictures/wallpaper.jpg fill"; mode = "2256x1504@60Hz"; position = "0 0"; scale = "1.5"; }; "DP-1" = { - background = "~/Pictures/blossoms.jpg fill"; + background = "~/Pictures/wallpaper.jpg fill"; mode = "1920x1080@165Hz"; position = "0 0"; }; "DP-2" = { - background = "~/Pictures/blossoms.jpg fill"; + background = "~/Pictures/wallpaper.jpg fill"; mode = "1920x1080@75Hz"; position = "1920 0"; }; @@ -345,6 +202,7 @@ "DP-1" "eDP-1" ]; + workspace = "1"; } { @@ -354,15 +212,7 @@ ]; }; - # inactive windows cast no shadow to avoid rendering shadows on top of - # the active window extraConfig = '' - blur enable - blur_xray enable - corner_radius 10 - shadows enable - shadow_inactive_color #00000000 - exec waybar ''; } |
