You are not logged in.
Manipulate the XRandR system from a dmenu instance.
https://php.radford.edu/~sdellysse/drandr.rb
I got tired of having to open the a throwaway terminal everytime I wanted to hook my netbook up to my external monitor, so I started hacking dmenu in ruby. Right now it's able to enumerate the different outputs and the possible resolutions of each, and also disconnect a monitor from the system.
It is no where near complete yet, and it's getting late so I'm posting it here for some feedback. Tomorrow I'll toss it up on the AUR.
Requires:
- ruby
- dmenu
- xrandr
Tell me what you think guys.
Offline
I usually use nvidia-settings which is a bit of a PITA so I might give this a go later.
Offline
Didn't seem to work for me. It wouldn't detect the tv I had connected to svideo.
Offline
Dont think binary nvidia drivers are supported by randr, may be wrong tho.
Offline
Hi sdellysse
The case statement can be simplified to:
case command
when 'Connect'
when 'Disconnect'
when 'Resize'
when 'Rotate'
when 'Move'
when 'List'
end
Cheers!
Offline
Hi sdellysse
The case statement can be simplified to:
case command when 'Connect' when 'Disconnect' when 'Resize' when 'Rotate' when 'Move' when 'List' end
Cheers!
Thank you very much. I was figuring that could be done, but hadn't tried it.
Offline
Didn't seem to work for me. It wouldn't detect the tv I had connected to svideo.
Can you post the output of 'xrandr -q'?
Offline
I simply use this:
if [ ! -z "`xrandr | grep 'VGA1 connected'`" ]; then
xrandr --output LVDS1 --off
xrandr --output VGA1 --auto
else
xrandr --output VGA1 --off
xrandr --output LVDS1 --auto
fi
Offline
I like the concept :-) I don't know if it works, I can't test it right now.
Will you create an AUR package?
Offline
I like the concept :-) I don't know if it works, I can't test it right now.
Will you create an AUR package?
Thanks. I just bought a new netbook, and am migrating my stuff to that at the moment. I'll toss it up on the AUR when I get a chance.
Offline
I simply use this:
if [ ! -z "`xrandr | grep 'VGA1 connected'`" ]; then xrandr --output LVDS1 --off xrandr --output VGA1 --auto else xrandr --output VGA1 --off xrandr --output LVDS1 --auto fi
cool script. albeit a bit ugly. I cleaned it up a bit and changed LVDS to eDP (that's how it's called on my system)
#!/bin/bash
if xrandr | grep -q 'VGA1 connected'
then
xrandr --output eDP1 --off --output VGA1 --auto
else
xrandr --output eDP1 --auto --output VGA1 --off
fi
btw, drandr is not on the AUR yet
Last edited by Dieter@be (2011-02-07 13:58:48)
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
Now it is http://aur.archlinux.org/packages.php?ID=46239 I don't know the version number and the license...
Last edited by Army (2011-02-07 18:39:41)
Offline