From c10fa602f7c30e03c0bacb9c5cf116d808e86f6d Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Fri, 2 Feb 2024 23:00:59 +0100 Subject: Various updates to many dotfiles --- .local/bin/imv-http | 5 +++++ .local/bin/mail | 3 +++ .local/bin/playlist-dl | 8 ++++++++ .local/bin/term | 24 ++++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100755 .local/bin/imv-http create mode 100755 .local/bin/mail create mode 100755 .local/bin/playlist-dl create mode 100755 .local/bin/term (limited to '.local') diff --git a/.local/bin/imv-http b/.local/bin/imv-http new file mode 100755 index 0000000..4af2c3a --- /dev/null +++ b/.local/bin/imv-http @@ -0,0 +1,5 @@ +#!/usr/bin/env sh +for pic in $@ +do + curl -s "$pic" | imv - & +done diff --git a/.local/bin/mail b/.local/bin/mail new file mode 100755 index 0000000..6e1326c --- /dev/null +++ b/.local/bin/mail @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +term neomutt "$@" diff --git a/.local/bin/playlist-dl b/.local/bin/playlist-dl new file mode 100755 index 0000000..583d62d --- /dev/null +++ b/.local/bin/playlist-dl @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +yt-dlp \ + -o '%(playlist)s/%(title)s.%(ext)s' \ + -x \ + --audio-format "mp3" \ + --parse-metadata "playlist_index:%(track_number)s" \ + --add-metadata \ + --embed-metadata $@ diff --git a/.local/bin/term b/.local/bin/term new file mode 100755 index 0000000..e3b46cd --- /dev/null +++ b/.local/bin/term @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +if [ -n "$DISPLAY" ] +then + if which st > /dev/null + then + st $@ + elif which xterm > /dev/null + then + xterm -e $@ + elif which alacritty > /dev/null + then + alacritty -e $@ + fi +else + if which footclient > /dev/null + then + footclient $@ + elif which alacritty > /dev/null + then + alacritty -e $@ + fi +fi + -- cgit v1.2.3