summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/compiler2
-rwxr-xr-x.local/bin/dmenurecord4
-rwxr-xr-x.local/bin/getbib2
-rwxr-xr-x.local/bin/linkhandler2
-rwxr-xr-x.local/bin/peertubetorrent2
-rwxr-xr-x.local/bin/queueandnotify2
6 files changed, 7 insertions, 7 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 39e149e..faf37c9 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -53,5 +53,5 @@ case "$ext" in
scad) openscad -o "$base".stl "$file" ;;
sent) setsid -f sent "$file" 2>/dev/null ;;
tex) textype "$file" ;;
- *) head -n1 "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
+ *) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;;
esac
diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord
index b1a034a..b83a7c5 100755
--- a/.local/bin/dmenurecord
+++ b/.local/bin/dmenurecord
@@ -31,7 +31,7 @@ screencast() { \
ffmpeg -y \
-f x11grab \
-framerate 60 \
- -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
+ -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
-i "$DISPLAY" \
-f alsa -i default \
-r 30 \
@@ -43,7 +43,7 @@ screencast() { \
video() { ffmpeg \
-f x11grab \
- -s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
+ -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \
-i "$DISPLAY" \
-c:v libx264 -qp 0 -r 30 \
"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
diff --git a/.local/bin/getbib b/.local/bin/getbib
index ed441c5..8675aae 100755
--- a/.local/bin/getbib
+++ b/.local/bin/getbib
@@ -11,4 +11,4 @@ else
fi
# Check crossref.org for the bib citation.
-curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"
+curl -s "https://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
index 04934e5..fa74caf 100755
--- a/.local/bin/linkhandler
+++ b/.local/bin/linkhandler
@@ -10,7 +10,7 @@
[ -z "$1" ] && { "$BROWSER"; exit; }
case "$1" in
- *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*)
+ *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)
setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
diff --git a/.local/bin/peertubetorrent b/.local/bin/peertubetorrent
index 56f2476..7a7a483 100755
--- a/.local/bin/peertubetorrent
+++ b/.local/bin/peertubetorrent
@@ -3,5 +3,5 @@
# first argument is the video link, second is the quality (480 or 1080)
# 13/07/20 - Arthur Bais
-link="$(echo "$1" | sed "s/videos\/watch/download\/torrents/")""-$2.torrent"
+link="$(echo "$1" | sed "s/w/download\/torrents/")""-$2.torrent"
transadd "$link"
diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify
index a54b13e..54b2c2a 100755
--- a/.local/bin/queueandnotify
+++ b/.local/bin/queueandnotify
@@ -7,7 +7,7 @@ queuefile="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/queue"
while read -r line; do
[ -z "$line" ] && continue
- url="$(echo "$line" | awk '{print $1}')"
+ url="${line%%[ ]*}"
qndl "$url" "curl -LO"
done < "$queuefile"