diff options
author | Ensa <@> | 2020-05-01 17:39:45 -0700 |
---|---|---|
committer | Ensa <@> | 2020-05-01 17:39:45 -0700 |
commit | 2b52ba86897ed947976d560fc1a1eb1a8499c451 (patch) | |
tree | d1a0d2d82a7907d308b99bbd3fc827cfad20f981 /bin/lh | |
parent | c4632455cff4a5097a3a35ad9d0531388776d028 (diff) | |
download | cfg-2b52ba86897ed947976d560fc1a1eb1a8499c451.tar.gz |
cwm added, general updates, etc
bother made the WM detection and X startup file detection more robust comm-sel replaced 6cord with cordless made the default case do nothing so it's less annoying lh removed ipc-server garbage changed the audio group to allow for streaming audio to mpv (this works with livestream audio files) mbsync-cron moved config file to $XDG_CONFIG_HOME/mbsync/mbsyncrc made error exits actually error (helps with crontab -n) renamed old popmail touch file to something more nominally appropriate same with notify-send --app-name cwmrc reading it, DEPENDENCIES.md, and `man cwmrc` will more than explain everything in here. except the commented binds, these are behaviours cwm does not have. completions.ksh self-explanatory. read it. diraliases added ~bin for user binaries dir added ~ksh for ksh config dir added ~pass for password database kshrc added safeguards for ensuring used directories exist switched lfcd source to a test and source prompt.ksh better sep symbols git branch occupies less space lfrc added auto-upload to ttm.sh, bound to t init.vim switched colourscheme to zellner removed syntastic checker specifiers, now uses aggregate checks. syntastic_c_compiler set to cc, symlink your preferred compiler to ~bin/cc switched ectags to ctags enabled folds shrc ALTSCR: terminal you want to use for programs that already have scrollback. set to "$TERMINAL" if you don't have one. fiddled with LESS, hopefully better now $TODO is the file todo(1) uses. ENV: file ksh sources on startup. 6cord.toml removed because it's abandoned now. colors-wal-dwm.h removed because i don't use dwm anymore. dunstrc, zathurarc now uses cozette font
Diffstat (limited to 'bin/lh')
-rwxr-xr-x | bin/lh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/lh b/bin/lh index e4bdf0c..25a2f62 100755 --- a/bin/lh +++ b/bin/lh @@ -1,16 +1,14 @@ #!/bin/sh # lh: the Link Handler # takes one path or URL as its argument, launches the appropriate program for this. -### differs from Luke Smith's linkhandler in cleaner code, inclusion of epub/pdf handling, proper interpretation of twitch video URLs, and livestream handling with streamlink (twitch only for now, tipping me off to URL schemes to look for for other streaming sites would be appreciated.) # if $1 isn't provided, spawn $BROWSER and exit. this allows lh to be used as a pseudo-browser. [ -z "$1" ] && exec "$BROWSER" - case "$1" in *mkv|*webm|*mp4) - mpv --input-ipc-server=/tmp/mpv-socket$(date +%s) --quiet "$1" >/dev/null 2>&1 & ;; - *youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*twitch.tv/videos/*) - mpv --input-ipc-server=/tmp/mpv-socket$(date +%s) --quiet --ytdl "$1" >/dev/null 2>&1 & ;; + mpv "$1" >/dev/null 2>&1 & ;; + *youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*twitch.tv/videos/*|*twitch.tv/*/v/*) + mpv --ytdl "$1" >/dev/null 2>&1 & ;; *twitch.tv/*) STREAMQUAL="$(streamlink "$1"|\ grep "Available streams"|tr " " "\n"|grep -E "[0-9]"|tr -d ,|\ @@ -19,8 +17,8 @@ case "$1" in *png|*jpg|*jpe|*jpeg|*gif) IMGPATH="/tmp/$(echo "$1"|sed "s/.*\\///")" curl -sL "$1" >"$IMGPATH"&&sxiv -a "$IMGPATH">/dev/null 2>&1 & ;; - *mp3|*m4a|*flac|*aiff|*opus|*mp3?source*) - curl -LO "$1" >/dev/null 2>&1 & ;; + *mp3|*m4a|*flac|*aiff|*opus|*ogg|*mp3?source*) + mpv "$1" >/dev/null 2>&1 & ;; *epub|*pdf|*djvu) BOOKPATH="/tmp/$(echo "$1"|sed "s/.*\\///")" if [ -n "$READER" ]; then |