bwm() {
s bwm-ng -T avg -d
- }
+}
b() {
local topb
}
nmt() {
- s nmtui-connect "$@"
+ # cant use s because sudo -i doesnt work for passwordless sudo command
+ case $EUID in
+ 0)
+ sudo nmtui-connect "$@"
+ ;;
+ *)
+ nmtui-connect "$@"
+ ;;
+ esac
}
nopanic() {
local quotes others
quotes=2048,2068,2086,2206
- others=2029,2033,2164
+ others=2029,2033,2054,2164
shellcheck -W 999 -x -e $quotes,$others "$@" || return $?
}
"|sort -r
}
+# Run script by copying it to a temporary location first,
+# and changing directory, so we don't have any open
+# directories or files that could cause problems when
+# remounting.
+z() {
+ local tmp
+ tmp=$(type -p "$1")
+ if [[ $tmp ]]; then
+ cd $(mktemp -d)
+ cp -a "$tmp" .
+ shift
+ ./"${tmp##*/}" "$@"
+ else
+ "$@"
+ fi
+}
+
# * misc stuff