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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
#!/usr/bin/env python3
from libqtile.config import Key, Screen
from libqtile.command import lazy
class MyKeys():
def init_keys(self,
mod="mod4",
browser="qutebrowser",
term="alacritty",
):
my_keys = [
Key([mod], "Return",
lazy.spawn(term),
desc='Launches My Terminal'
),
Key([mod, "shift"], "a",
lazy.spawn('anki'),
desc='Launch anki'),
Key([mod, "shift"], "m",
lazy.spawn("spotify"),
desc="Laucnh spotify"),
Key([mod], "Tab",
lazy.spawn("dmenu_run -p 'Run: '"),
desc='Run Launcher'
),
Key([mod], "p",
lazy.spawn("passmenu -p 'Password for: '"),
),
Key([mod], "b",
lazy.spawn(browser),
desc='Qutebrowser'
),
Key([mod, "shift"], "c",
lazy.next_layout(),
desc='Toggle through layouts'
),
Key([mod], "q",
lazy.window.kill(),
desc='Kill active window'
),
Key([mod, "shift"], "r",
lazy.restart(),
desc='Restart Qtile'
),
Key([mod, "shift"], "0",
lazy.shutdown(),
desc='Shutdown Qtile'
),
Key([mod, "shift"], "e",
lazy.spawn("emacsclient -c -a 'emacs'"),
desc='Doom Emacs'
),
### Switch focus of monitors
Key([mod], "period",
lazy.next_screen(),
desc='Move focus to next monitor'
),
Key([mod], "comma",
lazy.prev_screen(),
desc='Move focus to prev monitor'
),
### Treetab controls
Key([mod, "shift"], "h",
lazy.layout.move_left(),
desc='Move up a section in treetab'
),
Key([mod, "shift"], "l",
lazy.layout.move_right(),
desc='Move down a section in treetab'
),
### Window controls
Key([mod], "j",
lazy.layout.down(),
desc='Move focus down in current stack pane'
),
Key([mod], "k",
lazy.layout.up(),
desc='Move focus up in current stack pane'
),
Key([mod, "shift"], "j",
lazy.layout.shuffle_down(),
lazy.layout.section_down(),
desc='Move windows down in current stack'
),
Key([mod, "shift"], "k",
lazy.layout.shuffle_up(),
lazy.layout.section_up(),
desc='Move windows up in current stack'
),
Key([mod], "h",
lazy.layout.shrink(),
lazy.layout.decrease_nmaster(),
desc='Shrink window (MonadTall), decrease number in master pane (Tile)'
),
Key([mod], "l",
lazy.layout.grow(),
lazy.layout.increase_nmaster(),
desc='Expand window (MonadTall), increase number in master pane (Tile)'
),
Key([mod], "n",
lazy.layout.normalize(),
desc='normalize window size ratios'
),
Key([mod], "m",
lazy.layout.maximize(),
desc='toggle window between minimum and maximum sizes'
),
Key([mod, "shift"], "f",
lazy.window.toggle_floating(),
desc='toggle floating'
),
Key([mod], "f",
lazy.window.toggle_fullscreen(),
desc='toggle fullscreen'
),
### Stack controls
Key([mod, "shift"], "Tab",
lazy.layout.rotate(),
lazy.layout.flip(),
desc='Switch which side main pane occupies (XmonadTall)'
),
Key([mod, "shift"], "space",
lazy.layout.toggle_split(),
desc='Toggle between split and unsplit sides of stack'
),
### Volume controls
Key([], "XF86AudioLowerVolume",
lazy.spawn('amixer sset Master 5%-'),
desc="Decrease volume"
),
Key([], "XF86AudioRaiseVolume",
lazy.spawn('amixer sset Master 5%+'),
desc="Increase volume"
),
### Spotify
Key([mod, "shift"], "p",
lazy.spawn("spotify-control play-pause"),
desc="play/pause music"
),
Key([mod, "shift"], "n",
lazy.spawn("spotify-control next"),
desc="next song"
),
Key([mod, "shift"], "b",
lazy.spawn("spotify-control previous"),
desc="previous song"
),
### Change languages
Key([mod], "F1",
lazy.spawn("setxkbmap us -option caps:swapescape"),
desc= "change to US layout"
),
Key([mod],"F2",
lazy.spawn("setxkbmap gr"),
desc= "change to greek layout"
),
]
return my_keys
|