diff options
Diffstat (limited to 'commands.lisp')
| -rw-r--r-- | commands.lisp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/commands.lisp b/commands.lisp new file mode 100644 index 0000000..66c657d --- /dev/null +++ b/commands.lisp @@ -0,0 +1,16 @@ +(defpackage #:config.commands + (:use #:cl #:config #:stumpwm)) +(in-package #:config.commands) + +(defcommand get-current-volume () () + (let* ((raw-output (run-shell-command "wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{ printf(\"%s %s %d%% \", $3, $1, $2*100) }'" t))) + (message "~a" raw-output))) + +(defcommand get-current-temp () () + (let* ((raw-output (run-shell-command "sensors | sed -n /Tctl/p | sed 's/Tctl: *+/Temp: /'" t))) + (message "~a" raw-output))) + +(defcommand print-calendar () () + (let* ((raw-output (run-shell-command + "cal | sed -e \"s/ $(date +%e) /\<$(date +%e)\>/\"" t))) + (message "~a" raw-output))) |
