Created
January 27, 2020 16:47
-
-
Save ieure/1ac6f5e2c612d3c164073c27406099bf to your computer and use it in GitHub Desktop.
This file contains 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 window-toggle-dedicated (&optional window) | |
"Toggle the dedicated flag on a window." | |
(interactive) | |
(let* ((window (or window (selected-window))) | |
(dedicated (not (window-dedicated-p window)))) | |
(when (called-interactively-p) | |
(message (format "%s %sdedicated" | |
(buffer-name (window-buffer window)) | |
(if dedicated "" "un")))) | |
(set-window-dedicated-p window dedicated) | |
dedicated)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment