Skip to content

Commit 060db46

Browse files
committed
Added multiple screens
1 parent 339b153 commit 060db46

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

qtile/settings/keys.py

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
from libqtile.config import Key
22
from libqtile.lazy import lazy
3-
import os, subprocess
3+
import os
4+
import subprocess
45

56
mod = "mod4"
67
terminal = "kitty"
78

9+
810
def toggle_touchpad(qtile=None):
911
script = os.path.expanduser("~/.config/qtile/toggle_touchpad.sh")
1012
subprocess.Popen([script])
1113

14+
1215
keys = [
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-")),

qtile/settings/screens.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
padding_y=8,
3434
padding_x=5,
3535
# this is to slice title and add ... at end
36-
parse_text=lambda x: x[:max_title_length] + \
36+
parse_text=lambda x: x[:max_title_length] +
3737
"..." if len(x) > max_title_length else "",
3838

3939

@@ -92,4 +92,12 @@
9292

9393
x11_drag_polling_rate=60,
9494
),
95+
Screen(
96+
# top=bar.Bar([], 35,
97+
# opacity=1,
98+
# margin=[5, 5, 5, 5],
99+
# border_width=[2, 2, 2, 2],
100+
# border_color="#00000000"
101+
# ),
102+
)
95103
]

0 commit comments

Comments
 (0)