From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Wed, 30 Sep 2020 01:21:10 +0000 (-0400) Subject: restructured X-Git-Tag: v0.0.1~104 X-Git-Url: https://git.armaanb.net/?a=commitdiff_plain;h=e099a282b54a73d55dc8446b8f1a81148be40cb7;hp=2b129bbe59ec3d9d0598cda8d9d49ac9ae18a4cc;p=bin.git restructured --- diff --git a/ex b/ex new file mode 100755 index 0000000..111943d --- /dev/null +++ b/ex @@ -0,0 +1,27 @@ +# General purpose extraction function, from Ubuntu bashrc +#!/usr/bin/env sh + +ex() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *.deb) ar x $1 ;; + *.tar.xz) tar xf $1 ;; + *.tar.zst) unzstd $1 ;; + *) echo ''$1' cannot be extracted via ex()' ;; + esac + else + echo ''$1' is not a valid file' + fi +} + diff --git a/src/ex b/src/ex deleted file mode 100644 index 111943d..0000000 --- a/src/ex +++ /dev/null @@ -1,27 +0,0 @@ -# General purpose extraction function, from Ubuntu bashrc -#!/usr/bin/env sh - -ex() { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar x $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1;; - *.7z) 7z x $1 ;; - *.deb) ar x $1 ;; - *.tar.xz) tar xf $1 ;; - *.tar.zst) unzstd $1 ;; - *) echo ''$1' cannot be extracted via ex()' ;; - esac - else - echo ''$1' is not a valid file' - fi -} - diff --git a/status b/status new file mode 100755 index 0000000..ee0a0c5 --- /dev/null +++ b/status @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +notify-send -i "clock" "`date +%A" "%B" "%e" | "%1l:%M:%S `" "`upower -d | grep percentage | tail -c 4 | head -c 3 && echo " battery" && upower --dump | grep "time to empty" | tail -c 11 | head -c 11`" + +