diff --git a/modules/i3/default.nix b/modules/i3/default.nix index 6557fd5..a6fc8c4 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -10,9 +10,19 @@ in with theme.colors; { wmctrl # For rofi power menu xborders # Active window borders maim xdotool unclutter # Active window screenshots - xsel # Disable middle mouse paste + xbindkeys xsel xdotool # Disable middle mouse paste ]; + home.file = { + # Disable middle mouse paste + # May require running xbindkeys -p first time after rebuild + # https://unix.stackexchange.com/a/277488 + ".xbindkeysrc".text = '' + "echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys" + b:2 + Release + ''; + }; + # Screenshots services.flameshot = { enable = true; @@ -64,32 +74,7 @@ in with theme.colors; { }; startup = [ { - command = "systemctl --user restart polybar &"; - always = true; - notification = false; - } - { - command = "nm-applet &"; - always = true; - notification = false; - } - { - command = "nextcloud &"; - always = true; - notification = false; - } - { - command = "(xborders --border-rgb ${builtins.substring 1 6 primary}ff --border-radius 12 --border-width 2 --smart-hide-border --disable-version-warning) &"; - always = true; - notification = false; - } - { - # Disable middle mouse paste - # https://unix.stackexchange.com/a/501445 - # Other solutions such as the xbindkeys approach - # will break other functionality, such as panning - # https://unix.stackexchange.com/a/277488 - command = "(while true; do xsel -fin < /dev/null; done) &"; + command = "(systemctl --user restart polybar &) && (nm-applet &) && (nextcloud &) && (xborders --border-rgb ${builtins.substring 1 6 primary}ff --border-radius 12 --border-width 2 --smart-hide-border --disable-version-warning)"; always = true; notification = false; }