]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
added bba-toggle-fullscreen
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 8 Aug 2016 18:20:41 +0000 (20:20 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 8 Aug 2016 18:20:41 +0000 (20:20 +0200)
- s-return to toggle between fullscreen with battery mode and window mode.

bba.org

diff --git a/bba.org b/bba.org
index d1eceb73ac5c878bdaf16ef14cacaa973a009af3..bfe76e8f3d29bbb489da4e95c91268efec5bfc9e 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -1976,6 +1976,31 @@ Right from [[https://gist.github.com/etherald/dcdcf579751c75a2c796][gisthub]]:
 
 #+END_SRC
 
+* toggle fullscreen mode
+[2016-06-22 Wed 14:23]
+
+toggle full screen with super return. display battery status in
+fullscreen mode. disable scroll bar in fullscreen mode.
+
+#+BEGIN_SRC emacs-lisp
+  (defun bba-toggle-fullscreen()
+    "toggle fullscreen mode"
+    (interactive)
+    (if (equal 'fullboth (frame-parameter nil 'fullscreen))
+        (progn (set-frame-parameter nil 'fullscreen 'maximized)
+               (display-battery-mode -1)
+               (display-time-mode -1)
+               (scroll-bar-mode 1)
+               )
+      (progn (set-frame-parameter nil 'fullscreen 'fullboth)
+             (display-battery-mode 1)
+             (display-time-mode 1)
+             (scroll-bar-mode -1)
+             )
+        )
+    )
+  (global-set-key (kbd "s-<return>") 'bba-toggle-fullscreen)
+#+END_SRC
 * [[http://www.howardism.org/Technical/Emacs/eshell-fun.html][eshell-here]]
 Thanks to Howard Abrams.
 modified because current version lacks function have