from libqtile.lazy import lazy from libqtile.config import EzKey as Key from libqtile.config import EzClick as Click, EzDrag as Drag from config import apps keys = [ # Focus manipulation 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"), # 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", ), 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 Key( "M-n", lazy.layout.normalize(), desc="Normalize all window sizes", ), Key("M-S-n", lazy.layout.reset(), desc="Resets all window sizes"), Key( "M-t", lazy.window.toggle_floating(), desc="Toggles between floating and tiled state of a window", ), Key( "M-o", lazy.layout.maximize(), desc="Maximizes the window in the current layot", ), Key( "M-f", lazy.window.toggle_fullscreen(), desc="Toggles wiondow between tiled/floating and fullscreen", ), Key("", lazy.next_layout(), desc="Switches between layouts"), Key("", lazy.reload_config(), desc="Reload config"), # Audio and media control Key("", lazy.spawn("pamixer -t"), desc="Mutes Audio"), Key( "", lazy.spawn("pamixer -d 2"), desc="Lower Audio Volume", ), Key( "", lazy.spawn("pamixer -i 2"), desc="Raise Audio Volume", ), Key( "", lazy.spawn("playerctl previous"), desc="Play Previous Media", ), Key( "", lazy.spawn("playerctl next"), desc="Play Next Media", ), Key( "", lazy.spawn("playerctl play-pause"), desc="Toggle Play/Pause", ), # Rofi Key( "M-r", lazy.spawn("rofi -show drun -show-icons"), desc="Spawns Rofi", ), Key( "A-", lazy.spawn("rofi -show window -show-icons"), desc="Tab Windows", ), # 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-", lazy.spawn(apps["terminal"])), ] 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()), ]