feat(tmux): change style and position of tmux bar

This commit is contained in:
Stefan Imhoff
2022-12-23 21:03:16 +01:00
parent e2beeb125d
commit dc84035490
5 changed files with 54 additions and 29 deletions

View File

@@ -28,6 +28,7 @@
~/.editorconfig: editorconfig
~/.gitconfig: gitconfig
~/.gitignore: gitignore
~/.gitmux.conf: tmux/gitmux.conf
~/.hammerspoon: hammerspoon
~/.pandoc: pandoc
~/.ripgreprc: ripgrep

BIN
bin/gitmux Executable file

Binary file not shown.

View File

@@ -1,6 +1,6 @@
-- https://github.com/xiyaowong/nvim-transparent
require("transparent").setup({
enable = false,
enable = true,
extra_groups = {
"BufferLineBackground",
"BufferLineFill",

View File

@@ -5,14 +5,21 @@ set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{25
# Base index for windows
set -g base-index 1
# Automatically rename windows when their program exits
set -g automatic-rename on
set-option -g automatic-rename-format "#(tmux-icon-name #{pane_current_command})"
# Base index for panes
set-window-option -g pane-base-index 1
# copy to system clipboard
set -g set-clipboard on
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# Refresh status
set -g status-interval 5
set -g status-interval 1
# Set focus events for Vim
set -g focus-events on
@@ -38,38 +45,27 @@ set -g @pomodoro_break_mins 15
set -g @pomodoro_on " 🍅"
set -g @pomodoro_complete " ✅"
# set -g status-bg "#414868"
set -g status-bg "#1F2335"
# Status Bar
set -g status-position top
set -g status-style 'bg=default,fg=white' # transparent status bar
# TokyoNight colors for Tmux
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
# Pane Style
set -g pane-border-style "fg=brightblack,bg=default"
set -g pane-active-border-style "fg=white,bg=default"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
# Bar Left
set -g status-left-length 100
set -ga status-left "#[fg=white,nobold] "
set -g status-left "#[fg=blue,bold] #S #(gitmux -timeout 300ms -cfg $HOME/.gitmux.conf) #[fg=white] ❭" # session name
set -g status "on"
set -g status-justify "left"
# Bar Right
set -g status-right-length 100
set -g status-right "#{now_playing} #{pomodoro_status} %H:%M ❬ %d.%m.%Y"
set -g status-style "fg=#7aa2f7,bg=#16161e"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
# --- Bar Left ---
set -g status-left "#[fg=black,bg=green,bold] #S #[fg=blue,bg=default,nobold,noitalics,nounderscore]"
# --- Windows ---
set -g window-status-current-format "#[fg=white,bg=#111111]  #I #W "
set -g window-status-format "#[fg=brightwhite,bg=default,nobold,noitalics,nounderscore]  #I #W #F "
# --- Bar Right ---
set -g status-right "#[fg=white,bg=#24283B] #{pomodoro_status} %d.%m.%Y ❬ %H:%M"
# Windows
set -g window-status-current-format "#[fg=magenta,bold,bg=default] #I #W "
set -g window-status-separator ""
set -g window-status-format "#[fg=white,bg=default] #I #W "
# Swap Window to Position 1
bind-key T swap-window -t 1

28
tmux/gitmux.conf Normal file
View File

@@ -0,0 +1,28 @@
tmux:
symbols:
branch: ' שׂ '
hashprefix: ':'
ahead: ' '
behind: ' '
staged: '都'
conflict: '繁 '
untracked: ' '
modified: ' '
stashed: ' '
clean: ''
styles:
clear: '#[fg=default]'
state: '#[fg=red,bold]'
branch: '#[fg=white,bold]'
remote: '#[fg=cyan]'
staged: '#[fg=green,bold]'
conflict: '#[fg=red,bold]'
modified: '#[fg=red,bold]'
untracked: '#[fg=magenta,bold]'
stashed: '#[fg=cyan,bold]'
clean: '#[fg=green,bold]'
divergence: '#[fg=default]'
layout: [branch, divergence, ' ', flags]
options:
branch_max_len: 0
branch_trim: right