Move i3 config to home module folder
This commit is contained in:
21
modules/home/i3/i3/scripts/display-toggle-mirror
Executable file
21
modules/home/i3/i3/scripts/display-toggle-mirror
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
xrandr | grep -q "HDMI-1 connected"
|
||||
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "Two screens available"
|
||||
|
||||
MIRROR_FILE=~/.screenlayout/mirror-primary
|
||||
if [ -e "$MIRROR_FILE" ]; then
|
||||
echo "Mode set to mirror"
|
||||
rm "$MIRROR_FILE"
|
||||
~/.screenlayout/twoscreens-mirror.sh
|
||||
else
|
||||
echo "Mode set to left-right"
|
||||
touch "$MIRROR_FILE"
|
||||
~/.screenlayout/twoscreens.sh
|
||||
fi
|
||||
else
|
||||
echo "Only one screen available"
|
||||
~/.screenlayout/onescreen.sh
|
||||
fi
|
Reference in New Issue
Block a user