From 7e40c222d4c78a0b04886945c8a082ad9b3c04b1 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sat, 6 Aug 2022 22:01:39 +0200 Subject: [PATCH] qtile: make (most) keys layout specific --- nix/home-manager/profiles/qtile-desktop.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/nix/home-manager/profiles/qtile-desktop.nix b/nix/home-manager/profiles/qtile-desktop.nix index f89caae..1810b11 100644 --- a/nix/home-manager/profiles/qtile-desktop.nix +++ b/nix/home-manager/profiles/qtile-desktop.nix @@ -153,16 +153,21 @@ keys = [ Key([key_super, key_control], "l", lazy.layout.client_to_next().when(layout='stack')), # Columns - Key([key_super], "h", lazy.layout.left().when(layout='columns')), - Key([key_super], "l", lazy.layout.right().when(layout='columns')), - Key([key_super], "j", lazy.layout.down().when(layout='columns')), - Key([key_super], "k", lazy.layout.up().when(layout='columns')), - Key([key_super, key_control], "j", lazy.layout.shuffle_down().when(layout='columns')), - Key([key_super, key_control], "k", lazy.layout.shuffle_up().when(layout='columns')), - Key([key_super, key_control], "h", lazy.layout.shuffle_left().when(layout='columns')), - Key([key_super, key_control], "l", lazy.layout.shuffle_right().when(layout='columns')), + Key([key_super], "h", lazy.layout.left().when(layout="columns")), + Key([key_super], "l", lazy.layout.right().when(layout="columns")), + Key([key_super], "j", lazy.layout.next().when(layout="columns")), + Key([key_super], "k", lazy.layout.previous().when(layout="columns")), + Key([key_super, key_control], "j", lazy.layout.shuffle_down().when(layout="columns")), + Key([key_super, key_control], "k", lazy.layout.shuffle_up().when(layout="columns")), + Key([key_super, key_control], "h", lazy.layout.shuffle_left().when(layout="columns")), + Key([key_super, key_control], "l", lazy.layout.shuffle_right().when(layout="columns")), + Key([key_super, key_control], "space", lazy.layout.toggle_split().when(layout="columns")), # Max + Key([key_super], "j", lazy.layout.down().when(layout="max")), + Key([key_super], "k", lazy.layout.up().when(layout="max")), + + # TODO: these are required to make the 'columns' layout work, but why? Key([key_super], "j", lazy.layout.next()), Key([key_super], "k", lazy.layout.previous()),