I've been playing around with xmonad 0.2, and so far it's been pretty pleasant. I have a few questions. I'm running xmonad in wide mode exclusively, since my laptop screen is fairly small. First, when I run emacs, it initially comes up in non-fullscreen mode (basically, it uses the default dimensions I set in my .Xresources file, which don't quite fill the screen). When I cycle through other windows and come back to emacs the WM resizes it correctly. I'm wondering why it doesn't do so right away. Is this a bug? Second, I was wondering if there is a way to display the current workspace number and/or window title in a dzen status bar. Third, is it possible to swap workspaces i.e. change workspace 2 to 1 and vice-versa? Thanks for all your help, Mike
On Aug 3, 2007, at 21:58 , Michael Vanier wrote:
First, when I run emacs, it initially comes up in non-fullscreen mode (basically, it uses the default dimensions I set in my .Xresources file, which don't quite fill the screen). When I cycle through other windows and come back to emacs the WM resizes it correctly. I'm wondering why it doesn't do so right away. Is this a bug?
Dunno about FSF emacs, but xemacs is very evil about window sizing (violates the ICCCM in about every possible way, far as I can tell) --- not surprising that xmonad has issues with it. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
On Fri, Aug 03, 2007 at 06:58:02PM -0700, Michael Vanier wrote:
I've been playing around with xmonad 0.2, and so far it's been pretty pleasant. I have a few questions. I'm running xmonad in wide mode exclusively, since my laptop screen is fairly small.
First, when I run emacs, it initially comes up in non-fullscreen mode (basically, it uses the default dimensions I set in my .Xresources file, which don't quite fill the screen). When I cycle through other windows and come back to emacs the WM resizes it correctly. I'm wondering why it doesn't do so right away. Is this a bug?
Yes, it's a bug, fixed in darcs: Sun Jun 3 13:31:53 PDT 2007 Stefan O'Rear <stefanor@cox.net> * Correctly handle resize requests (-12 +22) Xmonad now implements resize requests in a consistent manner. * If the window is FLOATING, we implement the program's request, and correctly update the StackSet; so it will keep the new size. This should work correctly even for non-current windows. * Otherwise, we ignore the request. As per ICCCM, we send a fake ConfigureNotify containing the new (unchanged) geometry. This is perfectly ICCCM compliant, and if it breaks your client, it's your own fault. This patch requires setConfigureEvent, which is added to X11-extras by a patch approximately contemporaneous with this one.
Second, I was wondering if there is a way to display the current workspace number and/or window title in a dzen status bar.
It's been done. I think it involves: (in Config.hs) logHook = do whatever and print status to stdout (in .xinitrc) tail -f xmonadout | dzen2 -options & xmonad > xmonadout
Third, is it possible to swap workspaces i.e. change workspace 2 to 1 and vice-versa?
Not in the standard code, but implementing such a command is pretty simple. (in Config.hs, untested code!) swap :: WorkspaceId -> WorkspaceId -> X () swap i1 i2 = windows $ \ss -> ss{ current = fudge' (current ss) , visible = map fudge' (visible ss) , hidden = map fudge (hidden ss) } where fudge' ws = ws{ workspace = fudge (workspace ws) } fudge ws | tag ws == i1 = ws{ tag = i2 } | tag ws == i2 = ws{ tag = i1 } | otherwise = ws Stefan
Michael Vanier <mvanier@cs.caltech.edu> writes:
Second, I was wondering if there is a way to display the current workspace number and/or window title in a dzen status bar.
You can use the DynamicLog contrib module and then set a loogHook in Config.hs. This prints the string you are interested in to xmonad's stdout which you can pipe to a dzen instance.
Third, is it possible to swap workspaces i.e. change workspace 2 to 1 and vice-versa?
I wrote such an extension for my own use, but I didn't get around to cleaning it up yet. I use it like this in my config: ... , ((modMask, xK_a), submap . M.fromList $ [((0, k), swap i) | (i,k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..]]) ... Here's the the patch anyways ... Benedikt
participants (4)
-
Benedikt Schmidt -
Brandon S. Allbery KF8NH -
Michael Vanier -
Stefan O'Rear