Skip to content
Browse files

Add toggle-fullscreen function. (for X only)

Thanks to Daniel Nelson (Bluejade)
  • Loading branch information...
1 parent 3e66ebe commit 92fe7e3ad8ef934cc9606cce6ad5300346983e00 @technomancy committed Sep 6, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 starter-kit-defuns.el
View
9 starter-kit-defuns.el
@@ -207,6 +207,15 @@ Symbols matching the text at point are put first in the completion list."
(equal (char-syntax (char-before)) ?\")))
(paredit-mode 1))
+(defun toggle-fullscreen ()
+ (interactive)
+ ;; TODO: this only works for X. patches welcome for other OSes.
+ (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
+ '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
+ (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
+ '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0)))
+
+
;; A monkeypatch to cause annotate to ignore whitespace
(defun vc-git-annotate-command (file buf &optional rev)
(let ((name (file-relative-name file)))

0 comments on commit 92fe7e3

Please sign in to comment.
Something went wrong with that request. Please try again.