Created
December 9, 2008 23:17
-
-
Save wilkes/34146 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 twm-frame-full-screen-p () | |
(frame-parameter nil 'fullscreen)) | |
(defun twm-make-full-screen () | |
(when (and (featurep 'aquamacs) (not (twm-frame-full-screen-p))) | |
(aquamacs-toggle-full-frame))) | |
(defun twm-focus-window () | |
"assumes the largest window is the focus window" | |
(get-largest-window)) | |
(defun twm-focus-buffer () | |
(window-buffer (twm-focus-window))) | |
(defun twm-select-focus-window () | |
(interactive) | |
(select-window (twm-focus-window))) | |
(defun twm-dev-layout () | |
"1-2 layout" | |
(interactive) | |
(twm-make-full-screen) | |
(set-frame-font "-apple-monaco-medium-r-normal--14-120-72-72-m-120-mac-roman" t) | |
(delete-other-windows) | |
(split-window-horizontally) | |
(other-window 1) | |
; (set-window-buffer (selected-window) (caddr (buffer-list)) | |
(split-window-vertically) | |
(other-window 1) | |
; (set-window-buffer (selected-window) (cadddr (buffer-list))) | |
(twm-select-focus-window)) | |
(defun twm-focus-current-buffer () | |
(interactive) | |
(let* ((tmp (twm-focus-buffer))) | |
(progn | |
(set-window-buffer (twm-focus-window) (window-buffer)) | |
(set-window-buffer (selected-window) tmp) | |
(twm-select-focus-window)))) | |
(defun twm-zoomify () | |
(interactive) | |
(set-frame-font "-apple-monaco-medium-r-normal--16-120-72-72-m-120-mac-roman" t) | |
(delete-other-windows) | |
(twm-make-full-screen)) | |
(global-set-key [(meta shift return)] 'aquamacs-toggle-full-frame) | |
(global-set-key "\C-x\M-f" 'twm-select-focus-window) | |
(global-set-key "\C-x\M-x" 'twm-focus-current-buffer) | |
(global-set-key [f6] 'twm-zoomify) | |
(global-set-key [f5] 'twm-dev-layout) | |
(provide 'my-twm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment