diff options
author | rabite <rabite@posteo.de> | 2019-05-28 00:50:15 +0200 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-05-28 00:51:47 +0200 |
commit | ad4e3d573fffe2412c7840319c39ca4a64c02b56 (patch) | |
tree | 06a8e64a71859fbb448cc37e523b8bcc8ab606d2 /extra | |
parent | fdc4eb52d0403e041fe77f403b0dbc5686789087 (diff) |
add quick actions
Diffstat (limited to 'extra')
-rwxr-xr-x | extra/actions/application/extract.sh | 10 | ||||
-rwxr-xr-x | extra/actions/compress?archive_name.sh | 3 | ||||
-rwxr-xr-x | extra/actions/synchtop!.sh | 3 | ||||
-rwxr-xr-x | extra/actions/text/firefox.sh | 3 | ||||
-rwxr-xr-x | extra/actions/text/nano!.sh | 3 | ||||
-rwxr-xr-x | extra/actions/video/mpv.sh | 3 | ||||
-rwxr-xr-x | extra/actions/youtube_music?url.sh | 15 |
7 files changed, 40 insertions, 0 deletions
diff --git a/extra/actions/application/extract.sh b/extra/actions/application/extract.sh new file mode 100755 index 0000000..51c8c0f --- /dev/null +++ b/extra/actions/application/extract.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +which 7z >/dev/null && EXTRACTOR="7z x" +# Prefer aunpack +which aunpack >/dev/null && EXTRACTOR=aunpack + + +for file in "$@"; do + echo $EXTRACTOR "$file"; +done diff --git a/extra/actions/compress?archive_name.sh b/extra/actions/compress?archive_name.sh new file mode 100755 index 0000000..17c0d6a --- /dev/null +++ b/extra/actions/compress?archive_name.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +7z a $archive_name "$@" diff --git a/extra/actions/synchtop!.sh b/extra/actions/synchtop!.sh new file mode 100755 index 0000000..5e1f9f7 --- /dev/null +++ b/extra/actions/synchtop!.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec htop diff --git a/extra/actions/text/firefox.sh b/extra/actions/text/firefox.sh new file mode 100755 index 0000000..a03ee81 --- /dev/null +++ b/extra/actions/text/firefox.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +firefox "$@" diff --git a/extra/actions/text/nano!.sh b/extra/actions/text/nano!.sh new file mode 100755 index 0000000..2b03d6c --- /dev/null +++ b/extra/actions/text/nano!.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +nano "$@" diff --git a/extra/actions/video/mpv.sh b/extra/actions/video/mpv.sh new file mode 100755 index 0000000..87da718 --- /dev/null +++ b/extra/actions/video/mpv.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec mpv "$@" diff --git a/extra/actions/youtube_music?url.sh b/extra/actions/youtube_music?url.sh new file mode 100755 index 0000000..8881499 --- /dev/null +++ b/extra/actions/youtube_music?url.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +FORMATS=`youtube-dl -F "$url"` + +echo $FORMATS + +echo $FORMATS | grep "251 " && + youtube-dl -x -f 251 "$url" && + exit 0 + +echo $FORMATS | grep "171 " && + youtube-dl -x -f 171 "$url" && + exit 0 + +exit 1 |