fix fix fix
This commit is contained in:
parent
0ade5a05eb
commit
445050aaa8
1 changed files with 16 additions and 5 deletions
|
|
@ -69,11 +69,14 @@
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
sessionizer = /* fish */ ''
|
fzf_sessionizer = /* fish */ ''
|
||||||
set -l selected (dev_projects | fzf \
|
fzf \
|
||||||
--prompt "Create/switch to session: " \
|
--prompt "Create/switch to session: " \
|
||||||
--header ' Ctrl-d: Kill Session ' \
|
--header " Ctrl-d: Kill Session " \
|
||||||
--bind 'ctrl-d:execute(tmux kill-session -t {2..})++reload(dev_projects)')
|
--bind "ctrl-d:execute(tmux kill-session -t {2..})++reload(dev_projects)"
|
||||||
|
'';
|
||||||
|
sessionizer = /* fish */ ''
|
||||||
|
set -l selected (dev_projects | fzf_sessionizer)
|
||||||
|
|
||||||
if test -z "$selected"
|
if test -z "$selected"
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -82,7 +85,7 @@
|
||||||
set -l session_name (basename $selected)
|
set -l session_name (basename $selected)
|
||||||
set -l tmux_runnning (pgrep tmux)
|
set -l tmux_runnning (pgrep tmux)
|
||||||
|
|
||||||
if test -z $TMUX && -z $tmux_running
|
if test -z $TMUX && test -z $tmux_running
|
||||||
tmux new-session -s $session_name -c $selected
|
tmux new-session -s $session_name -c $selected
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
@ -93,6 +96,9 @@
|
||||||
|
|
||||||
tmux switch-client -t $session_name
|
tmux switch-client -t $session_name
|
||||||
'';
|
'';
|
||||||
|
tmux_sessionizer = /* fish */ ''
|
||||||
|
tmux display-popup -h 50% -w 80% -E sessionizer
|
||||||
|
'';
|
||||||
nn = /* fish */ ''
|
nn = /* fish */ ''
|
||||||
# Require a title argument
|
# Require a title argument
|
||||||
if test (count $argv) -lt 1
|
if test (count $argv) -lt 1
|
||||||
|
|
@ -232,6 +238,11 @@
|
||||||
# Third party integration not covered by
|
# Third party integration not covered by
|
||||||
# home manager's enableFishIntegration
|
# home manager's enableFishIntegration
|
||||||
fnm env --use-on-cd --shell fish | source
|
fnm env --use-on-cd --shell fish | source
|
||||||
|
|
||||||
|
# Auto start tmux
|
||||||
|
if status --is-interactive; and not set -q TMUX
|
||||||
|
tmux attach-session -d -t main || tmux new-session -s main
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue