feat: switched to i3

This commit is contained in:
Patrick 2023-09-13 21:32:05 +02:00
parent 5db5ed5168
commit e6e2e63cf6
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
5 changed files with 87 additions and 73 deletions

View file

@ -4,5 +4,6 @@
./rofi.nix
./polybar.nix
./autorandr.nix
./i3.nix
];
}

View file

@ -0,0 +1,6 @@
{
xsession.windowManager.i3 = {
enable = true;
config = import ../sway3.nix;
};
}

View file

@ -21,4 +21,4 @@ if command -v dbus-update-activation-environment >/dev/null 2>&1; then
fi
autorandr -c
exec herbstluftwm --locked
exec i3

View file

@ -0,0 +1,77 @@
# shared sway/i3 config
let
modifier = "Mod4";
down = "r";
left = "n";
right = "s";
up = "l";
terminal = "kitty";
in {
inherit modifier terminal;
focus = {
followMouse = false;
mouseWarping = false;
};
#bindkeysToCode = true;
window.titlebar = false;
keybindings = {
"${modifier}+t" = "exec ${terminal}";
"${modifier}+b" = "exec firefox";
"${modifier}+m" = "exec thunderbird";
"${modifier}+q" = "kill";
"${modifier}+${left}" = "focus left";
"${modifier}+${down}" = "focus down";
"${modifier}+${up}" = "focus up";
"${modifier}+${right}" = "focus right";
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
"${modifier}+Shift+${left}" = "move left";
"${modifier}+Shift+${down}" = "move down";
"${modifier}+Shift+${up}" = "move up";
"${modifier}+Shift+${right}" = "move right";
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
"${modifier}+x" = "splith";
"${modifier}+v" = "splitv";
"${modifier}+Return" = "fullscreen toggle";
"${modifier}+j" = "layout stacking";
"${modifier}+d" = "layout tabbed";
"${modifier}+u" = "layout toggle split";
"${modifier}+f" = "floating toggle";
"${modifier}+space" = "focus mode_toggle";
"${modifier}+Comma" = "workspace prev";
"${modifier}+Period" = "workspace next";
"${modifier}+1" = "workspace number 1";
"${modifier}+2" = "workspace number 2";
"${modifier}+3" = "workspace number 3";
"${modifier}+4" = "workspace number 4";
"${modifier}+5" = "workspace number 5";
"${modifier}+6" = "workspace number 6";
"${modifier}+7" = "workspace number 7";
"${modifier}+8" = "workspace number 8";
"${modifier}+9" = "workspace number 9";
"${modifier}+Shift+1" = "move container to workspace number 1";
"${modifier}+Shift+2" = "move container to workspace number 2";
"${modifier}+Shift+3" = "move container to workspace number 3";
"${modifier}+Shift+4" = "move container to workspace number 4";
"${modifier}+Shift+5" = "move container to workspace number 5";
"${modifier}+Shift+6" = "move container to workspace number 6";
"${modifier}+Shift+7" = "move container to workspace number 7";
"${modifier}+Shift+8" = "move container to workspace number 8";
"${modifier}+Shift+9" = "move container to workspace number 9";
};
}

View file

@ -1,7 +1,6 @@
{
config,
pkgs,
lib,
nixosConfig,
...
}: {
@ -11,9 +10,8 @@
wayland.windowManager.sway = {
enable = true;
config =
{
modifier = "Mod4";
terminal = "kitty";
(import ../sway3.nix)
// {
menu = "fuzzel";
input = {
"*" = {
@ -30,78 +28,10 @@
natural_scroll = "enabled";
};
};
focus = {
followMouse = false;
mouseWarping = false;
};
down = "r";
left = "n";
right = "s";
up = "l";
#bindkeysToCode = true;
window.titlebar = false;
keybindings = let
cfg = config.wayland.windowManager.sway.config;
in {
"${cfg.modifier}+t" = "exec ${cfg.terminal}";
"${cfg.modifier}+b" = "exec firefox";
"Menu" = "exec ${cfg.menu}";
"${cfg.modifier}+q" = "kill";
"${cfg.modifier}+${cfg.left}" = "focus left";
"${cfg.modifier}+${cfg.down}" = "focus down";
"${cfg.modifier}+${cfg.up}" = "focus up";
"${cfg.modifier}+${cfg.right}" = "focus right";
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
"${cfg.modifier}+Shift+${cfg.left}" = "move left";
"${cfg.modifier}+Shift+${cfg.down}" = "move down";
"${cfg.modifier}+Shift+${cfg.up}" = "move up";
"${cfg.modifier}+Shift+${cfg.right}" = "move right";
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
"${cfg.modifier}+x" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+Return" = "fullscreen toggle";
"${cfg.modifier}+j" = "layout stacking";
"${cfg.modifier}+d" = "layout tabbed";
"${cfg.modifier}+u" = "layout toggle split";
"${cfg.modifier}+f" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
"${cfg.modifier}+Comma" = "workspace prev";
"${cfg.modifier}+Period" = "workspace next";
"${cfg.modifier}+1" = "workspace number 1";
"${cfg.modifier}+2" = "workspace number 2";
"${cfg.modifier}+3" = "workspace number 3";
"${cfg.modifier}+4" = "workspace number 4";
"${cfg.modifier}+5" = "workspace number 5";
"${cfg.modifier}+6" = "workspace number 6";
"${cfg.modifier}+7" = "workspace number 7";
"${cfg.modifier}+8" = "workspace number 8";
"${cfg.modifier}+9" = "workspace number 9";
"${cfg.modifier}+Shift+1" = "move container to workspace number 1";
"${cfg.modifier}+Shift+2" = "move container to workspace number 2";
"${cfg.modifier}+Shift+3" = "move container to workspace number 3";
"${cfg.modifier}+Shift+4" = "move container to workspace number 4";
"${cfg.modifier}+Shift+5" = "move container to workspace number 5";
"${cfg.modifier}+Shift+6" = "move container to workspace number 6";
"${cfg.modifier}+Shift+7" = "move container to workspace number 7";
"${cfg.modifier}+Shift+8" = "move container to workspace number 8";
"${cfg.modifier}+Shift+9" = "move container to workspace number 9";
};
}
// {