Created
January 28, 2013 02:10
-
-
Save mapix/4652350 to your computer and use it in GitHub Desktop.
xinitrc for multi-monitor display in i3-wm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# ~/.xinitrc | |
# Executed by startx (run your window manager from here) | |
# Set up screens and set background | |
if [ `xrandr | grep -c ' connected '` -eq 2 ]; then # dual-monitor | |
if [ `xrandr | grep VGA-1 | grep -c ' connected '` -eq 1 ]; then | |
xrandr --output LVDS-1 --auto --primary --output VGA-1 --auto --right-of LVDS-1 | |
fi | |
if [ `xrandr | grep DVI-1 | grep -c ' connected '` -eq 1 ]; then | |
xrandr --output LVDS-1 --auto --primary --output DVI-1 --auto --right-of LVDS-1 | |
fi | |
feh --bg-tile ~/Wallpapers/tile8.jpg | |
# xsetroot -solid \#cccccc | |
else | |
xrandr --output LVDS-1 --auto --primary --output VGA-1 --off --output DVI-1 --off | |
feh --bg-center ~/Wallpapers/paperart5.jpg | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment