[vriska] add screenlayout scripts

This commit is contained in:
Lexi Stelter 2020-07-08 20:22:42 +02:00
parent 23a0c1f907
commit 6035f25ab6
6 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/bin/sh
# reset first
xrandr --output eDP-1 --auto \
--output DP-1-1 --off \
--output DP-1-2 --off \
--output DP-1-3 --off \
--output DP-2-1 --off \
--output DP-2-2 --off \
--output DP-2-3 --off
#xrandr --output eDP-1 --off --mode 1920x1080 --scale "1.25x1.25" --pos 0x0 \
# --output DP-2-3 --primary --mode 1920x1080 --scale "1.5x1.5" --pos 2400x0
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --scale 1x1 --rotate normal \
--output DP-1-1 --primary --mode 2560x1080 --pos 1920x0 --scale 1x1 --rotate normal \
--output DP-2-3 --mode 1920x1080 --pos 4480x0 --scale 1x1 --rotate normal
[ -f ~/.fehbg ] && sh ~/.fehbg

View File

@ -0,0 +1,10 @@
#!/bin/sh
# needed because this script stops working after detaching laptop from docking station
#xrandr --output DP-2-1 --off --output DP-2-2 --off
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --scale 1x1 --rotate normal \
--output DP-1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal
[ -f ~/.fehbg ] && sh ~/.fehbg

View File

@ -0,0 +1,16 @@
#!/bin/sh
# needed because this script stops working after detaching laptop from docking station
#xrandr --output DP2-1 --off --output DP2-2 --off
#xrandr --output eDP-1 --primary --auto --scale "1.25x1.25" \
xrandr --output eDP-1 --primary --auto --scale "0.8x0.8" \
--output DP-1 --off \
--output DP-2 --off \
--output DP-2-1 --off \
--output DP-2-2 --off \
--output DP-2-3 --off \
--output DP-1-2 --off
[ -f ~/.fehbg ] && sh ~/.fehbg

View File

@ -0,0 +1,14 @@
#!/bin/sh
# needed because this script stops working after detaching laptop from docking station
#xrandr --output DP2-1 --off --output DP2-2 --off
xrandr --output eDP-1 --off \
--output DP-2-2 --mode 3840x2160 --pos 0x0 --rotate normal \
--output DP-2-1 --mode 3840x2160 --right-of DP-2-2 --rotate normal \
--output DP-2 --off \
--output DP-2-1 --off \
--output DP-2-3 --off
[ -f ~/.fehbg ] && sh ~/.fehbg

View File

@ -0,0 +1,22 @@
#!/bin/sh
# needed because this script stops working after detaching laptop from docking station
#xrandr --output DP2-1 --off --output DP2-2 --off
xrandr --output eDP-1 --mode 1920x1080 --pos 0x2160 --scale 1x1 --rotate normal \
--output DP-1-2 --primary --mode 3840x2160 --pos 0x0 --rotate normal \
--output DP-2-2 --mode 3840x2160 --right-of DP-1-2 --rotate normal \
--output DP-2 --off \
--output DP-2-1 --off \
--output DP-2-3 --off
# TEST TEST TEST
#xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x1080 --scale 1x1 --rotate normal \
# --output DP-1-2 --mode 1920x1080 --pos 0x0 --rotate normal \
# --output DP-2-2 --mode 1920x1080 --right-of DP-1-2 --rotate normal \
# --output DP-2 --off \
# --output DP-2-1 --off \
# --output DP-2-3 --off
[ -f ~/.fehbg ] && sh ~/.fehbg

View File

@ -0,0 +1,25 @@
#!/bin/sh
if xrandr | grep -q '^DP-2-[1-3] connected'; then
echo switching to profile homeoffice
~/.screenlayout/homeoffice.sh
elif xrandr | grep -q '^DP-[1-2] connected'; then
echo switching to profile homeoffice_jenny
~/.screenlayout/homeoffice_jenny.sh
else
echo switching to profile laptop_only
~/.screenlayout/laptop_only.sh
fi
#if xrandr | grep -q 'DP-2-2 connected'; then
# ~/.screenlayout/workplace_withlaptop.sh
#else
# ~/.screenlayout/laptop_only.sh
#fi
# Set keyboard layout
setxkbmap us altgr-intl
# Remap Context Menu key to Super
xmodmap -e "keysym Menu = Super_R"