From d97f055798ed93a42c1825a423b91dc320a5b267 Mon Sep 17 00:00:00 2001 From: Rosa Date: Sun, 18 Jan 2026 12:47:55 -0500 Subject: re-theming begun --- hosts/limbo/default.nix | 4 +- modules/user/desktop/blossoms.jpg | Bin 524186 -> 0 bytes modules/user/desktop/components/default.nix | 6 + modules/user/desktop/components/waybar/default.nix | 154 +++++++++ .../user/desktop/components/waybar/style-blue.css | 96 ++++++ modules/user/desktop/default.nix | 102 +++--- modules/user/desktop/swayfx.nix | 372 --------------------- modules/user/desktop/wallpaper.jpg | Bin 0 -> 204580 bytes modules/user/desktop/waybar.css | 96 ------ modules/user/desktop/window-managers/default.nix | 5 + modules/user/desktop/window-managers/sway.nix | 222 ++++++++++++ 11 files changed, 531 insertions(+), 526 deletions(-) delete mode 100644 modules/user/desktop/blossoms.jpg create mode 100644 modules/user/desktop/components/default.nix create mode 100644 modules/user/desktop/components/waybar/default.nix create mode 100644 modules/user/desktop/components/waybar/style-blue.css delete mode 100644 modules/user/desktop/swayfx.nix create mode 100644 modules/user/desktop/wallpaper.jpg delete mode 100644 modules/user/desktop/waybar.css create mode 100644 modules/user/desktop/window-managers/default.nix create mode 100644 modules/user/desktop/window-managers/sway.nix 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 deleted file mode 100644 index a420e12..0000000 Binary files a/modules/user/desktop/blossoms.jpg and /dev/null differ 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 = '' + Network: {essid} + {ifname}: {ipaddr}/{cidr} + tx: {bandwidthUpBytes} + rx: {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/components/waybar/style-blue.css b/modules/user/desktop/components/waybar/style-blue.css new file mode 100644 index 0000000..b00c4b3 --- /dev/null +++ b/modules/user/desktop/components/waybar/style-blue.css @@ -0,0 +1,96 @@ +* { + border: none; + border-radius: 0; + font-family: 'FiraCode Nerd Font Mono'; + min-height: 0; +} + +window#waybar { + background: none; + color: #e0def4; +} + +tooltip { + background: rgba(38, 35, 58, 0.8); + border-radius: 10px; +} + +tooltip label { + color: #e0def4; +} + +#workspaces button { + background: none; + box-shadow: none; + color: #6e6a86; + padding: 0; +} + +#workspaces button.empty { + color: #403d52; +} + +#workspaces button.visible { + color: #908caa; +} + +#workspaces button.focused { + color: #ebbcba; +} + +#workspaces button.urgent { + color: #eb6f92; +} + +#workspaces button:hover { + color: #e0def4; + text-shadow: inherit; +} + +.module { + padding: 0 8px; + padding-top: 2px; +} + +.modules-left, .modules-center, .modules-right { + background: rgba(25, 23, 36, 0.8); + border-top-left-radius: 10px; + border-top-right-radius: 10px; +} + +.modules-left { + margin-left: 8px; + margin-right: 4px; +} + +.modules-right { + margin-left: 4px; + margin-right: 8px; +} + +@keyframes blink { + to { + color: #e0def4; + } +} + +#battery.charging { + color: #9ccfd8; +} + +#battery.critical:not(.charging) { + animation-direction: alternate; + animation-duration: 0.5s; + animation-iteration-count: infinite; + animation-name: blink; + animation-timing-function: steps(2); + color: #eb6f92; +} + +#cpu { + box-shadow: inset 0 -2px #ebbcba; +} + +#memory { + box-shadow: inset 0 -2px #f6c177; +} 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/swayfx.nix b/modules/user/desktop/swayfx.nix deleted file mode 100644 index 7d8d4c7..0000000 --- a/modules/user/desktop/swayfx.nix +++ /dev/null @@ -1,372 +0,0 @@ -{ - config, - lib, - options, - pkgs, - ... -}: -{ - options.desktop.windowManager = lib.mkOption { type = with lib.types; nullOr (enum [ "swayfx" ]); }; - - config = { - home.packages = with pkgs; [ - grim - rose-pine-cursor - slurp - ]; - - programs = { - swaylock = { - enable = true; - 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 = '' - Network: {essid} - {ifname}: {ipaddr}/{cidr} - tx: {bandwidthUpBytes} - rx: {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 - { - enable = lib.mkForce true; - package = null; # use the nixos module - config = { - bars = [ ]; - bindswitches = { - "lid:off" = { - action = "output eDP-1 power on"; - locked = true; - }; - - "lid:on" = { - action = "output eDP-1 power off"; - locked = true; - }; - }; - - colors = # rose pine theme - let - gold = "#f6c177"; - hl3 = "#524f67"; - love = "#eb6f92"; - muted = "#6e6a86"; - nothing = "#00000000"; - overlay = "#26233a"; - rose = "#ebbcba"; - subtle = "#908caa"; - text = "#e0def4"; - in - { - focused = { - background = "${rose}"; - border = "${rose}"; - childBorder = "${rose}"; - indicator = "${gold}"; - text = "${hl3}"; - }; - - focusedInactive = { - background = "${muted}"; - border = "${nothing}"; - childBorder = "${nothing}"; - indicator = "${nothing}"; - text = "${text}"; - }; - - unfocused = { - background = "${overlay}"; - border = "${nothing}"; - childBorder = "${nothing}"; - indicator = "${nothing}"; - text = "${subtle}"; - }; - - urgent = { - background = "${love}"; - border = "${love}"; - childBorder = "${love}"; - indicator = "${love}"; - text = "${text}"; - }; - }; - - floating.titlebar = false; - focus.followMouse = false; - fonts = { - names = [ "Fira Code" ]; - size = 8.0; - }; - - gaps = { - inner = 4; - outer = 8; - }; - - input = { - "*" = { - accel_profile = "flat"; - }; - - "type:touchpad" = { - drag = "enabled"; - dwt = "enabled"; - natural_scroll = "enabled"; - tap = "enabled"; - }; - }; - - keybindings = - let - mod = config.wayland.windowManager.sway.config.modifier; - in - { - "${mod}+Return" = "exec foot"; - "${mod}+Q" = "kill"; - "${mod}+Alt+Q" = "exit"; - "${mod}+V" = "splitt"; - "${mod}+H" = "focus left"; - "${mod}+J" = "focus down"; - "${mod}+K" = "focus up"; - "${mod}+L" = "focus right"; - "${mod}+Shift+H" = "move left"; - "${mod}+Shift+J" = "move down"; - "${mod}+Shift+K" = "move up"; - "${mod}+Shift+L" = "move right"; - "${mod}+Minus" = "resize shrink width 5"; - "${mod}+Shift+Equal" = "resize grow height 5"; - "${mod}+Shift+Minus" = "resize shrink height 5"; - "${mod}+Equal" = "resize grow width 5"; - "${mod}+1" = "workspace 1"; - "${mod}+2" = "workspace 2"; - "${mod}+3" = "workspace 3"; - "${mod}+4" = "workspace 4"; - "${mod}+5" = "workspace 5"; - "${mod}+6" = "workspace 6"; - "${mod}+7" = "workspace 7"; - "${mod}+8" = "workspace 8"; - "${mod}+9" = "workspace 9"; - "${mod}+Shift+1" = "move workspace 1"; - "${mod}+Shift+2" = "move workspace 2"; - "${mod}+Shift+3" = "move workspace 3"; - "${mod}+Shift+4" = "move workspace 4"; - "${mod}+Shift+5" = "move workspace 5"; - "${mod}+Shift+6" = "move workspace 6"; - "${mod}+Shift+7" = "move workspace 7"; - "${mod}+Shift+8" = "move workspace 8"; - "${mod}+Shift+9" = "move workspace 9"; - "${mod}+F" = "floating toggle"; - "${mod}+G" = "layout toggle split tabbed"; - "${mod}+R" = "exec fuzzel"; - "${mod}+Shift+S" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot.png"; - "${mod}+Alt+L" = "exec swaylock"; - "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1"; - "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%- -l 1"; - "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_SINK@ toggle"; - "XF86MonBrightnessUp" = "exec brightnessctl --class=backlight s +10%"; - "XF86MonBrightnessDown" = "exec brightnessctl --class=backlight s 10%-"; - "Shift+XF86MonBrightnessUp" = "exec brightnessctl --device=chromeos::kbd_backlight s +10%"; - "Shift+XF86MonBrightnessDown" = "exec brightnessctl --device=chromeos::kbd_backlight s 10%-"; - "XF86RFKill" = "exec rfkill toggle 1"; - }; - - modes = { }; - modifier = "Mod4"; - output = { - "eDP-1" = { - background = "~/Pictures/blossoms.jpg fill"; - mode = "2256x1504@60Hz"; - position = "0 0"; - scale = "1.5"; - }; - - "DP-1" = { - background = "~/Pictures/blossoms.jpg fill"; - mode = "1920x1080@165Hz"; - position = "0 0"; - }; - - "DP-2" = { - background = "~/Pictures/blossoms.jpg fill"; - mode = "1920x1080@75Hz"; - position = "1920 0"; - }; - }; - - window.titlebar = false; - workspaceOutputAssign = [ - { - output = [ - "DP-1" - "eDP-1" - ]; - workspace = "1"; - } - { - output = "DP-2"; - workspace = "2"; - } - ]; - }; - - # 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 - ''; - } - else - { }; - }; -} diff --git a/modules/user/desktop/wallpaper.jpg b/modules/user/desktop/wallpaper.jpg new file mode 100644 index 0000000..e75494a Binary files /dev/null and b/modules/user/desktop/wallpaper.jpg differ diff --git a/modules/user/desktop/waybar.css b/modules/user/desktop/waybar.css deleted file mode 100644 index b00c4b3..0000000 --- a/modules/user/desktop/waybar.css +++ /dev/null @@ -1,96 +0,0 @@ -* { - border: none; - border-radius: 0; - font-family: 'FiraCode Nerd Font Mono'; - min-height: 0; -} - -window#waybar { - background: none; - color: #e0def4; -} - -tooltip { - background: rgba(38, 35, 58, 0.8); - border-radius: 10px; -} - -tooltip label { - color: #e0def4; -} - -#workspaces button { - background: none; - box-shadow: none; - color: #6e6a86; - padding: 0; -} - -#workspaces button.empty { - color: #403d52; -} - -#workspaces button.visible { - color: #908caa; -} - -#workspaces button.focused { - color: #ebbcba; -} - -#workspaces button.urgent { - color: #eb6f92; -} - -#workspaces button:hover { - color: #e0def4; - text-shadow: inherit; -} - -.module { - padding: 0 8px; - padding-top: 2px; -} - -.modules-left, .modules-center, .modules-right { - background: rgba(25, 23, 36, 0.8); - border-top-left-radius: 10px; - border-top-right-radius: 10px; -} - -.modules-left { - margin-left: 8px; - margin-right: 4px; -} - -.modules-right { - margin-left: 4px; - margin-right: 8px; -} - -@keyframes blink { - to { - color: #e0def4; - } -} - -#battery.charging { - color: #9ccfd8; -} - -#battery.critical:not(.charging) { - animation-direction: alternate; - animation-duration: 0.5s; - animation-iteration-count: infinite; - animation-name: blink; - animation-timing-function: steps(2); - color: #eb6f92; -} - -#cpu { - box-shadow: inset 0 -2px #ebbcba; -} - -#memory { - box-shadow: inset 0 -2px #f6c177; -} 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/window-managers/sway.nix b/modules/user/desktop/window-managers/sway.nix new file mode 100644 index 0000000..5b82ff2 --- /dev/null +++ b/modules/user/desktop/window-managers/sway.nix @@ -0,0 +1,222 @@ +{ + config, + lib, + options, + pkgs, + ... +}: +{ + 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 + slurp + ]; + + programs = { + swaylock = { + enable = lib.mkDefault (config.desktop.windowManager == "sway"); + settings = { + color = "000000"; + no-unlock-indicator = true; + }; + }; + + }; + + wayland.windowManager.sway = + if (config.desktop.windowManager == "sway") then + { + enable = lib.mkForce true; + package = null; # use the nixos module + config = { + bars = [ ]; + bindswitches = { + "lid:off" = { + action = "output eDP-1 power on"; + locked = true; + }; + + "lid:on" = { + action = "output eDP-1 power off"; + locked = true; + }; + }; + + colors = # catppuccin mocha + let + 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"; + pink = "#f5c2e7"; + red = "#f38ba8"; + surface1 = "#45475a"; + teal = "#94e2d5"; + text = "#cdd6f4"; + in + { + focused = { + background = "${accent}"; + border = "${accent}"; + childBorder = "${accent}"; + indicator = "${indicator}"; + text = "${base}"; + }; + + focusedInactive = { + background = "${surface1}"; + border = "${surface1}"; + childBorder = "${nothing}"; + indicator = "${nothing}"; + text = "${text}"; + }; + + unfocused = { + background = "${base}"; + border = "${base}"; + childBorder = "${nothing}"; + indicator = "${nothing}"; + text = "${text}"; + }; + + urgent = { + background = "${red}"; + border = "${red}"; + childBorder = "${red}"; + indicator = "${red}"; + text = "${base}"; + }; + }; + + floating.titlebar = false; + focus.followMouse = false; + fonts = { + names = [ "Fira Code" ]; + size = 8.0; + }; + + gaps = { + inner = 4; + outer = 8; + }; + + input = { + "*" = { + accel_profile = "flat"; + }; + + "type:touchpad" = { + drag = "enabled"; + dwt = "enabled"; + natural_scroll = "enabled"; + tap = "enabled"; + }; + }; + + keybindings = + let + mod = config.wayland.windowManager.sway.config.modifier; + in + { + "${mod}+Return" = "exec foot"; + "${mod}+Q" = "kill"; + "${mod}+Alt+Q" = "exit"; + "${mod}+V" = "splitt"; + "${mod}+H" = "focus left"; + "${mod}+J" = "focus down"; + "${mod}+K" = "focus up"; + "${mod}+L" = "focus right"; + "${mod}+Shift+H" = "move left"; + "${mod}+Shift+J" = "move down"; + "${mod}+Shift+K" = "move up"; + "${mod}+Shift+L" = "move right"; + "${mod}+Minus" = "resize shrink width 5"; + "${mod}+Shift+Equal" = "resize grow height 5"; + "${mod}+Shift+Minus" = "resize shrink height 5"; + "${mod}+Equal" = "resize grow width 5"; + "${mod}+1" = "workspace 1"; + "${mod}+2" = "workspace 2"; + "${mod}+3" = "workspace 3"; + "${mod}+4" = "workspace 4"; + "${mod}+5" = "workspace 5"; + "${mod}+6" = "workspace 6"; + "${mod}+7" = "workspace 7"; + "${mod}+8" = "workspace 8"; + "${mod}+9" = "workspace 9"; + "${mod}+Shift+1" = "move workspace 1"; + "${mod}+Shift+2" = "move workspace 2"; + "${mod}+Shift+3" = "move workspace 3"; + "${mod}+Shift+4" = "move workspace 4"; + "${mod}+Shift+5" = "move workspace 5"; + "${mod}+Shift+6" = "move workspace 6"; + "${mod}+Shift+7" = "move workspace 7"; + "${mod}+Shift+8" = "move workspace 8"; + "${mod}+Shift+9" = "move workspace 9"; + "${mod}+F" = "floating toggle"; + "${mod}+G" = "layout toggle split tabbed"; + "${mod}+R" = "exec fuzzel"; + "${mod}+Shift+S" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot.png"; + "${mod}+Alt+L" = "exec swaylock"; + "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1"; + "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%- -l 1"; + "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_SINK@ toggle"; + "XF86MonBrightnessUp" = "exec brightnessctl --class=backlight s +10%"; + "XF86MonBrightnessDown" = "exec brightnessctl --class=backlight s 10%-"; + "Shift+XF86MonBrightnessUp" = "exec brightnessctl --device=chromeos::kbd_backlight s +10%"; + "Shift+XF86MonBrightnessDown" = "exec brightnessctl --device=chromeos::kbd_backlight s 10%-"; + "XF86RFKill" = "exec rfkill toggle 1"; + }; + + modes = { }; + modifier = "Mod4"; + output = { + "eDP-1" = { + background = "~/Pictures/wallpaper.jpg fill"; + mode = "2256x1504@60Hz"; + position = "0 0"; + scale = "1.5"; + }; + + "DP-1" = { + background = "~/Pictures/wallpaper.jpg fill"; + mode = "1920x1080@165Hz"; + position = "0 0"; + }; + + "DP-2" = { + background = "~/Pictures/wallpaper.jpg fill"; + mode = "1920x1080@75Hz"; + position = "1920 0"; + }; + }; + + window.titlebar = false; + workspaceOutputAssign = [ + { + output = [ + "DP-1" + "eDP-1" + ]; + + workspace = "1"; + } + { + output = "DP-2"; + workspace = "2"; + } + ]; + }; + + extraConfig = '' + exec waybar + ''; + } + else + { }; + }; +} -- cgit v1.3.1