diff options
| author | yuzu-eva <stevenhu@web.de> | 2024-12-17 18:52:36 +0100 |
|---|---|---|
| committer | yuzu-eva <stevenhu@web.de> | 2024-12-17 18:52:36 +0100 |
| commit | 1c8cab9a44fa80e88afc016067623d7e3a25bb10 (patch) | |
| tree | 27146ac82e14cf3201e9864f7fed40f3cbfc5e7c /commands.lisp | |
initial commit
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))) |
