2022-03-18 00:11:36 +01:00
|
|
|
from libqtile.config import Group, Key, Match, ScratchPad, DropDown
|
2022-01-25 21:28:02 +01:00
|
|
|
from libqtile.lazy import lazy
|
|
|
|
|
|
|
|
from .keys import keys, mod
|
|
|
|
|
2022-03-18 00:11:36 +01:00
|
|
|
groups = [Group(i) for i in "1234567890"]
|
2022-01-25 21:28:02 +01:00
|
|
|
|
2022-03-20 18:01:58 +01:00
|
|
|
browsers = [Match(wm_class="firefox"), Match(wm_class="Google-chrome")]
|
2022-03-18 00:11:36 +01:00
|
|
|
file_managers = [Match(wm_class="Thunar")]
|
2022-03-20 18:01:58 +01:00
|
|
|
video_players = [Match(wm_class="streamlink-twitch-gui"), Match(wm_class="mpv")]
|
2022-03-18 00:11:36 +01:00
|
|
|
groups = [
|
2022-03-20 18:01:58 +01:00
|
|
|
Group("1"),
|
|
|
|
Group("2", matches=[Match(wm_class="VirtualBox Manager")]),
|
|
|
|
Group("3", matches=[Match(wm_class="Thunderbird")]),
|
|
|
|
Group("4", matches=[Match(wm_class="st-256color")]),
|
|
|
|
Group("5", matches=file_managers),
|
|
|
|
Group("6"),
|
|
|
|
Group("7", matches=browsers),
|
|
|
|
Group("8", matches=video_players),
|
|
|
|
Group("9"),
|
|
|
|
Group("0", matches=[Match(wm_class="TelegramDesktop")]),
|
|
|
|
]
|
|
|
|
groups.append(
|
|
|
|
ScratchPad(
|
|
|
|
"scratchpad",
|
|
|
|
[
|
|
|
|
# define a drop down terminal.
|
|
|
|
# it is placed in the upper third of screen by default.
|
|
|
|
DropDown("term", "st", opacity=1.0)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
2022-03-18 00:11:36 +01:00
|
|
|
|
2022-03-20 18:01:58 +01:00
|
|
|
symbols = "arstgmneio"
|
2022-01-25 21:28:02 +01:00
|
|
|
|
|
|
|
for i, j in zip(groups, symbols):
|
2022-03-20 18:01:58 +01:00
|
|
|
keys.extend(
|
|
|
|
[
|
|
|
|
Key(
|
|
|
|
[mod],
|
|
|
|
j,
|
|
|
|
lazy.group[i.name].toscreen(),
|
|
|
|
desc="Switch to group {}".format(i.name),
|
|
|
|
),
|
|
|
|
Key(
|
|
|
|
[mod, "shift"],
|
|
|
|
j,
|
|
|
|
lazy.window.togroup(i.name, switch_group=True),
|
|
|
|
desc="Switch to & move focused window to group {}".format(i.name),
|
|
|
|
),
|
|
|
|
]
|
|
|
|
)
|