1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

scripts: renamed many scripts and added options; added loopback

This commit is contained in:
2024-05-18 04:27:54 +02:00
parent b25a478cfa
commit f662768a04
14 changed files with 124 additions and 40 deletions

23
.local/bin/etc/sxhkd/monitor Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
# toggle external monitor
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
intern=LVDS1
extern=HDMI2
case "$1" in
toggle) (xrandr | grep "$extern disconnected")
(xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && wallpaper) & exit)
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off
wallpaper
;;
*) cat << EOF
monitor: cli script to enable and disable monitors.
Allowed options:
toggle Toggle the set monitor on and off
all else Print this message
EOF
esac