aboutsummaryrefslogtreecommitdiff
path: root/linux/qtile/config/keys.m4.py
blob: 77e4f9b0df76af180216dfc2d512586b8cda050a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
keys = [
    # A list of available commands that can be bound to keys can be found
    # at https://docs.qtile.org/en/latest/manual/config/lazy.html
    # Switch between windows
    Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
    Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
    Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
    Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
    # Move windows between left/right columns or move up/down in current stack.
    # Moving out of range in Columns layout will create new column.
    Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"),
    Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"),
    Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"),
    # Grow windows. If current window is on the edge of screen and direction
    # will be to screen edge - window would shrink.
    Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"),
    Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"),
    Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"),
    Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"),
    Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"),
    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    # Key(
    #     [mod, "shift"],
    #     "Return",
    #     lazy.layout.toggle_split(),
    #     desc="Toggle between split and unsplit sides of stack",
    # ),
    Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
    Key([mod1], "f4", lazy.window.kill(), desc="Kill focused window"),
    Key(
        [mod],
        "f",
        lazy.window.toggle_fullscreen(),
        desc="Toggle fullscreen on the focused window",
    ),
    Key([mod], "space", lazy.window.toggle_floating(), desc="Toggle floating on the focused window"),
    Key([mod, "control"], "c", lazy.reload_config(), desc="Reload the config"),
    Key([mod, "control", "shift"], "c", lazy.restart(), desc="Restart QTile"),
    Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
    Key([mod], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
    Key([mod1], "l", lazy.spawn("xsecurelock"), desc="Toggle floating on the focused window"),
    #Key([mod], 'd', lazy.run_extension(extension.DmenuRun(
    #    dmenu_ignorecase=True,
    #    dmenu_font="Andika-8",
    #    dmenu_lines=10,
    #    dmenu_bottom=True,
    #))),
    Key([mod], 'd', lazy.spawn("rofi -show drun")),

    # audio
    Key([], 'XF86AudioRaiseVolume', lazy.spawn('amixer sset Master 5%+')),
    Key([], 'XF86AudioLowerVolume', lazy.spawn('amixer sset Master 5%-')),
    Key([], 'XF86AudioMute', lazy.spawn('amixer sset Master toggle')),
    Key([], 'XF86AudioMicMute', lazy.spawn('amixer set Capture toggle')),
    
    # backlight
    Key([], 'XF86MonBrightnessDown', lazy.spawn('brightnessctl set 5%-')),
    Key([], 'XF86MonBrightnessUp', lazy.spawn('brightnessctl set +5%')),

    # tt gui
    Key([mod, "shift"], "Return", lazy.spawn("/home/jakob/.local/bin/tt-g")),
]