mirror of
https://github.com/harivansh-afk/dots.git
synced 2026-04-17 19:03:55 +00:00
Initial dotfiles setup with GNU stow
Centralize dotfiles from ~ into stow packages: - zsh: .zshrc, .zshenv - git: .gitconfig - nvim: init.lua, lua/, plugin/, after/, lazy-lock.json - tmux: tmux.conf, session-list.sh - karabiner: karabiner.json - ghostty: config.ghostty - claude: CLAUDE.md, settings.json, settings.local.json, statusline.sh, 30 commands
This commit is contained in:
commit
44176e60f9
68 changed files with 6529 additions and 0 deletions
9
tmux/.config/tmux/session-list.sh
Executable file
9
tmux/.config/tmux/session-list.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
current=$(tmux display-message -p '#S')
|
||||
tmux list-sessions -F '#S' | while IFS= read -r s; do
|
||||
if [ "$s" = "$current" ]; then
|
||||
printf '#[bg=#4F4946,fg=#d8a657] %s #[bg=default,fg=default]' "$s"
|
||||
else
|
||||
printf ' %s ' "$s"
|
||||
fi
|
||||
done
|
||||
127
tmux/.config/tmux/tmux.conf
Normal file
127
tmux/.config/tmux/tmux.conf
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
# custom
|
||||
|
||||
# Set prefix to C-w
|
||||
unbind C-b
|
||||
set -g prefix M-w
|
||||
bind M-w send-prefix
|
||||
|
||||
set -g mouse on
|
||||
|
||||
# Enable extended keys so Shift+Enter and other modified keys work
|
||||
set -s extended-keys on
|
||||
set -as terminal-features 'xterm*:extkeys'
|
||||
|
||||
# Use Vim-style pane navigation (prefix + h/j/k/l)
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Switch sessions with prefix + H/J/K/L (capital)
|
||||
bind H switch-client -p
|
||||
bind J switch-client -n
|
||||
bind K switch-client -p
|
||||
bind L switch-client -n
|
||||
|
||||
# Switch sessions with prefix + H/J/K/L (capital)
|
||||
bind J switch-client -n
|
||||
bind K switch-client -p
|
||||
bind H switch-client -p
|
||||
bind L switch-client -n
|
||||
|
||||
# Auto-rename windows to the current running command
|
||||
set -g automatic-rename on
|
||||
set -g automatic-rename-format '#{b:pane_current_path}'
|
||||
|
||||
#from github
|
||||
|
||||
|
||||
# Start all numbering at 1 instead of 0 for better key reachability
|
||||
set-option -g base-index 1
|
||||
set-option -g pane-base-index 1
|
||||
|
||||
# Increase history limit, as we want an "almost" unlimited buffer.
|
||||
# May be set to something even higher, like 250k
|
||||
set-option -g history-limit 100000
|
||||
|
||||
# Fix Terminal Title display, to not contain tmux specic information
|
||||
set-option -g set-titles on
|
||||
set-option -g set-titles-string "#{pane_title}"
|
||||
|
||||
# Open new windows and panes in the current working directory of the active
|
||||
# pane.
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
bind - split-window -c "#{pane_current_path}"
|
||||
bind "'" split-window -h -c "#{pane_current_path}"
|
||||
|
||||
# Enable extended support for some more sophisticated terminal emulator
|
||||
# features. Disable them if they are causing problems!
|
||||
set-option -s focus-events on
|
||||
set-option -s extended-keys on
|
||||
|
||||
# Disable waiting time when pressing escape, for smoother Neovim usage. Disable
|
||||
# if differentiation between function and meta keycombination is needed.
|
||||
set-option -s escape-time 0
|
||||
|
||||
##
|
||||
# Styling
|
||||
##
|
||||
|
||||
# gruvbox material colorscheme (mostly)
|
||||
RED="#ea6962"
|
||||
GREEN="#a9b665"
|
||||
YELLOW="#d8a657"
|
||||
BLUE="#7daea3"
|
||||
MAGENTA="#d3869b"
|
||||
CYAN="#89b482"
|
||||
BLACK="#1d2021"
|
||||
DARK_GRAY="#32302F"
|
||||
LIGHT_GRAY="#4F4946"
|
||||
BG="#32302F"
|
||||
FG="#d4be98"
|
||||
|
||||
# Nerdfont characters
|
||||
HALF_ROUND_OPEN="#(printf '\uE0B2')"
|
||||
HALF_ROUND_CLOSE="#(printf '\uE0B0')"
|
||||
TRIANGLE_OPEN="#(printf '\uE0B2')"
|
||||
TRIANGLE_CLOSE="#(printf '\uE0B0')"
|
||||
|
||||
# Move statusbar to the top
|
||||
set-option -g status-position top
|
||||
|
||||
# Basic colors of the Statusbar
|
||||
set-option -g status-style bg=${BG},fg=${FG}
|
||||
|
||||
# Push window list to the left side
|
||||
set-option -g status-justify left
|
||||
|
||||
# Left section empty (windows shown via status-justify left)
|
||||
set-option -g status-left ""
|
||||
|
||||
# Right section shows all sessions (active highlighted)
|
||||
set-option -g status-right "#(~/.config/tmux/session-list.sh)"
|
||||
|
||||
# Set max length of left and right section
|
||||
set-option -g status-left-length 100
|
||||
set-option -g status-right-length 100
|
||||
|
||||
# Style and set content for the inactive windows
|
||||
set-option -g window-status-format "\
|
||||
\
|
||||
#I\
|
||||
#[fg=${MAGENTA}]:\
|
||||
#[fg=default]#W\
|
||||
\
|
||||
"
|
||||
|
||||
# Style and set content for the active windows
|
||||
set-option -g window-status-current-format "\
|
||||
#[bg=${LIGHT_GRAY},fg=default] #I\
|
||||
#[fg=${RED}]:\
|
||||
#[fg=default]#W \
|
||||
#[bg=default]\
|
||||
"
|
||||
|
||||
# Remove the separator between window list items, as we already have spacing
|
||||
# "around" inactive items
|
||||
set-option -g window-status-separator ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue