summaryrefslogtreecommitdiffstats
path: root/extra/actions
diff options
context:
space:
mode:
Diffstat (limited to 'extra/actions')
-rwxr-xr-xextra/actions/Add Action?type?name!.sh84
-rwxr-xr-xextra/actions/application/extract.sh10
-rwxr-xr-xextra/actions/compress?archive_name.sh3
-rwxr-xr-xextra/actions/synchtop!.sh3
-rwxr-xr-xextra/actions/text/firefox.sh3
-rwxr-xr-xextra/actions/text/nano!.sh3
-rwxr-xr-xextra/actions/video/mpv.sh3
-rwxr-xr-xextra/actions/youtube_music?url.sh15
8 files changed, 0 insertions, 124 deletions
diff --git a/extra/actions/Add Action?type?name!.sh b/extra/actions/Add Action?type?name!.sh
deleted file mode 100755
index 6a322bc..0000000
--- a/extra/actions/Add Action?type?name!.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/sh
-
-
-errecho() {
- echo ${@} >&2
-}
-
-check_dir() {
- DIR=${1}
-
- [ -d ${DIR} ] ||
- mkdir -p ${DIR} ||
- (echo "Can't create directory: ${DIR}" && exit 1)
-}
-
-populate_file() {
- FILE=${1}
-
- # Don't try to overwrite existing file
- test -e ${FILE} && return
-
-
-
- cat > ${FILE} << EOF
-#!/bin/sh
-
-# Selected files are stored here
-FILES=\${@}
-
-# You can interate over them one by one
-for FILE in \${FILES}; do
- echo \$FILE
-done
-
-# Or process them all at once
-echo "\${FILES}"
-EOF
-}
-
-
-## Starting point
-
-FILE=${1}
-MIME=`hunter -m $FILE`
-STATUS=$?
-
-
-# MIME detection failed, bail out unless type is base
-[ $STATUS != 0 ] && [ $type != "uni" ] &&
- echo $MIME &&
- exit 1
-
-# Laziy not using XGD here because of OSX
-ACTDIR="$HOME/.config/hunter/actions/"
-
-MIME_BASE=`echo $MIME | cut -d "/" -f 1`
-MIME_SUB=`echo $MIME | cut -d "/" -f 2`
-
-
-case $type in
- uni)
- AFILE="${ACTDIR}/${name}.sh"
- check_dir "${ACTDIR}"
- populate_file "${AFILE}"
- $EDITOR "${AFILE}"
- test -e "${AFILE}" && chmod +x "${AFILE}"
- ;;
- base)
- BASEDIR="${ACTDIR}/$MIME_BASE"
- AFILE="${BASEDIR}/${name}.sh"
- check_dir "${BASEDIR}"
- populate_file "${AFILE}"
- $EDITOR "${AFILE}"
- test -e ${AFILE} && chmod +x "${ACTDIR}/$name"
- ;;
- sub)
- SUBDIR="${ACTDIR}/${MIME_BASE}/${MIME_SUB}"
- AFILE="${SUBDIR}/${name}.sh"
- check_dir ${SUBDIR}
- populate_file "${AFILE}"
- $EDITOR "${AFILE}"
- test -e ${AFILE} && chmod+ +x ${AFILE}
- ;;
-esac
diff --git a/extra/actions/application/extract.sh b/extra/actions/application/extract.sh
deleted file mode 100755
index 51c8c0f..0000000
--- a/extra/actions/application/extract.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
deleted file mode 100755
index 17c0d6a..0000000
--- a/extra/actions/compress?archive_name.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-7z a $archive_name "$@"
diff --git a/extra/actions/synchtop!.sh b/extra/actions/synchtop!.sh
deleted file mode 100755
index 5e1f9f7..0000000
--- a/extra/actions/synchtop!.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec htop
diff --git a/extra/actions/text/firefox.sh b/extra/actions/text/firefox.sh
deleted file mode 100755
index a03ee81..0000000
--- a/extra/actions/text/firefox.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-firefox "$@"
diff --git a/extra/actions/text/nano!.sh b/extra/actions/text/nano!.sh
deleted file mode 100755
index 2b03d6c..0000000
--- a/extra/actions/text/nano!.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-nano "$@"
diff --git a/extra/actions/video/mpv.sh b/extra/actions/video/mpv.sh
deleted file mode 100755
index 87da718..0000000
--- a/extra/actions/video/mpv.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec mpv "$@"
diff --git a/extra/actions/youtube_music?url.sh b/extra/actions/youtube_music?url.sh
deleted file mode 100755
index 8881499..0000000
--- a/extra/actions/youtube_music?url.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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