Compare commits

..

15 Commits

22 changed files with 168 additions and 194 deletions

View File

@@ -1,12 +1,6 @@
# This needs jankyborders and hyperkey installed. # This needs jankyborders and hyperkey installed.
# Hyperkey must configured configured to use caps lock as hyperkey und must not include shift in hyperkey. # Hyperkey must be configured to use caps lock as hyperkey and must not include shift in hyperkey.
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands # Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = [] after-login-command = []
@@ -16,7 +10,7 @@ after-login-command = []
# JankyBorders has a built-in detection of already running process, # JankyBorders has a built-in detection of already running process,
# so it won't be run twice on AeroSpace restart # so it won't be run twice on AeroSpace restart
after-startup-command = [ after-startup-command = [
'exec-and-forget borders active_color=0xffeff1f5 inactive_color=0xff8c8fa1 width=10.0' 'exec-and-forget borders active_color=0xffeff1f5 inactive_color=0xff8c8fa1 width=3.0'
] ]
# Start AeroSpace at login # Start AeroSpace at login
@@ -142,30 +136,6 @@ cmd-ctrl-alt-shift-4 = 'move-node-to-workspace 4'
cmd-ctrl-alt-shift-5 = 'move-node-to-workspace 5' cmd-ctrl-alt-shift-5 = 'move-node-to-workspace 5'
cmd-ctrl-alt-shift-6 = 'move-node-to-workspace 6' cmd-ctrl-alt-shift-6 = 'move-node-to-workspace 6'
cmd-ctrl-alt-shift-7 = 'move-node-to-workspace 7' cmd-ctrl-alt-shift-7 = 'move-node-to-workspace 7'
# cmd-ctrl-alt-shift-8 = 'move-node-to-workspace 8'
# cmd-ctrl-alt-shift-9 = 'move-node-to-workspace 9'
# alt-shift-a = 'move-node-to-workspace A'
# alt-shift-b = 'move-node-to-workspace B'
# alt-shift-c = 'move-node-to-workspace C'
# alt-shift-d = 'move-node-to-workspace D'
# alt-shift-e = 'move-node-to-workspace E'
# alt-shift-f = 'move-node-to-workspace F'
# alt-shift-g = 'move-node-to-workspace G'
# alt-shift-i = 'move-node-to-workspace I'
# alt-shift-m = 'move-node-to-workspace M'
# alt-shift-n = 'move-node-to-workspace N'
# alt-shift-o = 'move-node-to-workspace O'
# alt-shift-p = 'move-node-to-workspace P'
# alt-shift-q = 'move-node-to-workspace Q'
# alt-shift-r = 'move-node-to-workspace R'
# alt-shift-s = 'move-node-to-workspace S'
# alt-shift-t = 'move-node-to-workspace T'
# alt-shift-u = 'move-node-to-workspace U'
# alt-shift-v = 'move-node-to-workspace V'
# alt-shift-w = 'move-node-to-workspace W'
# alt-shift-x = 'move-node-to-workspace X'
# alt-shift-y = 'move-node-to-workspace Y'
# alt-shift-z = 'move-node-to-workspace Z'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
cmd-ctrl-alt-tab = 'workspace-back-and-forth' cmd-ctrl-alt-tab = 'workspace-back-and-forth'
@@ -173,7 +143,6 @@ cmd-ctrl-alt-tab = 'workspace-back-and-forth'
cmd-ctrl-alt-shift-tab = 'move-workspace-to-monitor --wrap-around next' cmd-ctrl-alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode # See: https://nikitabobko.github.io/AeroSpace/commands#mode
# alt-shift-sfemicolon = 'mode service'
cmd-ctrl-alt-s = 'mode service' cmd-ctrl-alt-s = 'mode service'
# 'service' binding mode declaration. # 'service' binding mode declaration.
@@ -237,10 +206,6 @@ if.app-id = 'com.apple.AddressBook'
run = 'move-node-to-workspace 4' run = 'move-node-to-workspace 4'
## Workspace 5: Shell ## Workspace 5: Shell
[[on-window-detected]]
if.app-id = 'com.googlecode.iterm2'
run = 'move-node-to-workspace 5'
[[on-window-detected]] [[on-window-detected]]
if.app-id = 'com.mitchellh.ghostty' if.app-id = 'com.mitchellh.ghostty'
run = 'move-node-to-workspace 5' run = 'move-node-to-workspace 5'
@@ -289,4 +254,4 @@ inherit-env-vars = true
## Add homebrew prefix to path ## Add homebrew prefix to path
[exec.env-vars] [exec.env-vars]
PATH = '$(brew --prefix)/bin:/$(brew --prefix)/sbin:${PATH}' PATH = '/opt/homebrew/bin:/opt/homebrew/sbin:${PATH}'

View File

@@ -1,7 +1,7 @@
font-family = MesloLGM Nerd Font Mono font-family = MesloLGM Nerd Font Mono
font-thicken = true font-thicken = true
font-size = 15 font-size = 15
theme = catppuccin-mocha theme = Catppuccin Mocha
cursor-opacity = 0.5 cursor-opacity = 0.5
cursor-style-blink = true cursor-style-blink = true
@@ -9,6 +9,16 @@ cursor-style-blink = true
background-opacity = 0.9 background-opacity = 0.9
background-blur-radius = 20 background-blur-radius = 20
initial-command = /opt/homebrew/bin/tmux a -d initial-command = /opt/homebrew/bin/tmux new -A -s main
quit-after-last-window-closed = true quit-after-last-window-closed = true
window-inherit-font-size = true
window-height = 33
window-width = 130
mouse-hide-while-typing = true
shell-integration = zsh
clipboard-paste-protection = false
macos-titlebar-style = native
keybind = shift+enter=text:\n

View File

@@ -1,7 +1,7 @@
[init] [init]
defaultBranch = main defaultBranch = main
[user] [user]
name = Christian Baer name = Christian Busch
email = chris@debilux.org email = chris@debilux.org
[core] [core]
editor = vim editor = vim

View File

@@ -1,109 +1,100 @@
### General Settings ### General Settings
# Enable mouse support in tmux # Mouse support
set -g mouse on set -g mouse on
# Set the default terminal type to "tmux-256color" for better color support # Terminal type
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
# Set the base index for windows to 1 (instead of the default 0) # Window base index
set -g base-index 1 set -g base-index 1
# Set the base index for panes to 1 (instead of the default 0) # Pane base index
setw -g pane-base-index 1 setw -g pane-base-index 1
# Increase the history limit (useful for longer command histories) # History limit
set-option -g history-limit 10000 set-option -g history-limit 10000
### Startup Configuration ### Startup Configuration
# Start a new session named "main" if none exists # Ensure main session exists and setup startup layout
new-session -s main if-shell 'tmux has-session -t main 2>/dev/null' '' 'new-session -ds main; send-keys -t main:1 "htop" C-m; split-window -t main:1'
# Start htop and split the window when the session "main" is created
set-hook -t main session-created 'send-keys -t main:1 "sudo htop" C-m; split-window'
### Key Bindings ### Key Bindings
# Remap the prefix key from 'C-b' (Ctrl-b) to 'C-a' (Ctrl-a) # Prefix key
unbind C-b unbind C-b
set-option -g prefix C-a set-option -g prefix C-a
bind-key C-a send-prefix bind-key C-a send-prefix
# Split panes using 'h' for horizontal and 'v' for vertical splits # Pane splits
bind "h" split-window -h bind "h" split-window -h
bind "v" split-window -v bind "v" split-window -v
unbind '"' unbind '"'
unbind % unbind %
# Reload the tmux configuration file with 'r' # Reload config
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display-message "tmux config reloaded"
### Clipboard Integration ### Clipboard Integration
# Enable clipboard # Clipboard
set -s set-clipboard on set -s set-clipboard on
set -ag terminal-overrides ",*:Ms=\\E]52;c;%p2%s\\7" set -ag terminal-overrides ",*:Ms=\\E]52;c;%p2%s\\7"
# Vi-style copy mode # Copy mode
setw -g mode-keys vi setw -g mode-keys vi
# Copy mode key bindings # Copy bindings
bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh" bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh" bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "$XDG_CONFIG_HOME/tmux/yank.sh"
### Status and Window Configuration ### Status and Window Configuration
# Set the status bar update interval to 1 second # Status interval
set -g status-interval 1 set -g status-interval 1
# Enable automatic renaming of windows # Auto rename
set-option -g automatic-rename on set-option -g automatic-rename on
# Set window title to the current directory if the process is zsh, otherwise show the process name with arguments # Rename format
set-option -g automatic-rename-format '#{?#{==:#{pane_current_command},zsh},#(echo #{pane_current_path} | sed "s|^$HOME|~|"),#{pane_current_command}}' set-option -g automatic-rename-format '#{?#{==:#{pane_current_command},zsh},#(echo #{pane_current_path} | sed "s|^$HOME|~|"),#{pane_current_command}}'
# Set the color of the clock mode # Clock color
set -g clock-mode-colour "#8bd5ca" set -g clock-mode-colour "#8bd5ca"
# Set the style for copy mode (foreground black, background a specific color, bold text) # Copy mode style
set -g mode-style 'fg=black bg=#ed8796 bold' set -g mode-style 'fg=black bg=#ed8796 bold'
# Set the style for pane borders # Pane borders
set -g pane-border-style 'fg=white' set -g pane-border-style 'fg=white'
set -g pane-active-border-style 'fg=#8bd5ca' set -g pane-active-border-style 'fg=#8bd5ca'
### Status Bar Configuration ### Status Bar Configuration
# Position the status bar at the bottom # Status position
set -g status-position bottom set -g status-position bottom
# Align status bar items to the left # Status justify
set -g status-justify left set -g status-justify left
# Set the style for the status bar # Status style
set -g status-style 'fg=white,bg=#262626' set -g status-style 'fg=white,bg=#262626'
# Clear the default left status # Clear status left
set -g status-left '' set -g status-left ''
# Set the maximum length for the left status # Status left length
set -g status-left-length 30 set -g status-left-length 30
## Session name in the status bar # Session and prefix
set -ga status-left "#[bg=#444444,fg=white] #S " set -ga status-left '#[fg=#cad3f5,bg=#1e1e2e] #S #[fg=#{?client_prefix,#f38ba8,#585b70}]● '
# Display different colors for the session name based on whether the prefix is active # Window tabs
set -ga status-left '#[fg=black]#{?client_prefix,#[bg=#ed8796] S ,#[bg=#a6da95] S }' setw -g window-status-format '#[fg=#cdd6f4,bg=#313244] #I: #W #[fg=#cdd6f4,bg=#1e1e2e] '
set -ga status-left '#[bg=#262626] ' setw -g window-status-current-format '#[fg=#1e1e2e,bg=#cba6f7,bold] #I: #W #[fg=#cdd6f4,bg=#1e1e2e,nobold] '
# Set window status format to include the current directory or command # Window separator
setw -g window-status-format '#[bg=#8787AF,fg=black] #I #[bg=#585B70,fg=white] #W #F ' set -g window-status-separator ''
# Set the current window status format to include the current directory or command # Status right
setw -g window-status-current-format '#[bg=#c6a0f6,fg=black] #I #[bg=#585B70,fg=white] #W #F ' set -g status-right ''
set -g status-right-length 50
# Set the separator between window statuses set -ga status-right '#{?SSH_CONNECTION,#[fg=#1e1e2e#,bg=#fab387#,bold] SSH #[fg=#cdd6f4#,bg=#1e1e2e#,nobold] ,}'
set -g window-status-separator " " set -ga status-right '#[fg=#1e1e2e,bg=#94e2d5,bold] #H #[fg=#cdd6f4,bg=#1e1e2e,nobold]'
# Status bar right settings (display host information)
set -g status-right "#[fg=black,bg=#7dc4e4] H #[fg=white,bg=brightblack] #H "
# Set the maximum length for the right status
set -g status-right-length 40

View File

@@ -7,11 +7,10 @@ set -eu
buf=$(cat) buf=$(cat)
# Try methods in order of preference # Try methods in order of preference
copy_backend_remote_tunnel_port=$(tmux show-option -gvq "@copy_backend_remote_tunnel_port" 2>/dev/null || echo "")
# Method 1: Use pbcopy if available (local macOS) # Method 1: Use pbcopy if available (local macOS)
if command -v pbcopy >/dev/null 2>&1; then if command -v pbcopy >/dev/null 2>&1; then
printf "%s" "$buf" | pbcopy printf '%s' "$buf" | pbcopy
# Method 2: OSC 52 (for mosh/ssh) # Method 2: OSC 52 (for mosh/ssh)
elif [ -n "${TMUX:-}" ]; then elif [ -n "${TMUX:-}" ]; then
# Get the tmux tty # Get the tmux tty

View File

@@ -1,13 +1,14 @@
set undodir=${VIMDOTDIR}/undo set nocompatible " Vim defaults rather than vi ones. Keep at top.
set directory=${VIMDOTDIR}/swap
set backupdir=${VIMDOTDIR}/backup set undodir=$VIMDOTDIR/undo
set viewdir=${VIMDOTDIR}/view set directory=$VIMDOTDIR/swap
set viminfo+='1000,n${VIMDOTDIR}/viminfo set backupdir=$VIMDOTDIR/backup
set viewdir=$VIMDOTDIR/view
set viminfo+='1000,n$VIMDOTDIR/viminfo
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
" Install vim-plug if not found " Install vim-plug if not found
if empty(glob('${VIMDOTDIR}/autoload/plug.vim')) if empty(glob($VIMDOTDIR.'/autoload/plug.vim'))
silent !curl -fLo ${VIMDOTDIR}/autoload/plug.vim --create-dirs silent !curl -fLo ${VIMDOTDIR}/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif endif
@@ -18,18 +19,11 @@ autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| endif \| endif
" Specify a directory for plugins " Specify a directory for plugins
" Install plugins call plug#begin($VIMDOTDIR.'/plugged')
call plug#begin('$VIMDOTDIR/plugged') Plug 'elzr/vim-json'
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
Plug 'elzr/vim-json'
Plug 'arcticicestudio/nord-vim'
" Initialize plugin system
call plug#end() call plug#end()
set nocompatible " Vim defaults rather than vi ones. Keep at top.
filetype plugin indent on " Enable filetype-specific settings.
syntax on " Enable syntax highlighting.
set backspace=2 " Make the backspace behave as most applications. set backspace=2 " Make the backspace behave as most applications.
set autoindent " Use current indent for new lines. set autoindent " Use current indent for new lines.
set display=lastline " Show as much of the line as will fit. set display=lastline " Show as much of the line as will fit.
@@ -48,18 +42,24 @@ set nrformats-=octal " Remove octal support from 'nrformats'.
set tabstop=2 " Size of a Tab character. set tabstop=2 " Size of a Tab character.
set shiftwidth=2 " Use same value as 'tabstop'. set shiftwidth=2 " Use same value as 'tabstop'.
set softtabstop=2 " Use same value as 'shiftwidth'. set softtabstop=2 " Use same value as 'shiftwidth'.
set encoding=utf-8 " Set encoding set termguicolors " Enable true color support
color nord " Use Nord color scheme color catppuccin_mocha " Use Catppuccin Mocha color scheme
set list listchars=tab·,trail,eol,nbsp:˽ " Show invisible chars set listchars=tab:»·,trail,eol,nbsp:ʽ " Define invisible chars
" set colorcolumn=80 " Highlight the 80th collumn set wrap linebreak " Softwrap long lines at window border, don't break words
set wrap linebreak nolist " Softwrap long lines at window border, don't break words set showbreak=  " Indent softwrapped lines with unbreakable space
set showbreak= " Intend softwrapped lines with unbreakable space
" Highlight the line the cursor is on in markdown files " Filetype-specific settings
autocmd FileType markdown set cursorline augroup filetypes
autocmd!
autocmd FileType markdown set cursorline
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd FileType make set noexpandtab
autocmd FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79
augroup end
" Go to the last cursor location when opening a file. " Go to the last cursor location when opening a file.
augroup jump augroup jump
autocmd!
autocmd BufReadPost * autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\| exe 'normal! g`"' \| exe 'normal! g`"'
@@ -73,18 +73,3 @@ fun! s:trim_whitespace()
call winrestview(l:save) call winrestview(l:save)
endfun endfun
command! TrimWhitespace call s:trim_whitespace() command! TrimWhitespace call s:trim_whitespace()
" Highlight characters behind the 80 chars margin
" :au BufWinEnter * let w:m2=matchadd('ColumnMargin', '\%>80v.\+', -1)
" Treat all .md files as markdown
autocmd BufNewFile,BufRead *.md set filetype=markdown
" make uses real tabs
au FileType make set noexpandtab
" add json syntax highlighting
au BufNewFile,BufRead *.json set ft=javascript
" make Python follow PEP8 ( http://www.python.org/dev/peps/pep-0008/ )
au FileType python set softtabstop=4 tabstop=4 shiftwidth=4 textwidth=79

View File

@@ -2,6 +2,7 @@
## Load config files in $ZSH/lib that for stage 3 ## Load config files in $ZSH/lib that for stage 3
for config_file (${ZLIBDIR}/30-*.zsh) source $config_file for config_file (${ZLIBDIR}/30-*.zsh) source $config_file
unset config_file
## Compile startup files ## Compile startup files
zwcautocompile zwcautocompile

View File

@@ -2,3 +2,4 @@
# Load config files in $ZSH/lib that for stage 2 # Load config files in $ZSH/lib that for stage 2
for config_file (${ZLIBDIR}/20-*.zsh) source $config_file for config_file (${ZLIBDIR}/20-*.zsh) source $config_file
unset config_file

View File

@@ -10,12 +10,12 @@ function dc() {
# Save current working directory # Save current working directory
CURRENT_DIR="${PWD}" CURRENT_DIR="${PWD}"
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' | sort); do for file in $(find "${PWD}" -maxdepth 2 -type f \( -name "docker-compose.yml" -o -name "docker-compose.yaml" -o -name "compose.yml" -o -name "compose.yaml" \) | sort); do
cd $(dirname "$file") cd "$(dirname "$file")"
docker compose $@ docker compose "$@"
done done
# Change back to saved working directory # Change back to saved working directory
cd ${CURRENT_DIR} cd "${CURRENT_DIR}"
fi fi
} }

View File

@@ -5,7 +5,7 @@ function extract() {
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]" echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
return 1 return 1
else else
for n in $@; do for n in "$@"; do
if [ -f "$n" ]; then if [ -f "$n" ]; then
case "${n%,}" in case "${n%,}" in
*.tar.bz2 | *.tar.gz | *.tar.xz | *.tbz2 | *.tgz | *.txz | *.tar) *.tar.bz2 | *.tar.gz | *.tar.xz | *.tbz2 | *.tgz | *.txz | *.tar)

View File

@@ -3,19 +3,19 @@
function zwcautocompile() { function zwcautocompile() {
autoload -Uz zrecompile autoload -Uz zrecompile
for f in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do for f in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
zrecompile -pq ${f} && rm -f ${f}.zwc.old zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done done
if [[ -d ${ZAUTOLOADDIR} ]]; then if [[ -d "${ZAUTOLOADDIR}" ]]; then
for f in ${ZAUTOLOADDIR}/*; do for f in "${ZAUTOLOADDIR}"/*; do
zrecompile -pq ${f} && rm -f ${f}.zwc.old zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done done
fi fi
if [[ -d ${ZLIBDIR} ]]; then if [[ -d "${ZLIBDIR}" ]]; then
for f in ${ZLIBDIR}/*; do for f in "${ZLIBDIR}"/*; do
zrecompile -pq ${f} && rm -f ${f}.zwc.old zrecompile -pq "${f}" && rm -f "${f}.zwc.old"
done done
fi fi
} }

View File

@@ -2,7 +2,7 @@
function zwcpurge() { function zwcpurge() {
autoload -Uz zrecompile autoload -Uz zrecompile
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do for zsh_file in $(find "${ZDOTDIR}" -maxdepth 3 -type f \( -name "*.zwc" -o -name "*.zwc.old" \)); do
rm -f ${zsh_file} rm -f "${zsh_file}"
done done
} }

View File

@@ -4,15 +4,19 @@ typeset -U path # No duplicates
path=() path=()
_prepath() { _prepath() {
for dir in "$@"; do for dir in "$@"; do
dir=${dir:A} dir=${dir:A}
[[ ! -d "$dir" ]] && return [[ ! -d "$dir" ]] && continue
path=("$dir" $path) path=("$dir" $path)
done done
} }
_prepath /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/local/sbin # BSD and macOS _prepath /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/local/sbin # System
_prepath /opt/homebrew/bin /opt/homebrew/sbin /usr/local/bin # Homebrew on macOS _prepath /var/lib/flatpak/exports/bin # Flatpak (Linux, system)
_prepath ~/bin ~/.local/bin # $HOME _prepath /snap/bin # Snap (Linux)
_prepath /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/sbin # Homebrew (Linux)
_prepath /opt/homebrew/bin /opt/homebrew/sbin # Homebrew (macOS)
_prepath ~/.local/share/flatpak/exports/bin # Flatpak (Linux, user)
_prepath ~/.local/bin ~/bin # $HOME
unfunction _prepath unfunction _prepath

View File

@@ -18,25 +18,20 @@ fi
if ! _exists fetch; then if ! _exists fetch; then
if _exists curl; then if _exists curl; then
alias fetch="curl -O" alias fetch="curl -O"
elif _exists curl; then elif _exists wget; then
alias fetch="wget" alias fetch="wget"
else else
echo "fetch not found." echo "fetch not found."
fi fi
fi fi
# htop
if _exists htop; then
alias htop="sudo htop"
fi
unfunction _exists unfunction _exists
alias mkdir="mkdir -p" alias mkdir="mkdir -p"
alias ..="cd .." alias ..="cd .."
alias ...="cd ../.." alias ...="cd ../.."
alias ....="cd ../../.." alias ....="cd ../../.."
alias google="ping -c 10240000 google.com" alias google="ping google.com"
alias history="history -i" alias history="history -i"
case `uname` in case `uname` in

View File

@@ -2,7 +2,7 @@
if [[ -d "${ZAUTOLOADDIR}" ]]; then if [[ -d "${ZAUTOLOADDIR}" ]]; then
fpath=($fpath ${ZAUTOLOADDIR}) fpath=(${ZAUTOLOADDIR} $fpath)
# Load functions # Load functions
for func in ${ZAUTOLOADDIR}/*; do for func in ${ZAUTOLOADDIR}/*; do

View File

@@ -1,16 +1,13 @@
## Command history configuration ## Command history configuration
export HISTFILE="${ZCACHE}/history" export HISTFILE="${ZCACHE}/history"
export HISTSIZE=1000000000 export HISTSIZE=1000000
export SAVEHIST=${HISTSIZE} export SAVEHIST=${HISTSIZE}
export HISTORY_IGNORE="([bf]g *|disown|cd ..|cd -)" export HISTORY_IGNORE="([bf]g *|disown|cd ..|cd -)"
export HISTTIMEFORMAT="[%F %T] "
setopt INC_APPEND_HISTORY
setopt EXTENDED_HISTORY setopt EXTENDED_HISTORY
setopt SHARE_HISTORY
setopt HIST_FIND_NO_DUPS setopt HIST_FIND_NO_DUPS
setopt hist_ignore_dups setopt HIST_IGNORE_DUPS
setopt hist_verify setopt HIST_VERIFY
setopt incappendhistory setopt HIST_IGNORE_SPACE
setopt histignorespace setopt HIST_NO_STORE
setopt histnostore
setopt share_history

View File

@@ -10,7 +10,7 @@ setopt long_list_jobs
## pager ## pager
export LC_CTYPE=$LANG export LC_CTYPE=$LANG
export LC_ALL=de_DE.UTF-8 export LANG=de_DE.UTF-8
export IOCAGE_COLOR=TRUE export IOCAGE_COLOR=TRUE
## Set some app specific dirs with XDM scheme ## Set some app specific dirs with XDM scheme

View File

@@ -20,11 +20,11 @@ if [[ "$OSTYPE" == darwin* ]]; then
else else
# Linux/BSD: Start ssh-agent if not running # Linux/BSD: Start ssh-agent if not running
if ! pgrep -u "$USER" ssh-agent > /dev/null; then if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 1h > "$HOME/.ssh-agent.env" ( umask 077; ssh-agent -t 1h > "$HOME/.ssh-agent.env" )
fi fi
# Source ssh-agent environment # Source ssh-agent environment
if [[ ! -S ~/.ssh/ssh_auth_sock && -f "$HOME/.ssh-agent.env" ]]; then if [[ ! -S "$SSH_AUTH_SOCK" && -f "$HOME/.ssh-agent.env" ]]; then
source "$HOME/.ssh-agent.env" >/dev/null source "$HOME/.ssh-agent.env" >/dev/null
fi fi

View File

@@ -1,6 +1,6 @@
# get zsh_unplugged and store it with your other plugins # get zsh_unplugged and store it with your other plugins
if [[ ! -d ${ZPLUGINDIR}/zsh_unplugged ]]; then if [[ ! -d ${ZPLUGINDIR}/zsh_unplugged ]]; then
git clone --quiet https://github.com/mattmc3/zsh_unplugged ${ZPLUGINDIR}/zsh_unplugged git clone --quiet --depth 1 https://github.com/mattmc3/zsh_unplugged ${ZPLUGINDIR}/zsh_unplugged
fi fi
source ${ZPLUGINDIR}/zsh_unplugged/zsh_unplugged.zsh source ${ZPLUGINDIR}/zsh_unplugged/zsh_unplugged.zsh

View File

@@ -15,3 +15,4 @@ export ZCACHE="${XDG_CACHE_HOME}/zsh" # Cache directory for history and zcompdum
# Load config files in $ZSH/lib that for stage 1 # Load config files in $ZSH/lib that for stage 1
for config_file (${ZLIBDIR}/10-*.zsh) source $config_file for config_file (${ZLIBDIR}/10-*.zsh) source $config_file
unset config_file

View File

@@ -1,5 +1,12 @@
SHELL = /bin/sh SHELL = /bin/sh
HOMEDIR = ${HOME} HOMEDIR = ${HOME}
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
VSCODE_USER_DIR = ${HOMEDIR}/Library/Application Support/Code/User
else
VSCODE_USER_DIR = ${HOMEDIR}/.config/Code/User
endif
.PHONY: help all .PHONY: help all
@@ -16,11 +23,11 @@ all: git-fetch deploy-macos ## Update repo and run deploy-macos
install: git-fetch deploy-base ## Update repor and run deploy-base install: git-fetch deploy-base ## Update repor and run deploy-base
deploy-base: deploy-eza deploy-tmux deploy-vim deploy-zsh deploy-ssh deploy-hushlogin ## Only deploy basic conf files for shell usage deploy-base: deploy-eza deploy-tmux deploy-vim deploy-zsh deploy-ssh deploy-hushlogin deploy-git deploy-htop ## Only deploy basic conf files for shell usage
deploy-workstation: deploy-base deploy-vscode deploy-youtubedl ## Deploy workstation specific config files (inherits deploy-shell) deploy-workstation: deploy-base deploy-vscode deploy-ghostty ## Deploy workstation specific config files (inherits deploy-shell)
deploy-macos: deploy-htop deploy-workstation deploy-brewfile ## Deploy macOS specific config files (inherits deploy-workstation) deploy-macos: deploy-workstation deploy-brewfile deploy-aerospace deploy-karabiner ## Deploy macOS specific config files (inherits deploy-workstation)
gen-vscode-extension-list: ## Update the list of VSCode extensions gen-vscode-extension-list: ## Update the list of VSCode extensions
@echo "\033[1;32m>>>\033[1;0m Updating the list of VSCode extensions at .config/Code/User/extensions.list" @echo "\033[1;32m>>>\033[1;0m Updating the list of VSCode extensions at .config/Code/User/extensions.list"
@@ -76,17 +83,33 @@ deploy-vim: ## Deploy vim config
@cp .config/vim/vimrc ${HOMEDIR}/.config/vim @cp .config/vim/vimrc ${HOMEDIR}/.config/vim
deploy-vscode: ## Deploy VSCode config deploy-vscode: ## Deploy VSCode config
@echo "\033[1;32m>>>\033[1;0m Deploy VSCode config to ${HOMEDIR}/Library/Application Support/Code/User" @echo "\033[1;32m>>>\033[1;0m Deploy VSCode config to ${VSCODE_USER_DIR}"
@mkdir -p "${HOMEDIR}/Library/Application Support/Code/User" @mkdir -p "${VSCODE_USER_DIR}"
@cp .config/Code/User/*.json "${HOMEDIR}/Library/Application Support/Code/User" @cp .config/Code/User/*.json "${VSCODE_USER_DIR}"
@echo "\033[1;32m>>>\033[1;0m Install VSCode extensions from .config/Code/User/extensions.list" @echo "\033[1;32m>>>\033[1;0m Install VSCode extensions from .config/Code/User/extensions.list"
@cat .config/Code/User/extensions.list | xargs -L 1 code --install-extension @cat .config/Code/User/extensions.list | xargs -L 1 code --install-extension
deploy-youtubedl: ## Deploy youtube-dl config deploy-aerospace: ## Deploy Aerospace config
@echo "\033[1;32m>>>\033[1;0m Deploy youtube-dl config to ${HOMEDIR}/.config/youtube-dl" @echo "\033[1;32m>>>\033[1;0m Deploy Aerospace config to ${HOMEDIR}/.config/aerospace"
@mkdir -p ${HOMEDIR}/.config/youtube-dl @mkdir -p ${HOMEDIR}/.config/aerospace
@cp .config/youtube-dl/config ${HOMEDIR}/.config/youtube-dl @cp .config/aerospace/aerospace.toml ${HOMEDIR}/.config/aerospace
deploy-ghostty: ## Deploy Ghostty config
@echo "\033[1;32m>>>\033[1;0m Deploy Ghostty config to ${HOMEDIR}/.config/ghostty"
@mkdir -p ${HOMEDIR}/.config/ghostty
@cp .config/ghostty/config ${HOMEDIR}/.config/ghostty
deploy-git: ## Deploy Git config
@echo "\033[1;32m>>>\033[1;0m Deploy Git config to ${HOMEDIR}/.config/git"
@mkdir -p ${HOMEDIR}/.config/git
@cp .config/git/config ${HOMEDIR}/.config/git
deploy-karabiner: ## Deploy Karabiner config
@echo "\033[1;32m>>>\033[1;0m Deploy Karabiner config to ${HOMEDIR}/.config/karabiner"
@mkdir -p ${HOMEDIR}/.config/karabiner/scripts
@cp .config/karabiner/karabiner.json ${HOMEDIR}/.config/karabiner
@cp .config/karabiner/scripts/*.scpt ${HOMEDIR}/.config/karabiner/scripts
deploy-zsh: ## Deploy zsh config deploy-zsh: ## Deploy zsh config
@echo "\033[1;32m>>>\033[1;0m Deploy zsh config to ${HOMEDIR}/.config/zsh" @echo "\033[1;32m>>>\033[1;0m Deploy zsh config to ${HOMEDIR}/.config/zsh"

View File

@@ -20,23 +20,25 @@ The repo ships with a Makefile that you can use to deploy and update the dotfile
# make help # make help
help This help help This help
all Update repo and run deploy-macos all Update repo and run deploy-macos
install Update repor and run deploy-base install Update repo and run deploy-base
deploy-base Only deploy basic conf files for shell usage deploy-base Only deploy basic conf files for shell usage (eza, tmux, vim, zsh, ssh, hushlogin, git, htop)
deploy-workstation Deploy workstation specific config files (inherits deploy-shell) deploy-workstation Deploy platform-independent workstation config files (inherits deploy-base)
deploy-macos Deploy macOS specific config files (inherits deploy-workstation) deploy-macos Deploy macOS specific config files (inherits deploy-workstation)
gen-vscode-extension-list Update the list of VSCode extensions gen-vscode-extension-list Update the list of VSCode extensions
git-fetch Fetch changes from origin git-fetch Fetch changes from origin
git-push Push changes to origin git-push Push changes to origin
git-update-submodules Update all submodules git-update-submodules Update all submodules
brew-bundle Install applications with brew bundle brew-bundle Install applications with brew bundle
brew-bundle-cleanup Removew all appplications that are not listed in Brewfile brew-bundle-cleanup Remove all applications that are not listed in Brewfile
deploy-duti Deploy duti config deploy-eza Deploy eza config
deploy-htop Deploy htop config deploy-htop Deploy htop config
deploy-htop-zfs Deploy htop config with zfs
deploy-tmux Deploy tmux config deploy-tmux Deploy tmux config
deploy-vim Deploy vim config deploy-vim Deploy vim config
deploy-vscode Deploy VSCode config deploy-vscode Deploy VSCode config
deploy-youtubedl Deploy youtube-dl config deploy-aerospace Deploy Aerospace config
deploy-ghostty Deploy Ghostty config
deploy-git Deploy Git config
deploy-karabiner Deploy Karabiner config
deploy-zsh Deploy zsh config deploy-zsh Deploy zsh config
deploy-brewfile Deploy Brewfile deploy-brewfile Deploy Brewfile
deploy-ssh Deploy SSH config deploy-ssh Deploy SSH config