dotfiles: sync

This commit is contained in:
2025-03-20 15:59:13 +02:00
parent 24411364af
commit 6602c4da84
5 changed files with 118 additions and 26 deletions

View File

@@ -27,6 +27,7 @@ brew 'jq'
brew 'kubectl' brew 'kubectl'
brew 'kubectx' brew 'kubectx'
brew 'mas' brew 'mas'
brew 'ncdu'
brew 'neovim' brew 'neovim'
brew 'nmap' brew 'nmap'
brew 'node' brew 'node'

View File

@@ -1,4 +1,3 @@
live_config_reload = true
[colors] [colors]
draw_bold_text_with_bright_colors = true draw_bold_text_with_bright_colors = true
@@ -114,7 +113,7 @@ hide_when_typing = true
[selection] [selection]
semantic_escape_chars = ",│`|:\"' ()[]{}<>" semantic_escape_chars = ",│`|:\"' ()[]{}<>"
[shell] [terminal.shell]
args = ["-l", "-c", "/opt/homebrew/bin/tmux attach || /opt/homebrew/bin/tmux"] args = ["-l", "-c", "/opt/homebrew/bin/tmux attach || /opt/homebrew/bin/tmux"]
program = "/bin/bash" program = "/bin/bash"
@@ -130,3 +129,8 @@ lines = 24
[window.padding] [window.padding]
x = 0 x = 0
y = 0 y = 0
[general]
live_config_reload = true
[terminal]

View File

@@ -1,3 +1 @@
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
[ -f /opt/homebrew/opt/asdf/libexec/asdf.sh ] && . /opt/homebrew/opt/asdf/libexec/asdf.sh

View File

@@ -1,12 +1,12 @@
[ -f /opt/homebrew/opt/asdf/libexec/asdf.sh ] \ [ -f /opt/homebrew/opt/asdf/libexec/asdf.sh ] &&
&& . /opt/homebrew/opt/asdf/libexec/asdf.sh . /opt/homebrew/opt/asdf/libexec/asdf.sh
[ -f /etc/bash_completion ] && . /etc/bash_completion [ -f /etc/bash_completion ] && . /etc/bash_completion
[ -f ~/.fzf.bash ] && . ~/.fzf.bash [ -f ~/.fzf.bash ] && . ~/.fzf.bash
[ -f ~/.cargo/env ] && . ~/.cargo/env [ -f ~/.cargo/env ] && . ~/.cargo/env
[ -f ~/Syncthing/secrets.sh ] && . ~/Syncthing/secrets.sh [ -f ~/Syncthing/secrets.sh ] && . ~/Syncthing/secrets.sh
if [ -x /usr/libexec/path_helper ]; then if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s` eval $(/usr/libexec/path_helper -s)
fi fi
# Save 10,000 lines of history in memory # Save 10,000 lines of history in memory
@@ -55,10 +55,10 @@ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
alias ~='cd ~' alias ~='cd ~'
alias l='exa' alias l='eza'
alias ls='exa' alias ls='eza'
alias ll='exa -l' alias ll='eza -l'
alias tree='exa --tree' alias tree='eza --tree'
alias vim='nvim' alias vim='nvim'
alias vi='nvim' alias vi='nvim'
alias v='nvim' alias v='nvim'
@@ -72,12 +72,14 @@ alias md='mkdir -p'
alias gco='git checkout' alias gco='git checkout'
alias gcom='git checkout master' alias gcom='git checkout master'
alias gcob='git checkout -b' alias gcob='git checkout -b'
# TODO: git checkout --track origin/$1
# alias gcot='git checkout'
alias gd='git diff' alias gd='git diff'
alias gdc='git diff --cached' alias gdc='git diff --cached'
alias gdn='git diff --no-index' alias gdn='git diff --no-index'
alias gc='git commit' alias gc='git commit'
alias gca='git commit --amend' alias gca='git commit --amend'
alias gcw='git commit -m "wip"' alias gcw='git commit --no-verify -m "wip"'
alias gs='git status -sb' alias gs='git status -sb'
alias ga='git add' alias ga='git add'
alias grm='git rm' alias grm='git rm'
@@ -91,8 +93,8 @@ alias gl='git lg'
alias gr='git reset' alias gr='git reset'
alias gr1='git reset HEAD~1' alias gr1='git reset HEAD~1'
# alias gh='git lg -1' # alias gh='git lg -1'
function gcm () { function gcm() {
git commit -m "$*" git commit --no-verify -m "$*"
} }
alias fs='foreman start' alias fs='foreman start'
@@ -138,16 +140,86 @@ alias oclean="fd . '/Users/madundead/Syncthing/Obsidian/Personal' | rg sync-conf
alias proxy='kubectl port-forward -n staging svc/tinyproxy-svc 8888:8888' alias proxy='kubectl port-forward -n staging svc/tinyproxy-svc 8888:8888'
fzf_kill() { # Experimental
local pids=$( alias ports='lsof -iTCP -sTCP:LISTEN -n -P'
ps -f -u $USER | sed 1d | fzf --multi | tr -s [:blank:] | cut -d' ' -f3
) o() {
if [[ -n $pids ]]; then files="$(fzf --print0 --preview "bat --theme ansi --color always {}")"
echo "$pids" | xargs kill -9 "$@" if [ -z "$files" ]; then
fi return
fi
echo -n "$files" | xargs -0 -o "$EDITOR"
} }
alias fkill='fzf_kill' man() {
env \
LESS_TERMCAP_mb=$(printf "\\e[1;31m") \
LESS_TERMCAP_md=$(printf "\\e[1;31m") \
LESS_TERMCAP_me=$(printf "\\e[0m") \
LESS_TERMCAP_se=$(printf "\\e[0m") \
LESS_TERMCAP_so=$(printf "\\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\\e[0m") \
LESS_TERMCAP_us=$(printf "\\e[0;32m") \
man "$@"
}
function ex {
if [ $# -eq 0 ]; then
# display usage if no parameters given
echo "Usage: ex <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz|.zlib|.cso|.zst>"
echo " ex <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
fi
for n in "$@"; do
if [ ! -f "$n" ]; then
echo "'$n' - file doesn't exist"
return 1
fi
case "${n%,}" in
*.cbt | *.tar.bz2 | *.tar.gz | *.tar.xz | *.tbz2 | *.tgz | *.txz | *.tar)
tar zxvf "$n"
;;
*.lzma) unlzma ./"$n" ;;
*.bz2) bunzip2 ./"$n" ;;
*.cbr | *.rar) unrar x -ad ./"$n" ;;
*.gz) gunzip ./"$n" ;;
*.cbz | *.epub | *.zip) unzip ./"$n" ;;
*.z) uncompress ./"$n" ;;
*.7z | *.apk | *.arj | *.cab | *.cb7 | *.chm | *.deb | *.iso | *.lzh | *.msi | *.pkg | *.rpm | *.udf | *.wim | *.xar | *.vhd)
7z x ./"$n"
;;
*.xz) unxz ./"$n" ;;
*.exe) cabextract ./"$n" ;;
*.cpio) cpio -id <./"$n" ;;
*.cba | *.ace) unace x ./"$n" ;;
*.zpaq) zpaq x ./"$n" ;;
*.arc) arc e ./"$n" ;;
*.cso) ciso 0 ./"$n" ./"$n.iso" &&
extract "$n.iso" && \rm -f "$n" ;;
*.zlib) zlib-flate -uncompress <./"$n" >./"$n.tmp" &&
mv ./"$n.tmp" ./"${n%.*zlib}" && rm -f "$n" ;;
*.dmg)
hdiutil mount ./"$n" -mountpoint "./$n.mounted"
;;
*.tar.zst) tar -I zstd -xvf ./"$n" ;;
*.zst) zstd -d ./"$n" ;;
*)
echo "ex: '$n' - unknown archive method"
return 1
;;
esac
done
}
fkill() {
local pids=$(
ps -f -u $USER | sed 1d | fzf --multi | tr -s [:blank:] | cut -d' ' -f3
)
if [[ -n $pids ]]; then
echo "$pids" | xargs kill -9 "$@"
fi
}
alias fk='fkill'
# Homebrew stuff # Homebrew stuff
export MANPATH=/usr/local/share/man:$MANPATH export MANPATH=/usr/local/share/man:$MANPATH
@@ -162,6 +234,11 @@ export PATH="/opt/homebrew/opt/arm-gcc-bin@8/bin:$PATH"
export PATH="/usr/local/sbin:$PATH" export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/opt/avr-gcc@8/bin:$PATH" export PATH="/usr/local/opt/avr-gcc@8/bin:$PATH"
export PATH="/usr/local/opt/arm-gcc-bin@8/bin:$PATH" export PATH="/usr/local/opt/arm-gcc-bin@8/bin:$PATH"
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH=$BUN_INSTALL/bin:$PATH
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"

View File

@@ -83,6 +83,8 @@
excludesfile = ~/.gitignore_global excludesfile = ~/.gitignore_global
attributesfile = ~/.gitattributes attributesfile = ~/.gitattributes
ignorecase = false
# Treat spaces before tabs and all kinds of trailing whitespace as an error # Treat spaces before tabs and all kinds of trailing whitespace as an error
# [default] trailing-space: looks for spaces at the end of a line # [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of a line # [default] space-before-tab: looks for spaces before tabs at the beginning of a line
@@ -160,7 +162,6 @@
insteadOf = "github:" insteadOf = "github:"
[url "git@gist.github.com:"] [url "git@gist.github.com:"]
insteadOf = "gst:" insteadOf = "gst:"
pushInsteadOf = "gist:" pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/" pushInsteadOf = "git://gist.github.com/"
@@ -170,3 +171,14 @@
[diff-so-fancy] [diff-so-fancy]
markEmptyLines = false markEmptyLines = false
[merge]
tool = nvim
[mergetool]
keepBackup = false
[mergetool "nvim"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[pull]
default = current