[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash, xbindkeys and dual screen



On 9/27/07, Andrew Sackville-West <andrew@farwestbilliards.com> wrote:
On Thu, Sep 27, 2007 at 12:44:32PM -0400, Nguyen, Cuong K. wrote:
>
>> You're probably right that the DISPLAY is always :0.0. You need another
>> way to toggle between 0 and 1. Try this:
>>
>> #!/bin/bash
>> swfile=/tmp/sw-file
>> if [ ! -f $swfile ]; then echo 0 > $swfile ; fi
>> echo $(( ! `cat $swfile` )) > $swfile
>> echo exec switchscreen `cat $swfile`
>>
>> Note that I just echo-ed the command because I don't have switchscreen
>> installed. The $(( ... )) syntax allows you to evaluate mathematical
>> expressions. Read "man bash"
>>
>> HTH
>>
> Works perfectly! Thanks HTH :)

Cuong, I'm curious, running dual-screen myself, about your setup. I am
running xinerama and that combines my two screens into one large
one. The mouse flows effortlessly from one to the other. I find it
works very well with a tiling WM (wmii here) and just love it. What do
you find to be the advantages/disadvantages to have two truly separate
screens?


A

Hi Andrew,

A quick question: what does "a tiling WM (wmii here)" mean?

For my setup: I have one flat monitor (main monitor) and another monitor is TV, and I want to watch movies on TV and work on another monitor, and that I do not want my mouse bothers the TV when viewing movies, that is why I setup so that the mouse can not move from one monitor to another (the mouse is bounded as normal monitor). Another advantage, I "think" but have not tried (will try it soon), is that if you have two mice and two keyboards, you can work on one monitor when your child is playing game on another monitor. Two separately working desktop with one CPU is cool, right?

KC.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG/ACyaIeIEqwil4YRArKQAKCXSd3w0REamY1CkqiPuQsaNMRM7QCg0PpU
sbxto7UAXHnwnwiJjw1Tyfk=
=tuZx
-----END PGP SIGNATURE-----



Reply to: