(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)))