-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommands.lisp
57 lines (43 loc) · 1.67 KB
/
commands.lisp
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
(in-package :stumpwm)
(defcommand increase-volume () ()
"Increase the volume"
(run-shell-command "amixer sset Master unmute && amixer sset PCM 5+ unmute"))
(defcommand decrease-volume () ()
"Decrease the volume"
(run-shell-command "amixer sset Master unmute && amixer sset PCM 5- unmute"))
(defcommand mute () ()
"Mute/unmute the volume"
(run-shell-command "amixer sset Master toggle"))
(defcommand increase-brightness () ()
"Increase the brightness"
(run-shell-command "xbacklight -inc 5"))
(defcommand decrease-brightness () ()
"Decrease the brightness"
(run-shell-command "xbacklight -dec 5"))
(defcommand screenshot () ()
"Take a screenshot"
(run-shell-command "scrot -e 'mv $f ~/pictures/scrot/'"))
(defcommand dmenu () ()
"Run dmenu, the autocompleting launcher"
(run-shell-command "dmenu_run -i -b -p \"run command:\""))
(defcommand suspend () ()
"Suspend to ram. This requires the NOPASSWD argument in /etc/sudoers for pm-suspend"
(run-shell-command "sudo pm-suspend"))
(defcommand logout () ()
"exit out of X"
(run-shell-command "pkill xinit"))
(defcommand next-song () ()
"play the next song in playlist"
(run-shell-command "mpc next"))
(defcommand prev-song () ()
"play the previous song"
(run-shell-command "mpc prev"))
(defcommand stop-song () ()
"stop the song"
(run-shell-command "mpc stop"))
(defcommand play-song () ()
"plays/pauses the song"
(run-shell-command "mpc toggle"))
(defcommand run-compositor () ()
"Run compton"
(run-shell-command (concatenate 'string "compton --config " (getenv "XDG_CONFIG_HOME") "/compton/compton.conf")))