diff options
| author | Wis <im@wis.am> | 2020-04-09 04:35:03 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-08 21:35:03 -0400 |
| commit | a08904d88a5dc413258c590ad794871cb3fc88e8 (patch) | |
| tree | 9e7cb2f89c306ee5a33c1745e2fbd3a8f7d5626a /.local/bin | |
| parent | 11eac2294fa090cfbd891c538e6ce34fac8da88e (diff) | |
| download | eibhear-a08904d88a5dc413258c590ad794871cb3fc88e8.tar.gz eibhear-a08904d88a5dc413258c590ad794871cb3fc88e8.tar.zst eibhear-a08904d88a5dc413258c590ad794871cb3fc88e8.zip | |
mpv config: use mpvSockets script to remove mpv wrappers/aliases (#544)
* add scripts to mpv's cfg \w mpvSockets as 1st dependency and\or script
* remove all usage of --input-ipc-server in all cmds
* remove mpv alias that adds --input-ipc-server
* fix pauseallmpv: correct paths to unix socket files
* fix dependency-scripts loading so it works also when opening files off main disk
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/dmenuhandler | 4 | ||||
| -rwxr-xr-x | .local/bin/linkhandler | 2 | ||||
| -rwxr-xr-x | .local/bin/pauseallmpv | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index c7e2740..8ada2f4 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -6,11 +6,11 @@ case "$(printf "copy url\\nmpv\\nmpv (loop)\\nqueue download\\n\\nqueue youtube-dl\\nfeh\\nbrowser\\nw3m\\nmpv (float)" | dmenu -i -p "Open link with what program?")" in "copy url") echo "$1" | xclip -selection clipboard ;; mpv) setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; - "mpv (loop)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet --loop "$1" >/dev/null 2>&1 & ;; + "mpv (loop)") setsid mpv -quiet --loop "$1" >/dev/null 2>&1 & ;; "queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;; "queue youtube-dl") tsp youtube-dl --write-metadata -ic "$1" >/dev/null 2>&1 ;; browser) setsid "$BROWSER" "$1" >/dev/null 2>&1 & ;; feh) setsid feh "$1" >/dev/null 2>&1 & ;; w3m) w3m "$1" >/dev/null 2>&1 ;; - "mpv (float)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;; + "mpv (float)") setsid mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;; esac diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index 2c64dcb..0660011 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -11,7 +11,7 @@ case "$1" in *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*) - setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet "$1" >/dev/null 2>&1 & ;; + setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; *png|*jpg|*jpe|*jpeg|*gif) curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source*) diff --git a/.local/bin/pauseallmpv b/.local/bin/pauseallmpv index 85a7032..15b9f59 100755 --- a/.local/bin/pauseallmpv +++ b/.local/bin/pauseallmpv @@ -5,6 +5,6 @@ # every single one of them with one command! This is bound to super + shift + p # (with other things) by default and is used in some other places. -for i in $(ls /tmp/mpvsoc*); do +for i in $(ls /tmp/mpvSockets/*); do echo '{ "command": ["set_property", "pause", true] }' | socat - $i; done |
