aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar@proton.me>2026-03-13 20:50:45 +0530
committerArpit Chakladar <arpitchakladar@proton.me>2026-03-13 20:50:45 +0530
commit35308ac97cc7492cd4376aaec891b958eee08260 (patch)
treefb20cfbe31fb41088e6e72ef96169a0ca13cfdb9 /modules
parent9bdba2ca39d7356f67c2f8f8c13e0f6a973c460b (diff)
downloadhome-manager-config-35308ac97cc7492cd4376aaec891b958eee08260.tar.gz
home-manager-config-35308ac97cc7492cd4376aaec891b958eee08260.zip
Fixed workspace number styles in polybar
Diffstat (limited to 'modules')
-rw-r--r--modules/desktop/i3/default.nix153
-rw-r--r--modules/desktop/polybar/module/i3.nix4
2 files changed, 86 insertions, 71 deletions
diff --git a/modules/desktop/i3/default.nix b/modules/desktop/i3/default.nix
index e24f95b..e7e0901 100644
--- a/modules/desktop/i3/default.nix
+++ b/modules/desktop/i3/default.nix
@@ -7,87 +7,98 @@
{
config = lib.mkIf config.desktop.enable {
- xsession.windowManager.i3.enable = true;
+ xsession.windowManager.i3 = {
+ enable = true;
+ config = with config.scheme.withHashtag; {
+ modifier = "Mod4"; # Super
- xsession.windowManager.i3.config = with config.scheme.withHashtag; {
- modifier = "Mod4"; # Super
+ bars = [ ];
- bars = [ ];
-
- gaps = {
- inner = 10;
- outer = 0;
- };
-
- window = {
- border = 1;
- titlebar = false;
- };
-
- colors = {
- focused = {
- border = base03;
- background = base03;
- text = base07;
- indicator = base03;
- childBorder = base03;
+ gaps = {
+ inner = 10;
+ outer = 0;
};
- focusedInactive = {
- border = base02;
- background = base02;
- text = base05;
- indicator = base02;
- childBorder = base02;
+
+ window = {
+ border = 1;
+ titlebar = false;
};
- unfocused = {
- border = base02;
- background = base02;
- text = base05;
- indicator = base02;
- childBorder = base02;
+
+ colors = {
+ focused = {
+ border = base03;
+ background = base03;
+ text = base07;
+ indicator = base03;
+ childBorder = base03;
+ };
+ focusedInactive = {
+ border = base02;
+ background = base02;
+ text = base05;
+ indicator = base02;
+ childBorder = base02;
+ };
+ unfocused = {
+ border = base02;
+ background = base02;
+ text = base05;
+ indicator = base02;
+ childBorder = base02;
+ };
};
- };
- defaultWorkspace = "workspace number 1";
+ defaultWorkspace = "1";
- window.commands = [
- {
- command = "floating enable, sticky enable, resize set 1000 600, move position center";
- criteria = {
- class = "floating-termial";
- };
- }
- ];
+ window.commands = [
+ {
+ command = "floating enable, sticky enable, resize set 1000 600, move position center";
+ criteria = {
+ class = "floating-termial";
+ };
+ }
+ ];
- focus.followMouse = true;
+ focus.followMouse = true;
- startup = [
- # {
- # command = "${config.services.polybar.script}";
- # always = true;
- # notification = false;
- # }
- {
- command = "xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg \"workspace 1 output {}\"";
- always = false;
- notification = false;
- }
- {
- command =
- if config.tools.feh.enable then
- "${pkgs.feh}/bin/feh --bg-scale ${../../../assets/skeleton-mage.png}"
- else
- "xsetroot -solid \"${config.scheme.withHashtag.base00}\"";
- always = true;
- notification = false;
- }
- ];
+ startup = [
+ # {
+ # command = "${config.services.polybar.script}";
+ # always = true;
+ # notification = false;
+ # }
+ {
+ command = "xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg \"workspace 1 output {}\"";
+ always = false;
+ notification = false;
+ }
+ {
+ command =
+ if config.tools.feh.enable then
+ "${pkgs.feh}/bin/feh --bg-scale ${../../../assets/skeleton-mage.png}"
+ else
+ "xsetroot -solid \"${config.scheme.withHashtag.base00}\"";
+ always = true;
+ notification = false;
+ }
+ ];
- keybindings = lib.mkOptionDefault (import ./keybindings.nix { inherit pkgs lib; });
+ keybindings = lib.mkOptionDefault (import ./keybindings.nix { inherit pkgs lib; });
+ };
+ extraConfig = ''
+ exec_always --no-startup-id xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg "workspace 1 output {}"
+ set $ws1 "workspace number 1"
+ set $ws2 "workspace number 2"
+ set $ws3 "workspace number 3"
+ set $ws4 "workspace number 4"
+ set $ws5 "workspace number 5"
+ set $ws6 "workspace number 6"
+ set $ws7 "workspace number 7"
+ set $ws8 "workspace number 8"
+ set $ws9 "workspace number 9"
+ set $ws10 "workspace number 10"
+ exec_always --no-startup-id "i3-msg 'workspace 1; workspace 2; workspace 3; workspace 4; workspace 5; workspace 6; workspace 7; workspace 8; workspace 9; workspace 10; workspace 1' && polybar-msg cmd restart"
+ '';
};
-
- xsession.windowManager.i3.extraConfig = ''
- exec_always --no-startup-id xrandr -q | grep -w 'connected' | cut -d' ' -f1 | xargs -I{} i3-msg "workspace 1 output {}"
- '';
};
}
diff --git a/modules/desktop/polybar/module/i3.nix b/modules/desktop/polybar/module/i3.nix
index ac235f1..8565d41 100644
--- a/modules/desktop/polybar/module/i3.nix
+++ b/modules/desktop/polybar/module/i3.nix
@@ -8,6 +8,9 @@ with config.scheme.withHashtag;
label-focused-underline = "${base0D}";
label-focused-padding = 1;
+ label-unfocused = "%index%";
+ label-unfocused-padding = 1;
+
label-occupied = "%index%";
label-occupied-padding = 1;
@@ -21,4 +24,5 @@ with config.scheme.withHashtag;
pin-workspaces = true;
index-sort = true;
+ show-all = true;
}