|
From: | Tim X |
Subject: | Re: customizing emacs windows |
Date: | Sat, 26 May 2007 23:50:43 +1000 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Petter Gustad <newsmail6@gustad.com> writes: > Tim X <timx@nospam.dev.null> writes: > > >> so rarely that its not really been necessary. I usually have about >> 15 different workspaces and different emacs frames on most of >> them. I then just switch between workspaces using two function keys >> or by moving the mouse to the left or right edge of the screen. > > I prefer to select Emacs frames using a popup menu. I've made a > function in sawfish which pops up a menu of all Emacs frames: > > (provide 'menu-of) > (require 'sawfish.wm.menus) > > (defun wm-class-is (w class) > (equal (aref (get-x-text-property w 'WM_CLASS) 1) class)) > > (defun emacs-p (w) > (wm-class-is w "Emacs")) > > (defun xterm-p (w) > (wm-class-is w "XTerm")) > > (defun popup-menu-of (pred) > "make popup windows of a certain type" > (popup-menu > (mapcar #'(lambda (w) > (list (window-name w) > (lambda () > (uniconify-window w) > (x-raise-window w) > (set-input-focus w)))) > (filter pred (managed-windows))))) > > (defun menu-of-emacs () > "make a popup menu of emacs windows" > (interactive) > (popup-menu-of emacs-p)) > > (defun menu-of-xterm () > "make a popup menu of xterm windows" > (interactive) > (popup-menu-of xterm-p)) > > > Then in the global keymap I bind menu-of-emacs to e.g. to H-1 so when I > press the Windows key and 1 I get a popup menu of all Emacs frames. > > Petter > > -- > ________________________________________________________________________ > Petter Gustad 8'h2B | ~8'h2B http://www.gustad.com/petter Exactly why I love sawfish as a wm! The combination of sawfish and emacs is truely friendly. Thanks for the code snippets. Tim -- tcross (at) rapttech dot com dot au
[Prev in Thread] | Current Thread | [Next in Thread] |