From 78ca119a76634eed1010ab447f9646e48fe079cd Mon Sep 17 00:00:00 2001 From: "SilverAg.L" Date: Mon, 22 Dec 2025 00:36:27 +0800 Subject: [PATCH] rename script to better avoid unwanted auto-suggestions. --- .config/niri/config.keyboard.kdl | 6 +++--- bin/{fuzzel-win+r.sh => .fuzzel-startb} | 2 +- bin/{fuzzel-vsc-entries.sh => .fuzzel-vscode} | 2 +- bin/{runbg => startb} | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-) rename bin/{fuzzel-win+r.sh => .fuzzel-startb} (66%) rename bin/{fuzzel-vsc-entries.sh => .fuzzel-vscode} (84%) rename bin/{runbg => startb} (98%) diff --git a/.config/niri/config.keyboard.kdl b/.config/niri/config.keyboard.kdl index 4d22501..2b13036 100644 --- a/.config/niri/config.keyboard.kdl +++ b/.config/niri/config.keyboard.kdl @@ -6,8 +6,8 @@ binds { Mod+E hotkey-overlay-title="Explorer (yazi)" { spawn "foot" "yazi"; } //Shift+Mod+Return hotkey-overlay-title="Steam" { spawn "steam"; } - Mod+F12 hotkey-overlay-title="Open Projects ... (VSCode)" { spawn "~/.niri-dotfiles/bin/fuzzel-vsc-entries.sh"; } - Mod+Space hotkey-overlay-title="Run a command ... (fuzzel)" { spawn "~/.niri-dotfiles/bin/fuzzel-win+r.sh"; } + Mod+F12 hotkey-overlay-title="Open Projects ... (VSCode)" { spawn ".fuzzel-vscode"; } + Mod+Space hotkey-overlay-title="Run a command ... (fuzzel)" { spawn ".fuzzel-startb"; } // Applications such as remote-desktop clients and software KVM switches may // request that niri stops processing the keyboard shortcuts defined here @@ -21,7 +21,7 @@ binds { XF86PowerOff hotkey-overlay-title="Exit niri" { quit; } Super+Escape hotkey-overlay-title="Lock the Screen (gtklock)" { spawn "gtklock" "-d"; } Mod+Delete hotkey-overlay-title="Lock screen and Hibernate ..." allow-when-locked=true { - spawn-sh "(pgrep gtklock || gtklock -d) && sleep 1 && systemctl hibernate"; + spawn-sh "(pgrep gtklock || gtklock -d) && sleep 1.5 && systemctl hibernate"; } XF86AudioRaiseVolume hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; } diff --git a/bin/fuzzel-win+r.sh b/bin/.fuzzel-startb similarity index 66% rename from bin/fuzzel-win+r.sh rename to bin/.fuzzel-startb index b2ddda2..f516418 100755 --- a/bin/fuzzel-win+r.sh +++ b/bin/.fuzzel-startb @@ -1,3 +1,3 @@ #!/bin/bash option=$(fuzzel --dmenu --prompt-only="Command to execute: ") -[ -z "$option" ] || runbg -- $option +[ -z "$option" ] || startb -- $option diff --git a/bin/fuzzel-vsc-entries.sh b/bin/.fuzzel-vscode similarity index 84% rename from bin/fuzzel-vsc-entries.sh rename to bin/.fuzzel-vscode index bf9a887..84f7dbd 100755 --- a/bin/fuzzel-vsc-entries.sh +++ b/bin/.fuzzel-vscode @@ -12,4 +12,4 @@ for item in $(ls $desktop); do done fsarg=$(echo -en "$options" | fuzzel --dmenu --prompt="Open Project with VSCode:") -[ -z "$fsarg" ] || runbg -- code "$desktop/$fsarg" +[ -z "$fsarg" ] || startb -- code "$desktop/$fsarg" diff --git a/bin/runbg b/bin/startb similarity index 98% rename from bin/runbg rename to bin/startb index 8703dd9..ba80552 100755 --- a/bin/runbg +++ b/bin/startb @@ -1,11 +1,14 @@ #!/bin/bash -#systemd-run --user --scope --slice=YukiLauncher.slice --unit="$1-$$".scope /bin/sh -c '"$@"' _ "$@" +# like `start /b` in Windows CMD. # goddamn nvm-sh !!! # have to update PATH before launch PATH=$(zsh -c -i 'echo $PATH') export PATH +# https://vescrity.github.io/post/systemd-desktop-suspend/ +#systemd-run --user --scope --slice=YukiLauncher.slice --unit="$1-$$".scope /bin/sh -c '"$@"' _ "$@" + # Generated by GitHub Copilot. # start-bg-journal.sh - start a command as a detached daemon and send stdout/stderr to systemd-journald #