diff options
Diffstat (limited to 'lib/media/jao-spt.el')
-rw-r--r-- | lib/media/jao-spt.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/media/jao-spt.el b/lib/media/jao-spt.el index adafed6..b8ef0f0 100644 --- a/lib/media/jao-spt.el +++ b/lib/media/jao-spt.el @@ -28,6 +28,7 @@ (require 'jao-notify) (defvar jao-spt-bin (expand-file-name "~/bin/spt")) +(defvar jao-spt-format "'%s %t - %a [%r] %f'") (defun jao-spt--exec (&rest args) (let ((display-buffer-alist `((".*spt commands.*" display-buffer-no-window))) @@ -43,7 +44,9 @@ ;;;###autoload (defun jao-spt-update-status () (interactive) - (let ((st (string-trim (shell-command-to-string (format "%s pb" jao-spt-bin))))) + (let ((st (string-trim (shell-command-to-string (format "%s pb -f %s" + jao-spt-bin + jao-spt-format))))) (setq jao-spt--status-str (when (string-prefix-p "▶" st) st)) (jao-minibuffer-refresh) st)) @@ -70,8 +73,13 @@ (jao-notify (jao-spt-update-status)))) ;;;###autoload +(defun jao-spt-toggle-shuffle () + (interactive) + (jao-spt--exec "pb" "--shuffle")) + +;;;###autoload (defun jao-spt-set-up () - (jao-minibuffer-add-variable 'jao-spt--status-str 20)) + (jao-minibuffer-add-msg-variable 'jao-spt--status-str)) (provide 'jao-spt) ;;; jao-spt.el ends here |