#windowmanager
so... yesterday...
i got my #wminizer script working.
today, i intend to do a proper write up of it.
this is not that write up.
this is just me spouting a little victory song and dance. (and may get some passages for copypasta to the proper write up if i just let my fingers fly over the keyboard while thinking about it...)
wminizer is to wmrotate as wmrotate is to wm.
wmrotate has a while loop with a list of window managers to run in sequence. -- (why? wmrotate lets you cycle through window managers without losing your entire current Xwindows gui session and all programs currently running. cool huh?)
wminizer has a while loop with a list of wmrotate scripts to run in sequence.
why?
wmrotate is stuck on the one unchangeable list for the xsession. so if you want to add another wm to the list, or remove one, or change their sequence, you have to wait for a restart of the X11 server.
wminizer, allows the sequence to be changed.
wmrotate, to switch to the next window manager, simply kill the current window manager, and the next loads instantly.
wmrotate still works the same in wminizer. kill one wm to move to the next.
to implement a new list of wm, without losing your x session and all running programs, just kill the wmrotate script currently on.
in the initial default configuration, wminizer uses just wmrotate1 and wmrotate2, but you could have more elaborate arrangements.
just having 2 wmrotate scripts is sufficient to be able to switch between them to enable a live config change.
the two do not even have to be evolving versions of the same to toggle to.
one could be your main sequence that you edit, and the other, just a fallback to bounce past when refreshing the main one to be active with new edits.
as in, make edits to your wmrotate1, kill wmrotate1 so you're in wmrotate2 then, which might just have openbox/dwm/twm in it, which you're only in for a second before killing it, to get into the new wmrotate1.
or could be both the same, just one catching up with the other, edit by edit.
also... wminizer's just the/ a first increment more advanced than wmrotate.
all kinds more conditionals and syntactical conveniences and more elaborate arrangements of which window managers starting when or how, specifying, all sorts of if-else'ing possible...
but for now, for my bash-fu, this is accomplishment enough, for me. ;D ... more will come in due course.
so... i may as well point out the parts here in this ramble...
example wmrotate1 script:
#!/bin/bash
while true
do
icewm
dwm
herbstluftwm
dwm
spectrwm
dwm
done
example wmrotate2 script:
```#!/bin/bash
while true
do
dwm
spectrwm
openbox
xmonad
i3
done
````
either of which can be used as a standard wmrotate on its own.
example wminizer script:
```#!/bin/bash
GNU GPL
wminizer
runs wmrotate where wmrotate ran window managers
this enables killing the current wmrotate, to
cycle to the next wmrotate., thus enabling changing
the wm list, without having to restart your x session.
while true
do
wmrotate1
wmrotate2
done
```
and then of course have it be launched from some kind of Xsession or xinitrc or whatever other way you startx or whatever and it reads the right thing...
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/Xresources
sysmodmap=/etc/X11/xinit/Xmodmap
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if [ -n "`/etc/X11/chooser.sh`" ]; then
command="`/etc/X11/chooser.sh`"
else
failsafe="yes"
fi
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?* ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
if [ -n "$failsafe" ]; then
wminizer
xclock -geometry 50x50-1+1 &
xterm -geometry 80x38+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
else
exec $command
fi
export PATH=$PATH:/home/digit/bin
wmrotate & wmpid=$
wait $wmpid
(note that's basically just like a defualt devuan Xsession/xinitrc thingy, with twm in the fallback section replaced with wminizer, and the wmrotate and wmpid stuff added at the end. ... remember, my bash-fu no good, this was just the first working jank. can be cleaned up more yet. ... and should be for the "proper" write up. but for now, this is what you get from me. heh.)
okay, that'll do for now.
this twig snapped in the forest,
and now some can hear it.
so it definitely happened.
;)
yeah, i'll get wminizer cleaned up and put in a public hosted git repo with a helpful readme.md and nice accoutrements and things.
"soon".
;)
and then further development on the more elaborate arrangements can proceed.
https://bbs.archlinux.org/viewtopic.php?pid=320776#p320776 was the original inspiration for wmrotate. props to gazj and the others who helped in that thread, from all those years ago.
ps, i was at first going to call it wminator... then the whimsy of the name wminizer struck and stuck. get it? sounds like womaniser. :3 ... not there's no valid reason or connection, to womanising... but wminizing, i guess is a facilitation of promiscuity when comes to window managers. ... yeah, it fits. lol.
#windowmanager #windowmanagers #desktop #geekings #scripts #wmrotate #wminizer #foss #X11 #xinit
aight, enough posting social commentary churn, reacting to the trolling.
onto something i actually like, something positive, something useful...
#herbstluftwm lets me do things i cant even do in my #xmonad config. #lub #foss
herbstluftwm evokes such ridiculous giddy joy.
very good #windowmanager