commit 3a3218da317eaca3fad101ddc676eab7e747bc40 parent 9cdfae19af62decdbf0efedb6543827bca94a9f5 Author: awy <awy@awy.one> Date: Fri, 30 May 2025 15:29:47 +0300 singboxwrap update Diffstat:
M | .local/bin/singboxwrap | | | 14 | +++++++------- |
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/.local/bin/singboxwrap b/.local/bin/singboxwrap @@ -16,17 +16,17 @@ run_singbox () { } choose_menu () { - choose="$(ls $config_dir | wmenu -p "Config to use")" - [ -n "$choose" ] || exit 1 - ln -sf "$config_dir/$choose" "$default_path" - echo "$default_path" + choose="$(find $config_dir -maxdepth 1 -type f | wmenu -p "Config to use")" + [ -n "$choose" ] || exit 1 + ln -sf "$choose" "$default_path" + echo "$default_path" } if [ ! -f "$default_path" ]; then - input="menu" + input="menu" fi case $input in - menu) run_singbox $(choose_menu) ;; - *) run_singbox $default_path ;; + menu) run_singbox $(choose_menu) ;; + *) run_singbox $default_path ;; esac