Tmux configuration with dimming
This commit is contained in:
parent
30530c9759
commit
046eb4089e
5 changed files with 68 additions and 12 deletions
|
|
@ -15,6 +15,8 @@ set_light_mode() {
|
||||||
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1true/' "$NVIM_CONF"
|
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1true/' "$NVIM_CONF"
|
||||||
sed -i 's/"theme": "Zenwritten Dark"/"theme": "Zenwritten Light"/' "$GEMINI_CONF"
|
sed -i 's/"theme": "Zenwritten Dark"/"theme": "Zenwritten Light"/' "$GEMINI_CONF"
|
||||||
sed -i 's/"theme": "dark"/"theme": "light"/' "$CLAUDE_CONF"
|
sed -i 's/"theme": "dark"/"theme": "light"/' "$CLAUDE_CONF"
|
||||||
|
sed -i "s/set -g window-style .*/set -g window-style 'bg=#E8E2DF'/" ~/.tmux.conf
|
||||||
|
sed -i "s/set -g window-active-style .*/set -g window-active-style 'bg=default'/" ~/.tmux.conf
|
||||||
MODE="light"
|
MODE="light"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -23,6 +25,8 @@ set_dark_mode() {
|
||||||
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1false/' "$NVIM_CONF"
|
sed -E -i 's/(vim.g.light_mode[[:space:]]*=[[:space:]]*).*/\1false/' "$NVIM_CONF"
|
||||||
sed -i 's/"theme": "Zenwritten Light"/"theme": "Zenwritten Dark"/' "$GEMINI_CONF"
|
sed -i 's/"theme": "Zenwritten Light"/"theme": "Zenwritten Dark"/' "$GEMINI_CONF"
|
||||||
sed -i 's/"theme": "light"/"theme": "dark"/' "$CLAUDE_CONF"
|
sed -i 's/"theme": "light"/"theme": "dark"/' "$CLAUDE_CONF"
|
||||||
|
sed -i "s/set -g window-style .*/set -g window-style 'bg=#242424'/" ~/.tmux.conf
|
||||||
|
sed -i "s/set -g window-active-style .*/set -g window-active-style 'bg=default'/" ~/.tmux.conf
|
||||||
MODE="dark"
|
MODE="dark"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,4 +67,13 @@ done
|
||||||
# Reload Ghostty config via signal (no Accessibility permissions required)
|
# Reload Ghostty config via signal (no Accessibility permissions required)
|
||||||
kill -SIGUSR2 $(ps aux | grep "[G]hostty.app" | awk '{print $2}')
|
kill -SIGUSR2 $(ps aux | grep "[G]hostty.app" | awk '{print $2}')
|
||||||
|
|
||||||
|
|
||||||
|
# Reload tmux config
|
||||||
|
tmux source-file ~/.tmux.conf
|
||||||
|
|
||||||
|
tmux list-clients -F '#{client_tty}' |
|
||||||
|
while read -r tty; do
|
||||||
|
tmux refresh-client -R -t "$tty"
|
||||||
|
done
|
||||||
|
|
||||||
echo "Switched to ${MODE} mode"
|
echo "Switched to ${MODE} mode"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
# --- Basics
|
# --- Basics
|
||||||
auto-update-channel = tip
|
auto-update-channel = tip
|
||||||
font-family = "IosevkaTerm Nerd Font Propo"
|
font-family = "DepartureMono Nerd Font Mono"
|
||||||
font-style = "Regular"
|
font-size = 11
|
||||||
font-size = 13
|
|
||||||
background-opacity = 1.0
|
background-opacity = 1.0
|
||||||
window-decoration = auto
|
window-decoration = auto
|
||||||
confirm-close-surface = false
|
confirm-close-surface = false
|
||||||
|
|
@ -14,7 +13,6 @@ theme = zenwritten-light
|
||||||
# Font-size keybindings (match Ctrl+Shift+j/k from WezTerm)
|
# Font-size keybindings (match Ctrl+Shift+j/k from WezTerm)
|
||||||
keybind = all:ctrl+shift+k=increase_font_size:1
|
keybind = all:ctrl+shift+k=increase_font_size:1
|
||||||
keybind = all:ctrl+shift+j=decrease_font_size:1
|
keybind = all:ctrl+shift+j=decrease_font_size:1
|
||||||
keybind = shift+enter=text:\x1b\r
|
|
||||||
|
|
||||||
# Optional: make the split divider visible (newer Ghostty)
|
# Optional: make the split divider visible (newer Ghostty)
|
||||||
# split-divider-color = #444444
|
# split-divider-color = #444444
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,6 @@ $hostname\
|
||||||
$shlvl\
|
$shlvl\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$directory\
|
$directory\
|
||||||
$git_branch\
|
|
||||||
$git_commit\
|
|
||||||
$git_state\
|
|
||||||
$git_status\
|
|
||||||
$hg_branch\
|
$hg_branch\
|
||||||
$docker_context\
|
$docker_context\
|
||||||
$package\
|
$package\
|
||||||
|
|
@ -135,6 +131,7 @@ style = 'bold #BBBBBB'
|
||||||
style = 'bold #BBBBBB'
|
style = 'bold #BBBBBB'
|
||||||
[gcloud]
|
[gcloud]
|
||||||
style = 'bold #BBBBBB'
|
style = 'bold #BBBBBB'
|
||||||
|
disabled=true
|
||||||
[openstack]
|
[openstack]
|
||||||
style = 'bold #BBBBBB'
|
style = 'bold #BBBBBB'
|
||||||
[crystal]
|
[crystal]
|
||||||
|
|
@ -166,3 +163,4 @@ style = 'bold #BBBBBB'
|
||||||
success_symbol = "[](bold green)"
|
success_symbol = "[](bold green)"
|
||||||
error_symbol = "[](bold red)"
|
error_symbol = "[](bold red)"
|
||||||
vicmd_symbol = "[N](bold green)"
|
vicmd_symbol = "[N](bold green)"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#Make nicer tmux motion keys that work with vim as well
|
#Make nicer tmux motion keys that work with vim as well
|
||||||
|
set -g xterm-keys on
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
| grep -iqE '^[^TXZ ]+ +(\\S+\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||||
|
|
||||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||||
|
|
@ -70,3 +71,11 @@ setw -g window-status-bell-style 'fg=yellow bg=red bold'
|
||||||
|
|
||||||
# messages
|
# messages
|
||||||
set -g message-style 'fg=white bg=black'
|
set -g message-style 'fg=white bg=black'
|
||||||
|
|
||||||
|
# Pass through shift+enter
|
||||||
|
set -g extended-keys on
|
||||||
|
set -g extended-keys-format csi-u
|
||||||
|
|
||||||
|
# Dim inactive panes
|
||||||
|
set -g window-style 'fg=white,bg=gray'
|
||||||
|
set -g window-active-style 'fg=white,bg=black'
|
||||||
|
|
|
||||||
44
home/.zshrc
44
home/.zshrc
|
|
@ -44,6 +44,35 @@ alias jjn="jj new -B @ --no-edit"
|
||||||
alias jjs="jj squash --interactive --from @ --into @-"
|
alias jjs="jj squash --interactive --from @ --into @-"
|
||||||
alias jjp="jj bookmark move master --to @-; jj git push"
|
alias jjp="jj bookmark move master --to @-; jj git push"
|
||||||
|
|
||||||
|
sandbox() {
|
||||||
|
local host_repos="$HOME/repos"
|
||||||
|
local sandbox_cwd="/workspace"
|
||||||
|
|
||||||
|
if [[ "$PWD" == "$host_repos" ]]; then
|
||||||
|
sandbox_cwd="/workspace"
|
||||||
|
elif [[ "$PWD" == "$host_repos"/* ]]; then
|
||||||
|
sandbox_cwd="/workspace/${PWD#$host_repos/}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! docker ps -a --format '{{.Names}}' | grep -q '^dev-sandbox$'; then
|
||||||
|
docker run -dit --name dev-sandbox \
|
||||||
|
--env-file "$host_repos/dev_sandbox/.env" \
|
||||||
|
-v "$host_repos:/workspace" \
|
||||||
|
-v pi-state:/root/.pi \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
dev-sandbox:latest
|
||||||
|
else
|
||||||
|
docker start dev-sandbox 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $# > 0 )); then
|
||||||
|
docker exec -it -w "$sandbox_cwd" dev-sandbox /bin/zsh -l -c 'exec "$@"' sandbox "$@"
|
||||||
|
else
|
||||||
|
docker exec -it -w "$sandbox_cwd" dev-sandbox /bin/zsh -l
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Functions
|
# Functions
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
@ -154,9 +183,7 @@ else
|
||||||
alias ls="ls --classify --group-directories-first --color"
|
alias ls="ls --classify --group-directories-first --color"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [[ -z "$TMUX" ]] && [[ -n "$PS1" ]] && [[ -z "$NO_TMUX" ]]; then
|
|
||||||
# tmux attach -t dev || tmux new -s dev
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
export PNPM_HOME="/home/aselimov/.local/share/pnpm"
|
export PNPM_HOME="/home/aselimov/.local/share/pnpm"
|
||||||
|
|
@ -172,3 +199,14 @@ export PATH="$PATH:/Users/aselimov/.lmstudio/bin"
|
||||||
|
|
||||||
# starship
|
# starship
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
# bun completions
|
||||||
|
[ -s "/Users/aselimov/.bun/_bun" ] && source "/Users/aselimov/.bun/_bun"
|
||||||
|
|
||||||
|
# bun
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
if [[ -z "$TMUX" ]] && [[ -n "$PS1" ]] && [[ -z "$NO_TMUX" ]]; then
|
||||||
|
tmux attach -t dev || tmux new -s dev
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue