}
ccomp cd c
+bwm() {
+ s bwm-ng -T avg -d
+}
+
b() {
local topb
if (( ${#_iankdirb[@]} == 0 )); then
ifn() {
# insensitive find
+ # -L = follow symlinks
find -L . -not \( -name .svn -prune -o -name .git -prune \
-o -name .hg -prune -o -name .editor-backups -prune \
-o -name .undo-tree-history -prune \) -iname "*$**" 2>/dev/null
}
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() {
grep '^ *hosts:' /etc/nsswitch.conf
if systemctl is-enabled systemd-resolved &>/dev/null || [[ $(systemctl is-active systemd-resolved ||:) != inactive ]]; then
hr; m ser status systemd-resolved | cat || :
- hr; m systemd-resolve --status | cat
+ hr; m resolvectl status | cat
fi
}
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