-
Notifications
You must be signed in to change notification settings - Fork 0
/
setres
executable file
·44 lines (38 loc) · 1.11 KB
/
setres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# A script for setting up monitor(s)
# Gives a dmenu prompt to choose monitor setup option
# Option are dual, laptop-only, desktop-only
OPT=$(echo -e "Dual\nLaptop-only\nDesktop-only" | dmenu -i -p "Enter the monitor-mode")
case $OPT in
Dual )
xrandr --output HDMI1 --primary \
--mode 1920x1080 \
--pos 0x0 \
--rotate normal \
--output eDP1 \
--mode 1366x768 \
--pos 1920x468 \
--rotate normal \
--output DP1 --off \
--output HDMI2 --off \
--output VIRTUAL1 --off ;;
Laptop-only )
xrandr --output eDP1 --primary \
--mode 1366x768 \
--pos 0x0 \
--rotate normal \
--output DP1 --off \
--output HDMI1 --off \
--output HDMI2 --off \
--output VIRTUAL1 --off ;;
Desktop-only )
xrandr --output HDMI --primary \
--mode 1920x1080 \
--pos 0x0 \
--rotate normal \
--output HDMI2 --off \
--output VIRTUAL1 --off \
--output eDP1 --off \
--output DP1 --off ;;
esac
exit 0