mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
feat: tmux theme updates, plugins prep
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -31,9 +31,26 @@ bind -n C-M-w confirm-before kill-session
|
||||
# Enable mouse control
|
||||
set -g mouse on
|
||||
|
||||
# List of plugins
|
||||
# set -g @plugin 'tmux-plugins/tpm'
|
||||
# set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
# set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||
# set -g @plugin 'tmux-plugins/tmux-online-status'
|
||||
# set -g @plugin 'tmux-plugins/tmux-battery'
|
||||
# set -g @plugin ''
|
||||
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'github_username/plugin_name#branch'
|
||||
# set -g @plugin 'git@github.com:user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com:user/plugin'
|
||||
|
||||
# Load local config if exists
|
||||
if-shell "[[ -f ~/.config/local.tmux ]]" {
|
||||
source ~/.config/local.tmux
|
||||
if-shell "[[ -f ~/.config/tmux/local.tmux ]]" {
|
||||
source -F "#{d:current_file}/local.tmux"
|
||||
}
|
||||
|
||||
source ~/.config/theme.tmux
|
||||
source -F "#{d:current_file}/theme.tmux"
|
||||
|
||||
# NOTE Initialize TMUX plugin manager (keep this line at the very bottom of tmux conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
1
.config/tmux/local.tmux
Normal file
1
.config/tmux/local.tmux
Normal file
@@ -0,0 +1 @@
|
||||
set-option default-command "arch -arm64 /bin/zsh"
|
||||
7
.config/tmux/modules/date.tmux
Normal file
7
.config/tmux/modules/date.tmux
Normal file
@@ -0,0 +1,7 @@
|
||||
%hidden MODULE_NAME="date"
|
||||
|
||||
set -gq "@catppuccin_${MODULE_NAME}_icon" " "
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_color" "#{E:@thm_blue}"
|
||||
set -gq "@catppuccin_${MODULE_NAME}_text" " %d-%m"
|
||||
|
||||
source "${ZPLUG_REPOS}/catppuccin/tmux/utils/status_module.conf"
|
||||
14
.config/tmux/modules/online_status.tmux
Normal file
14
.config/tmux/modules/online_status.tmux
Normal file
@@ -0,0 +1,14 @@
|
||||
%hidden MODULE_NAME="online"
|
||||
|
||||
# NOTE online status
|
||||
set -g @online_icon "ok"
|
||||
set -g @offline_icon "nok"
|
||||
|
||||
set -gqF "@on_stat" "#{online_status}"
|
||||
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_icon" "#{?#{==:#{@on_stat},ok}, , }"
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_color" "#{E:@thm_mauve}"
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_text" "#{?#{==:#{@on_stat},ok}, on, off}"
|
||||
# set -gqF "@catppuccin_${MODULE_NAME}_text" "#{online_status}"
|
||||
|
||||
source "${ZPLUG_REPOS}/catppuccin/tmux/utils/status_module.conf"
|
||||
7
.config/tmux/modules/time.tmux
Normal file
7
.config/tmux/modules/time.tmux
Normal file
@@ -0,0 +1,7 @@
|
||||
%hidden MODULE_NAME="time"
|
||||
|
||||
set -gq "@catppuccin_${MODULE_NAME}_icon" " "
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_color" "#{E:@thm_blue}"
|
||||
set -gq "@catppuccin_${MODULE_NAME}_text" " %H:%M:%S"
|
||||
|
||||
source "${ZPLUG_REPOS}/catppuccin/tmux/utils/status_module.conf"
|
||||
8
.config/tmux/modules/usage.tmux
Normal file
8
.config/tmux/modules/usage.tmux
Normal file
@@ -0,0 +1,8 @@
|
||||
%hidden MODULE_NAME="usage"
|
||||
|
||||
set -gq "@catppuccin_${MODULE_NAME}_icon" " "
|
||||
set -gqF "@catppuccin_${MODULE_NAME}_color" "#{E:@thm_green}"
|
||||
# set -gqF "@catppuccin_${MODULE_NAME}_text" " #(df -h /System/Volumes/Data | awk 'NR==2{print $5}' | tr -d '\n')"
|
||||
set -gq "@catppuccin_${MODULE_NAME}_text" " #(echo -n test)"
|
||||
|
||||
source "${ZPLUG_REPOS}/catppuccin/tmux/utils/status_module.conf"
|
||||
@@ -1,5 +1,12 @@
|
||||
run "${ZPLUG_REPOS}/catppuccin/tmux/catppuccin.tmux"
|
||||
|
||||
# source -F "#{d:current_file}/modules/online_status.tmux"
|
||||
source -F "#{d:current_file}/modules/date.tmux"
|
||||
source -F "#{d:current_file}/modules/time.tmux"
|
||||
source -F "#{d:current_file}/modules/usage.tmux"
|
||||
|
||||
set -g status-interval 5
|
||||
|
||||
# Configure Catppuccin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
# set -g @catppuccin_status_background "none"
|
||||
@@ -7,10 +14,6 @@ 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 ""
|
||||
@@ -30,16 +33,22 @@ set -ga status-left "#[bg=default,fg=#{@thm_yellow}]#{?window_zoomed_flag, z
|
||||
# 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 -gaF status-right "#{E:@catppuccin_status_application}"
|
||||
# set -gaF status-right "#{E:@catppuccin_status_usage}"
|
||||
set -gaF 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 -gaF 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 "
|
||||
set -g @online_icon "ok"
|
||||
set -g @offline_icon "nok"
|
||||
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 -gaF status-right "#{E:@catppuccin_status_online}"
|
||||
|
||||
set -ga status-right "#{E:@catppuccin_status_date}"
|
||||
set -ga status-right "#{E:@catppuccin_status_time}"
|
||||
|
||||
# NOTE Pane Borders
|
||||
setw -g pane-border-status bottom
|
||||
2
.zshrc
2
.zshrc
@@ -53,7 +53,7 @@ fi
|
||||
|
||||
export VISUAL="$EDITOR"
|
||||
|
||||
tmux source-file "$HOME/.config/.tmux.conf" 2>/dev/null
|
||||
tmux source-file "$HOME/.config/tmux/conf.tmux" 2>/dev/null
|
||||
|
||||
source "$DOTFILES/exports.zsh" # must run before zsh_init
|
||||
source "$DOTFILES/aliases.zsh"
|
||||
|
||||
@@ -13,7 +13,7 @@ These are my personal dotfiles.
|
||||
Some notable tools I use are:
|
||||
|
||||
- Nvim (`.config/nvim`)
|
||||
- Tmux (`.config/.tmux.conf`, `utils/tx`)
|
||||
- Tmux (`.config/tmux`, `utils/tx`)
|
||||
- WezTerm (`.config/wezterm/wezterm.lua`)
|
||||
- Zplug (`zplug.init.sh`)
|
||||
|
||||
|
||||
@@ -126,13 +126,13 @@ alias dvolp="docker-volume-path"
|
||||
alias dvp="docker-volume-path"
|
||||
|
||||
# tmux
|
||||
alias tmux="tmux -f ~/.config/.tmux.conf"
|
||||
alias tmux="tmux -f ~/.config/tmux/conf.tmux"
|
||||
alias tn="tmux new"
|
||||
alias tns="tmux new -s"
|
||||
alias ta="tmux attach"
|
||||
alias tas="tmux attach -t"
|
||||
alias tlw="tmux list-windows"
|
||||
alias trl="tmux source-file ~/.config/conf.tmux"
|
||||
alias trl="tmux source-file ~/.config/tmux/conf.tmux"
|
||||
alias trn="tmux rename-session -t"
|
||||
alias tk="trm"
|
||||
alias tks="tmux kill-server"
|
||||
|
||||
@@ -360,7 +360,7 @@ xrg "--exclude 'nvim' --exclude 'lazygit.yml' $DOTFILES/.config/ $HOME/.config/"
|
||||
# Tmux
|
||||
if [[ $refresh_tmux -eq 1 ]]; then
|
||||
echo_yellow "Reloading tmux config..."
|
||||
tmux source-file "$HOME/.config/.tmux.conf" 2>/dev/null
|
||||
tmux source-file "$HOME/.config/tmux/conf.tmux" 2>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export async function createFromConfig(opts: Opts, tmuxConfig: ParsedTmuxConfigI
|
||||
|
||||
const commands: string[] = []
|
||||
commands.push(
|
||||
`tmux -f ~/.config/.tmux.conf new-session -d -s ${sessionName} -n general -c ${root}; sleep 1`,
|
||||
`tmux -f ~/.config/tmux/conf.tmux new-session -d -s ${sessionName} -n general -c ${root}; sleep 1`,
|
||||
)
|
||||
|
||||
// Create all windows
|
||||
@@ -90,7 +90,7 @@ function getPaneCommands(
|
||||
)
|
||||
commands.push(
|
||||
`tmux split-window -${pane.split.direction || 'h'} ` +
|
||||
` -t ${sessionName}:${windowName} -c ${pane.cwd || rootDir}`.trim(),
|
||||
` -t ${sessionName}:${windowName} -c ${pane.cwd || rootDir}`.trim(),
|
||||
)
|
||||
|
||||
if (pane.split.child) {
|
||||
|
||||
@@ -8,6 +8,7 @@ zplug "chenasraf/git-open", at:develop
|
||||
zplug "mfaerevaag/wd", as:command, use:"wd.sh", hook-load:"wd() { . $ZPLUG_REPOS/mfaerevaag/wd/wd.sh }"
|
||||
zplug "romkatv/powerlevel10k", as:theme, depth:1
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
# zplug "tmux-plugins/tpm", from:github, depth:1
|
||||
# zplug "wfxr/tmux-power", as:theme, depth:1
|
||||
zplug "catppuccin/tmux", as:theme, depth:1
|
||||
zplug "tmux-plugins/tmux-online-status", depth:1
|
||||
|
||||
Reference in New Issue
Block a user