Add first init
This commit is contained in:
commit
1c63057b73
16 changed files with 475 additions and 0 deletions
17
.chezmoi.toml.tmpl
Normal file
17
.chezmoi.toml.tmpl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{{- $hostname := .chezmoi.hostname -}}
|
||||
{{- $os := .chezmoi.os -}}
|
||||
|
||||
[data]
|
||||
{{- if eq $hostname "maple" }}
|
||||
machine = "server"
|
||||
editor = "hx"
|
||||
{{- else if eq $hostname "archbook" }}
|
||||
machine = "laptop"
|
||||
editor = "hx"
|
||||
{{- else if eq $os "darwin" }}
|
||||
machine = "macbook"
|
||||
editor = "hx"
|
||||
{{- else }}
|
||||
machine = "unknown"
|
||||
editor = "hx"
|
||||
{{- end }}
|
||||
47
README.md
Normal file
47
README.md
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Dotfiles
|
||||
|
||||
Personal dotfiles managed with [Chezmoi](https://www.chezmoi.io/).
|
||||
|
||||
## Machines
|
||||
|
||||
- **maple** - Debian server
|
||||
- **archbook** - Arch Linux laptop
|
||||
- **macbook** - MacBook Pro (macOS)
|
||||
|
||||
## What's Included
|
||||
|
||||
- **Fish shell** - Config with utility functions
|
||||
- **Helix** - Modal editor config with LSP settings
|
||||
- **tmux** - Terminal multiplexer with Catppuccin theme
|
||||
|
||||
## Quick Start
|
||||
|
||||
### New Machine
|
||||
|
||||
```bash
|
||||
chezmoi init git@forgejo.novanexus.ca:gruberb/dotfiles.git
|
||||
chezmoi diff
|
||||
chezmoi apply
|
||||
```
|
||||
|
||||
### Update Configs
|
||||
|
||||
```bash
|
||||
# Pull latest and apply
|
||||
chezmoi update
|
||||
|
||||
# After editing a file locally
|
||||
chezmoi re-add <file>
|
||||
|
||||
# Push changes
|
||||
cd ~/.local/share/chezmoi
|
||||
git add . && git commit -m "Update configs" && git push
|
||||
```
|
||||
|
||||
## Theme
|
||||
|
||||
Catppuccin Macchiato across all tools.
|
||||
|
||||
## Font
|
||||
|
||||
Berkeley Mono (install manually per machine).
|
||||
34
dot_config/fish/config.fish.tmpl
Normal file
34
dot_config/fish/config.fish.tmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
if status is-interactive
|
||||
# Fix for terminals without terminfo on server (e.g., Ghostty)
|
||||
if not test -e /usr/share/terminfo/$TERM[1]/$TERM
|
||||
set -gx TERM xterm-256color
|
||||
end
|
||||
|
||||
# Disable OSC 133 shell integration
|
||||
functions -e __fish_on_interactive_startup_done
|
||||
functions -e __fish_prompt_initialized
|
||||
end
|
||||
|
||||
# Clear screen AND scrollback with Ctrl+L
|
||||
bind \cl 'printf "\e[2J\e[3J\e[H"; commandline -f repaint'
|
||||
|
||||
# PATH setup
|
||||
fish_add_path -g ~/.local/bin
|
||||
|
||||
{{- if eq .machine "macbook" }}
|
||||
# macOS-specific: Homebrew paths
|
||||
fish_add_path -g /opt/homebrew/bin
|
||||
fish_add_path -g /opt/homebrew/sbin
|
||||
{{- end }}
|
||||
|
||||
{{- if eq .machine "server" }}
|
||||
# Server-specific: Helix runtime
|
||||
set -gx HELIX_RUNTIME /usr/local/lib/helix/runtime
|
||||
{{- end }}
|
||||
|
||||
# GPG TTY for signing
|
||||
set -gx GPG_TTY (tty)
|
||||
|
||||
# Editor
|
||||
set -gx EDITOR {{ .editor }}
|
||||
set -gx VISUAL {{ .editor }}
|
||||
3
dot_config/fish/functions/gaa.fish
Normal file
3
dot_config/fish/functions/gaa.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function gaa --wraps='git add .' --description 'alias gaa=git add .'
|
||||
git add . $argv
|
||||
end
|
||||
3
dot_config/fish/functions/gc.fish
Normal file
3
dot_config/fish/functions/gc.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function gc --wraps='git commit' --description 'alias gc=git commit'
|
||||
git commit $argv
|
||||
end
|
||||
3
dot_config/fish/functions/gco.fish
Normal file
3
dot_config/fish/functions/gco.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function gco --wraps='git checkout' --description 'alias gco=git checkout'
|
||||
git checkout $argv
|
||||
end
|
||||
3
dot_config/fish/functions/glg.fish
Normal file
3
dot_config/fish/functions/glg.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function glg --wraps='git log --all --oneline --decorate --graph' --description 'alias glg=git log --all --oneline --decorate --graph'
|
||||
git log --all --oneline --decorate --graph $argv
|
||||
end
|
||||
4
dot_config/fish/functions/gp.fish
Normal file
4
dot_config/fish/functions/gp.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Git push with optional arguments
|
||||
function gp --description "Git push (shortcut)"
|
||||
git push $argv
|
||||
end
|
||||
4
dot_config/fish/functions/gpl.fish
Normal file
4
dot_config/fish/functions/gpl.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Git pull with optional arguments
|
||||
function gpl --description "Git pull (shortcut)"
|
||||
git pull $argv
|
||||
end
|
||||
4
dot_config/fish/functions/gs.fish
Normal file
4
dot_config/fish/functions/gs.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Git status shortcut
|
||||
function gs --description "Git status (shortcut)"
|
||||
git status $argv
|
||||
end
|
||||
8
dot_config/fish/functions/gst.fish
Normal file
8
dot_config/fish/functions/gst.fish
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function gst --wraps='git status -sb --show-stash --untracked-files=all' --description 'status + changed files'
|
||||
git status -sb --show-stash --untracked-files=all
|
||||
set -l changes (git status --porcelain=v1)
|
||||
if test -n "$changes"
|
||||
echo
|
||||
git diff --name-status
|
||||
end
|
||||
end
|
||||
3
dot_config/fish/functions/l.fish
Normal file
3
dot_config/fish/functions/l.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function l --wraps='eza --all --long --header --description' --wraps='eza --all --long --header' --description 'alias l=eza --all --long --header'
|
||||
eza --all --long --header $argv
|
||||
end
|
||||
4
dot_config/fish/functions/mkcd.fish
Normal file
4
dot_config/fish/functions/mkcd.fish
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Create directory and cd into it
|
||||
function mkcd --description "Create a directory and cd into it"
|
||||
mkdir -p $argv[1] && cd $argv[1]
|
||||
end
|
||||
95
dot_config/helix/config.toml
Normal file
95
dot_config/helix/config.toml
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
theme = "catppuccin_macchiato"
|
||||
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
mouse = true
|
||||
cursorline = true
|
||||
auto-save = true
|
||||
bufferline = "multiple"
|
||||
color-modes = true
|
||||
true-color = true
|
||||
rulers = [80, 120]
|
||||
|
||||
[editor.cursor-shape]
|
||||
insert = "bar"
|
||||
normal = "block"
|
||||
select = "underline"
|
||||
|
||||
[editor.statusline]
|
||||
left = ["mode", "spinner", "file-name", "file-modification-indicator"]
|
||||
center = []
|
||||
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
|
||||
separator = "│"
|
||||
mode.normal = "NORMAL"
|
||||
mode.insert = "INSERT"
|
||||
mode.select = "SELECT"
|
||||
|
||||
[editor.lsp]
|
||||
display-messages = true
|
||||
display-inlay-hints = true
|
||||
|
||||
[editor.indent-guides]
|
||||
render = true
|
||||
character = "│"
|
||||
skip-levels = 1
|
||||
|
||||
[editor.soft-wrap]
|
||||
enable = true
|
||||
|
||||
[editor.file-picker]
|
||||
hidden = false
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Key Bindings
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[keys.normal]
|
||||
# Quick save
|
||||
C-s = ":w"
|
||||
|
||||
# Buffer navigation
|
||||
H = ":buffer-previous"
|
||||
L = ":buffer-next"
|
||||
|
||||
# Close buffer
|
||||
C-w = ":buffer-close"
|
||||
|
||||
# Quick quit
|
||||
C-q = ":q"
|
||||
|
||||
# Clipboard operations (system clipboard)
|
||||
space.y = ":clipboard-yank"
|
||||
space.p = ":clipboard-paste-after"
|
||||
space.P = ":clipboard-paste-before"
|
||||
|
||||
# File picker
|
||||
space.f = "file_picker"
|
||||
space.F = "file_picker_in_current_directory"
|
||||
|
||||
# Buffer picker
|
||||
space.b = "buffer_picker"
|
||||
|
||||
# Symbol picker
|
||||
space.s = "symbol_picker"
|
||||
space.S = "workspace_symbol_picker"
|
||||
|
||||
# Diagnostics
|
||||
space.d = "goto_next_diag"
|
||||
space.D = "goto_prev_diag"
|
||||
|
||||
# Comment toggle
|
||||
C-c = "toggle_comments"
|
||||
|
||||
# Format
|
||||
space.l = ":format"
|
||||
|
||||
[keys.insert]
|
||||
# Quick escape
|
||||
j.k = "normal_mode"
|
||||
|
||||
# Quick save from insert mode
|
||||
C-s = ["normal_mode", ":w"]
|
||||
|
||||
[keys.select]
|
||||
# Clipboard operations in select mode
|
||||
space.y = ":clipboard-yank"
|
||||
126
dot_config/helix/languages.toml
Normal file
126
dot_config/helix/languages.toml
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
# Helix Language Server Configuration
|
||||
# Auto-format on save and LSP settings per language
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Rust
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "rust"
|
||||
auto-format = true
|
||||
|
||||
[language-server.rust-analyzer.config]
|
||||
check.command = "clippy"
|
||||
cargo.features = "all"
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Python
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "python"
|
||||
auto-format = true
|
||||
language-servers = ["ruff", "pyright"]
|
||||
|
||||
[language-server.ruff]
|
||||
command = "ruff"
|
||||
args = ["server"]
|
||||
|
||||
[language-server.pyright]
|
||||
command = "pyright-langserver"
|
||||
args = ["--stdio"]
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# JavaScript/TypeScript
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "javascript"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "javascript"] }
|
||||
|
||||
[[language]]
|
||||
name = "typescript"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "typescript"] }
|
||||
|
||||
[[language]]
|
||||
name = "tsx"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "typescript"] }
|
||||
|
||||
[[language]]
|
||||
name = "jsx"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "javascript"] }
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Web Languages
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "html"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "html"] }
|
||||
|
||||
[[language]]
|
||||
name = "css"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "css"] }
|
||||
|
||||
[[language]]
|
||||
name = "json"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "json"] }
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Go
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "go"
|
||||
auto-format = true
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Shell
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "bash"
|
||||
auto-format = true
|
||||
formatter = { command = "shfmt", args = ["-i", "4"] }
|
||||
|
||||
[[language]]
|
||||
name = "fish"
|
||||
auto-format = false
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Markdown
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "markdown"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "markdown"] }
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# TOML/YAML
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "toml"
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "yaml"
|
||||
auto-format = true
|
||||
formatter = { command = "prettier", args = ["--parser", "yaml"] }
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Nix
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
[[language]]
|
||||
name = "nix"
|
||||
auto-format = true
|
||||
formatter = { command = "nixfmt" }
|
||||
117
dot_config/tmux/tmux.conf
Normal file
117
dot_config/tmux/tmux.conf
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
# tmux config - Catppuccin Macchiato theme
|
||||
# Minimal but powerful setup
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# General Settings
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
# Change prefix from C-b to C-a (easier to reach)
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# Enable true color support
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
set -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# Enable mouse support
|
||||
set -g mouse on
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# Renumber windows when one is closed
|
||||
set -g renumber-windows on
|
||||
|
||||
# Increase scrollback buffer
|
||||
set -g history-limit 10000
|
||||
|
||||
# Reduce escape time (important for Helix/vim)
|
||||
set -sg escape-time 0
|
||||
|
||||
# Enable focus events
|
||||
set -g focus-events on
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Key Bindings
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
# Reload config
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded!"
|
||||
|
||||
# Split panes with | and -
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Vim-style pane navigation
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Resize panes with H/J/K/L
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
|
||||
# New window in current path
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
# Quick window switching
|
||||
bind -n M-1 select-window -t 1
|
||||
bind -n M-2 select-window -t 2
|
||||
bind -n M-3 select-window -t 3
|
||||
bind -n M-4 select-window -t 4
|
||||
bind -n M-5 select-window -t 5
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Catppuccin Macchiato Colors
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
# Palette
|
||||
# Base: #24273a
|
||||
# Surface0: #363a4f
|
||||
# Surface1: #494d64
|
||||
# Text: #cad3f5
|
||||
# Subtext0: #a5adcb
|
||||
# Mauve: #c6a0f6
|
||||
# Blue: #8aadf4
|
||||
# Green: #a6da95
|
||||
# Yellow: #eed49f
|
||||
# Red: #ed8796
|
||||
|
||||
# Status bar
|
||||
set -g status-position bottom
|
||||
set -g status-style "bg=#24273a,fg=#cad3f5"
|
||||
set -g status-left-length 30
|
||||
set -g status-right-length 50
|
||||
|
||||
# Status left: session name
|
||||
set -g status-left "#[bg=#c6a0f6,fg=#24273a,bold] #S #[bg=#24273a] "
|
||||
|
||||
# Status right: date and time
|
||||
set -g status-right "#[fg=#a5adcb]%Y-%m-%d #[fg=#cad3f5]%H:%M #[bg=#8aadf4,fg=#24273a,bold] #h "
|
||||
|
||||
# Window status
|
||||
set -g window-status-format "#[fg=#a5adcb] #I:#W "
|
||||
set -g window-status-current-format "#[bg=#363a4f,fg=#8aadf4,bold] #I:#W "
|
||||
set -g window-status-separator ""
|
||||
|
||||
# Pane borders
|
||||
set -g pane-border-style "fg=#363a4f"
|
||||
set -g pane-active-border-style "fg=#c6a0f6"
|
||||
|
||||
# Message style
|
||||
set -g message-style "bg=#363a4f,fg=#cad3f5"
|
||||
set -g message-command-style "bg=#363a4f,fg=#cad3f5"
|
||||
|
||||
# Mode style (copy mode, etc.)
|
||||
setw -g mode-style "bg=#363a4f,fg=#cad3f5"
|
||||
|
||||
# Clock
|
||||
setw -g clock-mode-colour "#c6a0f6"
|
||||
Loading…
Reference in a new issue