commit 30d3e5da8fe4216ac8e096a1c230df2b4c42f56f parent eb00153d969950d32731fbee14923298924f497a Author: Riaz <riaz@riazj.com> Date: Sat, 4 Oct 2025 22:55:34 -0700 sxhkd: Add hotkey for searching directories Diffstat:
M | .config/sxhkd/sxhkdrc | | | 19 | +++++++++++-------- |
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -13,15 +13,15 @@ alt + Tab alt + BackSpace killw $(pfw) +alt + Down + wtp 0 $(($(wattr h $(lsw -r))-250)) 500 250 $(pfw) + alt + p dmenu_run alt + t todo -alt + n - st calc - alt + w st w3m -v @@ -31,10 +31,13 @@ alt + x alt + m page="$(:|dmenu -p "Man page:")" && st man "$page" +alt + d + phrase="$(:|dmenu -p "Define:")" && st sdcv "$phrase" + alt + l - file="$(find "${SEARCH_DIRS[@]}" -type f -not -path '*/.git/*' | dmenu -i -l 10)" && soap "$file" + file="$(find -L "${SEARCH_DIRS[@]}" -type f -not -path '*/.git/*' -not -path '.config/chromium/*' | dmenu -i -l 10)" && soap "$file" -alt + d - def="$XDG_RUNTIME_DIR/sdcv"; \ - sdcv -n "$(:|dmenu -p "Define:")" > "$def"; \ - [ -s "$def" ] && st less "$def" +alt + s + search="$(:|dmenu -p "Search: ")" && dir="$(find -L school repos -mindepth 1 -maxdepth 1 -type d | dmenu -i -l 10)" && \ + grep -ir --color=always "$search" "$dir" > "$XDG_RUNTIME_DIR/search" && \ + st less "$XDG_RUNTIME_DIR/search"