92 lines
3 KiB
Python
92 lines
3 KiB
Python
from libqtile.config import Click, Drag, Group, Key, Screen
|
|
from libqtile.lazy import lazy
|
|
from libqtile import layout
|
|
|
|
# ============== #
|
|
# === GROUPS === #
|
|
# ============== #
|
|
|
|
group_names = ["zic", "dev", "web"]
|
|
groups = [Group(name) for name in group_names]
|
|
|
|
# ============ #
|
|
# === KEYS === #
|
|
# ============ #
|
|
|
|
MOD = "mod4"
|
|
SHIFT = "shift"
|
|
CTRL = "control"
|
|
ALT = "mod1"
|
|
|
|
keys = [
|
|
# Actions
|
|
Key([MOD], "g", lazy.reload_config(), desc="Reload the config"),
|
|
Key([MOD], "b", lazy.window.kill(), desc="Kill focused window"),
|
|
Key([MOD], "v", lazy.window.toggle_floading(), desc="Toggle floating window"),
|
|
|
|
# Switch to group
|
|
Key([MOD], "q", lazy.group["zic"].toscreen(), desc="Switch to group zic"),
|
|
Key([MOD], "w", lazy.group["dev"].toscreen(), desc="Switch to group dev"),
|
|
Key([MOD], "f", lazy.group["web"].toscreen(), desc="Switch to group web"),
|
|
|
|
# Move window to group
|
|
Key([MOD], "z", lazy.window.togroup("zic", switch_group=True), desc="Move window to group zic"),
|
|
Key([MOD], "x", lazy.window.togroup("dev", switch_group=True), desc="Move window to group dev"),
|
|
Key([MOD], "c", lazy.window.togroup("web", switch_group=True), desc="Move window to group web"),
|
|
|
|
# Switch between windows
|
|
Key([MOD], "n", lazy.layout.left(), desc="Move focus left"),
|
|
Key([MOD], "e", lazy.layout.down(), desc="Move focus down"),
|
|
Key([MOD], "i", lazy.layout.up(), desc="Move focus up"),
|
|
Key([MOD], "o", lazy.layout.right(), desc="Move focus right"),
|
|
|
|
# Move windows
|
|
Key([MOD], "l", lazy.layout.shuffle_left(), desc="Move window left"),
|
|
Key([MOD], "u", lazy.layout.shuffle_down(), desc="Move window down"),
|
|
Key([MOD], "y", lazy.layout.shuffle_up(), desc="Move window up"),
|
|
Key([MOD], "BackSpace", lazy.layout.shuffle_right(), desc="Move window right"),
|
|
|
|
# Grow windows
|
|
Key([MOD], "k", lazy.layout.normalize(), desc="Reset all window sizes"),
|
|
Key([MOD], "h", lazy.layout.grow_left(), desc="Grow window left"),
|
|
Key([MOD], "comma", lazy.layout.grow_down(), desc="Grow window down"),
|
|
Key([MOD], "semicolon", lazy.layout.grow_up(), desc="Grow window up"),
|
|
Key([MOD], "apostrophe", lazy.layout.grow_right(), desc="Grow window right"),
|
|
|
|
# Applications
|
|
Key([MOD], "a", lazy.spawn("rofi -show drun"), desc="Launch rofi"),
|
|
Key([MOD], "s", lazy.spawn("qutebrowser"), desc="Launch browser"),
|
|
Key([MOD], "t", lazy.spawn("alacritty"), desc="Launch terminal"),
|
|
]
|
|
|
|
# ============= #
|
|
# === MOUSE === #
|
|
# ============= #
|
|
|
|
# Drag floating layouts.
|
|
mouse = [
|
|
Drag([MOD], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
|
|
Drag([MOD], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
|
|
Click([MOD], "Button2", lazy.window.bring_to_front()),
|
|
]
|
|
|
|
# =============== #
|
|
# === LAYOUTS === #
|
|
# =============== #
|
|
|
|
layouts = [
|
|
layout.Columns(border_focus_stack=["#d75f5f", "#8f3d3d"], border_width=4),
|
|
]
|
|
|
|
# =============== #
|
|
# === SCREENS === #
|
|
# =============== #
|
|
|
|
screens = [Screen()]
|
|
|
|
# ================ #
|
|
# === SETTINGS === #
|
|
# ================ #
|
|
|
|
auto_minimize = False
|