diff --git a/.config/shell/functions b/.config/shell/functions index b9e9874..f295b10 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -245,7 +245,7 @@ del() { u() { # Line below handy for users of netkeeper - ping example.com -c 1 -w 2 >/dev/null && sudo nft list ruleset | grep -1 outall | grep -q 'meta hour' || echo sysupgrade | netkeeper 30 2>/dev/null + timeout 1 curl -s https://github.com >/dev/null || echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null if command -v pacman >/dev/null; then if test "$(stat /etc/pacman.d/mirrorlist --printf=%y | cut -d'-' -f1-2)" != "$(date +%Y-%m)" then diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index f8d8e4d..13be803 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -1,5 +1,6 @@ #!/bin/bash # Clean up files according to given parameters +# TODO filter recently accessed files typeset -A _clean_map _clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [v]=/var/cache) diff --git a/.local/bin/scripts/edit-config b/.local/bin/scripts/edit-config index 132cb5c..7a870a8 100755 --- a/.local/bin/scripts/edit-config +++ b/.local/bin/scripts/edit-config @@ -34,6 +34,7 @@ case "$sel" in (/etc/ssh/*) sudoedit "$sel" && sudo systemctl reload-or-restart sshd;; (/etc/network/interfaces*) sudoedit "$sel" && sudo service networking reload;; (/etc/samba/smb.conf) sudoedit "$sel" && testparm;; + (/etc/nftables.conf) sudoedit "$sel" && sudo systemctl restart nftables;; (*) edit "$sel";; esac echo "$sel" | cat - "$conf_cache" | head -20 >"$conf_tmp" && mv "$conf_tmp" "$conf_cache"