Makes screen mirroring work on different resolutions
This commit is contained in:
parent
131d693fd8
commit
70daba0413
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,10 @@
|
|||
laptopScreen="eDP-1"
|
||||
externalScreen="$(xrandr | grep -Eo '^.* connected' | grep -v "$laptopScreen" |
|
||||
cut -d ' ' -f 1)"
|
||||
laptopResolution="$(xrandr | grep -A 1 "$laptopScreen" | sed -n 2p | awk '{print $1}')"
|
||||
xrandr | sed '/^ /d' | grep -Ev '(:|eDP-1)' | awk -v ORS=" " '{print "--output " $1 " --off"}' |
|
||||
|
||||
pkill compton
|
||||
xrandr --output "$laptopScreen" --primary --mode 1920x1080 --pos 0x0 --rotate normal --output "$externalScreen" --mode 1920x1080 --pos 0x0 --rotate normal
|
||||
/usr/bin/compton --config "$HOME/.config/picom/picom.conf" & disown
|
||||
pkill picom
|
||||
xrandr --output "$laptopScreen" --primary --mode "$laptopResolution" --pos 0x0 --rotate normal --output "$externalScreen" --mode "$laptopResolution" --pos 0x0 --rotate normal
|
||||
/usr/bin/picom --config "$HOME/.config/picom/picom.conf" & disown
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue