Connect to the selected session in st
All checks were successful
/ check (push) Successful in 43s

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-11-02 07:40:47 +00:00
parent c888e88daf
commit e8d92643c5

View file

@ -9,18 +9,19 @@
name = "dmenu_tmux"; name = "dmenu_tmux";
text = '' text = ''
selected="$(z tmux list | dmenu -l 20)" selected="$(z tmux list | dmenu -l 20)" || exit 0
if [[ -n "$selected" ]]; then pkill -x st 2>/dev/null || true
echo "$selected" sleep 0.1
# TODO: open a terminal with the selected session. exec st -e z tmux connect "$selected"
fi
''; '';
runtimeInputs = with pkgs; [ runtimeInputs = with pkgs; [
dmenu dmenu
inputs.z.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.z.packages.${pkgs.stdenv.hostPlatform.system}.default
# TODO: ensure st is installed and that my version is used.
]; ];
}) })
]; ];