dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 8639caf249a5c747eade38b17bacc5ffdf9fbba6
parent cafb793e02bb73c238c4f0fd157b505547882346
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu, 15 Feb 2018 01:39:58 +0000

.stumpwmrc: Refactor mpd key bindings.

Diffstat:
.stumpwmrc | 23+++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/.stumpwmrc b/.stumpwmrc @@ -43,18 +43,12 @@ (run-shell-command "dates" T)) (defcommand s/local-ip () () (run-shell-command "ip r" T)) +(defcommand s/mpc-status () () + (run-shell-command "mpc status" T)) ;; key bindings (defparameter *s/key-bindings* (let ((m (make-sparse-keymap))) - ;; audio - (define-key m (kbd "t") "exec mpc toggle") - (define-key m (kbd "n") "exec mpc next") - (define-key m (kbd "p") "exec mpc prev") - (define-key m (kbd "h") "exec mpc seek -10") - (define-key m (kbd "s") "exec mpc seek +10") - (define-key m (kbd "+") "exec vol-up") - (define-key m (kbd "-") "exec vol-down") ;; emacs client (define-key m (kbd "e") "exec ec") ;; browsers @@ -65,7 +59,20 @@ (define-key m (kbd "a") "s/dates") (define-key m (kbd "i") "s/local-ip") m)) + +;; mpd key bindings +(defparameter *s/mpd-key-bindings* + (let ((m (make-sparse-keymap))) + (define-key m (kbd "t") "exec mpc toggle") + (define-key m (kbd "n") "exec mpc next") + (define-key m (kbd "p") "exec mpc prev") + (define-key m (kbd "a") "exec mpc seek -10") + (define-key m (kbd "u") "exec mpc seek +10") + (define-key m (kbd "s") "s/mpc-status") + m)) + (define-key *root-map* (kbd ".") '*s/key-bindings*) +(define-key *root-map* (kbd ",") '*s/mpd-key-bindings*) (define-key *top-map* (kbd "XF86AudioLowerVolume") "amixer-Master-1-") (define-key *top-map* (kbd "XF86AudioRaiseVolume") "amixer-Master-1+") (define-key *top-map* (kbd "XF86ScreenSaver") "exec i3lock")