-
Notifications
You must be signed in to change notification settings - Fork 0
/
monswitch
executable file
·23 lines (16 loc) · 936 Bytes
/
monswitch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#List array Options
ARR=()
ARR+=("Laptop Only")
ARR+=("1920x1080 monitor Solo")
#ARR+=("LQ1")
#ARR+=("LQ2")
CHOICE=$(printf '%s\n' "${ARR[@]}" | rofi -dmenu -config /usr/share/rofi/themes/fullbar.rasi -p "Select Output Type:")
if [ "$CHOICE" = "Laptop Only" ]; then
xrandr --output eDP1 --mode 3000x2000; xrandr --output DP2 --off ; sed -i 's/^\(Xft.dpi:\).*/\Xft.dpi:220/' ~/.Xresources; sed -ri 's/(ofi.dpi:).*/\ofi.dpi:220/' ~/.Xresources ; xrdb ~/.Xresources; sed -ri 's/(pango:mono ).*/\pango:mono 12/' ~/.config/i3/config; i3 restart; setbg ; remaps
exit 0
fi
if [ "$CHOICE" = "1920x1080 monitor Solo" ]; then
xrandr --output eDP1 --off; xrandr --output DP2 --mode 1920x1200; sed -i 's/^\(Xft.dpi:\).*/\Xft.dpi:110/' ~/.Xresources; sed -ri 's/(ofi.dpi:).*/\ofi.dpi:110/' ~/.Xresources; xrdb .Xresources; sed -ri 's/(pango:mono ).*/\pango:mono 14/' ~/.config/i3/config; i3 restart; setbg ; remaps
exit 0
fi