aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.scripts/dnd11
-rwxr-xr-x.scripts/encrypt7
-rwxr-xr-x.scripts/qscrot4
-rwxr-xr-x.scripts/suggestadblock14
-rwxr-xr-x.scripts/suggestbreak8
-rwxr-xr-x.scripts/webchange20
6 files changed, 57 insertions, 7 deletions
diff --git a/.scripts/dnd b/.scripts/dnd
new file mode 100755
index 0000000..251e1ce
--- /dev/null
+++ b/.scripts/dnd
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$(dunstctl is-paused)" = "true" ]; then
+ killall -SIGUSR2 dunst
+ notify-send "disturb!"
+else
+ notify-send "do not disturb!"
+ sleep 3
+ dunstctl close-all
+ killall -SIGUSR1 dunst
+fi
diff --git a/.scripts/encrypt b/.scripts/encrypt
deleted file mode 100755
index 6b399d8..0000000
--- a/.scripts/encrypt
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -e
-
-gpg --encrypt --armor --recipient "Master" -o "$1.enc" "$1"
-shred "$1"
-mv "$1.enc" "$1"
diff --git a/.scripts/qscrot b/.scripts/qscrot
new file mode 100755
index 0000000..b5ce9ac
--- /dev/null
+++ b/.scripts/qscrot
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+killall -9 flameshot
+flameshot gui --raw | (zbarimg - || notify-send "No QR code found") | clip
diff --git a/.scripts/suggestadblock b/.scripts/suggestadblock
new file mode 100755
index 0000000..a2331e4
--- /dev/null
+++ b/.scripts/suggestadblock
@@ -0,0 +1,14 @@
+#!/bin/env bash
+
+export XAUTHORITY=/home/melvin/.Xauthority
+export DISPLAY=:0
+export XDG_RUNTIME_DIR=/run/user/1000
+export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
+
+LIM=30
+
+expiring="$(find $HOME/.cache/adblock_disabled -mmin +$LIM)"
+if [ "$expiring" ]; then
+ notify-send "Focus" "Adblock länger als $LIM Minuten deaktiviert"
+ exit 0
+fi
diff --git a/.scripts/suggestbreak b/.scripts/suggestbreak
new file mode 100755
index 0000000..bf0eb62
--- /dev/null
+++ b/.scripts/suggestbreak
@@ -0,0 +1,8 @@
+#!/bin/env bash
+
+export XAUTHORITY=/home/melvin/.Xauthority
+export DISPLAY=:0
+export XDG_RUNTIME_DIR=/run/user/1000
+export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
+
+notify-send "Eine Stunde ist rum!" "Vielleicht eine kleine Pause?"
diff --git a/.scripts/webchange b/.scripts/webchange
new file mode 100755
index 0000000..cdc715b
--- /dev/null
+++ b/.scripts/webchange
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# run as crontab job
+
+export XAUTHORITY=/home/melvin/.Xauthority
+export DISPLAY=:0
+export XDG_RUNTIME_DIR=/run/user/1000
+export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
+
+url="..."
+
+wget -q "$url" -O /tmp/webchange_new
+
+touch /tmp/webchange_current
+
+if ! cmp -s /tmp/webchange_new /tmp/webchange_current >/dev/null; then
+ notify-send -t 0 -u critical "Website changed!" "$(date)"
+fi
+
+mv /tmp/webchange_new /tmp/webchange_current