From 1bf9fd108da8177337c90996bc66653e0a0dac8a Mon Sep 17 00:00:00 2001 From: earnest ma Date: Mon, 7 Mar 2022 20:55:01 -0500 Subject: [PATCH] doom: Add personal/music module --- doom/.config/doom/init.el | 3 +++ .../.config/doom/modules/personal/music/config.el | 15 +++++++++++++++ .../.config/doom/modules/personal/music/doctor.el | 4 ++++ .../doom/modules/personal/music/packages.el | 4 ++++ 4 files changed, 26 insertions(+) create mode 100644 doom/.config/doom/modules/personal/music/config.el create mode 100644 doom/.config/doom/modules/personal/music/doctor.el create mode 100644 doom/.config/doom/modules/personal/music/packages.el diff --git a/doom/.config/doom/init.el b/doom/.config/doom/init.el index 6cbbbf6..f1bdde5 100644 --- a/doom/.config/doom/init.el +++ b/doom/.config/doom/init.el @@ -186,6 +186,9 @@ ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought + :personal + music + :config ;;literate (default +bindings +smartparens)) diff --git a/doom/.config/doom/modules/personal/music/config.el b/doom/.config/doom/modules/personal/music/config.el new file mode 100644 index 0000000..e8910fc --- /dev/null +++ b/doom/.config/doom/modules/personal/music/config.el @@ -0,0 +1,15 @@ +;;; personal/music/config.el -*- lexical-binding: t; -*- + +(use-package! playerctl + :when (executable-find "playerctl") + :config + ;; keybindings + ;; k prefix looks like it isn't defined, so let's borrow it for now + (map! :n "SPC k SPC" #'playerctl-play-pause-song + :n "SPC k s" #'playerctl-stop-song + :n "SPC k S" #'playerctl-status + :n "SPC k m" #'playerctl-metadata ; currently broken + :n "SPC k n" #'playerctl-next-song + :n "SPC k N" #'playerctl-seek-forward + :n "SPC k p" #'playerctl-previous-song + :n "SPC k P" #'playerctl-seek-backward)) diff --git a/doom/.config/doom/modules/personal/music/doctor.el b/doom/.config/doom/modules/personal/music/doctor.el new file mode 100644 index 0000000..811fd42 --- /dev/null +++ b/doom/.config/doom/modules/personal/music/doctor.el @@ -0,0 +1,4 @@ +;;; personal/music/doctor.el -*- lexical-binding: t; -*- + +(unless (executable-find "playerctl") + (warn! "Couldn't find playerctl executable")) diff --git a/doom/.config/doom/modules/personal/music/packages.el b/doom/.config/doom/modules/personal/music/packages.el new file mode 100644 index 0000000..e46a881 --- /dev/null +++ b/doom/.config/doom/modules/personal/music/packages.el @@ -0,0 +1,4 @@ +;; -*- no-byte-compile: t; -*- +;;; personal/music/packages.el + +(package! playerctl :pin "4c3a6132616fd28f902590bf6e63332e6055492b")