summaryrefslogtreecommitdiffstats
path: root/.scripts/tools
diff options
context:
space:
mode:
Diffstat (limited to '.scripts/tools')
-rwxr-xr-x.scripts/tools/dmenupass2
-rwxr-xr-x.scripts/tools/lmc13
-rwxr-xr-x.scripts/tools/podentr6
-rwxr-xr-x.scripts/tools/queueandnotify18
4 files changed, 32 insertions, 7 deletions
diff --git a/.scripts/tools/dmenupass b/.scripts/tools/dmenupass
new file mode 100755
index 0000000..4fc464f
--- /dev/null
+++ b/.scripts/tools/dmenupass
@@ -0,0 +1,2 @@
+#!/bin/sh
+dmenu -fn Monospace-18 -sb "#d79921" -sf "#1d2021" -nf "#000000" -nb "#000000" -p "$1" <&- && echo
diff --git a/.scripts/tools/lmc b/.scripts/tools/lmc
index 45cfcd9..18cf2c2 100755
--- a/.scripts/tools/lmc
+++ b/.scripts/tools/lmc
@@ -1,16 +1,13 @@
#!/bin/sh
-
# A general audio interface for LARBS.
-newvol="pkill -RTMIN+10 i3blocks"
-
[ -z "$2" ] && num="2" || num="$2"
case "$1" in
- u*) pulsemixer --change-volume +"$num" ; $newvol ;;
- d*) pulsemixer --change-volume -"$num" ; $newvol ;;
- m*) pulsemixer --toggle-mute ; $newvol ;;
- truemute) pulsemixer --mute ; $newvol ;;
+ u*) pulsemixer --change-volume +"$num" ;;
+ d*) pulsemixer --change-volume -"$num" ;;
+ m*) pulsemixer --toggle-mute ;;
+ truemute) pulsemixer --mute ;;
play) mpc play ;;
n*) mpc next ;;
prev) mpc prev ;;
@@ -41,3 +38,5 @@ All of these commands, except for \`truemute\`, \`prev\` and \`play\` can be tru
i.e. \`lmc r\` for \`lmc restart\`.
EOF
esac
+
+pkill -RTMIN+10 i3blocks
diff --git a/.scripts/tools/podentr b/.scripts/tools/podentr
new file mode 100755
index 0000000..13ab4a8
--- /dev/null
+++ b/.scripts/tools/podentr
@@ -0,0 +1,6 @@
+#!/bin/sh
+# entr command to run `queueandnotify` when newsboat queue is changed
+
+[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit
+
+echo ~/.local/share/newsboat/queue | entr -p queueandnotify 2>/dev/null
diff --git a/.scripts/tools/queueandnotify b/.scripts/tools/queueandnotify
new file mode 100755
index 0000000..332668f
--- /dev/null
+++ b/.scripts/tools/queueandnotify
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Podboat sucks. This script replaces it.
+# It reads the newsboat queue, queuing downloads with taskspooler.
+# It also removes the junk from extentions.
+queuefile="$HOME/.local/share/newsboat/queue"
+
+while read -r line; do
+ [ -z "$line" ] && continue
+ url="$(echo "$line" | awk '{print $1}')"
+ base="$(basename "$url")"
+ notify-send -i "$PIX/dl.png" "Queuing $base..."
+ idnum="$(tsp curl -LO "$url")"
+ realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
+ tsp -D "$idnum" mv "$base" "$realname"
+ tsp -D "$idnum" notify-send -i "$PIX/check.png" "$realname done."
+done < "$queuefile"
+
+echo > "$queuefile"