summaryrefslogtreecommitdiffstats
path: root/pissrc.example.lua
blob: 3097c799ac970f7e92446ad1df6344653bd83f89 (plain)
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
#!/usr/bin/lua

-- NOTE THAT THE CONFIG DOES __NOT__ HAVE TO BE IN LUA. Do whatever you want!

local function bind(key, cmd)
	os.execute(string.format('piss bind "%s" "%s"', key, cmd))
end

bind("Super + Ctrl + l", "slock")
bind("Super + Return", "st")
bind("Super + s", "bspc node -c")
bind("Super + Ctrl + r", "bspc wm -r")

for _, dir in ipairs({
	{ "h", "west" },
	{ "j", "south" },
	{ "k", "north" },
	{ "l", "east" }
}) do
	bind("Super + " .. dir[1], "bspc node -f " .. dir[2])
end

for _, dir in ipairs({
	{ "h", "west" },
	{ "j", "south" },
	{ "k", "north" },
	{ "l", "east" }
}) do
	bind("Super + Shift + " .. dir[1], "bspc node -s " .. dir[2])
end

bind("Super + p", "pkill picom && picom --backend glx & disown")
bind("Super + Shift + p", "pkill piss && piss ~/.config/piss/pissrc & disown")

local desktops = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" }
for i = 1, 9 do
	bind("Super + " .. i, "bspc desktop -f " .. desktops[i])
	bind("Super + Shift + " .. i, "bspc node -d " .. desktops[i])
end

bind("Super + r", "rofi -show drun -config ~/.config/rofi/gruvbox.rasi")
bind("Super + Shift + Return", "rofi -show run -config ~/.config/rofi/gruvbox.rasi")
bind("Super + Shift + q", "bspc quit")
bind("Super + Shift + s", "flameshot gui")
bind("Super + f", "pcmanfm")
bind("Super + space", "bspc node -t floating")
bind("Super + Shift + space", "bspc node -t tiled")