You are not logged in.
Pages: 1
Hello guys,
I'm trying to include a small snippet
X=`xrandr | awk '/VGA/ {print $2}'`
if [ "$X" = "connected" ]
then
xrandr --output TV --off --output LVDS --off --output VGA --mode 1280x1024 --pos 0x0 --rotate normal
fi
in my xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
while true
do
xsetroot -name "`acpi -b | awk '{print $4}' | sed 's/,//g'` | `acpi -t | awk '{print $4 $6}'` | `date +"%a %x | %H:%M"`"
sleep 1s
done &
exec dwm
to check if an external monitor is plugged. I tried it already on different positions but once I had no longer a statusbar in dwm, the other time I recognized some display errors.
So my question, where to go with it?
I have to admit that I have no experiences with Bash-Coding.
Thank you in advance.
orschiro
Offline
Bla I am dumb....
Last edited by hunterthomson (2009-09-01 05:10:56)
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline
Does it work if you run the xrandr command alone in a terminal? It looks fine to me...
thayer williams ~ cinderwick.ca
Offline
Pages: 1