Files
dotfiles/qtile/config.py

100 lines
2.1 KiB
Python
Raw Normal View History

2025-08-16 12:37:23 +02:00
# Qtile configuration by cerberus
2025-08-17 12:52:21 +02:00
from libqtile import qtile, bar
2025-08-16 12:37:23 +02:00
from libqtile.backend.wayland.inputs import InputConfig
2025-08-17 12:52:21 +02:00
from libqtile.config import Screen
2025-08-16 12:37:23 +02:00
2025-08-17 14:46:12 +02:00
from themes.colors import gruvbox_dark
2025-08-17 18:31:11 +02:00
from modules.keys import keybinds, mousebinds
2025-08-17 11:56:14 +02:00
from modules.groups import groups
2025-08-17 14:46:12 +02:00
from modules.widgets import widgets_main, widgets_portrait, widgets_media
2025-08-17 15:48:47 +02:00
from modules.hooks import *
from modules.layouts import layouts
2025-08-16 13:49:40 +02:00
2025-08-17 11:56:14 +02:00
# Application definitions
2025-08-17 18:31:11 +02:00
APPS = {
2025-08-16 13:52:14 +02:00
"terminal": "kitty",
"browser": "firefox",
"filebrowser": "nemo",
2025-08-17 11:56:14 +02:00
"cli-filebrowser": "yazi",
"editor": "nvim",
2025-08-16 13:52:14 +02:00
}
2025-08-17 12:52:21 +02:00
# Screens
screens = [
# Left screen
Screen(
top=bar.Bar(
2025-08-17 14:46:12 +02:00
widgets_media,
background=gruvbox_dark["bg0_hard"],
2025-08-17 12:52:21 +02:00
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
),
),
# Center screen
Screen(
top=bar.Bar(
2025-08-17 14:46:12 +02:00
widgets_main,
background=gruvbox_dark["bg0_hard"],
2025-08-17 12:52:21 +02:00
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
),
),
# Right screen
Screen(
top=bar.Bar(
2025-08-17 14:46:12 +02:00
widgets_portrait,
background=gruvbox_dark["bg0_hard"],
2025-08-17 12:52:21 +02:00
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
)
),
]
2025-08-17 14:46:12 +02:00
widget_defaults = dict(
font="Open Sans",
fontsize=22,
foreground=gruvbox_dark["fg1"],
)
2025-08-17 11:56:14 +02:00
# Essentials
2025-08-17 18:31:11 +02:00
keys = keybinds()
mouse = mousebinds()
2025-08-17 11:56:14 +02:00
groups = groups
2025-08-17 15:48:47 +02:00
layouts = layouts
2025-08-17 11:56:14 +02:00
# Wayland specific configuration
2025-08-16 12:37:23 +02:00
if qtile.core.name == "X11":
term = "urvx"
elif qtile.core.name == "wayland":
term = "foot"
wl_input_rules = {
"type:keyboard": InputConfig(
kb_repeat_delay=200,
kb_repeat_rate=60,
kb_layout="de",
kb_options="nodeadkeys",
),
}
wl_xcursor_theme = None
wl_xcursor_size = 18
2025-08-17 11:56:14 +02:00
# General Qtile configuration
dgroups_key_binder = None
dgroups_app_rules = [] # type: list
follow_mouse_focus = True
bring_front_click = True
floats_kept_above = True
cursor_warp = True
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True
auto_minimize = True
wmname = "Qtile"