diff --git a/files/.local/bin/fetch b/files/.local/bin/fetch new file mode 100755 index 0000000..d20bf57 --- /dev/null +++ b/files/.local/bin/fetch @@ -0,0 +1,8 @@ +#!/bin/sh + +echo "$USER@$(hostname)" +echo 'os: Void Linux x86_64-musl' +echo "uptime:$(uptime -p | tr -d 'up')" +echo "ip: $(ip a | grep '192.168.178' | cut -d\ -f6 | cut -d/ -f1)" +echo "pkgs: $(xbps-query -lm | wc -l)" +echo "mem: $(free -Lm | cut -dU -f4 | cut -d' ' -f10) MiB" diff --git a/files/.local/bin/unpk b/files/.local/bin/unpk new file mode 100755 index 0000000..5e0c9b9 --- /dev/null +++ b/files/.local/bin/unpk @@ -0,0 +1,29 @@ +#!/bin/sh + +# extract archives +# depends: unzip unace unrar 7z + +if test -z "$1"; then + echo "usage: $(basename $0) ARCHIVE ..." + exit 1 +fi + +while test -n "$1"; do + case "$1" in + *.tar.gz | *.tgz) tar xzf "$1";; + *.tar.bz2 | *.tbz) tar xjf "$1";; + *.tar.xz) tar xf "$1";; + *.zip) unzip "$1";; + *.jar) unzip "$1";; + *.war) unzip "$1";; + *.ace) unace x "$1";; + *.rar) unrar x "$1";; + *.7z) 7z x "$1";; + *.tar) tar xf "$1";; + *.gz) gunzip "$1";; + *.bz2) bunzip2 "$1";; + *) echo "file format not supported: $1";; + esac + + shift +done diff --git a/files/.profile b/files/.profile index 03aee75..f565dc2 100644 --- a/files/.profile +++ b/files/.profile @@ -3,6 +3,7 @@ export ENV="$HOME/.shrc" export PATH="$HOME/.local/bin/":"$PATH" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/lib/pkgconfig export XKB_DEFAULT_LAYOUT=de +export XBPS_DISTDIR="$HOME/void-packages" exists() { which "$1" >/dev/null 2>&1