aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-03-06 23:52:56 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-03-06 23:52:56 +0300
commitc0d8f7c421193b54f13ca3611c9fa6ffd1f09b3d (patch)
treef58431805627914da1c428ed9adca29ca9780b31 /dotfiles
parent05c3b3e5534a6341c02e86605e15f26920fc2236 (diff)
downloadswayrice-c0d8f7c421193b54f13ca3611c9fa6ffd1f09b3d.tar.gz
swayrice-c0d8f7c421193b54f13ca3611c9fa6ffd1f09b3d.zip
Script to clean URLs of trackers
Diffstat (limited to 'dotfiles')
-rwxr-xr-xdotfiles/.local/bin/cleanurl10
-rwxr-xr-xdotfiles/.local/bin/notistats2
2 files changed, 11 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/cleanurl b/dotfiles/.local/bin/cleanurl
new file mode 100755
index 0000000..ba449db
--- /dev/null
+++ b/dotfiles/.local/bin/cleanurl
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Nothing really fancy here, just removes useless tracking GET vars (e.g. amazon
+# URLs).
+# BEWARE: this script is as dumb as it gets, it might break some URLs that
+# actually depend on GET vars (e.g. youtube URLs).
+
+wl-paste -n | cut -d '?' -f1 | wl-copy -n
+
+notify-send "✨ URL cleaned" "$(wl-paste)"
diff --git a/dotfiles/.local/bin/notistats b/dotfiles/.local/bin/notistats
index cd50276..923b0ba 100755
--- a/dotfiles/.local/bin/notistats
+++ b/dotfiles/.local/bin/notistats
@@ -15,4 +15,4 @@ if [ -f /sys/class/drm/card0/device/hwmon/hwmon1/temp1_input ]; then
body=$body"\n"$(echo print\(\'GPU temp:\\t{}C\'.format\($(cat /sys/class/drm/card0/device/hwmon/hwmon1/temp1_input)/1000\)\) | python)
fi
-notify-send "Hardware status" "$body"
+notify-send "⚡ Hardware status" "$body"