From 44a695e6d2eaf76d53cda4497cef9e7b13065bcd Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sat, 10 Sep 2022 10:59:07 +0200 Subject: [PATCH] tmux: simplify --- .config/gitmux/gitmux.yaml | 26 -------- .config/starship-tmux.toml | 118 ------------------------------------- .config/starship.toml | 6 ++ .tmux.conf | 9 +-- 4 files changed, 9 insertions(+), 150 deletions(-) delete mode 100644 .config/gitmux/gitmux.yaml delete mode 100644 .config/starship-tmux.toml diff --git a/.config/gitmux/gitmux.yaml b/.config/gitmux/gitmux.yaml deleted file mode 100644 index 734902d..0000000 --- a/.config/gitmux/gitmux.yaml +++ /dev/null @@ -1,26 +0,0 @@ -tmux: - symbols: - branch: '' - hashprefix: ':' - ahead: ↑· - behind: ↓· - staged: '● ' - conflict: '✖ ' - modified: ' !' - untracked: '?' - stashed: '⚑ ' - clean: '✔ ' - styles: - clear: '#[fg=default]' - state: '#[bg=red,fg=white]' - branch: '#[fg=#9ccc65,bg=#1B5E20] ' - remote: '#[fg=cyan]' - staged: '#[fg=green]' - conflict: '#[fg=red]' - modified: '#[fg=#fdd835,bg=#1B5E20]' - untracked: '#[fg=#ff7043,bg=#1B5E20]' - stashed: '#[fg=#ffcdd2]' - clean: '#[fg=#4caf50,bg=#1B5E20]' - layout: [branch, divergence, ' ', flags, '#[fg=#212121]▕'] - options: - branch_max_len: 0 diff --git a/.config/starship-tmux.toml b/.config/starship-tmux.toml deleted file mode 100644 index a41637c..0000000 --- a/.config/starship-tmux.toml +++ /dev/null @@ -1,118 +0,0 @@ -add_newline = false - -format = """ -$status\ -$jobs\ -$kubernetes\ -$gcloud\ -""" -#$cmd_duration\ -# $git_branch\ -# $git_commit\ -# $git_state\ -# $git_status\ -# """ - -# $shlvl\ -# $directory\ -# $hg_branch\ -# $docker_context\ -# $package\ -# $cmake\ -# $dart\ -# $dotnet\ -# $elixir\ -# $elm\ -# $erlang\ -# $golang\ -# $helm\ -# $java\ -# $julia\ -# $nim\ -# $nodejs\ -# $ocaml\ -# $perl\ -# $php\ -# $purescript\ -# $python\ -# $ruby\ -# $rust\ -# $swift\ -# $terraform\ -# $zig\ -# $nix_shell\ -# $conda\ -# $memory_usage\ -# $aws\ -# $gcloud\ -# $env_var\ -# $crystal\ -# $cmd_duration\ -# $custom\ -# $line_break\ -# $jobs\ -# $battery\ -# $time\ -# $status\ -# """ - -[hostname] -ssh_only = false -format = '#\[bg=red\] $hostname ' -style = "" - -[line_break] -disabled = true - -[directory] -fish_style_pwd_dir_length = 1 -truncation_length = 1 -truncate_to_repo = false -style = "bold" - -[gcloud] -# format = "☁$active" -format = '#\[fg=#212121\]▕#\[bg=#0D47A1,fg=#80DEEA\] ☁$active' -style = "" - -[git_branch] -format = '#\[fg=#212121]\▕#\[bg=green,fg=#f7f7f7\] $symbol$branch ' -style = "" - -[git_commit] -format = '$hash' -style = "" - -[git_state] -format = "$state( $progress_current/$progress_total)" -style = "" - -[git_status] -style = "" - -[kubernetes] -disabled = false -format = '#\[fg=#212121\]▕#\[bg=#0D47A1,fg=#80DEEA\] $symbol$context(\($namespace\)) ' -style = "" - -[time] -disabled = false -style = "" - -[golang] -format = '#\[fg=#212121\]▕#\[bg=#00ACC1,fg=#f7f7f7\] $symbol$version ' -style = "" - -[jobs] -format = '#\[fg=#212121\]▕#\[bg=#7E57C2,fg=#f7f7f7\] $symbol$number ' -style = "" -disabled = false - -[status] -format = '\#\[fg=#212121\]▕#[bg=red,fg=#f7f7f7\] $symbol$status ' -style = "" -disabled = false - -[cmd_duration] -format = '#\[fg=#212121\]▕#\[bg=#558B2F,fg=#f7f7f7\] ⏳$duration ' -style = "" diff --git a/.config/starship.toml b/.config/starship.toml index b50177c..994dfe0 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -3,9 +3,15 @@ add_newline = false format = """\ $hostname\ $directory\ +$git_branch\ +$git_state\ +$git_status\ ($character)\ """ +right_format = """\ +""" + [character] success_symbol = "%" diff --git a/.tmux.conf b/.tmux.conf index 10c6e07..5bc8d93 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -29,7 +29,6 @@ bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D -# bind -n M-Tab last-pane bind -n M-1 select-window -t 1 bind -n M-2 select-window -t 2 bind -n M-3 select-window -t 3 @@ -41,7 +40,6 @@ bind -n M-8 select-window -t 8 bind -n M-9 select-window -t 9 bind -n M-0 select-window -t 10 bind -n M-m send-keys -t 9 q C-u "clear; tmux clear-history -t 9" C-m C-p C-p C-p C-m -bind -n M-` last-window bind C-o send-keys C-o bind r source-file ~/.tmux.conf bind -n C-Right next-window @@ -65,13 +63,12 @@ setw -g window-status-separator "" set -g status-style "bg=#313131,fg=#919191" set -g status-left-length 0 set -g status-right-length 0 -set -g status-left '#{?#{==:#I,1},#[bg=#515151]#[fg=#a1a1a1]  #[bg=#515151]#[fg=#d1d1d1] #T #[fg=#515151]#[bg=#313131]🭬,#[bg=#515151,fg=#c1c1c1] #I#[fg=#313131]▕#[bg=#313131,fg=#cccccc] #{=|145|…:pane_current_path}}' -set -g status-right '#{?#{==:#I,1},,#[fg=#07f7f7]#{@starship}#[fg=#313131]▕#[fg=#f7f7f7]#(~/go/bin/gitmux -cfg ~/.config/gitmux/gitmux.yaml "#{pane_current_path}")}#[bg=#4e342e fg=#e0a74d] #(date +%%H:%%M) ' - +set -g status-left '[#I] #{pane_current_path}' +set -g status-right '%F | %R' +set -f status off set -g set-titles on set -g set-titles-string "#H - #T" -# new -s 0 -n 1 new -s0 -n 1 nvim --listen $XDG_RUNTIME_DIR/nvim.sock new-window -n 2 new-window -n 3