2025-08-16 13:44:04 +02:00
|
|
|
from libqtile.lazy import lazy
|
|
|
|
|
from libqtile.config import EzKey as Key
|
2025-08-17 10:53:23 +02:00
|
|
|
from libqtile.config import EzClick as Click, EzDrag as Drag
|
2025-08-16 13:44:04 +02:00
|
|
|
|
2025-08-17 10:53:23 +02:00
|
|
|
from config import apps
|
2025-08-16 13:44:04 +02:00
|
|
|
|
|
|
|
|
keys = [
|
|
|
|
|
# Focus manipulation
|
2025-08-16 23:16:14 +02:00
|
|
|
Key("M-h", lazy.layout.left(), desc="Move focus to the left"),
|
|
|
|
|
Key("M-l", lazy.layout.right(), desc="Move focus to the right"),
|
|
|
|
|
Key("M-j", lazy.layout.down(), desc="Move focus to the down"),
|
|
|
|
|
Key("M-k", lazy.layout.up(), desc="Move focus to the up"),
|
2025-08-16 13:44:04 +02:00
|
|
|
# Window manipulation
|
|
|
|
|
Key(
|
|
|
|
|
"M-S-h",
|
|
|
|
|
lazy.layout.swap_left(),
|
|
|
|
|
desc="Move window to the left",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
|
|
|
|
"M-S-l",
|
|
|
|
|
lazy.layout.swap_right(),
|
|
|
|
|
desc="Move window to the right",
|
|
|
|
|
),
|
2025-08-16 23:16:14 +02:00
|
|
|
Key("M-S-j", lazy.layout.shuffle_down(), desc="Move window down"),
|
|
|
|
|
Key("M-S-k", lazy.layout.shuffle_up(), desc="Move window up"),
|
|
|
|
|
Key("M-S-i", lazy.layout.shrink(), desc="Increase window size"),
|
|
|
|
|
Key("M-S-m", lazy.layout.grow(), desc="Decrease window size"),
|
|
|
|
|
Key("M-c", lazy.window.kill(), desc="Closes window"),
|
|
|
|
|
# Layout manipulation
|
2025-08-16 16:39:36 +02:00
|
|
|
Key(
|
|
|
|
|
"M-n",
|
|
|
|
|
lazy.layout.normalize(),
|
|
|
|
|
desc="Normalize all window sizes",
|
|
|
|
|
),
|
2025-08-16 23:16:14 +02:00
|
|
|
Key("M-S-n", lazy.layout.reset(), desc="Resets all window sizes"),
|
2025-08-16 16:39:36 +02:00
|
|
|
Key(
|
|
|
|
|
"M-t",
|
|
|
|
|
lazy.window.toggle_floating(),
|
|
|
|
|
desc="Toggles between floating and tiled state of a window",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"M-o",
|
|
|
|
|
lazy.layout.maximize(),
|
|
|
|
|
desc="Maximizes the window in the current layot",
|
2025-08-16 16:39:36 +02:00
|
|
|
),
|
|
|
|
|
Key(
|
|
|
|
|
"M-f",
|
|
|
|
|
lazy.window.toggle_fullscreen(),
|
|
|
|
|
desc="Toggles wiondow between tiled/floating and fullscreen",
|
|
|
|
|
),
|
2025-08-16 23:16:14 +02:00
|
|
|
Key("<M-Tab>", lazy.next_layout(), desc="Switches between layouts"),
|
|
|
|
|
Key("<M-C-r>", lazy.reload_config(), desc="Reload config"),
|
2025-08-16 16:39:36 +02:00
|
|
|
# Audio and media control
|
2025-08-16 23:16:14 +02:00
|
|
|
Key("<F86AudioMute>", lazy.spawn("pamixer -t"), desc="Mutes Audio"),
|
2025-08-16 16:39:36 +02:00
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"<XF86AudioLowerVolume>",
|
2025-08-16 16:39:36 +02:00
|
|
|
lazy.spawn("pamixer -d 2"),
|
|
|
|
|
desc="Lower Audio Volume",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"<XF86AudioRaiseVolume>",
|
2025-08-16 16:39:36 +02:00
|
|
|
lazy.spawn("pamixer -i 2"),
|
|
|
|
|
desc="Raise Audio Volume",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"<XF86AudioPrev>",
|
2025-08-16 16:39:36 +02:00
|
|
|
lazy.spawn("playerctl previous"),
|
|
|
|
|
desc="Play Previous Media",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"<XF86AudioNext>",
|
2025-08-16 16:39:36 +02:00
|
|
|
lazy.spawn("playerctl next"),
|
|
|
|
|
desc="Play Next Media",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"<XF86AudioPlay>",
|
2025-08-16 16:39:36 +02:00
|
|
|
lazy.spawn("playerctl play-pause"),
|
|
|
|
|
desc="Toggle Play/Pause",
|
|
|
|
|
),
|
2025-08-16 20:09:01 +02:00
|
|
|
# Rofi
|
|
|
|
|
Key(
|
|
|
|
|
"M-r",
|
|
|
|
|
lazy.spawn("rofi -show drun -show-icons"),
|
|
|
|
|
desc="Spawns Rofi",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
2025-08-16 23:16:14 +02:00
|
|
|
"A-<Tab>",
|
2025-08-16 20:09:01 +02:00
|
|
|
lazy.spawn("rofi -show window -show-icons"),
|
|
|
|
|
desc="Tab Windows",
|
|
|
|
|
),
|
2025-08-16 23:16:14 +02:00
|
|
|
# Scratchpads
|
|
|
|
|
Key(
|
|
|
|
|
"C-1",
|
|
|
|
|
lazy.group["scratchpad"].dropdown_toggle("term"),
|
|
|
|
|
desc="Toggles terminal scratchpad",
|
|
|
|
|
),
|
|
|
|
|
Key(
|
|
|
|
|
"C-2",
|
|
|
|
|
lazy.group["scratchpad"].dropdown_toggle("calc"),
|
|
|
|
|
desc="Calculator in scratchpad",
|
|
|
|
|
),
|
|
|
|
|
# Application shortcuts
|
|
|
|
|
Key(
|
|
|
|
|
"M-e",
|
|
|
|
|
lazy.spawn(apps["filebrowser"]),
|
|
|
|
|
desc="Launches filebrowser",
|
|
|
|
|
),
|
|
|
|
|
Key("M-b", lazy.spawn(apps["browser"])),
|
|
|
|
|
Key("M-<Return>", lazy.spawn(apps["terminal"])),
|
2025-08-16 13:44:04 +02:00
|
|
|
]
|
2025-08-17 10:53:23 +02:00
|
|
|
|
|
|
|
|
mouse = [
|
|
|
|
|
Drag(
|
|
|
|
|
"M-1",
|
|
|
|
|
lazy.window.set_position_floating(),
|
|
|
|
|
start=lazy.window.get_position(),
|
|
|
|
|
),
|
|
|
|
|
Drag(
|
|
|
|
|
"M-3",
|
|
|
|
|
lazy.window.set_size_floating(),
|
|
|
|
|
start=lazy.window.get_size(),
|
|
|
|
|
),
|
|
|
|
|
Click("M-2", lazy.window.bring_to_front()),
|
|
|
|
|
]
|