diff options
| -rwxr-xr-x | bin/guiscripts/lh | 36 | ||||
| -rwxr-xr-x | bin/guiscripts/sturl | 2 | ||||
| -rw-r--r-- | config/common/newsraft/feeds | 5 | ||||
| -rw-r--r-- | config/essentials/shell/aliases.sh | 4 | 
4 files changed, 32 insertions, 15 deletions
diff --git a/bin/guiscripts/lh b/bin/guiscripts/lh index 956b99b..ed5af47 100755 --- a/bin/guiscripts/lh +++ b/bin/guiscripts/lh @@ -11,23 +11,33 @@ notify-send "linkhandler" "$url"  echo "$url" > ~/file.txt  case "$url" in -    file://*) file="${url##file:/}" +    file://*)  +        file="${url##file:/}"          case "$(file -bi "$file" | cut -f1 -d'/')" in -            audio|video) mpv "$file" ;; -            image) imv "$file" ;; -	    *) xdg-open "$file" ;; -        esac ;; -	*mkv|*webm|*mp4|*bitchute.com*|*odysee.com*) mpv "$url" ;; -	*youtube.com/watch*|*youtube.com/playlist*|*youtube.com/shorts*|*youtu.be*|*hooktube.com*) mpv "$(ytlink "$url")" ;; -	*png|*jpg|*jpe|*jpeg|*gif) curl -sL "$url" | imv - ;; +            "audio"|"video") mpv "$file" ;; +            "image") imv "$file" ;; +            *) xdg-open "$file" ;; +        esac  +        ;; + +	*mkv|*webm|*mp4|*bitchute.com*|*odysee.com*)  +        mpv "$url" ;; + +	*youtube.com/watch*|*youtube.com/playlist*|*youtube.com/shorts*|*youtu.be*|*hooktube.com*) +        mpv "$(ytlink "$url")" ;; + +	*png|*jpg|*jpe|*jpeg|*gif)  +        curl -sL "$url" | imv - ;; +  	*pdf|*cbz|*cbr)  		curl -sL "$url" > "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" -        $VIEWER "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")"  >/dev/null 2>&1 ;; +        $VIEWER "/tmp/$(echo "$url" | sed "s/.*\///;s/%20/ /g")" +        ;; +  	*mp3|*flac|*opus|*mp3?source*)  		mpv "$url" ;; +  	*) -		if [ -f "$url" ] -		then setsid -f "$TERMINAL" -e "$EDITOR" "$url" >/dev/null 2>&1 -		else setsid -f "$BROWSER" "$url" >/dev/null 2>&1 -		fi +		"$BROWSER" "$url" +        ;;  esac diff --git a/bin/guiscripts/sturl b/bin/guiscripts/sturl index 27a8f47..2712d92 100755 --- a/bin/guiscripts/sturl +++ b/bin/guiscripts/sturl @@ -6,6 +6,6 @@ url="$(tr -d '\n' | grep -Eo "$regex" | commander -xcl)"  case $1 in  	'c') printf '%s' "$url" | clipp ;; -	'o') linkhandler "$url" ;; +	'o') lh "$url" ;;  	*) echo "no option" ;;  esac diff --git a/config/common/newsraft/feeds b/config/common/newsraft/feeds index f4f7030..77e5420 100644 --- a/config/common/newsraft/feeds +++ b/config/common/newsraft/feeds @@ -11,7 +11,10 @@ https://xkcd.com/rss.xml  @ Hacking  https://www.youtube.com/feeds/videos.xml?channel_id=UClcE-kVhqyiHCcjYwcpfj9w "LiveOverflow" -https://feeds.feedburner.com/TheHackersNews +https://feeds.feedburner.com/TheHackersNews "TheHackersNews" + +@ Computers +https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "Computerphile"  @ Music  https://www.youtube.com/feeds/videos.xml?channel_id=UC3vYz1SAtcbRhsatydObGQw "Shijun Wang" diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 7e4c8ab..09b2daa 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -50,6 +50,8 @@ alias sr='surfraw'  alias ccu='calcurse'  alias pf='profanity' +alias f='fg' +  alias gurk='pgrep gurk > /dev/null && printf "Already Running.\n" || gurk'  alias arduino-cli='arduino-cli --config-file $XDG_CONFIG_HOME/arduino15/arduino-cli.yaml' @@ -326,3 +328,5 @@ alias doirm='docker image rm $(docker image ls | tail -n +2 | fzf -m | awk '\''{  alias -g skip='tail -n +2'  alias ddeps='pactree -r -d 1'  alias update-mirrors='reflector -p https | rankmirrors -n 10 -p -w - | doas tee /etc/pacman.d/mirrorlist' + +alias tmpd='cd $(mktemp -d)'  | 
