add toggleMonitor script

This commit is contained in:
qvalentin 2021-09-26 14:22:26 +02:00
parent 9a9bdb22fc
commit 7a06470070
3 changed files with 14 additions and 2 deletions

View File

@ -28,7 +28,7 @@ PATH_TO_IMG="${args[0]}"
echo $PATH_TO_IMG
wal -i $PATH_TO_IMG
feh --bg-center $PATH_TO_IMG
feh --bg-fill $PATH_TO_IMG
# overwrite .Xresources file
cat ~/.cache/wal/colors.Xresources > ~/.Xresources
@ -41,7 +41,7 @@ xrdb -merge ~/.Xresources
# aur package is themix-full-git
# generate new gtk themes
#/opt/oomox/plugins/theme_oomox/change_color.sh ~/.cache/wal/colors-oomox -o Wal -t ~/.themes/ -d true -m gtk3
/opt/oomox/plugins/theme_oomox/change_color.sh ~/.cache/wal/colors-oomox -o Wal -t ~/.themes/ -d true -m gtk3
xmobar_change
killall xmobar

0
.scripts/poweroff Normal file → Executable file
View File

12
.scripts/toggleMonitor Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
primary=DP-1
secondary=HDMI-0
if xrandr | grep "$secondary connected 1920x1080"; then
echo "Turing second monitor off"
xrandr --output "$secondary" --off
else
echo "Turing second monitor on"
xrandr --output "$secondary" --left-of "$primary" --auto
fi