new dotfiles

This commit is contained in:
2026-02-25 15:35:26 +02:00
parent f1df2dd897
commit a4ba5a2a2e
5 changed files with 21 additions and 13 deletions

View File

@@ -3,7 +3,7 @@
email = contact@tomastm.com email = contact@tomastm.com
[core] [core]
editor = nvim editor = nvim
excludesfile = ~/.gitignore excludesfile = ~/.config/git/ignore
[init] [init]
defaultBranch = main defaultBranch = main
[pull] [pull]
@@ -17,8 +17,7 @@
amend = commit --amend --no-edit amend = commit --amend --no-edit
rename = branch -m rename = branch -m
st = status st = status
unstage = reset HEAD unstage = reset HEAD
last = log -1 HEAD last = log -1 HEAD
tags = tag -l tags = tag -l
undo = reset --mixed HEAD~1 undo = reset --mixed HEAD~1

View File

@@ -67,10 +67,9 @@ bind n new-window
bind c confirm-before -p "kill-pane \#P? (y/n)" kill-pane bind c confirm-before -p "kill-pane \#P? (y/n)" kill-pane
##### Misc ##### ##### Misc #####
bind r source-file ~/.tmux.conf \; display "Reloaded!" bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
unbind d unbind d
bind e detach bind e detach
bind d command-prompt -I "flow " 'run-shell "~/.bin/dev-tmux-wrapper %1 --from #{session_name}"' bind d command-prompt -I "flow " 'run-shell "~/.bin/dev-tmux-wrapper %1 --from #{session_name}"'

View File

@@ -6,7 +6,9 @@ export LC_COLLATE=C
# eval "$(dircolors)"; echo "$LS_COLORS" # eval "$(dircolors)"; echo "$LS_COLORS"
export LS_COLORS='rs=0:di=01;34:ln=01;33:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32' export LS_COLORS='rs=0:di=01;34:ln=01;33:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32'
HISTFILE=$HOME/.zsh_history mkdir -p "$XDG_CACHE_HOME/zsh" "$XDG_STATE_HOME/zsh"
HISTFILE="$XDG_STATE_HOME/zsh/history"
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
@@ -14,28 +16,31 @@ setopt auto_cd interactive_comments prompt_subst share_history
setopt append_history hist_ignore_dups hist_ignore_all_dups hist_reduce_blanks setopt append_history hist_ignore_dups hist_ignore_all_dups hist_reduce_blanks
autoload -Uz compinit autoload -Uz compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case-insensitive zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' use-cache on zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/zcompcache"
compinit compinit -d "$XDG_CACHE_HOME/zsh/zcompdump"
git_prompt_info() { git_prompt_info() {
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD) local branch
branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
echo " %F{green}($branch)%f" echo " %F{green}($branch)%f"
fi fi
} }
abbrev_path() { abbrev_path() {
local pwd="${PWD/#$HOME/~}" local pwd="${PWD/#$HOME/~}"
local parts=("${(@s:/:)pwd}") local parts=("${(@s:/:)pwd}")
local len=${#parts} local len=${#parts}
if (( len <= 1 )); then if (( len <= 1 )); then
echo "$pwd" echo "$pwd"
return return
fi fi
local result="" local result=""
local i
for (( i=1; i<len; i++ )); do for (( i=1; i<len; i++ )); do
result+="${parts[i]:0:1}/" result+="${parts[i]:0:1}/"
done done
@@ -44,7 +49,6 @@ abbrev_path() {
} }
PROMPT='%n@%m%f %F{blue}$(abbrev_path)%f$(git_prompt_info) $ ' PROMPT='%n@%m%f %F{blue}$(abbrev_path)%f$(git_prompt_info) $ '
# PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
autoload -U up-line-or-beginning-search down-line-or-beginning-search autoload -U up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search zle -N up-line-or-beginning-search

6
_shared/zsh/.zshenv Normal file
View File

@@ -0,0 +1,6 @@
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"