From 7279d1272e2c34d389cab482f1b8f528da4babfb Mon Sep 17 00:00:00 2001 From: tracer Date: Fri, 3 Apr 2026 16:51:42 +0200 Subject: [PATCH] Tune bufferline and tmux window movement --- nvim/lua/tracer/plugins.lua | 2 +- nvim/lua/tracer/plugins/bufferline.lua | 79 ++++++++++++++++++++++++++ tmux/tmux.conf | 4 +- 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 nvim/lua/tracer/plugins/bufferline.lua diff --git a/nvim/lua/tracer/plugins.lua b/nvim/lua/tracer/plugins.lua index c08030c..40dd681 100644 --- a/nvim/lua/tracer/plugins.lua +++ b/nvim/lua/tracer/plugins.lua @@ -218,7 +218,7 @@ end, requires = "nvim-tree/nvim-web-devicons", after = "onedark.nvim", config = function() - require("bufferline").setup() + require("tracer.plugins.bufferline") end, }) diff --git a/nvim/lua/tracer/plugins/bufferline.lua b/nvim/lua/tracer/plugins/bufferline.lua new file mode 100644 index 0000000..f6061fb --- /dev/null +++ b/nvim/lua/tracer/plugins/bufferline.lua @@ -0,0 +1,79 @@ +require("bufferline").setup({ + options = { + indicator = { + icon = " ", + }, + show_close_icon = false, + tab_size = 0, + max_name_length = 25, + offsets = { + { + filetype = "NvimTree", + text = " Files", + highlight = "StatusLine", + text_align = "left", + }, + }, + separator_style = "slant", + modified_icon = "", + custom_areas = { + left = function() + return { + { text = "  ", fg = "#8fff6d" }, + } + end, + }, + }, + highlights = { + fill = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + background = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + tab = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + tab_close = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + close_button = { + bg = { attribute = "bg", highlight = "StatusLine" }, + fg = { attribute = "fg", highlight = "StatusLineNonText" }, + }, + close_button_visible = { + bg = { attribute = "bg", highlight = "StatusLine" }, + fg = { attribute = "fg", highlight = "StatusLineNonText" }, + }, + close_button_selected = { + fg = { attribute = "fg", highlight = "StatusLineNonText" }, + }, + buffer_visible = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + modified = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + modified_visible = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + duplicate = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + duplicate_visible = { + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + separator = { + fg = { attribute = "bg", highlight = "StatusLine" }, + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + separator_selected = { + fg = { attribute = "bg", highlight = "StatusLine" }, + bg = { attribute = "bg", highlight = "Normal" }, + }, + separator_visible = { + fg = { attribute = "bg", highlight = "StatusLine" }, + bg = { attribute = "bg", highlight = "StatusLine" }, + }, + }, +}) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 187646f..34407a1 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -47,6 +47,9 @@ bind m if -F '#{mouse}' \ 'set -g mouse off; display-message "mouse: off"' \ 'set -g mouse on; display-message "mouse: on"' +# Move current window left/right like tabs +bind -n S-Left swap-window -t -1 +bind -n S-Right swap-window -t +1 set -g status-right "" # Tmux Plugin Manager @@ -54,7 +57,6 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' - # Continuum settings set -g @continuum-restore 'on' # Auto-restore on tmux startup set -g @continuum-save-interval '15' # Auto-save every 15 minutes