From 86aaaabfd153a1710b6773f17925d2e5191bf522 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Wed, 25 Sep 2024 23:51:51 +0530 Subject: Changed polybar bspwm workspace tab config. --- .../desktop/display-server/x11/xinit/default.nix | 4 +- modules/desktop/popup-manager/rofi/default.nix | 2 +- .../desktop/popup-manager/rofi/theme.mustache.rasi | 82 ++++++++++++++++++++++ .../desktop/popup-manager/rofi/theme.rasi.mustache | 82 ---------------------- modules/desktop/status-bar/polybar/bar/main.nix | 38 ++++++++++ modules/desktop/status-bar/polybar/bars/main.nix | 28 -------- modules/desktop/status-bar/polybar/default.nix | 30 +++++--- .../desktop/status-bar/polybar/module/battery.nix | 36 ++++++++++ .../desktop/status-bar/polybar/module/bspwm.nix | 21 ++++++ modules/desktop/status-bar/polybar/module/cpu.nix | 9 +++ modules/desktop/status-bar/polybar/module/date.nix | 10 +++ .../status-bar/polybar/module/kernel-version.nix | 10 +++ .../desktop/status-bar/polybar/module/memory.nix | 9 +++ modules/desktop/status-bar/polybar/module/time.nix | 10 +++ .../desktop/status-bar/polybar/module/xwindow.nix | 7 ++ .../desktop/status-bar/polybar/modules/battery.nix | 36 ---------- .../desktop/status-bar/polybar/modules/bspwm.nix | 22 ------ modules/desktop/status-bar/polybar/modules/cpu.nix | 9 --- .../desktop/status-bar/polybar/modules/date.nix | 10 --- .../status-bar/polybar/modules/kernel-version.nix | 10 --- .../desktop/status-bar/polybar/modules/memory.nix | 9 --- .../desktop/status-bar/polybar/modules/time.nix | 10 --- .../desktop/status-bar/polybar/modules/xwindow.nix | 7 -- modules/desktop/window-manager/bspwm/default.nix | 5 +- modules/desktop/window-manager/default.nix | 6 ++ .../window-manager/sxhkd/scripts/keybindings.sh | 1 + 26 files changed, 267 insertions(+), 236 deletions(-) create mode 100644 modules/desktop/popup-manager/rofi/theme.mustache.rasi delete mode 100644 modules/desktop/popup-manager/rofi/theme.rasi.mustache create mode 100644 modules/desktop/status-bar/polybar/bar/main.nix delete mode 100644 modules/desktop/status-bar/polybar/bars/main.nix create mode 100644 modules/desktop/status-bar/polybar/module/battery.nix create mode 100644 modules/desktop/status-bar/polybar/module/bspwm.nix create mode 100644 modules/desktop/status-bar/polybar/module/cpu.nix create mode 100644 modules/desktop/status-bar/polybar/module/date.nix create mode 100644 modules/desktop/status-bar/polybar/module/kernel-version.nix create mode 100644 modules/desktop/status-bar/polybar/module/memory.nix create mode 100644 modules/desktop/status-bar/polybar/module/time.nix create mode 100644 modules/desktop/status-bar/polybar/module/xwindow.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/battery.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/bspwm.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/cpu.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/date.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/kernel-version.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/memory.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/time.nix delete mode 100644 modules/desktop/status-bar/polybar/modules/xwindow.nix (limited to 'modules/desktop') diff --git a/modules/desktop/display-server/x11/xinit/default.nix b/modules/desktop/display-server/x11/xinit/default.nix index e3f10f1..0dda25a 100644 --- a/modules/desktop/display-server/x11/xinit/default.nix +++ b/modules/desktop/display-server/x11/xinit/default.nix @@ -11,7 +11,9 @@ source = pkgs.writeText ".xinitrc" '' #!/bin/sh -${if config.desktop.status-bar.polybar.enable then "polybar main &" else ""} +${if config.desktop.status-bar.polybar.enable then + config.desktop.status-bar.polybar.command +else ""} ${if config.desktop.window-manager.sxhkd.enable then "sxhkd &" else ""} exec ${config.desktop.window-manager.default} ''; diff --git a/modules/desktop/popup-manager/rofi/default.nix b/modules/desktop/popup-manager/rofi/default.nix index 009db89..be22bcd 100644 --- a/modules/desktop/popup-manager/rofi/default.nix +++ b/modules/desktop/popup-manager/rofi/default.nix @@ -10,7 +10,7 @@ programs.rofi.enable = true; programs.rofi.font = "FiraCode Nerd Font 16"; programs.rofi.theme = config.scheme { - template = builtins.readFile ./theme.rasi.mustache; + template = builtins.readFile ./theme.mustache.rasi; }; }; } diff --git a/modules/desktop/popup-manager/rofi/theme.mustache.rasi b/modules/desktop/popup-manager/rofi/theme.mustache.rasi new file mode 100644 index 0000000..02cdaf3 --- /dev/null +++ b/modules/desktop/popup-manager/rofi/theme.mustache.rasi @@ -0,0 +1,82 @@ +configuration { + drun { + display-name: " "; + } + + run { + display-name: " "; + } + + window { + display-name: " "; + } + + ssh { + display-name: " "; + } + + timeout { + delay: 10; + action: "kb-cancel"; + } +} + +* { + border: 1; + margin: 0; + padding: 0; + spacing: 0; + + bg: #{{base00-hex}}; + bg-alt: #{{base01-hex}}; + fg: #{{base07-hex}}; + fg-alt: #{{base03-hex}}; + + background-color: @bg; + text-color: @fg; +} + +window { + transparency: "real"; + border-color: #{{base03-hex}}; +} + +mainbox { + children: [inputbar, listview]; +} + +inputbar { + background-color: @bg-alt; + children: [prompt, entry]; +} + +entry { + background-color: inherit; + padding: 12px 3px; +} + +prompt { + background-color: inherit; + padding: 12px; +} + +listview { + lines: 8; +} + +element { + children: [element-text]; +} + +element-icon { + padding: 10px 10px; +} + +element-text { + padding: 10px 10px; + text-color: @fg-alt; +} + +element-text selected { + text-color: @fg; +} diff --git a/modules/desktop/popup-manager/rofi/theme.rasi.mustache b/modules/desktop/popup-manager/rofi/theme.rasi.mustache deleted file mode 100644 index 02cdaf3..0000000 --- a/modules/desktop/popup-manager/rofi/theme.rasi.mustache +++ /dev/null @@ -1,82 +0,0 @@ -configuration { - drun { - display-name: " "; - } - - run { - display-name: " "; - } - - window { - display-name: " "; - } - - ssh { - display-name: " "; - } - - timeout { - delay: 10; - action: "kb-cancel"; - } -} - -* { - border: 1; - margin: 0; - padding: 0; - spacing: 0; - - bg: #{{base00-hex}}; - bg-alt: #{{base01-hex}}; - fg: #{{base07-hex}}; - fg-alt: #{{base03-hex}}; - - background-color: @bg; - text-color: @fg; -} - -window { - transparency: "real"; - border-color: #{{base03-hex}}; -} - -mainbox { - children: [inputbar, listview]; -} - -inputbar { - background-color: @bg-alt; - children: [prompt, entry]; -} - -entry { - background-color: inherit; - padding: 12px 3px; -} - -prompt { - background-color: inherit; - padding: 12px; -} - -listview { - lines: 8; -} - -element { - children: [element-text]; -} - -element-icon { - padding: 10px 10px; -} - -element-text { - padding: 10px 10px; - text-color: @fg-alt; -} - -element-text selected { - text-color: @fg; -} diff --git a/modules/desktop/status-bar/polybar/bar/main.nix b/modules/desktop/status-bar/polybar/bar/main.nix new file mode 100644 index 0000000..34858d8 --- /dev/null +++ b/modules/desktop/status-bar/polybar/bar/main.nix @@ -0,0 +1,38 @@ +{ config }: + +with config.scheme.withHashtag; +{ + width = "\${env:POLYBAR_WIDTH}"; + fixed-center = false; + height = 35; + + border-top-size = 1; + border-bottom-size = 1; + border-left-size = 1; + border-right-size = 1; + border-color = base02; + + background = base00; + foreground = base05; + + line-size = 3; + line-color = base08; + + padding-left = 1; + padding-right = 1; + + module-margin-left = 2; + module-margin-right = 2; + + offset-x = "\${env:POLYBAR_OFFSET}"; + offset-y = "\${env:POLYBAR_OFFSET}"; + + font-0 = "FiraCode Nerd Font:pixelsize=16;3"; + + modules-left = + if config.desktop.window-manager.bspwm.enable then + "bspwm" + else null; + modules-center = "xwindow"; + modules-right = "memory cpu battery time date kernel-version"; +} diff --git a/modules/desktop/status-bar/polybar/bars/main.nix b/modules/desktop/status-bar/polybar/bars/main.nix deleted file mode 100644 index a36f97a..0000000 --- a/modules/desktop/status-bar/polybar/bars/main.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - width = "100%"; - height = 30; - radius = 3; - fixed-center = false; - - background = "${base00}"; - foreground = "${base05}"; - - line-size = 3; - line-color = "${base08}"; - - border-size = 4; - padding-left = 2; - padding-right = 2; - - module-margin-left = 2; - module-margin-right = 2; - - font-0 = "FiraCode Nerd Font:pixelsize=16;3"; - - modules-left = "bspwm"; - modules-center = "xwindow"; - modules-right = "memory cpu battery time date kernel-version"; -} diff --git a/modules/desktop/status-bar/polybar/default.nix b/modules/desktop/status-bar/polybar/default.nix index 4f7ace3..b8e1907 100644 --- a/modules/desktop/status-bar/polybar/default.nix +++ b/modules/desktop/status-bar/polybar/default.nix @@ -3,25 +3,35 @@ { options.desktop.status-bar.polybar = { enable = lib.mkEnableOption "Enables polybar."; + command = lib.mkOption { + type = lib.types.str; + description = "Command to run polybar."; + # This command calculates the width of the polybar to create those gaps + default = '' +MONITOR_WIDTH=$(xrandr | grep '*' | awk '{print $1}' | cut -d'x' -f1 | head -n1); \ +OFFSET=${toString config.desktop.window-manager.gap}; \ +POLYBAR_WIDTH=$((MONITOR_WIDTH - 2 * OFFSET)) POLYBAR_OFFSET=$OFFSET polybar main & +''; + }; }; config = lib.mkIf config.desktop.status-bar.polybar.enable { services.polybar.enable = true; - services.polybar.script = "polybar main &"; + services.polybar.script = config.desktop.status-bar.polybar.command; services.polybar.config = { - "bar/main" = import ./bars/main.nix { inherit config; }; - "module/xwindow" = import ./modules/xwindow.nix { inherit config; }; + "bar/main" = import ./bar/main.nix { inherit config; }; + "module/xwindow" = import ./module/xwindow.nix { inherit config; }; "module/bspwm" = if config.desktop.window-manager.bspwm.enable then - import ./modules/bspwm.nix { inherit config; } + import ./module/bspwm.nix { inherit config; } else null; - "module/cpu" = import ./modules/cpu.nix { inherit config; }; - "module/memory" = import ./modules/memory.nix { inherit config; }; - "module/date" = import ./modules/date.nix { inherit config; }; - "module/time" = import ./modules/time.nix { inherit config; }; - "module/battery" = import ./modules/battery.nix { inherit config; }; - "module/kernel-version" = import ./modules/kernel-version.nix { inherit config; }; + "module/cpu" = import ./module/cpu.nix { inherit config; }; + "module/memory" = import ./module/memory.nix { inherit config; }; + "module/date" = import ./module/date.nix { inherit config; }; + "module/time" = import ./module/time.nix { inherit config; }; + "module/battery" = import ./module/battery.nix { inherit config; }; + "module/kernel-version" = import ./module/kernel-version.nix { inherit config; }; }; }; } diff --git a/modules/desktop/status-bar/polybar/module/battery.nix b/modules/desktop/status-bar/polybar/module/battery.nix new file mode 100644 index 0000000..6d4aef9 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/battery.nix @@ -0,0 +1,36 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/battery"; + battery = "BAT0"; + adapter = "ADP1"; + + format-charging = " "; + format-discharging = " "; + format-full-prefix = "%{F${base0B}}󰁹%{F-}"; + + ramp-capacity-0 = "%{F${base0C}}󰁺%{F-}"; + ramp-capacity-1 = "%{F${base0C}}󰁻%{F-}"; + ramp-capacity-2 = "%{F${base0C}}󰁼%{F-}"; + ramp-capacity-3 = "%{F${base0C}}󰁽%{F-}"; + ramp-capacity-4 = "%{F${base0C}}󰁾%{F-}"; + ramp-capacity-5 = "%{F${base0C}}󰁿%{F-}"; + ramp-capacity-6 = "%{F${base0C}}󰂀%{F-}"; + ramp-capacity-7 = "%{F${base0C}}󰂁%{F-}"; + ramp-capacity-8 = "%{F${base0C}}󰂂%{F-}"; + ramp-capacity-9 = "%{F${base0C}}󰁹%{F-}"; + + animation-charging-0 = "%{F${base0C}}󰁺%{F-}"; + animation-charging-1 = "%{F${base0C}}󰁻%{F-}"; + animation-charging-2 = "%{F${base0C}}󰁼%{F-}"; + animation-charging-3 = "%{F${base0C}}󰁽%{F-}"; + animation-charging-4 = "%{F${base0C}}󰁾%{F-}"; + animation-charging-5 = "%{F${base0C}}󰁿%{F-}"; + animation-charging-6 = "%{F${base0C}}󰂀%{F-}"; + animation-charging-7 = "%{F${base0C}}󰂁%{F-}"; + animation-charging-8 = "%{F${base0C}}󰂂%{F-}"; + animation-charging-9 = "%{F${base0C}}󰁹%{F-}"; + + animation-charging-framerate = 750; +} diff --git a/modules/desktop/status-bar/polybar/module/bspwm.nix b/modules/desktop/status-bar/polybar/module/bspwm.nix new file mode 100644 index 0000000..c6671e7 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/bspwm.nix @@ -0,0 +1,21 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/bspwm"; + + label-focused = "%index%"; + label-focused-underline = "${base0D}"; + label-focused-padding = 2; + + label-occupied = "%index%"; + label-occupied-padding = 2; + + label-urgent = "%index%!"; + label-urgent-underline = "${base08}"; + label-urgent-padding = 2; + + label-empty = "%index%"; + label-empty-foreground = "${base03}"; + label-empty-padding = 2; +} diff --git a/modules/desktop/status-bar/polybar/module/cpu.nix b/modules/desktop/status-bar/polybar/module/cpu.nix new file mode 100644 index 0000000..403add3 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/cpu.nix @@ -0,0 +1,9 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/cpu"; + interval = 2; + format-prefix = "%{F${base09}} %{F-}"; + label = "%percentage%%"; +} diff --git a/modules/desktop/status-bar/polybar/module/date.nix b/modules/desktop/status-bar/polybar/module/date.nix new file mode 100644 index 0000000..9ebfd77 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/date.nix @@ -0,0 +1,10 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/date"; + interval = 60; + date = "%d/%m/%Y"; + label = "%date%"; + format-prefix = "%{F${base0B}} %{F-}"; +} diff --git a/modules/desktop/status-bar/polybar/module/kernel-version.nix b/modules/desktop/status-bar/polybar/module/kernel-version.nix new file mode 100644 index 0000000..e6822fa --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/kernel-version.nix @@ -0,0 +1,10 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "custom/script"; + exec = "uname -r"; + interval = 1024; + format-prefix = "%{F${base03}} %{F-}"; + label = "%output%"; +} diff --git a/modules/desktop/status-bar/polybar/module/memory.nix b/modules/desktop/status-bar/polybar/module/memory.nix new file mode 100644 index 0000000..a09d4a8 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/memory.nix @@ -0,0 +1,9 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/memory"; + interval = 2; + format-prefix = "%{F${base0A}} %{F-}"; + label = "%percentage_used%%"; +} diff --git a/modules/desktop/status-bar/polybar/module/time.nix b/modules/desktop/status-bar/polybar/module/time.nix new file mode 100644 index 0000000..f3e0054 --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/time.nix @@ -0,0 +1,10 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/date"; + interval = 30; + time = "%H:%M"; + label = "%time%"; + format-prefix = "%{F${base0C}} %{F-}"; +} diff --git a/modules/desktop/status-bar/polybar/module/xwindow.nix b/modules/desktop/status-bar/polybar/module/xwindow.nix new file mode 100644 index 0000000..833899e --- /dev/null +++ b/modules/desktop/status-bar/polybar/module/xwindow.nix @@ -0,0 +1,7 @@ +{ config }: + +with config.scheme.withHashtag; +{ + type = "internal/xwindow"; + label = "%title:0:30:...%"; +} diff --git a/modules/desktop/status-bar/polybar/modules/battery.nix b/modules/desktop/status-bar/polybar/modules/battery.nix deleted file mode 100644 index 6d4aef9..0000000 --- a/modules/desktop/status-bar/polybar/modules/battery.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/battery"; - battery = "BAT0"; - adapter = "ADP1"; - - format-charging = " "; - format-discharging = " "; - format-full-prefix = "%{F${base0B}}󰁹%{F-}"; - - ramp-capacity-0 = "%{F${base0C}}󰁺%{F-}"; - ramp-capacity-1 = "%{F${base0C}}󰁻%{F-}"; - ramp-capacity-2 = "%{F${base0C}}󰁼%{F-}"; - ramp-capacity-3 = "%{F${base0C}}󰁽%{F-}"; - ramp-capacity-4 = "%{F${base0C}}󰁾%{F-}"; - ramp-capacity-5 = "%{F${base0C}}󰁿%{F-}"; - ramp-capacity-6 = "%{F${base0C}}󰂀%{F-}"; - ramp-capacity-7 = "%{F${base0C}}󰂁%{F-}"; - ramp-capacity-8 = "%{F${base0C}}󰂂%{F-}"; - ramp-capacity-9 = "%{F${base0C}}󰁹%{F-}"; - - animation-charging-0 = "%{F${base0C}}󰁺%{F-}"; - animation-charging-1 = "%{F${base0C}}󰁻%{F-}"; - animation-charging-2 = "%{F${base0C}}󰁼%{F-}"; - animation-charging-3 = "%{F${base0C}}󰁽%{F-}"; - animation-charging-4 = "%{F${base0C}}󰁾%{F-}"; - animation-charging-5 = "%{F${base0C}}󰁿%{F-}"; - animation-charging-6 = "%{F${base0C}}󰂀%{F-}"; - animation-charging-7 = "%{F${base0C}}󰂁%{F-}"; - animation-charging-8 = "%{F${base0C}}󰂂%{F-}"; - animation-charging-9 = "%{F${base0C}}󰁹%{F-}"; - - animation-charging-framerate = 750; -} diff --git a/modules/desktop/status-bar/polybar/modules/bspwm.nix b/modules/desktop/status-bar/polybar/modules/bspwm.nix deleted file mode 100644 index 0eaac30..0000000 --- a/modules/desktop/status-bar/polybar/modules/bspwm.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/bspwm"; - - label-focused = "%index%"; - label-focused-background = "${base01}"; - label-focused-underline = "${base0D}"; - label-focused-padding = 2; - - label-occupied = "%index%"; - label-occupied-padding = 2; - - label-urgent = "%index%!"; - label-urgent-background = "${base08}"; - label-urgent-padding = 2; - - label-empty = "%index%"; - label-empty-foreground = "${base03}"; - label-empty-padding = 2; -} diff --git a/modules/desktop/status-bar/polybar/modules/cpu.nix b/modules/desktop/status-bar/polybar/modules/cpu.nix deleted file mode 100644 index 403add3..0000000 --- a/modules/desktop/status-bar/polybar/modules/cpu.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/cpu"; - interval = 2; - format-prefix = "%{F${base09}} %{F-}"; - label = "%percentage%%"; -} diff --git a/modules/desktop/status-bar/polybar/modules/date.nix b/modules/desktop/status-bar/polybar/modules/date.nix deleted file mode 100644 index 9ebfd77..0000000 --- a/modules/desktop/status-bar/polybar/modules/date.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 60; - date = "%d/%m/%Y"; - label = "%date%"; - format-prefix = "%{F${base0B}} %{F-}"; -} diff --git a/modules/desktop/status-bar/polybar/modules/kernel-version.nix b/modules/desktop/status-bar/polybar/modules/kernel-version.nix deleted file mode 100644 index e6822fa..0000000 --- a/modules/desktop/status-bar/polybar/modules/kernel-version.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "custom/script"; - exec = "uname -r"; - interval = 1024; - format-prefix = "%{F${base03}} %{F-}"; - label = "%output%"; -} diff --git a/modules/desktop/status-bar/polybar/modules/memory.nix b/modules/desktop/status-bar/polybar/modules/memory.nix deleted file mode 100644 index a09d4a8..0000000 --- a/modules/desktop/status-bar/polybar/modules/memory.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/memory"; - interval = 2; - format-prefix = "%{F${base0A}} %{F-}"; - label = "%percentage_used%%"; -} diff --git a/modules/desktop/status-bar/polybar/modules/time.nix b/modules/desktop/status-bar/polybar/modules/time.nix deleted file mode 100644 index f3e0054..0000000 --- a/modules/desktop/status-bar/polybar/modules/time.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 30; - time = "%H:%M"; - label = "%time%"; - format-prefix = "%{F${base0C}} %{F-}"; -} diff --git a/modules/desktop/status-bar/polybar/modules/xwindow.nix b/modules/desktop/status-bar/polybar/modules/xwindow.nix deleted file mode 100644 index 833899e..0000000 --- a/modules/desktop/status-bar/polybar/modules/xwindow.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config }: - -with config.scheme.withHashtag; -{ - type = "internal/xwindow"; - label = "%title:0:30:...%"; -} diff --git a/modules/desktop/window-manager/bspwm/default.nix b/modules/desktop/window-manager/bspwm/default.nix index 96df979..e70842b 100644 --- a/modules/desktop/window-manager/bspwm/default.nix +++ b/modules/desktop/window-manager/bspwm/default.nix @@ -10,7 +10,7 @@ xsession.windowManager.bspwm.enable = true; xsession.windowManager.bspwm.settings = with config.scheme.withHashtag; { - window_gap = 5; + window_gap = config.desktop.window-manager.gap; split_ratio = 0.5; single_monocle = true; borderless_monocle = false; @@ -31,6 +31,9 @@ "popup" = { state = "floating"; sticky = true; + rectangle = "1000x600+0+0"; + center = true; + follow = true; }; }; diff --git a/modules/desktop/window-manager/default.nix b/modules/desktop/window-manager/default.nix index 23c5d6e..de8034b 100644 --- a/modules/desktop/window-manager/default.nix +++ b/modules/desktop/window-manager/default.nix @@ -11,5 +11,11 @@ type = lib.types.str; description = "Path to the default window manager program."; }; + + gap = lib.mkOption { + type = lib.types.number; + default = 5; + description = "The spacing between windows."; + }; }; } diff --git a/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh b/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh index 5e6b356..aa3ff05 100644 --- a/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh +++ b/modules/desktop/window-manager/sxhkd/scripts/keybindings.sh @@ -1,4 +1,5 @@ #!/bin/sh + awk ' /^#/ { desc = substr($0, 3) -- cgit v1.2.3