On 02/26/2011 11:10 AM, Patrick Haller wrote:
unmapped windows => xdotool search stupid_window windowmap mapped not viewable => xdotool search stupid_window windowmove 0 0 I keep a stack of unmapped windows (especially for surf, which i open unmapped), managed via the script below. Patrick #!/bin/bash dir="${HOME}/.wm-banished" [[ ! -d $dir ]]&& mkdir -p $dir [[ "$1" = "push" ]]&& { # no window manager = we don't know what's focus'd, use getmouselocation or selectwindow w_id=$(xdotool selectwindow ) xdotool windowunmap $w_id touch "${dir}/${w_id}" exit } w_id=$( ls -tr $dir | tail -1) [[ "$w_id" = "" ]]&& { echo -e "\n Bad news... \n no souls remain banished \n" | xmessage -file - exit } xdotool windowmap $w_id rm -f "${dir}/${w_id}"
This is very cool, however I have one question. Correct me if I'm wrong, but you're replacing window-manager functionality with various small scripts and built-in X tools, right? So wouldn't you just be creating a (very minimalist) window manager out of those tools? I haven't actually used them yet so please feel free to correct/scold/yell at/damn me if I'm wrong.
-Steve