2014-09-25 23:37:13 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# Description: Manage video output (size, orientation, ...)
|
|
|
|
# And reload wm configuration
|
|
|
|
#
|
|
|
|
# $1: a directory with images to convert or a image file path
|
|
|
|
|
|
|
|
|
|
|
|
case "${1}" in
|
2017-09-28 22:10:20 +02:00
|
|
|
ds | dockstation | work )
|
2018-10-23 11:18:39 +02:00
|
|
|
xrandr --output DP-1 --mode 1920x1080 --left-of LVDS-1 --output LVDS-1 --mode 1366x768
|
2017-09-28 22:10:20 +02:00
|
|
|
printf 'Xrandr for DisplayPort with dock station';;
|
|
|
|
vga | lug )
|
|
|
|
xrandr --output VGA-1 --mode 1280x1024 --right-of LVDS-1 --output LVDS-1 --mode 1366x768
|
|
|
|
printf 'Xrandr for dual screen with VGA';;
|
|
|
|
hdmi | dp | displayport )
|
|
|
|
xrandr --output HDMI-1 --mode 1920x1080 --above LVDS-1 --output LVDS-1 --mode 1366x768
|
|
|
|
printf 'Xrandr for dual screen with DisplayPort';;
|
|
|
|
pres | prez | presentation )
|
|
|
|
xrandr --output HDMI-1 --mode 1024x768 --output LVDS-1 --mode 1366x768 --same-as HDMI-1
|
|
|
|
printf 'Xrandr for presentation';;
|
|
|
|
- | off )
|
2018-10-23 11:18:39 +02:00
|
|
|
xrandr --output LVDS-1 --mode 1360x768 --output HDMI-1 --off --output VGA-1 --off --output HDMI-3 --off --output DP-1 --off
|
2017-09-28 22:10:20 +02:00
|
|
|
xrandr --output VGA --off
|
|
|
|
printf 'Desactivate all video output';;
|
|
|
|
out )
|
2017-09-28 22:09:12 +02:00
|
|
|
xrandr --output HDMI-3 --mode 1920x1080 --output LVDS-1 --off
|
|
|
|
;;
|
2017-09-28 22:10:20 +02:00
|
|
|
* )
|
|
|
|
printf 'Bad argument, please use [vga|hdmi|ds|work|-|off]'
|
|
|
|
exit 1;;
|
2014-09-25 23:37:13 +02:00
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
herbstclient detect_monitors
|
|
|
|
herbstclient reload
|
|
|
|
|
|
|
|
exit 0
|