diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-18 17:52:21 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-18 18:38:21 +0100 |
| commit | 273f57260449a8247eb1e7ca640dba6af8a90ad2 (patch) | |
| tree | 14d364dbe3c8eb7599f802a61e1f617ddfcdf111 /bin/open | |
| parent | 7a7ef68421ceb67642560ee00d0c51301934f3c0 (diff) | |
bin: drop some scripts
chrome-extension-dl fs kp mesoninit once open wsudo
Diffstat (limited to 'bin/open')
| -rwxr-xr-x | bin/open | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/bin/open b/bin/open deleted file mode 100755 index ba809bf..0000000 --- a/bin/open +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -m -termmode=0 - -while getopts ":hg" opt; do - case $opt in - g) - termmode=1 - ;; - h|*) - echo "usage: open [-t] FILE" - echo "" - echo " -t Use only Terminal-based applications" - exit 2 - ;; - esac -done -shift $((OPTIND-1)) - -in="$1" - -mime=$(file --mime-type "$in" | awk -F': ' '{print $2}' ) -ext=$(basename "$in" | rev | cut -d'.' -f1 | rev) -opener=xdg-open - -fork() { - exec $@ >/dev/null 2>&1 & -} -term() { - fork alacritty --title="$1" --command "$@" -} - -case $mime in - inode/directory) [ $termmode -eq 0 ] && vifm "$in" ;; - inode/file) [ $termmode -eq 0 ] && vifm "$in" ;; - - image/*) fork mvi "$in" ;; - video/*) fork mpv --force-window=yes "$in" ;; - audio/*) fork mpv --force-window=yes "$in" ;; - - application/pdf) fork zathura "$in" ;; - # application/vnd.ms-opentype|application/font-sfnt) - # fork gnome-font-viewer "$in" ;; - - # now text... - text/md|text/markdown) - fork shiba "$(readlink -f "$in")" ;; - text/*) fork term ${EDITOR} "$in" ;; - - # everything else... - *) exec $opener "$in" ;; -esac |