Merge branch 'master' of git.jeremydormitzer.com:jdormit/dotfiles

This commit is contained in:
Jeremy Dormitzer 2020-01-03 09:48:30 -05:00
commit 61403b940e

View File

@ -19,6 +19,16 @@
"-n "
"--lock-icon ~/Pictures/lock.png")))
(defcommand battery () ()
(let ((capacity
(string-trim
'(#\newline)
(run-shell-command
"cat /sys/class/power_supply/BAT0/capacity"
t))))
(echo-string (current-screen)
(format nil "Battery: ~A%" capacity))))
;; Keybindings
(define-key stumpwm:*root-map* (kbd "C-f") "firefox")
(define-key stumpwm:*root-map* (kbd "d") "exec rofi -show run")
@ -26,6 +36,7 @@
(define-key stumpwm:*root-map* (kbd "P") "exec passmenu")
(define-key stumpwm:*root-map* (kbd "N") "exec networkmanager_dmenu")
(define-key stumpwm:*root-map* (kbd "L") "lock")
(define-key stumpwm:*root-map* (kbd "b") "battery")
(define-key *top-map* (kbd "XF86MonBrightnessDown") "exec light -U 5")
(define-key *top-map* (kbd "XF86MonBrightnessUp") "exec light -A 5")
(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec pavolume volup")