mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
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:
parent
eac1c86fe8
commit
29c4ca1a81
1 changed files with 0 additions and 20 deletions
|
|
@ -8,24 +8,6 @@
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
}:
|
}:
|
||||||
let
|
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 {
|
tmux-maybe-create = writeShellApplication {
|
||||||
name = "__tmux-maybe-create";
|
name = "__tmux-maybe-create";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
|
@ -94,7 +76,6 @@ let
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# effects
|
# effects
|
||||||
${lib.getExe tmux-register-session} || :
|
|
||||||
${lib.getExe tmux-maybe-create} "$session_name" "$selected"
|
${lib.getExe tmux-maybe-create} "$session_name" "$selected"
|
||||||
${lib.getExe tmux-attach-or-switch} "$session_name"
|
${lib.getExe tmux-attach-or-switch} "$session_name"
|
||||||
'';
|
'';
|
||||||
|
|
@ -103,7 +84,6 @@ in
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
name = "tmux-sessionizer";
|
name = "tmux-sessionizer";
|
||||||
paths = [
|
paths = [
|
||||||
tmux-register-session
|
|
||||||
tmux-maybe-create
|
tmux-maybe-create
|
||||||
tmux-attach-or-switch
|
tmux-attach-or-switch
|
||||||
tmux-sessionizer
|
tmux-sessionizer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue