11from libqtile .config import Key
22from libqtile .lazy import lazy
3- import os , subprocess
3+ import os
4+ import subprocess
45
56mod = "mod4"
67terminal = "kitty"
78
9+
810def toggle_touchpad (qtile = None ):
911 script = os .path .expanduser ("~/.config/qtile/toggle_touchpad.sh" )
1012 subprocess .Popen ([script ])
1113
14+
1215keys = [
1316 # A list of available commands that can be bound to keys can be found
1417 # at https://docs.qtile.org/en/latest/manual/config/lazy.html
@@ -17,12 +20,15 @@ def toggle_touchpad(qtile=None):
1720 Key ([mod ], "l" , lazy .layout .right (), desc = "Move focus to right" ),
1821 Key ([mod ], "j" , lazy .layout .down (), desc = "Move focus down" ),
1922 Key ([mod ], "k" , lazy .layout .up (), desc = "Move focus up" ),
20- Key (["mod1" ], "Tab" , lazy .layout .next (), desc = "Move window focus to other window" ),
23+ Key (["mod1" ], "Tab" , lazy .layout .next (),
24+ desc = "Move window focus to other window" ),
2125
2226 # Move windows between left/right columns or move up/down in current stack.
2327 # Moving out of range in Columns layout will create new column.
24- Key ([mod , "shift" ], "h" , lazy .layout .shuffle_left (), desc = "Move window to the left" ),
25- Key ([mod , "shift" ], "l" , lazy .layout .shuffle_right (), desc = "Move window to the right" ),
28+ Key ([mod , "shift" ], "h" , lazy .layout .shuffle_left (),
29+ desc = "Move window to the left" ),
30+ Key ([mod , "shift" ], "l" , lazy .layout .shuffle_right (),
31+ desc = "Move window to the right" ),
2632 Key ([mod , "shift" ], "j" , lazy .layout .shuffle_down (), desc = "Move window down" ),
2733 Key ([mod , "shift" ], "k" , lazy .layout .shuffle_up (), desc = "Move window up" ),
2834
@@ -33,8 +39,10 @@ def toggle_touchpad(qtile=None):
3339
3440 # Grow windows. If current window is on the edge of screen and direction
3541 # will be to screen edge - window would shrink.
36- Key ([mod , "control" ], "h" , lazy .layout .grow_left (), desc = "Grow window to the left" ),
37- Key ([mod , "control" ], "l" , lazy .layout .grow_right (), desc = "Grow window to the right" ),
42+ Key ([mod , "control" ], "h" , lazy .layout .grow_left (),
43+ desc = "Grow window to the left" ),
44+ Key ([mod , "control" ], "l" , lazy .layout .grow_right (),
45+ desc = "Grow window to the right" ),
3846 Key ([mod , "control" ], "j" , lazy .layout .grow_down (), desc = "Grow window down" ),
3947 Key ([mod , "control" ], "k" , lazy .layout .grow_up (), desc = "Grow window up" ),
4048 Key ([mod ], "n" , lazy .layout .normalize (), desc = "Reset all window sizes" ),
@@ -61,30 +69,38 @@ def toggle_touchpad(qtile=None):
6169 desc = "Toggle fullscreen on the focused window" ,
6270 ),
6371
64- Key ([mod ], "t" , lazy .window .toggle_floating (), desc = "Toggle floating on the focused window" ),
72+ Key ([mod ], "comma" , lazy .to_screen (0 ), desc = 'Keyboard focus to monitor 1' ),
73+ Key ([mod ], "period" , lazy .to_screen (1 ), desc = 'Keyboard focus to monitor 1' ),
74+ Key ([mod ], "t" , lazy .window .toggle_floating (),
75+ desc = "Toggle floating on the focused window" ),
6576 Key ([mod , "control" ], "r" , lazy .reload_config (), desc = "Reload the config" ),
6677 Key ([mod , "control" , "Shift" ], "r" , lazy .restart (), desc = "Restart conf" ),
6778 Key ([mod , "control" ], "q" , lazy .shutdown (), desc = "Shutdown Qtile" ),
6879 Key ([mod ], "r" , lazy .spawncmd (), desc = "Spawn a command using a prompt widget" ),
6980
7081 # launch browsers and shit
7182 Key ([mod ], "Backspace" , lazy .spawn ("rofi -show drun" ), desc = "run rofi" ),
72- Key ([mod ], "b" , lazy .spawn ("brave" ), desc = "Spawn brave browser" ),
83+ Key ([mod ], "b" , lazy .spawn ("brave" ), desc = "Spawn brave browser" ),
7384 Key ([mod ], "e" , lazy .spawn ("nemo" ), desc = "Spawn Ranger" ),
74- #Key([mod, "shift"], "e", lazy.spawn("nemo"), desc="Spawn File explorer"),
85+ # Key([mod, "shift"], "e", lazy.spawn("nemo"), desc="Spawn File explorer"),
7586
7687 # screenshot
7788 # Key([], "Print", lazy.spawn(["sh", "-c", "gnome-screenshot -c /tmp/screenshot && cat /tmp/screenshot | xclip -i -selection clipboard -target image/png"]), desc="Copy Screenshot to Clipboard"),
7889 # Key(["shift"], "Print", lazy.spawn(["sh","-c","gnome-screenshot -acf /tmp/screenshot && cat /tmp/screenshot | xclip -i -selection clipboard -target image/png"]), desc="Screenshot of area to clipboard"),
79-
80- Key ([], "Print" , lazy .spawn ("flameshot screen -c" ), desc = "Screenshot of screen" ),
81- Key (["shift" ], "Print" , lazy .spawn ("flameshot gui -c -s" ), desc = "Screenshot of area" ),
90+
91+ Key ([], "Print" , lazy .spawn ("flameshot screen -c" ),
92+ desc = "Screenshot of screen" ),
93+ Key (["shift" ], "Print" , lazy .spawn (
94+ "flameshot gui -c -s" ), desc = "Screenshot of area" ),
95+
96+ Key (["control" ], "Print" , lazy .spawn ("flameshot gui" ),
97+ desc = "Interactive screenshot of screen" ),
8298 # sound and volume controls
8399
84100 Key ([], "XF86AudioMute" , lazy .spawn ("amixer set Master toggle" )),
85101 Key ([], "XF86AudioRaiseVolume" , lazy .spawn ("amixer set Master 3%+" )),
86102 Key ([], "XF86AudioLowerVolume" , lazy .spawn ("amixer set Master 3%-" )),
87-
103+
88104 # brightness control
89105 Key ([], "XF86MonBrightnessUp" , lazy .spawn ("brightnessctl set 5+" )),
90106 Key ([], "XF86MonBrightnessDown" , lazy .spawn ("brightnessctl set 5-" )),
0 commit comments