Skip to content

Instantly share code, notes, and snippets.

@tychoish
Created July 6, 2013 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tychoish/5940680 to your computer and use it in GitHub Desktop.
Save tychoish/5940680 to your computer and use it in GitHub Desktop.
stumpwm: notification function and dispay toggling
(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