The Lambda Lab
/
projects
/
emus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d0b58f6
)
Added track scrubbing.
author
Tim Vaughan
<timv@ughan.xyz>
Mon, 9 Dec 2019 11:04:58 +0000
(12:04 +0100)
committer
Tim Vaughan
<timv@ughan.xyz>
Mon, 9 Dec 2019 11:04:58 +0000
(12:04 +0100)
emus.el
patch
|
blob
|
history
diff --git
a/emus.el
b/emus.el
index
04a8e73
..
898b403
100644
(file)
--- a/
emus.el
+++ b/
emus.el
@@
-343,6
+343,21
@@
(interactive)
(emus--play-adjacent-album t))
(interactive)
(emus--play-adjacent-album t))
+(defun emus-jump (seconds)
+ "Jump forward in current track by SECONDS seconds."
+ (emus--with-library
+ (emus-send-cmd "jump" (format "%+ds" seconds))))
+
+(defun emus-jump-10s-forward ()
+ "Jump 10 seconds forward in current track."
+ (interactive)
+ (emus-jump 10))
+
+(defun emus-jump-10s-backward ()
+ "Jump 10 seconds backward in current track."
+ (interactive)
+ (emus-jump -10))
+
(defun emus-display-status ()
(interactive)
(emus--with-library
(defun emus-display-status ()
(interactive)
(emus--with-library
@@
-473,6
+488,8
@@
(defun emus-play-prev-status () (interactive) (emus-play-prev) (emus-display-status))
(defun emus-play-next-album-status () (interactive) (emus-play-next-album) (emus-display-status))
(defun emus-play-prev-album-status () (interactive) (emus-play-prev-album) (emus-display-status))
(defun emus-play-prev-status () (interactive) (emus-play-prev) (emus-display-status))
(defun emus-play-next-album-status () (interactive) (emus-play-next-album) (emus-display-status))
(defun emus-play-prev-album-status () (interactive) (emus-play-prev-album) (emus-display-status))
+(defun emus-jump-10s-forward-status () (interactive) (emus-jump-10s-forward) (emus-display-status))
+(defun emus-jump-10s-backward-status () (interactive) (emus-jump-10s-backward) (emus-display-status))
(defun emus-centre-current-status () (interactive) (emus-centre-current) (emus-display-status))
(defvar emus-browser-mode-map
(defun emus-centre-current-status () (interactive) (emus-centre-current) (emus-display-status))
(defvar emus-browser-mode-map
@@
-487,6
+504,8
@@
(define-key map (kbd "p") 'emus-play-prev-status)
(define-key map (kbd "N") 'emus-play-next-album-status)
(define-key map (kbd "P") 'emus-play-prev-album-status)
(define-key map (kbd "p") 'emus-play-prev-status)
(define-key map (kbd "N") 'emus-play-next-album-status)
(define-key map (kbd "P") 'emus-play-prev-album-status)
+ (define-key map (kbd ",") 'emus-jump-10s-backward-status)
+ (define-key map (kbd ".") 'emus-jump-10s-forward-status)
(define-key map (kbd "c") 'emus-centre-current-status)
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
(define-key map (kbd "c") 'emus-centre-current-status)
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
@@
-500,6
+519,8
@@
(kbd "p") 'emus-play-prev-status
(kbd "N") 'emus-play-next-album-status
(kbd "P") 'emus-play-prev-album-status
(kbd "p") 'emus-play-prev-status
(kbd "N") 'emus-play-next-album-status
(kbd "P") 'emus-play-prev-album-status
+ (kbd ",") 'emus-jump-10s-backward-status
+ (kbd ".") 'emus-jump-10s-forward-status
(kbd "c") 'emus-centre-current-status))
map)
"Keymap for emus.")
(kbd "c") 'emus-centre-current-status))
map)
"Keymap for emus.")