Setting default tags for arbitrary applications in ruby-wmii
Message from 2022
This post is pretty old! Opinions and technical information in it are almost certainly oudated. Commands and configurations will probably not work. Consider the age of the content before putting any of it into practice.
I’ve been running wmii with the ruby-wmii configuration/script/event loop for a few months now, and just today decided to scratch an itch I’ve been having.
Basically, I keep a ‘1’ tag around with the floating model so I can overlap my web browser and IRC window (my IRC window needs to stay a fixed size because it’s shared between multiple machines using screen). However, when I start rhythmbox, I want it managed (and incidentally, full-screen) on the 'rock’ tag.
As it turns out, this is cake:
WMII::Configuration.define do border 1 font "fixed" selcolors "#FFFFFF #224422 #228822" normcolors "#FFFFFF #668866 #228822" colmode 'default' colwidth 0 grabmod 'Mod1' rules </Kdict.*/ -> dict /XMMS.*/ -> ~ /Gimp.*/ -> ~ /MPlayer.*/ -> ~ /XForm.*/ -> ~ /XSane.*/ -> ~ /fontforge.*/ -> ~ /KoLmafia.*/ -> ~ /Rhythmbox.*/ -> rock /.*/ -> ! /.*/ -> 1 EOF # MORE CONFIG end
Simply adding the rhythmbox matcher was all it took.
Also, as a bonus tip, if you’re a Gentoo user that has problems with ruby-wmii and wmii-3.5, you might want to downgrade to wmii-3.1 . However, simply emerging wmii-3.1 (probably from your portage overlay) will error out unless you unmerge the libixp ebuild that wmii-3.5 depends on:
sudo emerge -C libixp
sudo emerge -av '=wmii-3.1-r4'