feat(tmux): various improvements
This commit is contained in:
parent
bd2b6d1af3
commit
d943ab8b6d
5 changed files with 15 additions and 19 deletions
|
|
@ -19,14 +19,14 @@ let
|
|||
|
||||
tmux-sessionizer = pkgs.writeFishApplication {
|
||||
name = "ts";
|
||||
runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd fzf1 tmux-switch ];
|
||||
runtimeInputs = with pkgs; [ tmux findutils coreutils procps fd tmux-switch ];
|
||||
text = readFile ./tmux-sessionizer/script.fish;
|
||||
completions = readFile ./tmux-sessionizer/completions.fish;
|
||||
};
|
||||
|
||||
tmux-attach = pkgs.writeFishApplication {
|
||||
name = "ta";
|
||||
runtimeInputs = with pkgs; [ tmux fzf1 tmux-switch ];
|
||||
runtimeInputs = with pkgs; [ tmux tmux-switch ];
|
||||
text = readFile ./tmux-attach/script.fish;
|
||||
completions = readFile ./tmux-attach/completions.fish;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
set selected (tmux list-sessions -F '#{session_name}' 2>/dev/null | fzf1 $argv)
|
||||
set selected (tmux list-sessions -F '#{session_name}' 2>/dev/null | fzf $argv)
|
||||
if not test -n "$selected"
|
||||
exit 1
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
set selected (fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | fzf1 $argv)
|
||||
set pipe (mktemp --dry-run)
|
||||
mkfifo $pipe
|
||||
|
||||
fd -HIg '.git' ~/ --min-depth 1 --max-depth 5 --type d --prune --exec dirname {} | tee $pipe >/dev/null &
|
||||
fd . ~/ --min-depth 1 --max-depth 3 --type d | tee $pipe >/dev/null &
|
||||
|
||||
set selected (cat $pipe | fzf $argv)
|
||||
rm -f "$pipe"
|
||||
|
||||
set selected_name (basename $selected 2>/dev/null | string replace "." "_")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue