From ccccb4098d9087c2a858d2dbb16dfc698da9d51e Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 14 May 2014 08:51:38 +0200 Subject: [PATCH] xrandr: setup xrandr in xsession Since it requires awesome to be restarted, let's setup xrandr inside xsession instead. --- rc/start.lua | 9 --------- xsession | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rc/start.lua b/rc/start.lua index ff335eb..358a3da 100644 --- a/rc/start.lua +++ b/rc/start.lua @@ -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 awful.util.spawn("compton", false) awful.util.spawn("xcompmgr", false) -- Will fail if compton has been started diff --git a/xsession b/xsession index 23bb9e8..edb8cdb 100644 --- a/xsession +++ b/xsession @@ -29,6 +29,15 @@ export MAILCAPS=$HOME/.mailcap 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/bin/xbacklight ] && xbacklight = 60 2> /dev/null [ -x /usr/bin/redshift ] && redshift -l 2.3508:48.8567 -t 6500:5500 2> /dev/null &