summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-12-07 23:25:14 +0000
committerjao <jao@gnu.org>2021-12-07 23:25:14 +0000
commit96ea525c9a3ed6472055b69fa5aaa0ee7be87005 (patch)
treedcdf715e226b00090e0d4af750892e699159e09d /init.org
parent52868fccd178aa60f1c95f0d967ef3869029d639 (diff)
downloadelibs-96ea525c9a3ed6472055b69fa5aaa0ee7be87005.tar.gz
elibs-96ea525c9a3ed6472055b69fa5aaa0ee7be87005.tar.bz2
giving spotifd another try via jao-mpris
Diffstat (limited to 'init.org')
-rw-r--r--init.org38
1 files changed, 27 insertions, 11 deletions
diff --git a/init.org b/init.org
index 4060754..b7cb1ec 100644
--- a/init.org
+++ b/init.org
@@ -2902,12 +2902,27 @@
#+begin_src emacs-lisp
(jao-load-path "espotify")
- (use-package espotify :demand t)
+ (use-package espotify
+ :demand t
+ :init (setq espotify-service-name "spotifyd"))
(use-package consult-spotify :demand t)
(defalias 'jao-spotify-album #'consult-spotify-album)
(defalias 'jao-spotify-track #'consult-spotify-track)
(defalias 'jao-spotify-artist #'consult-spotify-artist)
(defalias 'jao-spotify-playlist #'consult-spotify-playlist)
+
+ (use-package jao-mpris
+ :demand t
+ :config
+ (defun jao-mpris-setup-aliases ()
+ (defalias 'jao-spotify-toggle #'jao-mpris-play-pause)
+ (defalias 'jao-spotify-next #'jao-mpris-next)
+ (defalias 'jao-spotify-prev #'jao-mpris-previous)
+ (defalias 'jao-spotify-current #'jao-mpris-show-osd)))
+
+ (jao-mpris-setup-aliases)
+ (jao-mpris-register "spotifyd" nil (if jao-modeline-in-minibuffer-p -10 70))
+
#+end_src
*** mpc
#+begin_src emacs-lisp
@@ -2915,8 +2930,9 @@
:demand t
:commands jao-mpc-setup)
- (defvar jao-mopidy-port 6669)
- (jao-mpc-setup jao-mopidy-port 70)
+ ;; (defvar jao-mopidy-port 6669)
+ (defvar jao-mopidy-port nil)
+ (jao-mpc-setup jao-mopidy-port (if jao-modeline-in-minibuffer-p -10 70))
(defun jao-mpc-pport ()
(when (jao-mpc--playing-p jao-mopidy-port) jao-mopidy-port))
@@ -2967,12 +2983,12 @@
(defun jao-player-seek--10 () (interactive) (jao-player-seek -10))
(defun jao-spotify-clear () (interactive) (jao-mpc-clear jao-mopidy-port))
+
(defun jao-spotify-echo-current ()
(interactive)
(jao-mpc-echo-current jao-mopidy-port))
- (defun jao-spotify-show-playlist ()
- (interactive)
- (jao-mpc-show-playlist jao-mopidy-port))
+
+ (defalias 'jao-spotify-playlist #'jao-exwm-spt)
(defun jao-player-seek-m10 ()
(interactive)
@@ -2993,16 +3009,16 @@
("t" "track" jao-spotify-track)
("P" "playlist" jao-spotify-playlist)]
["Play"
- ("s" "toggle" espotify-play-pause)
- ("n" "next" espotify-next)
- ("p" "previous" espotify-previous)]
+ ("s" "toggle" jao-spotify-toggle)
+ ("n" "next" jao-spotify-next)
+ ("p" "previous" jao-spotify-prev)]
["Seek"
("f" "seek fwd" jao-player-seek-m10 :transient t)
("F" "seek bwd" jao-player-seek-m-10 :transient t)]
["Browse"
("l" "playing list" jao-spotify-show-playlist)
- ("c" "clear list"jao-spotify-clear :transient t)
- ("w" "currently playing" jao-spotify-echo-current)]])
+ ;; ("c" "clear list"jao-spotify-clear :transient t)
+ ("w" "currently playing" jao-spotify-current)]])
(transient-define-prefix jao-transient-media ()
[["Play"