summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorivan-boikov <ik.boikov.public@protonmail.com>2022-06-03 17:50:01 +0200
committerivan-boikov <ik.boikov.public@protonmail.com>2022-06-03 17:50:01 +0200
commitb1da73c07af7945dad09070081413db5c533534d (patch)
treecfe8621d051e3d47139a6bac40a599b969519d56 /scripts
parent128ae72e6b0ff6ab70b4c54938a5354218c58abc (diff)
no msg
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.local/bin/checkzwap2
-rwxr-xr-xscripts/.local/bin/dcpug2
-rwxr-xr-xscripts/.local/bin/statusbar/sb-internet27
-rwxr-xr-xscripts/.local/bin/statusbar/sb-tasks10
-rwxr-xr-xscripts/.local/bin/to60fps2
5 files changed, 11 insertions, 32 deletions
diff --git a/scripts/.local/bin/checkzwap b/scripts/.local/bin/checkzwap
index 25bae37..902c35c 100755
--- a/scripts/.local/bin/checkzwap
+++ b/scripts/.local/bin/checkzwap
@@ -1 +1 @@
-sudo grep -R . /sys/kernel/debug/zswap
+doas grep -R . /sys/kernel/debug/zswap
diff --git a/scripts/.local/bin/dcpug b/scripts/.local/bin/dcpug
index 7d4720b..762ad96 100755
--- a/scripts/.local/bin/dcpug
+++ b/scripts/.local/bin/dcpug
@@ -16,3 +16,5 @@ profile=$(printf $profiles | $dmenu)
notify-send "Set CPU profile: $profile"
$sudo cpupower frequency-set --governor $profile
+# repeat, for good measure
+$sudo cpupower frequency-set --governor $profile
diff --git a/scripts/.local/bin/statusbar/sb-internet b/scripts/.local/bin/statusbar/sb-internet
index e342345..6d80852 100755
--- a/scripts/.local/bin/statusbar/sb-internet
+++ b/scripts/.local/bin/statusbar/sb-internet
@@ -1,28 +1,13 @@
#!/bin/sh
-# Show wifi 📶 and percent strength or 📡 if none.
-# Show 🌐 if connected to ethernet or ❎ if none.
-# Show 🔒 if a vpn connection is active
-
-# EDIT: NO CRINGEY EMOJI
-
-case $BLOCK_BUTTON in
- 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;;
- 3) notify-send "🌐 Internet module" "\- Click to connect
-❌: wifi disabled
-📡: no wifi connection
-📶: wifi connection with quality
-❎: no ethernet
-🌐: ethernet working
-🔒: vpn is active
-" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
-esac
+# Show wifi W and percent strength or w if none.
+# Show E if connected to ethernet or e if none.
+# Show V if a vpn connection is active
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
- wifiicon="$(awk '/^\s*w/ { print "W" int($3 * 100 / 70) }' /proc/net/wireless)"
+ wifiicon="$(awk '/^\s*w/ { print "W" int($3 * 100 / 70) }' /proc/net/wireless)"
elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then
- grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="X" || wifiicon="X"
+ grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="w" || wifiicon="w"
fi
-printf "%s%s%s\n" "$(sed "s/.*/V/" /sys/class/net/tun*/operstate 2>/dev/null)" "$(sed "s/down/X/;s/up/E/" /sys/class/net/e*/operstate 2>/dev/null)" "$wifiicon"
+printf "%s%s%s\n" "$(sed "s/.*/V/" /sys/class/net/tun*/operstate 2>/dev/null)" "$(sed "s/down/e/;s/up/E/" /sys/class/net/e*/operstate 2>/dev/null)" "$wifiicon"
diff --git a/scripts/.local/bin/statusbar/sb-tasks b/scripts/.local/bin/statusbar/sb-tasks
index 586300e..349e8cb 100755
--- a/scripts/.local/bin/statusbar/sb-tasks
+++ b/scripts/.local/bin/statusbar/sb-tasks
@@ -8,13 +8,5 @@
num=$(tsp -l | awk -v numr=0 -v numq=0 '{if (/running/)numr++; if (/queued/)numq++} END{print numr+numq"("numq")"}')
-# Handle mouse clicks
-case $BLOCK_BUTTON in
- 1) setsid -f "$TERMINAL" -e tsp -l ;;
- 3) notify-send "Tasks module" "🤖: number of running/queued background tasks
-- Left click opens tsp" ;; # Right click
- 2) $EDITOR "$0" ;; # Middle click
-esac
-
[ "$num" != "0(0)" ] &&
- echo "🤖$num"
+ echo "$num"
diff --git a/scripts/.local/bin/to60fps b/scripts/.local/bin/to60fps
index c9bee4a..68ae6db 100755
--- a/scripts/.local/bin/to60fps
+++ b/scripts/.local/bin/to60fps
@@ -29,7 +29,7 @@ mpv \
--input-ipc-server=/tmp/mpvencodesocket \
--input-media-keys=no \
--no-msg-color \
- --vf=vapoursynth:$(echo $HOME)/.local/share/SVP4/scripts/ffff.py:4:6 \
+ --vf=vapoursynth=$(echo $HOME)/.local/share/SVP4/scripts/ffff.py \
--of=matroska \
--ovc=libx264 \
--ovcopts=crf=$quality,preset=slow,threads=$threads