From 07b4b59c4f3c540aff72f57d4315351a8ae5c6ab Mon Sep 17 00:00:00 2001 From: zoe Date: Sun, 19 Mar 2023 17:24:08 +0100 Subject: [PATCH] add autotiling to i3 --- i3/config.nix | 29 ++++++++++++++++++++++------- i3/mainbar.nix | 2 +- user.nix | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/i3/config.nix b/i3/config.nix index 9fba3ab..50e9cbf 100644 --- a/i3/config.nix +++ b/i3/config.nix @@ -61,7 +61,6 @@ in ## THE PICTURES "${mod}+s" = "exec flameshot gui --clipboard"; - # windows ## find mouse cursor "${mod}+x" = "exec find-cursor --color '#282828' -o 2 --outline-color '#EBDBB2'"; @@ -72,6 +71,9 @@ in "${mod}+m" = "mode media"; "${mod}+w" = "mode move"; "${mod}+v" = "mode focus"; + + ## workspaces + "${mod}+Tab" = "workspace next"; # extra keys ## audio @@ -124,10 +126,11 @@ in Escape = "mode default"; v = "mode focus"; r = "mode resize"; - j = "move down"; - k = "move up"; - h = "move left"; - l = "move right"; + j = "exec i3l move down"; + k = "exec i3l move up"; + h = "exec i3l move left"; + l = "exec i3l move right"; + s = "exec i3l swap container with previous"; }; focus = { Escape = "mode default"; @@ -182,7 +185,7 @@ in }; }; }]; - + startup = [ { command = "--no-startup-id feh --bg-scale /etc/nixos/wallpaper.png"; @@ -193,9 +196,21 @@ in always = true; } { - command = "--no-startup-id autotiling"; + command = "--no-startup-id i3-layouts"; always = true; } ]; }; + home-manager.users.zoe.xsession.windowManager.i3.extraConfig = '' + set $i3l companion to workspace 1 + set $i3l companion to workspace 2 + set $i3l companion to workspace 3 + set $i3l companion to workspace 4 + set $i3l companion to workspace 5 + set $i3l companion to workspace 6 + set $i3l companion to workspace 7 + set $i3l companion to workspace 8 + set $i3l companion to workspace 9 + set $i3l companion to workspace 10 + ''; } diff --git a/i3/mainbar.nix b/i3/mainbar.nix index a20564a..f74ef6f 100644 --- a/i3/mainbar.nix +++ b/i3/mainbar.nix @@ -2,7 +2,7 @@ let music = { block = "music"; - format = "$play $player {$combo.str(max_w:25,rot_interval:0.5)|}"; + format = "$icon $play $player {$combo.str(max_w:25,rot_interval:0.5)|}"; }; pomodoro = { block = "pomodoro"; diff --git a/user.nix b/user.nix index b6a1f99..8d38852 100644 --- a/user.nix +++ b/user.nix @@ -1,7 +1,7 @@ { pkgs, users, config, inputs, supercolor, kaokao, ... }: let my-python-packages = p: with p; [ - numpy + i3ipc ( buildPythonPackage rec { pname = "i3-layouts";