diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bg.sh | 4 | ||||
-rwxr-xr-x | scripts/cinema.sh | 2 | ||||
-rwxr-xr-x | scripts/ddc-switch-inputs | 2 | ||||
-rwxr-xr-x | scripts/powermenu | 2 | ||||
-rwxr-xr-x | scripts/tablet | 14 |
5 files changed, 17 insertions, 7 deletions
diff --git a/scripts/bg.sh b/scripts/bg.sh index decf4f1..e6f6999 100755 --- a/scripts/bg.sh +++ b/scripts/bg.sh @@ -1,3 +1,3 @@ #!/bin/sh -feh --force-aliasing --bg-tile ~/.config/dither.png -#feh --force-aliasing --bg-fill ~/.config/bg +#feh --force-aliasing --bg-tile ~/.config/dither.png +feh --force-aliasing --bg-fill ~/.config/bg diff --git a/scripts/cinema.sh b/scripts/cinema.sh index 46c7082..f7a0f23 100755 --- a/scripts/cinema.sh +++ b/scripts/cinema.sh @@ -1,3 +1,3 @@ #!/bin/sh -MAIN_DP=DP-0; +MAIN_DP=DP-3; v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done diff --git a/scripts/ddc-switch-inputs b/scripts/ddc-switch-inputs index d85fed2..d298fac 100755 --- a/scripts/ddc-switch-inputs +++ b/scripts/ddc-switch-inputs @@ -15,5 +15,5 @@ case $1 in ;; esac -ddcutil --bus=5 setvcp 60 ${OUT[0]} & +ddcutil --bus=23 setvcp 60 ${OUT[0]} & wait diff --git a/scripts/powermenu b/scripts/powermenu index a1ac5f4..2ce5901 100755 --- a/scripts/powermenu +++ b/scripts/powermenu @@ -1,3 +1,3 @@ #!/bin/sh -printf "suspend\nreboot\npoweroff\nhibernate" | rofi -dmenu -p "systemctl" | xargs -r systemctl +printf "pm-suspend reboot poweroff" | rofi -dmenu -p "power" | xargs -r diff --git a/scripts/tablet b/scripts/tablet index ec3eefa..0965395 100755 --- a/scripts/tablet +++ b/scripts/tablet @@ -1,6 +1,9 @@ #!/usr/bin/python import sys +if len(sys.argv) < 3: + print("Usage: tablet [dev number] [property number] [scale factor] [aspect ratio]") + #Arguments dev = sys.argv[1] prop = sys.argv[2] @@ -8,11 +11,18 @@ scale = float(sys.argv[3]) tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if len(sys.argv) > 4 else 16/9 #Layout of screens: (x, y, w, h) +#screens = [ +# (0, 0, 1280, 1024), +# (1280, 0, 2560, 1440), +# (3840, 0, 1080, 1920), +# (4920, 0, 1080, 1920), +#] + screens = [ (0, 0, 1280, 1024), (1280, 0, 2560, 1440), - (3840, 0, 1080, 1920), - (4920, 0, 1080, 1920), + (3840, 0, 1920, 1080), + (5760, 0, 1920, 1080), ] #TODO find this with xrandr |