mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
fish: refactored tmux_sessionizer
This commit is contained in:
parent
d2d49f9de4
commit
d78f5b9043
7 changed files with 74 additions and 78 deletions
11
nix/homeModules/fish/functions/__tmux_register_session.fish
Normal file
11
nix/homeModules/fish/functions/__tmux_register_session.fish
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
function __tmux_register_session \
|
||||
--description "Register the session, if it's not set yet"
|
||||
### Effects:
|
||||
set last /tmp/TMUX_LAST
|
||||
|
||||
set this (tmux display-message -p '#S')
|
||||
if [ ! -f "$last" ]; or [ (cat "$last") != "$tmux_current" ]
|
||||
echo $this >$last
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue