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:
@@ -176,6 +176,7 @@ bindsym $mod+m mode "resize"
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
tray_output primary
|
||||
}
|
||||
|
||||
exec xautolock -locknow
|
||||
|
||||
3
.xinitrc
3
.xinitrc
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user