summaryrefslogtreecommitdiff
path: root/commands.lisp
blob: 66c657d8c1204e0c0f633f2cc83cf84f626e325a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)))