jj, fish, better kanata, etc
This commit is contained in:
parent
52b1728e2e
commit
d030ebe744
17 changed files with 1642 additions and 938 deletions
|
|
@ -36,11 +36,13 @@
|
|||
# for special characters to work right
|
||||
# like <C-_>
|
||||
# set-window-option -g xterm-keys on
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
set -g set-titles on
|
||||
set -s escape-time 0
|
||||
|
||||
set-option -g default-shell /bin/zsh
|
||||
set-option -g default-shell ${pkgs.fish}/bin/fish
|
||||
set -ga terminal-features "\*:hyperlinks"
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
|
|
@ -119,7 +121,22 @@
|
|||
'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
|
||||
"send -t= Down" "send -Mt="'
|
||||
|
||||
# bind -n DoubleClick1Pane run-shell "${pkgs.xdragon}/bin/dragon -x '#{pane_current_path}/#{mouse_word}'"
|
||||
bind-key -T root DoubleClick1Pane run-shell "cd '#{pane_current_path}'; echo '#{mouse_line}' | ${pkgs.writeScriptBin "open-file" ''
|
||||
open_file () {
|
||||
input=`cat`
|
||||
link=$(echo "$input" | grep -Po '[^ \\]*/[^ \\]*\.[^ \\]*\:[0-9]+' | sed 's/\:/|/g')
|
||||
|
||||
if [ ! -z "$link" ]; then
|
||||
echo "LINK = $link"
|
||||
vim_proc=$(pgrep vim | xargs pwdx | grep $(pwd -P) | awk '{print $1}' | sed 's/\:*$//g' | xargs -I{} find /run/user/1000 -depth -maxdepth 1 -name "nvim.{}.0")
|
||||
|
||||
nvim --server "$vim_proc" --remote-send "<C-\><C-N>:e $link<cr>"
|
||||
fi
|
||||
}
|
||||
|
||||
open_file 2>&1 >> ~/open-file.log
|
||||
|
||||
''}/bin/open-file"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue