less hardware tied variant, uses .displayrc config
This commit is contained in:
parent
08946d0527
commit
8ac263a880
1 changed files with 10 additions and 4 deletions
|
@ -1,12 +1,18 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
if [[ -r $HOME/.displayrc ]]; then
|
||||||
|
. $HOME/.displayrc
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
variants=(int ext both)
|
variants=(int ext both)
|
||||||
selection=$(printf "%s\n" $variants|dmenu -p display "$@")
|
selection=$(printf "%s\n" $variants|dmenu -p display "$@")
|
||||||
case $selection in
|
case $selection in
|
||||||
('int') xrandr --output HDMI1 --off --output eDP1 --auto ;;
|
($variants[1]) xrandr --output $DISPLAY2 --off --output $DISPLAY1 --auto ;;
|
||||||
('ext') xrandr --output eDP1 --off --output HDMI1 --auto ;;
|
($variants[2]) xrandr --output $DISPLAY1 --off --output $DISPLAY2 --auto ;;
|
||||||
('both') xrandr --output eDP1 --auto --output HDMI1 --auto --right-of eDP1 ;;
|
($variants[3]) xrandr --output $DISPLAY1 --auto --output $DISPLAY2 --auto --right-of eDP1 ;;
|
||||||
(*) exit 0 ;;
|
(*) exit 0 ;;
|
||||||
esac
|
esac
|
||||||
feh --bg-scale ${HOME}/.wallpaper.png
|
feh --bg-scale $HOME/.wallpaper.png
|
||||||
sleep 1
|
sleep 1
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue