-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_keybindings.py
100 lines (75 loc) · 2.61 KB
/
config_keybindings.py
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
"""
MODIFY THIS FILE TO CREATE CUSTOM KEYBINDINGS
Keybindings are configured with tuples, inside Predifined lists Variables
"""
from libqtile.confreader import ConfigError
# Import default mod keys
from keys.default import *
from functions import PWA
from os.path import expanduser
HOME = expanduser("~")
# Define constants here
# TERMINAL = "alacritty"
TERMINAL = "gnome-terminal"
BROWSER = "google-chrome"
# Basic window manager movements
# Qtile shutdown/restart keys
SHUTDOWN_MODIFIER = [MOD, CONTROL]
RESTART = "r"
SHUTDOWN = "q"
# Group movement keys:
GROUPS_KEY = CONTROL
SWAP_GROUP_KEY = SHIFT
NEXT_GROUP = "period"
PREV_GROUP = "comma"
# --------------- HARDWARE_CONFIGS --------------- #
HARDWARE_KEYS = [
# VOLUME
([], "XF86AudioLowerVolume", "pactl set-sink-volume @DEFAULT_SINK@ -5%"),
([], "XF86AudioRaiseVolume", "pactl set-sink-volume @DEFAULT_SINK@ +5%"),
([], "XF86AudioMute", "pactl set-sink-mute @DEFAULT_SINK@ toggle"),
# BRIGHTNESS
([], "XF86MonBrightnessUp", "brightnessctl set +10%"),
([], "XF86MonBrightnessDown", "brightnessctl set 10%-"),
]
APPS = [
([MOD], "Return", TERMINAL),
([MOD], "e", "thunar"),
([MOD, ALT], "d", "emacs"),
([MOD, ALT], "o", "env LIBGL_ALWAYS_SOFTWARE=1 obs"),
([MOD, ALT], "v", "gvim"),
([MOD], "b", BROWSER),
([MOD, ALT], "c", "code"),
([MOD, ALT], "a", "pavucontrol"),
([MOD, ALT], "e", "vim -g .config/qtile/config.py"),
([MOD, ALT], "z", "zoom"),
# MEDIA HOTKEYS
([MOD], "Up", "pulseaudio-ctl up 5"),
([MOD], "Down", "pulseaudio-ctl down 5"),
# Makes reference to play-pause script
# You can find it in my scripts repository
([ALTGR], "space", "play-pause"),
# ROFI
# ([MOD], "space", 'rofi -modi "drun,power-menu:rofi-power-menu,run,window,ssh" -show drun -show-icons'),
([ALT], "space", 'rofi -show drun'),
# SCREENSHOT
([], "Print", "xfce4-screenshooter"),
# FULL SCREEN SCREENSHOT
([ALT], "Print", "xfce4-screenshooter -f -c"),
# TERMINAL APPS
([MOD, ALT], "n", TERMINAL + " -e nvim"),
]
CUSTOM_SPAWN_KEYS = [
# PWA keys
([MOD, ALT], "s", PWA.spotify()),
([MOD, ALT], "m", PWA.music()),
([MOD, ALT], "t", PWA.calendar()),
([MOD, ALT], "y", PWA.youtube()),
([MOD, ALT], "l", PWA.notion()),
([MOD, ALT], "h", PWA.habitica()),
]
SPAWN_KEYS = HARDWARE_KEYS + APPS + CUSTOM_SPAWN_KEYS
SPAWN_CMD_KEYS = [
# Takes full screenshot and creates a file on the screenshot folder
([SHIFT], "Print", f"xfce4-screenshooter -f -s {HOME}/Pictures/Screenshots/"),
]