feat: massive cleanup, kctx cache
This commit is contained in:
parent
23d1e06c20
commit
a759ac8dd2
28 changed files with 320 additions and 1743 deletions
|
@ -13,16 +13,15 @@ if [ "$EUID" != 0 ]; then
|
|||
XDG_CACHE_HOME="$XDG_CACHE_HOME" "$BASH" -- "${BASH_SOURCE[0]}" "$@"
|
||||
fi
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
set -- "$(basename -s.conf /etc/wireguard/*.conf | "$DMENU")"
|
||||
if [ "$1" != off ]; then
|
||||
set -- "$(basename -s.conf "/etc/wireguard/$1"*.conf | "$DMENU")"
|
||||
if ! wg | grep -q "$1"; then
|
||||
wg-quick up "$1"
|
||||
fi
|
||||
fi
|
||||
|
||||
while read -r i; do
|
||||
wg-quick down "$i"
|
||||
done < <(wg show interfaces)
|
||||
done < <(ip -br link show type wireguard | awk "\$1 != \"$1\"{print \$1}")
|
||||
|
||||
if [ "$1" != off ]; then
|
||||
wg-quick up "$1"
|
||||
fi
|
||||
|
||||
kill -38 "$(cat "$XDG_CACHE_HOME/pidofbar")"
|
||||
kill -37 "$(cat "$XDG_CACHE_HOME/sbar/pid")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue