summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-12-11 18:45:10 +0000
committerdavidovski <david@davidovski.xyz>2022-12-11 18:45:10 +0000
commit3739ff6661d2f51c957118a373dafcc9709219fa (patch)
tree5407aef1c733bac34203680c5697f339261dd8b9 /scripts
parent365412b61b6cfefac353fcce7d0bb470ee8953b0 (diff)
Updated to graphite theme
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bg.sh24
-rwxr-xr-xscripts/cinema.sh2
-rwxr-xr-xscripts/ddc-switch-inputs2
-rwxr-xr-xscripts/gamma.sh2
-rwxr-xr-xscripts/toggle-gap.sh2
5 files changed, 26 insertions, 6 deletions
diff --git a/scripts/bg.sh b/scripts/bg.sh
index e6f6999..72c612c 100755
--- a/scripts/bg.sh
+++ b/scripts/bg.sh
@@ -1,3 +1,23 @@
#!/bin/sh
-#feh --force-aliasing --bg-tile ~/.config/dither.png
-feh --force-aliasing --bg-fill ~/.config/bg
+setbg="feh --force-aliasing --bg-tile "
+
+image=~/.config/bg.gif
+dir=/tmp/bggif
+
+printf "Converting..."
+[ ! -d "$dir" ] || rm -rf "$dir"
+mkdir -p "$dir"
+
+convert -coalesce $image $dir/%05d.png
+printf "done\n"
+
+amount_of_frames=$(ls -1 "$dir" | wc -l)
+frames_per_second=30
+speed=$(echo "scale=3; ($amount_of_frames/$frames_per_second) * (1/$frames_per_second)" | bc -l)
+
+while : ; do
+ for i in $(ls -1 $dir); do
+ $setbg $dir/$i;
+ sleep $speed
+ done;
+done
diff --git a/scripts/cinema.sh b/scripts/cinema.sh
index f7a0f23..5352a6e 100755
--- a/scripts/cinema.sh
+++ b/scripts/cinema.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-MAIN_DP=DP-3;
+MAIN_DP=DP-1;
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 d298fac..9bd3682 100755
--- a/scripts/ddc-switch-inputs
+++ b/scripts/ddc-switch-inputs
@@ -15,5 +15,5 @@ case $1 in
;;
esac
-ddcutil --bus=23 setvcp 60 ${OUT[0]} &
+ddcutil --bus=12 setvcp 60 ${OUT[0]} &
wait
diff --git a/scripts/gamma.sh b/scripts/gamma.sh
index cd9433f..c470275 100755
--- a/scripts/gamma.sh
+++ b/scripts/gamma.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-MAIN_DP=DP-0;
+MAIN_DP=DP-1;
v=$1
diff --git a/scripts/toggle-gap.sh b/scripts/toggle-gap.sh
index d1eef2d..4216af5 100755
--- a/scripts/toggle-gap.sh
+++ b/scripts/toggle-gap.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-GAP=16; bspc config window_gap | grep -q $GAP && bspc config window_gap 0 || bspc config window_gap $GAP
+GAP=32; bspc config window_gap | grep -q $GAP && bspc config window_gap 0 || bspc config window_gap $GAP