packages/tmux-sessionizer: remove tmux-register-session

We already use the builtin leader-l binding, no need to keep this.
This commit is contained in:
Primrose 2025-11-09 23:05:20 +08:00
parent eac1c86fe8
commit 29c4ca1a81
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -8,24 +8,6 @@
symlinkJoin,
}:
let
tmux-register-session = writeShellApplication {
name = "__tmux-register-session";
runtimeInputs = [ tmux ];
text = ''
last=/tmp/TMUX_LAST
# bail if tmux not running
if ! pgrep tmux >/dev/null 2>&1; then
exit 1
fi
this="$(tmux display-message -p '#S')"
if [ ! -f "$last" ] || [ "$(cat "$last")" != "$this" ]; then
echo "$this" >"$last"
fi
'';
};
tmux-maybe-create = writeShellApplication {
name = "__tmux-maybe-create";
runtimeInputs = [
@ -94,7 +76,6 @@ let
esac
# effects
${lib.getExe tmux-register-session} || :
${lib.getExe tmux-maybe-create} "$session_name" "$selected"
${lib.getExe tmux-attach-or-switch} "$session_name"
'';
@ -103,7 +84,6 @@ in
symlinkJoin {
name = "tmux-sessionizer";
paths = [
tmux-register-session
tmux-maybe-create
tmux-attach-or-switch
tmux-sessionizer