From e3f29b2cdb1702349cb5483eda0a548755eb8475 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Sun, 17 Feb 2019 15:54:46 +1100 Subject: [PATCH 1/1] add mime-terminal functions --- mime-terminal.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 mime-terminal.sh diff --git a/mime-terminal.sh b/mime-terminal.sh new file mode 100755 index 0000000..5674818 --- /dev/null +++ b/mime-terminal.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +# +# Various wrapper functions for xdg-open +# Also refer to desktop entries in ~/.local/share/applications +# + +# opens a new terminal window and unzips a file +function munzip() { + urxvt -e zsh -c "unzip \"$1\" -d \"${1%.*}\" && cd \"${1%.*}\";zsh" +} + +# opens a new window and does ls -l for a file +function mcd() { + urxvt -hold -e zsh -ic "ls -ltrh | tail -1; zsh" +} + +# opens a new window and displays a text file +function mcat() { + urxvt -e zsh -c "cat \"$1\";zsh" +} + +"$@" -- 2.43.2