From 1c8cab9a44fa80e88afc016067623d7e3a25bb10 Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Tue, 17 Dec 2024 18:52:36 +0100 Subject: initial commit --- commands.lisp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 commands.lisp (limited to 'commands.lisp') 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))) -- cgit v1.2.3