aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-01-13 16:52:14 -0500
committerRosa <rosaontheweb@proton.me>2026-01-13 16:52:14 -0500
commit034e6a5e6738ea84e6e3c22bedf5f1fe523d144b (patch)
tree043cd8439c122c744f45de11d78e08ef049b4a41 /modules
parentd15c9aa80f81b773888dee5b2b21548c96528df8 (diff)
waybarrr
Diffstat (limited to 'modules')
-rw-r--r--modules/user/desktop/default.nix30
-rw-r--r--modules/user/desktop/swayfx.nix370
-rw-r--r--modules/user/desktop/waybar.css65
3 files changed, 328 insertions, 137 deletions
diff --git a/modules/user/desktop/default.nix b/modules/user/desktop/default.nix
index a480d86..a72069b 100644
--- a/modules/user/desktop/default.nix
+++ b/modules/user/desktop/default.nix
@@ -26,6 +26,7 @@
};
packages = with pkgs; [
+ brightnessctl
fira-code # monospace font
];
};
@@ -65,14 +66,41 @@
cursor.blink = true;
main = {
- font = "Fira Code:size=8";
dpi-aware = true;
+ font = "Fira Code:size=8";
};
mouse.hide-when-typing = true;
};
};
+ 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 = true;
+ font = "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 = {
diff --git a/modules/user/desktop/swayfx.nix b/modules/user/desktop/swayfx.nix
index 8763124..9619e9a 100644
--- a/modules/user/desktop/swayfx.nix
+++ b/modules/user/desktop/swayfx.nix
@@ -7,163 +7,261 @@
{
options.desktop.windowManager = lib.mkOption { type = with lib.types; nullOr (enum [ "swayfx" ]); };
- config.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;
+ config = {
+ programs.waybar = {
+ enable = lib.mkDefault (config.desktop.windowManager == "swayfx");
+ settings = {
+ main = {
+ modules-left = [ "sway/workspaces" "tray" ];
+ modules-center = [ "clock" ];
+ modules-right = [
+ "backlight"
+ "battery"
+ "cpu"
+ "memory"
+ "network"
+ "wireplumber"
+ ];
+
+ backlight.format = "{percent}% Brightness";
+ battery = {
+ format = "{capacity}% BAT";
+ format-critical = "!! {capacity}% BAT !!";
+ format-time = "{H}h{m}m";
+ states = {
+ critical = 15;
+ warning = 25;
};
- "lid:on" = {
- action = "output eDP-1 power off";
- locked = true;
+ 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 = "{percentage}% RAM";
+ states = {
+ critical = 90;
+ warning = 70;
};
+
+ tooltip-format = "{used}/{total} GiB";
};
- 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}";
- };
+ network = {
+ format-disabled = "Interface disabled";
+ format-disconnected = "No network";
+ format-ethernet = "{ifname} ({ipaddr}/{cidr})";
+ format-wifi = "{essid} ({signalStrength}%)";
+ interval = 15;
+ tooltip-format = "tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}";
+ tooltip-format-wifi = "{ifname} ({ipaddr}/{cidr}) tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}";
+ };
- focusedInactive = {
- background = "${muted}";
- border = "${nothing}";
- childBorder = "${nothing}";
- indicator = "${nothing}";
- text = "${text}";
- };
+ position = "bottom";
+ "sway/workspaces" = {
+ all-outputs = true;
+ disable-scroll = true;
+ format = "•";
+ };
+
+ wireplumber = {
+ format = "{volume}% VOL";
+ format-muted = "Muted";
+ on-click = "wpctl set-mute @DEFAULT_SINK@ toggle";
+ };
+ };
+ };
+
+ style = builtins.readFile ./waybar.css;
+ };
- unfocused = {
- background = "${overlay}";
- border = "${nothing}";
- childBorder = "${nothing}";
- indicator = "${nothing}";
- text = "${subtle}";
+ 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;
};
- urgent = {
- background = "${love}";
- border = "${love}";
- childBorder = "${love}";
- indicator = "${love}";
- text = "${text}";
+ "lid:on" = {
+ action = "output eDP-1 power off";
+ locked = true;
};
};
- floating.titlebar = false;
- focus.followMouse = false;
- fonts = {
- names = [ "Fira Code" ];
- size = 8.0;
- };
+ 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}";
+ };
- gaps = {
- inner = 4;
- outer = 8;
- };
+ 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}";
+ };
+ };
- input = {
- "*" = {
- accel_profile = "flat";
+ floating.titlebar = false;
+ focus.followMouse = false;
+ fonts = {
+ names = [ "Fira Code" ];
+ size = 8.0;
};
- "type:touchpad" = {
- drag = "enabled";
- dwt = "enabled";
- natural_scroll = "enabled";
- tap = "enabled";
+ gaps = {
+ inner = 4;
+ outer = 8;
};
- };
- 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";
+ input = {
+ "*" = {
+ accel_profile = "flat";
+ };
+
+ "type:touchpad" = {
+ drag = "enabled";
+ dwt = "enabled";
+ natural_scroll = "enabled";
+ tap = "enabled";
+ };
};
- modes = { };
- modifier = "Mod4";
- output = {
- "eDP-1" = {
- background = "~/Pictures/blossoms.jpg fill";
- mode = "2256x1504@60Hz";
- position = "0 0";
- scale = "1.5";
+ 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";
+ "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";
+ };
};
- };
- window.titlebar = false;
- };
+ window.titlebar = false;
+ };
- # 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
- '';
- }
- else
- { };
+ # 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
+ '';
+ }
+ else
+ { };
+ };
}
diff --git a/modules/user/desktop/waybar.css b/modules/user/desktop/waybar.css
new file mode 100644
index 0000000..8fa6fc8
--- /dev/null
+++ b/modules/user/desktop/waybar.css
@@ -0,0 +1,65 @@
+* {
+ border: none;
+ border-radius: 0;
+ font-family: Fira Code;
+ 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;
+ font-weight: bold;
+ padding: 0;
+}
+
+#workspaces button:hover {
+ color: #e0def4;
+}
+
+#workspaces button.visible {
+ color: #908caa;
+}
+
+#workspaces button.focused {
+ color: #ebbcba;
+}
+
+#workspaces button.urgent {
+ color: #eb6f92;
+}
+
+.module {
+ padding: 0 4px;
+}
+
+.modules-left, .modules-center, .modules-right {
+ background: rgba(25, 23, 36, 0.8);
+ border-top-left-radius: 10px;
+ border-top-right-radius: 10px;
+ padding: 4px;
+}
+
+.modules-left {
+ margin-left: 8px;
+ margin-right: 4px;
+}
+
+.modules-right {
+ margin-left: 4px;
+ margin-right: 8px;
+}