diff options
| author | awy <awy@awy.one> | 2025-12-02 16:50:11 +0300 |
|---|---|---|
| committer | awy <awy@awy.one> | 2025-12-02 16:50:11 +0300 |
| commit | a91b268c7316bc98b38da5520102356694644846 (patch) | |
| tree | 73e70b25a0ad59e3249d789aac7f7057529f12d0 /.local | |
| parent | 124e6a08aa6b2f80da3424bae73d36a3d71f2861 (diff) | |
| download | hyprdots-a91b268c7316bc98b38da5520102356694644846.tar.gz | |
fix
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/singboxwrap | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/singboxwrap b/.local/bin/singboxwrap index a69bbc4..2ef4081 100755 --- a/.local/bin/singboxwrap +++ b/.local/bin/singboxwrap @@ -6,6 +6,7 @@ default_path="${XDG_DATA_HOME:-$HOME/.local/share}/singboxcfg" input=$1 run_singbox () { + [ -z "${1}" ] && exit sing-box check -c "$1" && { pidof sing-box >/dev/null && killall sing-box setsid -f sing-box -c "$1" run @@ -17,7 +18,7 @@ run_singbox () { choose_menu () { choose="$(fd . $config_dir -d 1 -t f | rofi -dmenu -no-custom -p "Config to use")" - [ -n "$choose" ] || exit 1 + [ -z "${choose}" ] && exit ln -sf "$choose" "$default_path" echo "$default_path" } |