From 4af2ea3027f8fa20e6e87411fd77bdec556ce3d9 Mon Sep 17 00:00:00 2001 From: psox Date: Thu, 4 Nov 2021 15:12:41 +0000 Subject: [PATCH] consolodate with develop --- starship.toml | 81 ++++++++++++++++++++++++++++ tmux/fragment/ctrl-alt-movement.conf | 33 ++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 starship.toml create mode 100644 tmux/fragment/ctrl-alt-movement.conf diff --git a/starship.toml b/starship.toml new file mode 100644 index 0000000..3ab519d --- /dev/null +++ b/starship.toml @@ -0,0 +1,81 @@ + +format = """ +\\[$username@$hostname\\] $directory \ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$kubernetes\ +$docker_context\ +$aws\ +$terraform\ +$package\ +$cmake\ +$golang\ +$helm\ +$java\ +$nodejs\ +$perl\ +$php\ +$python\ +$rust\ +$nix_shell\ +$memory_usage\ +$env_var\ +$cmd_duration\ +$custom\ +$jobs\ +$status +$time $character\ +""" + +[cmd_duration] +min_time = 0 +show_milliseconds = true +format = " [ ⏱ $duration](bold blue)" + +[time] +disabled = false +time_format = "%FT%T" +format = "[$time]($style)" + +[git_status] +disabled = false + +[git_state] +disabled = false + +[directory] +truncation_length = 0 +truncate_to_repo = false +read_only = " 🔒" +format = "\\[[$path]($style)\\][$read_only](bold yellow)" + +[hostname] +disabled = false +ssh_only = false +format = "[$hostname]($style)" + +[username] +disabled = false +show_always = true +format = "[$user]($style)" + +[status] +format = '[ \[$symbol $status\]]($style) ' +map_symbol = true +disabled = false + +[docker_context] +only_with_files = false +disabled = false + +[aws] +disabled = false + +[kubernetes] +disabled = false + +[terraform] +disabled = false + diff --git a/tmux/fragment/ctrl-alt-movement.conf b/tmux/fragment/ctrl-alt-movement.conf new file mode 100644 index 0000000..9d10f26 --- /dev/null +++ b/tmux/fragment/ctrl-alt-movement.conf @@ -0,0 +1,33 @@ + +# This fragmenet is meant to be used with a Vim plugin and provides unified movement +# between Vim window/panes and tmux panes. It requires you install the following in +# Vim to function correctly: +# +# github.com/christoomey/vim-tmux-navigator +# +# Include it by adding the following snippet to your early (or late) tmux.conf: +# +# source-file "$PSOXIZSH/tmux/fragment/ctrl-alt-movement.conf" + +### --- This uses Ctrl-Alt- movement --- ### + +# Integration with vim-tmux-navigator & fzf +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ +| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \ +| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'" +bind -n C-M-Left run "($is_vim && tmux send-keys C-h) \ + || tmux select-pane -L" +bind -n C-M-Down run "($is_vim && tmux send-keys C-j) \ + || ($is_fzf && tmux send-keys C-j) \ + || tmux select-pane -D" +bind -n C-M-Up run "($is_vim && tmux send-keys C-k) \ + || ($is_fzf && tmux send-keys C-k) \ + || tmux select-pane -U" +bind -n C-M-Right run "($is_vim && tmux send-keys C-l) \ + || tmux select-pane -R" +bind-key -T copy-mode-vi 'C-M-Left' select-pane -L +bind-key -T copy-mode-vi 'C-M-Down' select-pane -D +bind-key -T copy-mode-vi 'C-M-Up' select-pane -U +bind-key -T copy-mode-vi 'C-M-Right' select-pane -R +