i3: use primary monitor for tray icons

Useful for multi-monitor and monitor + projector mode.
Also let xrandr set the first connected monitor as primary on login.
This commit is contained in:
2014-04-11 14:28:38 +03:00
parent 8f0f3fc5d2
commit 79ff4584a2
2 changed files with 4 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ bindsym $mod+m mode "resize"
# finds out, if available)
bar {
status_command i3status
tray_output primary
}
exec xautolock -locknow

View File

@@ -11,6 +11,9 @@ setxkbmap -layout "us,ru" -option "grp:caps_toggle,grp_led:caps,compose:ralt"
xset dpms 610 610 610
xset r rate 290 30
# set primary output to the first connected monitor
xrandr --output $(set -- $(xrandr | grep ' connected') && echo $1) --primary
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"