xrandr: setup xrandr in xsession

Since it requires awesome to be restarted, let's setup xrandr inside
xsession instead.
This commit is contained in:
Vincent Bernat 2014-05-14 08:51:38 +02:00
parent 6dbb49b162
commit ccccb4098d
2 changed files with 9 additions and 9 deletions

View file

@ -1,12 +1,3 @@
-- Setup display
local xrandr = {
neo = "--output HDMI1 --auto --output HDMI2 --auto --right-of HDMI1",
alucard = "--output DVI-0 --auto --primary --output DisplayPort-0 --auto --right-of DVI-0"
}
if xrandr[config.hostname] then
os.execute("xrandr " .. xrandr[config.hostname])
end
-- Spawn a composoting manager -- Spawn a composoting manager
awful.util.spawn("compton", false) awful.util.spawn("compton", false)
awful.util.spawn("xcompmgr", false) -- Will fail if compton has been started awful.util.spawn("xcompmgr", false) -- Will fail if compton has been started

View file

@ -29,6 +29,15 @@ export MAILCAPS=$HOME/.mailcap
export XAUTHORITY=$HOME/.Xauthority export XAUTHORITY=$HOME/.Xauthority
} }
case "$(hostname)" in
neo)
xrandr --output HDMI1 --auto --output HDMI2 --auto --right-of HDMI1
;;
alucard)
xrandr --output DVI-0 --auto --primary --output DisplayPort-0 --auto --right-of DVI-0
;;
esac
[ -x /usr/sbin/rfkill ] && rfkill block all 2> /dev/null [ -x /usr/sbin/rfkill ] && rfkill block all 2> /dev/null
[ -x /usr/bin/xbacklight ] && xbacklight = 60 2> /dev/null [ -x /usr/bin/xbacklight ] && xbacklight = 60 2> /dev/null
[ -x /usr/bin/redshift ] && redshift -l 2.3508:48.8567 -t 6500:5500 2> /dev/null & [ -x /usr/bin/redshift ] && redshift -l 2.3508:48.8567 -t 6500:5500 2> /dev/null &