Created
July 6, 2013 17:57
-
-
Save tychoish/5940680 to your computer and use it in GitHub Desktop.
stumpwm: notification function and dispay toggling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun notify (msg) | |
(run-shell-command (format nil "notify-send 'StumpWM' '~a'" msg))) | |
(defcommand conditional-restore-layout () () | |
(when (> (list-length (screen-heads (current-screen))) 1) | |
(restore-desktop-office) | |
(notify "changed to multihead mode")) | |
(when (> (list-length (screen-heads (current-screen)) 1) | |
(restore-desktop-laptop) | |
(notify "changed to laptop mode")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment