/+ finds the correct display setup to use
This commit is contained in:
@@ -3,10 +3,14 @@
|
|||||||
# : klevstul : start miscellanous application : 24.11.17
|
# : klevstul : start miscellanous application : 24.11.17
|
||||||
# -----
|
# -----
|
||||||
|
|
||||||
|
# finds the correct display setup function to use
|
||||||
|
getDisplaySetupFunction() {
|
||||||
|
numberOfDisplays=$(xrandr --query | grep -o " connected " | wc -l)
|
||||||
|
display_function=ds-${HOSTNAME}-${numberOfDisplays}
|
||||||
|
echo ${display_function}
|
||||||
|
}
|
||||||
|
|
||||||
# display setup functions
|
ds-t470p-2() {
|
||||||
|
|
||||||
ds-t470p-11() {
|
|
||||||
info="1 laptop + 1 monitor for t470p"
|
info="1 laptop + 1 monitor for t470p"
|
||||||
echo "${info}"
|
echo "${info}"
|
||||||
xrandr --output eDP-1 --mode 1920x1080 --pos 0x1080 --rotate normal --output DP-1 --off --output HDMI-1 --primary --mode 3840x2160 --pos 1920x0 --rotate normal --output DP-2 --off --output HDMI-2 --off --output DP-3 --off --output HDMI-3 --off > /dev/null 2>&1
|
xrandr --output eDP-1 --mode 1920x1080 --pos 0x1080 --rotate normal --output DP-1 --off --output HDMI-1 --primary --mode 3840x2160 --pos 1920x0 --rotate normal --output DP-2 --off --output HDMI-2 --off --output DP-3 --off --output HDMI-3 --off > /dev/null 2>&1
|
||||||
@@ -14,7 +18,7 @@ ds-t470p-11() {
|
|||||||
xrdb ~/.Xresources
|
xrdb ~/.Xresources
|
||||||
}
|
}
|
||||||
|
|
||||||
ds-tuxwarrior-11() {
|
ds-tuxwarrior-2() {
|
||||||
info="1 laptop + 1 monitor for tuxwarrior"
|
info="1 laptop + 1 monitor for tuxwarrior"
|
||||||
echo "${info}"
|
echo "${info}"
|
||||||
xrandr --output DP-0 --off --output DP-1 --off --output HDMI-0 --primary --mode 3840x2160 --pos 3840x0 --rotate normal --output DP-2 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-3 --off --output DP-4 --off --output DP-5 --off --output DP-6 --off > /dev/null 2>&1
|
xrandr --output DP-0 --off --output DP-1 --off --output HDMI-0 --primary --mode 3840x2160 --pos 3840x0 --rotate normal --output DP-2 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-3 --off --output DP-4 --off --output DP-5 --off --output DP-6 --off > /dev/null 2>&1
|
||||||
@@ -24,6 +28,16 @@ ds-tuxwarrior-11() {
|
|||||||
i3-msg "rename workspace 2 to 1"
|
i3-msg "rename workspace 2 to 1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ds-tuxwarrior-3() {
|
||||||
|
info="1 laptop + 2 monitors for tuxwarrior"
|
||||||
|
echo "${info}"
|
||||||
|
xrandr --output DP-0 --primary --mode 3840x2160 --pos 3840x0 --rotate normal --output DP-1 --off --output HDMI-0 --mode 1920x1080 --pos 7680x240 --rotate left --output DP-2 --mode 3840x2160 --pos 0x0 --rotate normal --output DP-3 --off --output DP-4 --off --output DP-5 --off --output DP-6 --off
|
||||||
|
nr > /dev/null 2>&1
|
||||||
|
xrdb ~/.Xresources
|
||||||
|
i3-msg "rename workspace 1 to 10"
|
||||||
|
i3-msg "rename workspace 2 to 1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# do the choka choka
|
# do the choka choka
|
||||||
|
|
||||||
@@ -40,7 +54,8 @@ elif [[ "${XWM}" == "i3" ]]; then
|
|||||||
echo "<< i3wm >>"
|
echo "<< i3wm >>"
|
||||||
|
|
||||||
# display setup
|
# display setup
|
||||||
display_setup=ds-${HOSTNAME}-11
|
display_setup=$(getDisplaySetupFunction)
|
||||||
|
|
||||||
${display_setup}
|
${display_setup}
|
||||||
|
|
||||||
# populate keyring, and sleep to make sure it takes effect before apps start
|
# populate keyring, and sleep to make sure it takes effect before apps start
|
||||||
|
|||||||
Reference in New Issue
Block a user