mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
feat: tmux theme updates
This commit is contained in:
@@ -1,126 +0,0 @@
|
||||
# remap prefix from 'C-b' to 'C-space'
|
||||
# unbind C-b
|
||||
# set-option -g prefix C-space
|
||||
# bind-key C-space send-prefix
|
||||
set -g escape-time 0
|
||||
|
||||
# split panes using | and -
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind _ split-window -v -c "#{pane_current_path}"
|
||||
bind j run-shell '~/.config/popuptmux'
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# sort sessions by name in selector
|
||||
bind s choose-tree -sZ -O name
|
||||
|
||||
# switch panes using Ctrl-Alt-arrow without prefix
|
||||
# bind -n C-M-Left select-pane -L
|
||||
# bind -n C-M-Right select-pane -R
|
||||
# bind -n C-M-Up select-pane -U
|
||||
# bind -n C-M-Down select-pane -D
|
||||
|
||||
# Ctrl+Shift+K to clear
|
||||
bind -n C-M-k send-keys -R \; send-keys C-l \; clear-history
|
||||
# bind -n C-k send-keys C-l
|
||||
|
||||
# Ctrl+Shift+W to close session
|
||||
bind -n C-M-w confirm-before kill-session
|
||||
|
||||
# Enable mouse control
|
||||
set -g mouse on
|
||||
|
||||
######################
|
||||
### DESIGN CHANGES ###
|
||||
######################
|
||||
|
||||
# NOTE Tmux Power theme
|
||||
# run-shell "${HOME}/.zplug/repos/wfxr/tmux-power/tmux-power.tmux"
|
||||
# set -g @tmux_power_theme '#FF0000'
|
||||
# set -g @tmux_power_theme 'redwine'
|
||||
# set -g window-style 'bg=terminal'
|
||||
# set -g window-active-style 'bg=terminal'
|
||||
# set -g pane-active-border-style 'bg=red'
|
||||
# set -g status-position top
|
||||
# set -g status-justify centre
|
||||
# set -g window-style 'fg=colour242,bg=terminal'
|
||||
# set -g window-active-style 'fg=colour250,bg=terminal'
|
||||
|
||||
run "${ZPLUG_REPOS}/catppuccin/tmux/catppuccin.tmux"
|
||||
# set -g @plugin 'tmux-plugins/tpm'
|
||||
# set -g @plugin 'tmux-plugins/tmux-online-status'
|
||||
# set -g @plugin 'tmux-plugins/tmux-battery'
|
||||
# set -g @plugin 'catppuccin/tmux'
|
||||
|
||||
# Configure Catppuccin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
# set -g @catppuccin_status_background "none"
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
set -g @catppuccin_pane_status_enabled "off"
|
||||
set -g @catppuccin_pane_border_status "off"
|
||||
|
||||
# Configure Online
|
||||
set -g @online_icon "ok"
|
||||
set -g @offline_icon "nok"
|
||||
|
||||
# status left look and feel
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_bg},bold] #S },#{#[bg=#{@thm_bg},fg=#{@thm_green}] #S }}"
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_maroon}] #{pane_current_command} "
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
|
||||
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag, zoom ,}"
|
||||
|
||||
# status right look and feel
|
||||
set -g status-right-length 100
|
||||
set -g status-right ""
|
||||
set -ga status-right "#{?#{e|>=:10,#{battery_percentage}},#{#[bg=#{@thm_red},fg=#{@thm_bg}]},#{#[bg=#{@thm_bg},fg=#{@thm_pink}]}} #{battery_icon} #{battery_percentage} "
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
|
||||
set -ga status-right "#[bg=#{@thm_bg}]#{?#{==:#{online_status},ok},#[fg=#{@thm_mauve}] on ,#[fg=#{@thm_red},bold]#[reverse] off }"
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}, none]│"
|
||||
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
# set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
|
||||
set -ga status-right "#[bg=#{@thm_bg},fg=#{@thm_blue}]#[reverse] #[noreverse] %Y-%m-%d #[reverse] #[noreverse] %H:%M "
|
||||
|
||||
# Configure Tmux
|
||||
# set -g status-position top
|
||||
set -g status-style "bg=#{@thm_bg}"
|
||||
set -g status-justify "absolute-centre"
|
||||
|
||||
# pane border look and feel
|
||||
setw -g pane-border-status bottom
|
||||
setw -g pane-border-format ""
|
||||
setw -g pane-active-border-style "bg=#{@thm_overlay_1},fg=#{@thm_overlay_1}"
|
||||
setw -g pane-border-style "fg=#{@thm_surface_0}"
|
||||
setw -g pane-border-lines single
|
||||
|
||||
# window look and feel
|
||||
# set -wg automatic-rename on
|
||||
# set -g automatic-rename-format "Window"
|
||||
# open:
|
||||
# close:
|
||||
|
||||
# set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
|
||||
set -g window-status-format "#[reverse]#I#{?#{!=:#{window_name},Window}, #[noreverse] #W,}#[fg=#{@thm_bg}]"
|
||||
set -g window-status-style "bg=#{@thm_bg},fg=#{@thm_rosewater}"
|
||||
# set -g window-status-last-style "bg=#{@thm_bg},fg=#{@thm_peach}"
|
||||
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
|
||||
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
|
||||
# set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
|
||||
|
||||
set -g window-status-current-format "#[reverse]#[noreverse]#I#{?#{!=:#{window_name},Window},: #W,}#[bg=#{@thm_bg},fg=#{@thm_peach}]"
|
||||
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_bg},bold"
|
||||
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-online-status/online_status.tmux"
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-battery/battery.tmux"
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-cpu/cpu.tmux"
|
||||
|
||||
39
.config/conf.tmux
Normal file
39
.config/conf.tmux
Normal file
@@ -0,0 +1,39 @@
|
||||
# remap prefix from 'C-b' to 'C-space'
|
||||
# unbind C-b
|
||||
# set-option -g prefix C-space
|
||||
# bind-key C-space send-prefix
|
||||
set -g escape-time 0
|
||||
|
||||
# split panes using | and -
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind _ split-window -v -c "#{pane_current_path}"
|
||||
bind j run-shell '~/.config/popuptmux'
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# sort sessions by name in selector
|
||||
bind s choose-tree -sZ -O name
|
||||
|
||||
# switch panes using Ctrl-Alt-arrow without prefix
|
||||
# bind -n C-M-Left select-pane -L
|
||||
# bind -n C-M-Right select-pane -R
|
||||
# bind -n C-M-Up select-pane -U
|
||||
# bind -n C-M-Down select-pane -D
|
||||
|
||||
# Ctrl+Shift+K to clear
|
||||
bind -n C-M-k send-keys -R \; send-keys C-l \; clear-history
|
||||
# bind -n C-k send-keys C-l
|
||||
|
||||
# Ctrl+Shift+W to close session
|
||||
bind -n C-M-w confirm-before kill-session
|
||||
|
||||
# Enable mouse control
|
||||
set -g mouse on
|
||||
|
||||
# Load local config if exists
|
||||
if-shell "[[ -f ~/.config/local.tmux ]]" {
|
||||
source ~/.config/local.tmux
|
||||
}
|
||||
|
||||
source ~/.config/theme.tmux
|
||||
@@ -1,6 +1,7 @@
|
||||
au BufRead,BufNewFile *.arb set filetype=json
|
||||
au BufRead,BufNewFile *.arb set filetype=json
|
||||
au BufRead,BufNewFile Brewfile set filetype=ruby
|
||||
au BufRead,BufNewFile *.zsh set filetype=bash
|
||||
au BufRead,BufNewFile Makefile set filetype=make noexpandtab shiftwidth=4 softtabstop=0
|
||||
au BufRead,BufNewFile *.md set filetype=markdown
|
||||
au BufRead,BufNewFile *.mdx set filetype=markdown
|
||||
au BufRead,BufNewFile *.zsh set filetype=bash
|
||||
au BufRead,BufNewFile Makefile set filetype=make noexpandtab shiftwidth=4 softtabstop=0
|
||||
au BufRead,BufNewFile *.md set filetype=markdown
|
||||
au BufRead,BufNewFile *.mdx set filetype=markdown
|
||||
au BufRead,BufNewFile *.tmux set filetype=tmux
|
||||
|
||||
71
.config/theme.tmux
Normal file
71
.config/theme.tmux
Normal file
@@ -0,0 +1,71 @@
|
||||
run "${ZPLUG_REPOS}/catppuccin/tmux/catppuccin.tmux"
|
||||
|
||||
# Configure Catppuccin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
# set -g @catppuccin_status_background "none"
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
set -g @catppuccin_pane_status_enabled "off"
|
||||
set -g @catppuccin_pane_border_status "off"
|
||||
|
||||
# Configure Online
|
||||
set -g @online_icon "ok"
|
||||
set -g @offline_icon "nok"
|
||||
|
||||
# NOTE Status Bar
|
||||
# set -g status-position top
|
||||
set -g status-style ""
|
||||
set -g status-justify "absolute-centre"
|
||||
|
||||
# NOTE Status Left
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_bg},bold] #S },#{#[bg=default,fg=#{@thm_green}] #S }}"
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_maroon}] #{pane_current_command} "
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_overlay_0},none]│"
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_blue}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
|
||||
set -ga status-left "#[bg=default,fg=#{@thm_yellow}]#{?window_zoomed_flag, zoom ,}"
|
||||
|
||||
# INFO Right Status
|
||||
set -g status-right-length 100
|
||||
set -g status-right ""
|
||||
set -ga status-right "#[bg=#{@thm_surface_0},fg=#{@thm_mauve}]#{?#{==:#{online_status},ok},#[reverse] #[noreverse]#[fg=#{@thm_fg}] on ,#[fg=#{@thm_red},bold]#[reverse] #[noreverse]#[fg=#{@thm_fg}] off }"
|
||||
|
||||
set -ga status-right "#{E:@catppuccin_status_application}"
|
||||
set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
# set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||
set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
|
||||
set -ga status-right "#[bg=#{@thm_surface_0},fg=#{@thm_blue}]#[reverse] #[noreverse] #[fg=#{@thm_fg}]%Y-%m-%d "
|
||||
set -ga status-right "#[bg=#{@thm_surface_0},fg=#{@thm_blue}]#[reverse] #[noreverse] #[fg=#{@thm_fg}]%H:%M "
|
||||
|
||||
# NOTE Pane Borders
|
||||
setw -g pane-border-status bottom
|
||||
setw -g pane-border-format ""
|
||||
setw -g pane-active-border-style "bg=#{@thm_overlay_1},fg=#{@thm_overlay_1}"
|
||||
setw -g pane-border-style "fg=#{@thm_surface_0}"
|
||||
setw -g pane-border-lines single
|
||||
|
||||
# window look and feel
|
||||
# set -wg automatic-rename on
|
||||
# set -g automatic-rename-format "Window"
|
||||
# open:
|
||||
# close:
|
||||
|
||||
# NOTE Window Status
|
||||
# set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,} "
|
||||
set -g window-status-format "#[reverse]#I#{?#{!=:#{window_name},Window}, #[noreverse] #W,}#[fg=#{@thm_surface_0},bg=#{@thm_bg}]"
|
||||
set -g window-status-style "bg=#{@thm_surface_0},fg=#{@thm_rosewater}"
|
||||
# set -g window-status-last-style "bg=#{@thm_surface_0},fg=#{@thm_peach}"
|
||||
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_surface_0}"
|
||||
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_surface_0},bold"
|
||||
# set -gF window-status-separator "#[bg=#{@thm_surface_0},fg=#{@thm_overlay_0}]│"
|
||||
|
||||
set -g window-status-current-format "#[reverse]#[noreverse]#I#{?#{!=:#{window_name},Window}, #W,}#[bg=#{@thm_surface_0},fg=#{@thm_peach}]"
|
||||
set -g window-status-current-style "bg=#{@thm_peach},fg=#{@thm_surface_0},bold"
|
||||
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-online-status/online_status.tmux"
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-battery/battery.tmux"
|
||||
run "${ZPLUG_REPOS}/tmux-plugins/tmux-cpu/cpu.tmux"
|
||||
@@ -41,12 +41,13 @@ config.font = wezterm.font_with_fallback({
|
||||
"Symbols Nerd Font Mono",
|
||||
})
|
||||
-- For example, changing the color scheme:
|
||||
-- config.color_scheme = 'AdventureTime'
|
||||
config.color_scheme = 'catppuccin-mocha'
|
||||
-- config.font = wezterm.font("Menlo")
|
||||
config.font_size = 14.0
|
||||
config.window_background_opacity = 0.85
|
||||
config.macos_window_background_blur = 20
|
||||
config.enable_tab_bar = false
|
||||
config.window_decorations = "RESIZE"
|
||||
config.mouse_bindings = {
|
||||
-- Disable the 'Down' event of Cmd-Click to avoid weird program behaviors
|
||||
{
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,4 +9,4 @@ _local.zsh
|
||||
.tmux_local.yml
|
||||
.device_uid
|
||||
plugins/.cache
|
||||
.config/.tmux_local.conf
|
||||
.config/local.tmux
|
||||
|
||||
@@ -132,7 +132,7 @@ alias tns="tmux new -s"
|
||||
alias ta="tmux attach"
|
||||
alias tas="tmux attach -t"
|
||||
alias tlw="tmux list-windows"
|
||||
alias trl="[[ -f ~/.config/.tmux_local.conf ]] && tmux source-file ~/.config/.tmux_local.conf; tmux source-file ~/.config/.tmux.conf"
|
||||
alias trl="tmux source-file ~/.config/conf.tmux"
|
||||
alias trn="tmux rename-session -t"
|
||||
alias tk="trm"
|
||||
alias tks="tmux kill-server"
|
||||
|
||||
Reference in New Issue
Block a user