You are not logged in.
More frequently I'm using an external monitor when working on Arch Linux, so I made this script, which works ok for now. This is a simple approach for this kind of stuff I think, so I'm wondering what you people out there are using to connect your external monitors. I guess there's a bunch of people in this community that are using two (or more) monitors? Please post your beloved script or name the package you are using. I would also be happy with some feedback or tips on my script.
#!/bin/bash
#~/scripts/vga
case $1 in
-r|--right) xrandr --output VGA1 --auto --right-of LVDS1 ;;
-l|--left) xrandr --output VGA1 --auto --left-of LVDS1 ;;
-o|--off) xrandr --output VGA1 --off ;;
*) xrandr --output VGA1 --auto ;;
esac
Last edited by roygbiv (2011-08-24 18:15:54)
Offline
#!/bin/bash
#
# A script to set up monitors correctly
# by SS4
#
xrandr --output DVI-I-1 --auto --left-of VGA-1 --output VGA-1 --auto --primary
Both my monitors are usually connected on boot although it does work if I hotplug the second monitor in
Rauchen verboten
Offline
When I'm at home I connect my laptop to my TV and use that as the only screen. I have mapped the screen fn-key to this script:
#!/bin/bash
if xrandr -q | grep "HDMI1 connected" > /dev/null ; then
# xrandr --newmode "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
# xrandr --addmode HDMI1 1920x1080
xrandr --output HDMI1 --mode 1360x768
xrandr --output LVDS1 --off
else
xrandr --output LVDS1 --mode 1366x768
xrandr --output HDMI1 --off
fi
Works perfectly.
Offline
I run this script on login/when I click the VGA button.
#!/bin/bash
mode="$(xrandr -q|grep -A1 "VGA1 connected"| tail -1 |awk '{ print $1 }')"
if [ -n "$mode" ]; then
xrandr --output VGA1 --mode "$mode" --right-of LVDS1
xrandr --output LVDS1 --primary
else
xrandr --output VGA1 --off
fi
Offline
autorandr (I maintain it on the AUR).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I use this in my .xinitrc on all my machines:
# If two monitors are present, setup tiling.
if [[ -x /usr/bin/xrandr ]]; then
OUTPUTS=($( xrandr | grep connected | cut -f 1 -d ' '))
if [[ ${#OUTPUTS[@]} == 2 ]]; then
xrandr --output ${OUTPUTS[0]} --left-of ${OUTPUTS[1]}
fi
fi
Offline
I made a small program for this while learning haskell. You can find it here.
Offline