Re: [dev] Not Using a Window Manager?

From: Patrick Haller <201009-suckless_AT_haller.ws>
Date: Sun, 27 Feb 2011 00:10:25 +0800

On Sat, Feb 26, 2011 at 12:42:04PM +0000, Bjartur Thorlacius wrote:
>
> Sounds really cool, but have you figured out how to manage detached
> (off-screen) windows? Maybe windows that aren't on screen suck too
> much.

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}"
Received on Sat Feb 26 2011 - 17:10:25 CET

This archive was generated by hypermail 2.2.0 : Sat Feb 26 2011 - 17:24:03 CET