From aac47e072dd150266e411e90b8f5d39c457979fd Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 28 May 2023 11:32:42 +0200 Subject: [PATCH] get rid of i3-wk-switch --- nixos/components/gui/home-manager/i3.nix | 33 ++++++++---------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/nixos/components/gui/home-manager/i3.nix b/nixos/components/gui/home-manager/i3.nix index ee22744..e225bcc 100644 --- a/nixos/components/gui/home-manager/i3.nix +++ b/nixos/components/gui/home-manager/i3.nix @@ -11,17 +11,6 @@ let background = theme.base03; }; - # switch to named workspaces - # todo : add version assert - i3-wk-switch = pkgs.i3-wk-switch.overrideAttrs (old: { - src = pkgs.fetchFromGitHub { - owner = "tmfink"; - repo = "i3-wk-switch"; - rev = "5f43bb8cbe7938eff476fc534b61c8fb6a700c8f"; - sha256 = "sha256-DOBPI/wO+S8a6EzWJeVGODXeSixFl7SHTtHAq5DG8GU="; - }; - }); - backgroundCommand = pkgs.writers.writeDash "background" '' ${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | \ ${pkgs.gnused}/bin/sed -E "s/primary //" | \ @@ -269,16 +258,16 @@ in "${cfg.config.modifier}+Shift+minus" = "move scratchpad"; "${cfg.config.modifier}+minus" = "scratchpad show"; - "${cfg.config.modifier}+1" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 1"; - "${cfg.config.modifier}+2" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 2"; - "${cfg.config.modifier}+3" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 3"; - "${cfg.config.modifier}+4" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 4"; - "${cfg.config.modifier}+5" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 5"; - "${cfg.config.modifier}+6" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 6"; - "${cfg.config.modifier}+7" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 7"; - "${cfg.config.modifier}+8" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 8"; - "${cfg.config.modifier}+9" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 9"; - "${cfg.config.modifier}+0" = "exec --no-startup-id ${i3-wk-switch}/bin/i3-wk-switch 10"; + "${cfg.config.modifier}+1" = "workspace 1"; + "${cfg.config.modifier}+2" = "workspace 2"; + "${cfg.config.modifier}+3" = "workspace 3"; + "${cfg.config.modifier}+4" = "workspace 4"; + "${cfg.config.modifier}+5" = "workspace 5"; + "${cfg.config.modifier}+6" = "workspace 6"; + "${cfg.config.modifier}+7" = "workspace 7"; + "${cfg.config.modifier}+8" = "workspace 8"; + "${cfg.config.modifier}+9" = "workspace 9"; + "${cfg.config.modifier}+0" = "workspace 10"; "${cfg.config.modifier}+Shift+1" = "move container to workspace number 1"; "${cfg.config.modifier}+Shift+2" = "move container to workspace number 2"; @@ -308,7 +297,7 @@ in ${pkgs.rofi}/bin/rofi -dmenu -p 'Select Workspace' | \ while read line do - ${i3-wk-switch}/bin/i3-wk-switch "$line" + ${pkgs.i3}/bin/i3-msg workspace "$line" done ''; in