Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38e8a9ed54 | ||
|
|
75deb4987e | ||
|
|
7b2c21ddc0 | ||
|
|
c0c05c951a | ||
|
|
53d420f979 | ||
|
|
d88d0565dc | ||
|
|
083ff173c7 |
@@ -40,7 +40,7 @@ program = "alacritty"
|
|||||||
history = 0
|
history = 0
|
||||||
|
|
||||||
[selection]
|
[selection]
|
||||||
save_to_clipboard = false
|
save_to_clipboard = true
|
||||||
|
|
||||||
[terminal]
|
[terminal]
|
||||||
osc52 = "OnlyCopy"
|
osc52 = "OnlyCopy"
|
||||||
@@ -56,3 +56,8 @@ option_as_alt = "None"
|
|||||||
[window.padding]
|
[window.padding]
|
||||||
x = 2
|
x = 2
|
||||||
y = 0
|
y = 0
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
key = "Return"
|
||||||
|
mods = "Shift"
|
||||||
|
chars = "\u001B\r"
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
[subtree "tmux"]
|
|
||||||
url = git@vcs.murgi.de:dotfiles_fabian/tmux.git
|
|
||||||
path = tmux
|
|
||||||
branch = master
|
|
||||||
|
|
||||||
[subtree "zsh"]
|
|
||||||
url = git@vcs.murgi.de:dotfiles_fabian/zsh.git
|
|
||||||
path = zsh
|
|
||||||
branch = master
|
|
||||||
|
|
||||||
[subtree "vim"]
|
|
||||||
url = git@vcs.murgi.de:dotfiles_fabian/vim.git
|
|
||||||
path = vim
|
|
||||||
branch = master
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
This is a personal dotfiles repository targeting macOS (Apple Silicon + Intel) and Arch Linux. It is installed by symlinking config directories/files from the repo into `$HOME`, so files here are live configs — editing them changes the running system.
|
||||||
|
|
||||||
|
## Installation & setup
|
||||||
|
|
||||||
|
Setup is platform-specific and runs from the repo root:
|
||||||
|
|
||||||
|
- **macOS:** `./setup_mac.sh` — brews dependencies, creates a `neovim` virtualenv, then calls `./clone_and_link_mac.sh`. Uses GNU coreutils' `gln` (not `ln`), so coreutils must be installed first.
|
||||||
|
- **Arch:** `./setup_arch.sh` — pacman deps, then `./clone_and_link.sh` + `./copy_fonts_arch.sh`.
|
||||||
|
- `clone_and_link*.sh` create the symlinks (`~/.zsh`, `~/.zshrc`, `~/.tmux`, `~/.tmux.conf`, `~/.config/nvim`, `~/.config/alacritty`, virtualenvwrapper hooks). `link_config.sh` is a simpler standalone variant.
|
||||||
|
- `general_setup.sh` switches the login shell to zsh and triggers plugin installs.
|
||||||
|
|
||||||
|
## Platform-specific config via `.example` templates
|
||||||
|
|
||||||
|
The most important repo-wide convention: platform variants live as `.example` files and the active file is a symlink/copy produced at setup time. The setup scripts loop over files matching `zsh/.*_mac.example`, `tmux/.*_arch.example`, etc., and link/copy each to the name with the `_<platform>.example` suffix stripped.
|
||||||
|
|
||||||
|
Practical rule: **edit the `.example` source, not the generated symlink target.** The unsuffixed active files are git-ignored (see each subdir's `.gitignore`). Templates that are copied (not symlinked) at setup — `nvim/scheme.vim.template` → `scheme.vim`, `.config/alacritty/schemes.yml.template` → `schemes.yml` — are also git-ignored once activated.
|
||||||
|
|
||||||
|
## Component architecture
|
||||||
|
|
||||||
|
- **zsh** (`zsh/.zshrc`): Powerlevel10k instant prompt + [antidote](https://github.com/mattmc3/antidote) plugin manager (plugin list in `zsh/.zsh_plugins.txt`). `.zshrc` sources optional layered configs if present: `.powerline_config`, `.user_config`, `.virtual_env_config.zsh`, `.mac_config.zsh`, `.local_config`. `update_dotfiles()` auto-`git pull`s this repo in the background on every shell start. Machine-local overrides belong in `.local_config` (not committed).
|
||||||
|
- **nvim** (`nvim/init.vim`): [vim-plug](https://github.com/junegunn/vim-plug), auto-bootstrapped on first launch (`:PlugInstall`). Python provider points at the `~/python-envs/neovim` virtualenv on Apple Silicon. `colors/` holds a large bundled colorscheme collection.
|
||||||
|
- **tmux** (`tmux/.tmux.conf`): TPM-style `plugins/`. `tmux/tmux_attach.sh` is an attach helper.
|
||||||
|
- **alacritty** (`.config/alacritty/`): active theme selected via the `import = [...]` line in `alacritty.toml`.
|
||||||
|
- **gitconfig** (`gitconfig/gitconfig`): identity/behavior split by remote host using `includeIf "hasconfig:remote.*.url:..."` — `github`, `fhms` (fh-muenster), `murgi`, and `sit` (Fraunhofer) each load their own `*.gitconfig`. Change per-context email/signing in the matching include file, not the base config.
|
||||||
|
|
||||||
|
## Light/dark theme switching
|
||||||
|
|
||||||
|
`.config/alacritty/color_switcher.py` toggles light/dark across the terminal **and** nvim in one shot: it rewrites the `import` line in `alacritty.toml` (`solarized_light.toml` ↔ `dark_mode.toml`) and the `background`/`colorscheme` lines in `~/.config/nvim/scheme.vim`. Keep the regex-matched line formats in those files intact when editing them by hand. `screenshot_mode.py` is a related toggle.
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
- `./update_mac.sh` — macOS update runner. Default (no args) runs `--brew-update --cleanup --diagnostics --update-others`; other flags: `--system-update`, `--permission-fix` (strips Caskroom/App quarantine xattrs). Run `./update_mac.sh --help` for the list. `--update-others` also runs `claude --update`.
|
||||||
|
- `brew_autoupdate` — sets up scheduled brew auto-updates.
|
||||||
+1
-1
@@ -25,7 +25,7 @@ email = github@murgi.de
|
|||||||
[includeIf "hasconfig:remote.*.url:https://git-int.sit.fraunhofer.de/**"]
|
[includeIf "hasconfig:remote.*.url:https://git-int.sit.fraunhofer.de/**"]
|
||||||
path = ~/dotfiles/gitconfig/sit.gitconfig
|
path = ~/dotfiles/gitconfig/sit.gitconfig
|
||||||
[core]
|
[core]
|
||||||
excludesfile = /Users/ising/dotfiles/.gitignore_global
|
excludesfile = ~/dotfiles/.gitignore_global
|
||||||
[submodule]
|
[submodule]
|
||||||
recurse = true
|
recurse = true
|
||||||
[filter "lfs"]
|
[filter "lfs"]
|
||||||
|
|||||||
@@ -28,7 +28,4 @@ for filename in tmux/.*_arch.example; do
|
|||||||
cp $filename ${filename:0:-13}
|
cp $filename ${filename:0:-13}
|
||||||
done
|
done
|
||||||
|
|
||||||
for filename in vim/.*_arch.example; do
|
|
||||||
cp $filename ${filename:0:-13}
|
|
||||||
done
|
|
||||||
echo "You should now start tmux (and zsh) and nvim for automatic plugin installation."
|
echo "You should now start tmux (and zsh) and nvim for automatic plugin installation."
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ for filename in tmux/.*_mac.example(N); do
|
|||||||
gln -Tsvf $PWD/$filename $PWD/${filename:0:-12}
|
gln -Tsvf $PWD/$filename $PWD/${filename:0:-12}
|
||||||
done
|
done
|
||||||
|
|
||||||
for filename in vim/.*_mac.example(N); do
|
|
||||||
gln -Tsvf $PWD/$filename $PWD/${filename:0:-12}
|
|
||||||
done
|
|
||||||
|
|
||||||
open fonts/*.ttf
|
open fonts/*.ttf
|
||||||
|
|
||||||
echo "You should now start tmux (and zsh) and nvim for automatic plugin installation."
|
echo "You should now start tmux (and zsh) and nvim for automatic plugin installation."
|
||||||
|
|||||||
@@ -88,6 +88,12 @@ if '[ `uname` == Darwin ]' \
|
|||||||
set-option -g set-titles on
|
set-option -g set-titles on
|
||||||
|
|
||||||
|
|
||||||
|
set -g visual-bell on
|
||||||
|
# Forward bells from ALL panes to terminal (not just active one)
|
||||||
|
set -g bell-action any
|
||||||
|
# Enable bell monitoring
|
||||||
|
set -g monitor-bell on
|
||||||
|
|
||||||
# Escape timeout for nvim
|
# Escape timeout for nvim
|
||||||
set -sg escape-time 10
|
set -sg escape-time 10
|
||||||
|
|
||||||
|
|||||||
+17
-3
@@ -50,14 +50,25 @@ function diagnostics {
|
|||||||
brew doctor
|
brew doctor
|
||||||
brew missing
|
brew missing
|
||||||
}
|
}
|
||||||
|
function update_others {
|
||||||
|
echo "----------"
|
||||||
|
echo "Update other stuff"
|
||||||
|
echo "----------"
|
||||||
|
|
||||||
|
if [ -x "$(command -v claude)" ]; then
|
||||||
|
echo "-- CLAUDE"
|
||||||
|
claude --update
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if [[ $* == *--help* ]]; then
|
if [[ $* == *--help* ]]; then
|
||||||
echo "Usage: $0 [option]"
|
echo "Usage: $0 [option]"
|
||||||
echo "Default options: --brew-update --cleanup --diagnostics"
|
echo "Default options: --brew-update --update-others --cleanup --diagnostics"
|
||||||
echo -e "Options:\n\t--brew-update\n\t--cleanup\n\t--diagnostics\n\t--permission-fix\n\t--system-update"
|
echo -e "Options:\n\t--brew-update\n\t--update-others\n\t--cleanup\n\t--diagnostics\n\t--permission-fix\n\t--system-update"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $* ]]; then
|
if [[ -z $* ]]; then
|
||||||
set -- "$*" "--brew-update --cleanup --diagnostics"
|
set -- "$*" "--brew-update --cleanup --diagnostics --update-others"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $* == *--system-update* ]]; then
|
if [[ $* == *--system-update* ]]; then
|
||||||
@@ -66,6 +77,9 @@ fi
|
|||||||
if [[ $* == *--brew-update* ]]; then
|
if [[ $* == *--brew-update* ]]; then
|
||||||
update_brew
|
update_brew
|
||||||
fi
|
fi
|
||||||
|
if [[ $* == *--update-others* ]]; then
|
||||||
|
update_others
|
||||||
|
fi
|
||||||
if [[ $* == *--cleanup* ]]; then
|
if [[ $* == *--cleanup* ]]; then
|
||||||
cleanup
|
cleanup
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ ohmyzsh/ohmyzsh path:plugins/pip
|
|||||||
ohmyzsh/ohmyzsh path:plugins/python
|
ohmyzsh/ohmyzsh path:plugins/python
|
||||||
ohmyzsh/ohmyzsh path:plugins/brew
|
ohmyzsh/ohmyzsh path:plugins/brew
|
||||||
ohmyzsh/ohmyzsh path:plugins/virtualenv
|
ohmyzsh/ohmyzsh path:plugins/virtualenv
|
||||||
ohmyzsh/ohmyzsh path:plugins/python
|
|
||||||
ohmyzsh/ohmyzsh path:plugins/command-not-found
|
ohmyzsh/ohmyzsh path:plugins/command-not-found
|
||||||
ohmyzsh/ohmyzsh path:plugins/docker-compose
|
ohmyzsh/ohmyzsh path:plugins/docker-compose
|
||||||
ohmyzsh/ohmyzsh path:plugins/docker
|
ohmyzsh/ohmyzsh path:plugins/docker
|
||||||
@@ -16,7 +15,6 @@ ohmyzsh/ohmyzsh path:plugins/vi-mode
|
|||||||
|
|
||||||
|
|
||||||
romkatv/powerlevel10k
|
romkatv/powerlevel10k
|
||||||
zsh-users/zsh-syntax-highlighting
|
|
||||||
zsh-users/zsh-autosuggestions
|
zsh-users/zsh-autosuggestions
|
||||||
zsh-users/zsh-completions
|
zsh-users/zsh-completions
|
||||||
zsh-users/zsh-history-substring-search
|
zsh-users/zsh-history-substring-search
|
||||||
|
|||||||
Reference in New Issue
Block a user