summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/dmenuprint15
-rwxr-xr-x.local/bin/dwmbar/dwmb-debarque29
-rwxr-xr-x.local/bin/linkhandler3
3 files changed, 38 insertions, 9 deletions
diff --git a/.local/bin/dmenuprint b/.local/bin/dmenuprint
new file mode 100755
index 0000000..cfcd179
--- /dev/null
+++ b/.local/bin/dmenuprint
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+choice="$(lpstat -p -d | sed 's/.*default.*//g;
+ s/[^ ]* //;
+ s/is\sidle.//g
+ s/.*disabled.*//g' |
+ dmenu -p "Which printer?" |
+ sed 's/\s.*//g' )"
+
+lpr -P $choice "$@"
+
+# printer Canon_iP110_series is idle. enabled since Tue 10 Nov 2020 04:22:34 PM
+# printer HP_OfficeJet_Pro_9010 is idle. enabled since Wed 09 Dec 2020 01:57:06 AM
+# printer HP_OfficeJet_Pro_9010_fax is idle. enabled since Tue 27 Oct 2020 08:40:56 PM
+# system default destination: HP_OfficeJet_Pro_9010
diff --git a/.local/bin/dwmbar/dwmb-debarque b/.local/bin/dwmbar/dwmb-debarque
index a5c0e21..79fc346 100755
--- a/.local/bin/dwmbar/dwmb-debarque
+++ b/.local/bin/dwmbar/dwmb-debarque
@@ -1,13 +1,26 @@
#!/bin/sh
-count="$(curl https://www.ladebarque.com/achalandage |
- grep -i 'il y a ' |
- sed 's/.*il\sy\sa\sen\sce\smoment\s//; s/\([0-9]*\).*/\1/')"
+# count="$(curl https://www.ladebarque.com/achalandage |
+ # grep 'il y a' |
+ # sed 's/.*il\sy\sa\sen\sce\smoment\s//; s/\sgrimpeurs.*//')"
-echo "  $count "
+count="$(curl -L ladebarque.com/achalandage |
+ grep -i 'moment' |
+ sed 's/\s//g;
+ s/Maximum.*//;
+ s/^.*moment//;
+ s/\([0-9]\+\).*/\1/')"
-case $BLOCK_BUTTON in
- 1) $BROWSER https://www.ladebarque.com/achalandage ;;
- 2) notify-send -a " La Débarque" "Syncing..." && kill -51 $(pidof dwmblocks) && notify-send -a " La Débarque" "Done!" ;;
- 3) notify-send -a "La Débarque" "This block shows the number of people currently climbing at my local gym." ;;
+# curl https://www.ladebarque.com/achalandage > ~/asdf.html
+
+sep=","
+date="$(TZ='America/Toronto' date +"%Y-%m-%d$sep%R")"
+entry=""$date"$sep"$count""
+
+case "$1" in
+ write) echo "$entry" >> $HOME/.cache/debarque.csv ;;
+ *) echo "  $count " ;;
esac
+
+
+# echo "$entry"
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
index c7c5e75..0beb361 100755
--- a/.local/bin/linkhandler
+++ b/.local/bin/linkhandler
@@ -11,7 +11,8 @@
case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*video.twimg.com*)
- mpv --no-config "$1" ;;
+ mpv "$1" ;;
+ # mpv --no-config "$1" ;;
# setsid -f mpv --no-config "$1" ;;
*png|*jpg|*jpe|*jpeg|*gif|*.webp)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;;