Tmux things

This commit is contained in:
Daniel Flanagan 2022-12-13 15:34:46 -06:00
parent 57a5439bd7
commit 88e270c192
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
5 changed files with 27 additions and 3 deletions

View file

@ -6,6 +6,6 @@ set dir (set -q argv[2] && echo $argv[2] || pwd)
if set -q TMUX
tmux switch -t $session_name
else
tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \
tmux switch -d -t "$session_name" -c "$dir"
tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] &>/dev/null || \
tmux attach -t "$session_name" -c "$dir"
end

View file

@ -41,6 +41,12 @@ if test -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
set --prepend --export --global fish_user_paths $HOME/.nix-profile/bin /nix/var/nix/profiles/default/bin
end
if set -q KITTY_INSTALLATION_DIR
set --global KITTY_SHELL_INTEGRATION enabled
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
end
if has_command nnn
source $DOTFILES_PATH/common/nnn/config.fish
end
@ -54,5 +60,5 @@ end
# end
if status is-interactive; and not set -q TMUX; and status --is-login; and not string match '/dev/tty*' (tty)
tmux attach -t default || tmux new -s default
tmux attach -t default || tmux new -s default
end

View file

@ -76,6 +76,18 @@ function _maybe_git_summary
end
end
function _prompt_marker
printf "%b133;A%b" "\x1b\x5d" "\x1b\x5c"
end
function _prompt_continuation_marker
printf "%b133;A;k=s%b" "\x1b\x5d" "\x1b\x5c"
end
function cmd_marker --on-variable _
printf "%b133;C%b" "\x1b\x5d" "\x1b\x5c"
end
function _prompt_prefix
set_color -b normal brblack
printf "# "
@ -83,6 +95,7 @@ end
function fish_prompt
set last_cmd_status $status
_prompt_marker
_prompt_prefix
_maybe_sudo_prefix
_user_and_host $last_cmd_status

View file

@ -37,6 +37,9 @@ map ctrl+shift+l neighboring_window right
map ctrl+shift+k neighboring_window up
map ctrl+shift+j neighboring_window down
map ctrl+shift+h nth_window -1
map ctrl+shift+p>u kitten hints --type=url --program @
shell_integration disabled
enable_audio_bell no

View file

@ -0,0 +1,2 @@
protocol http, https
action wl-copy