[openbox] Swap Windows Between Screens in Xinerama Mode

Miguel Bazdresch ob-01 at thewizardstower.org
Wed Jun 9 06:02:05 EDT 2004


* Adam Kessel <adam at rosi-kessel.org> [2004-06-08 23:53]:
> On Tue, 2004-06-08 at 15:39, Adam Kessel wrote:
> > Okay, here's the resulting script.  It's still fairly clunky, but at
> > least doesn't call wmctrl as many times.  It's too bad there's no way to
> > move the window without unmaximizing and remaximizing it.  Any
> > additional suggestions are appreciated.
> 
> One other nice feature would be to just move the *active* window from
> side to side--is there any command line tool that will report back the
> ID of the active window?

ID=`xdpyinfo | grep focus | cut -d ' ' -f 4 - | cut -d ',' -f 1`
xdpyinfo | grep focus | grep Parent &> /dev/null && ID=$((ID-1))

After executing these two lines ID contains the active window ID, and
you can pass it to wmctrl with the -i option (numerical id).

The second line is necessary because xdpyinfo reports the window id
differently for "graphical" windows, as opposed to text windows like
terms.

-- 
Miguel Bazdresch
http://thewizardstower.org/



More information about the openbox mailing list