You are not logged in.
Hello fellow Archers!
I'm using Xmonad for a couple of days now and as I'm getting used to the short cuts it's really a nice way of working.
There are some disadvantages compared to Openbox, mainly regarding the placement and focus of floating windows, but I'm currently learning Haskell and will solve this soon enough.
There's only one thing which really annoys me: I'm used to having half-transparent 80x25 terminals (I use urxvt) floating around my desktop. I would read a PDF or website in the background while working in the terminal in the foreground.
Is there any way to tell Xmonad that I want to start certain terminals in floating mode, while all other terminals should be in tiling mode? (Preferably only using urxvt.)
For instance I press Win+Shift+Enter and I get a tiled terminal and I press Alt+F1 and I get a floating one.
Thanks in advance for your help!
Offline
An idea on how to do it: you can run some of your urxvt's with different "-name" (see urxvt's manual page). Xmonad can match windows on name property...
Offline
I'm using Xmonad for a couple of days now
You beat me to it! For some intuitive reason, I want to learn Haskell before using Xmonad. Learning Haskell takes a bit of time though.
I'm currently learning Haskell and will solve this soon enough.
Maybe you have the better solution.
Anyway, interesting question. Bender's solution looks good. I'm a fan of short wrappers:
$ cat ~/bin/flterm
#!/bin/sh
urxvt -name "floating urxvt"
$ cat ~/bin/titerm
#!/bin/sh
urxvt -name "tiled urxvt"
then the "Haskell" part will be telling Xmonad how to handle those two; I can't help you there. (yet!)
P.S. If you're reading this through TTS, it's important for me to clarify that I don't particularly like rap. Even if it's performed by a short person.
Last edited by peets (2008-02-20 23:11:18)
Offline
For the xmonad part, you can get an idea on how to match class name by looking at the template xmonad.hs config file, particularly myManageHook. Since xmonad.hs files vary *very much* from person to person, you need to adapt that part to your setting. Minimal config for what you want to do would be something like this:
import XMonad
myManageHook = composeAll
[ className =? "floating urxvt" --> doFloat ]
main = xmonad defaults
defaults = defaultConfig { manageHook = myManageHook }
EDIT: forgotten import fixed
Last edited by bender02 (2008-02-21 00:12:05)
Offline
Thanks a lot, I've got it working now.
xprop | grep WM_CLASS for a window will give two values: the first correspondents to the title value below while the second can be used with className.
By using "urxvt -name urxvtfloat" the title is changed so that I got it working with the following code change in ~/.xmonad/xmonad.hs (some context provided)
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, title =? "urxvtfloat" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
@peets: You don't need to know Haskell in order to use Xmonad. But if you want to configure it to your needs, some knowledge is recommendable.
To be frank, I know that it'll take me quite some to learn Haskell. I barely start to grasp the ideas behind functional programming...
Offline
The problem that I find when using the -name flag is that the .Xdefaults are not processed properly. I think the -name flag is meant to be used for resource definitions, rather than titling the terminal window. Titles appear to be handled by the -n (iconName) and -T (title) flags, according to the urxvt manpages. However, these tags have no effect on the X classNames unless urxvt is executing another program (e.g. urxvt -T myTitle -e alsamixer)
thayer williams ~ cinderwick.ca
Offline
thayer: that's true, I think the -name parameter was originally intended as an access to an alternative resouce set (at least the urxvt manpage says so). I know it's not totally clean solution, but.... if you don't mind adding a couple of extra lines to .Xresources (essentially the copies of the usual urxvt.*, but now as <newrxvtname>.*), things should be back to normal. With the "advantage" of a possibility of using different font in the floating windows...
Offline
wuischke wrote:I'm using Xmonad for a couple of days now
You beat me to it! For some intuitive reason, I want to learn Haskell before using Xmonad. Learning Haskell takes a bit of time though.
On the other hand, I think Xmonad is an excellent environment in which to learn Haskell.
You don't need to know any Haskell to run Xmonad. I installed it a few days ago just to take a quick look, and I haven't been able to tear myself away from it.
noobus in perpetuus
Offline