Created
April 18, 2021 00:38
-
-
Save wangkuiyi/967926a7eb41a75c738e4ed8c6bf833b to your computer and use it in GitHub Desktop.
Move Emacs window to the right half of the screen
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
;; Move emacs window to the right half screen. -50 is a hack for macOS. | |
(let ((frame (selected-frame)) | |
(one-half-display-pixel-width (/ (display-pixel-width) 2))) | |
(set-frame-width frame one-half-display-pixel-width nil 'pixelwise) | |
(set-frame-height frame (- (display-pixel-height) 50) nil 'pixelwise) | |
(set-frame-position frame one-half-display-pixel-width 0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment