mirror of
https://github.com/stumpwm/stumpwm-contrib.git
synced 2026-09-10 07:26:25 -04:00
Show new volume level in volume-up and volume-down commands
This commit is contained in:
parent
d0c05077ec
commit
b33f01a2f1
|
|
@ -763,13 +763,17 @@ Passed an argument of zero and if crossfade is on, toggles crossfade off."
|
|||
|
||||
(defcommand mpd-volume-up () ()
|
||||
(let* ((status (mpd-send-command "status"))
|
||||
(vol (read-from-string (assoc-value :volume status))))
|
||||
(mpd-send-command (format nil "setvol ~a" (+ vol *mpd-volume-step*)))))
|
||||
(vol (read-from-string (assoc-value :volume status)))
|
||||
(new-vol (+ vol *mpd-volume-step*)))
|
||||
(mpd-send-command (format nil "setvol ~a" new-vol))
|
||||
(message "~a" new-vol)))
|
||||
|
||||
(defcommand mpd-volume-down () ()
|
||||
(let* ((status (mpd-send-command "status"))
|
||||
(vol (read-from-string (assoc-value :volume status))))
|
||||
(mpd-send-command (format nil "setvol ~a" (- vol *mpd-volume-step*)))))
|
||||
(vol (read-from-string (assoc-value :volume status)))
|
||||
(new-vol (- vol *mpd-volume-step*)))
|
||||
(mpd-send-command (format nil "setvol ~a" new-vol))
|
||||
(message "~a" new-vol)))
|
||||
|
||||
(defcommand mpd-clear () ()
|
||||
(mpd-send-command "clear"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue