Added screenlayouts for new computer
This commit is contained in:
parent
ca45ee273c
commit
23d849d999
20
config/xserver/screenlayout/gamedock.sh
Executable file
20
config/xserver/screenlayout/gamedock.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
RESOLUTION='1920x1080';
|
||||||
|
|
||||||
|
[ $1 ] && RESOLUTION="$1";
|
||||||
|
|
||||||
|
CURRENT_MONITOR=$(xrandr | grep 'primary' | awk '{print $1;}' | tail -n 1);
|
||||||
|
|
||||||
|
xrandr\
|
||||||
|
--output "$CURRENT_MONITOR" --primary\
|
||||||
|
--rotate normal\
|
||||||
|
--pos 0x0\
|
||||||
|
--mode $RESOLUTION\
|
||||||
|
;
|
||||||
|
|
||||||
|
for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$CURRENT_MONITOR"); do
|
||||||
|
xrandr --output $display --off;
|
||||||
|
done;
|
||||||
|
|
||||||
|
feh --bg-fill --randomize $HOME/.wallpaper;
|
29
config/xserver/screenlayout/hdmidock.sh
Executable file
29
config/xserver/screenlayout/hdmidock.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
NATIVE_MONITOR='eDP1';
|
||||||
|
CONNECTED_MONITOR=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1);
|
||||||
|
|
||||||
|
MONITOR_DIRECTION='--above'; # left-of, below, above, right-of
|
||||||
|
|
||||||
|
[ -z $CONNECTED_MONITOR ] && return; # no external monitor connected; do nothing
|
||||||
|
[ $1 ] && MONITOR_DIRECTION="$1";
|
||||||
|
|
||||||
|
xrandr\
|
||||||
|
--output "$NATIVE_MONITOR" --primary\
|
||||||
|
--rotate normal\
|
||||||
|
--pos 0x0\
|
||||||
|
--mode $(xrandr | grep -A 2 "$NATIVE_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
|
||||||
|
;
|
||||||
|
|
||||||
|
xrandr\
|
||||||
|
--output "$CONNECTED_MONITOR"\
|
||||||
|
--rotate normal\
|
||||||
|
$MONITOR_DIRECTION $NATIVE_MONITOR\
|
||||||
|
--mode $(xrandr | grep -A 2 "$CONNECTED_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | grep -v "$CONNECTED_MONITOR"); do
|
||||||
|
xrandr --output $display --off;
|
||||||
|
done;
|
||||||
|
|
||||||
|
feh --recursive --bg-fill --randomize $HOME/.wallpaper;
|
18
config/xserver/screenlayout/homedock.sh
Executable file
18
config/xserver/screenlayout/homedock.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
NATIVE_MONITOR='eDP1';
|
||||||
|
HOMEDOCK_MONITOR=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1);
|
||||||
|
|
||||||
|
[ -z $HOMEDOCK_MONITOR ] && return; # no external monitor connected; do nothing
|
||||||
|
|
||||||
|
xrandr\
|
||||||
|
--output "$HOMEDOCK_MONITOR" --primary\
|
||||||
|
--rotate normal\
|
||||||
|
--pos 0x0\
|
||||||
|
--mode $(xrandr | grep -A 2 "$HOMEDOCK_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
|
||||||
|
;
|
||||||
|
|
||||||
|
for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$HOMEDOCK_MONITOR"); do
|
||||||
|
xrandr --output $display --off;
|
||||||
|
done;
|
||||||
|
|
||||||
|
feh --bg-fill --randomize $HOME/.wallpaper;
|
15
config/xserver/screenlayout/undock.sh
Executable file
15
config/xserver/screenlayout/undock.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
NATIVE_MONITOR='eDP1';
|
||||||
|
|
||||||
|
xrandr\
|
||||||
|
--output "$NATIVE_MONITOR" --primary\
|
||||||
|
--rotate normal\
|
||||||
|
--pos 0x0\
|
||||||
|
--mode $(xrandr | grep -A 2 "$NATIVE_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
|
||||||
|
;
|
||||||
|
|
||||||
|
for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$NATIVE_MONITOR"); do
|
||||||
|
xrandr --output $display --off;
|
||||||
|
done;
|
||||||
|
|
||||||
|
feh --bg-fill --randomize $HOME/.wallpaper;
|
Loading…
Reference in New Issue
Block a user