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