(defun djcb-full-screen-toggle ()
"toggle full-screen mode"
(interactive)
(shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))
This requires the wmctrl program, for which there is (hopefully) a package in your distribution.
We can make a keybinding for this to, say, F11, which is the same one that e.g. FireFox use:
(global-set-key (kbd "<f11>") 'djcb-full-screen-toggle)
Note that instead of shell-command we could use the djcb-shell-command-maybe function instead, and get a warning if wmctrl is not installed.
No comments:
Post a Comment