You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 KiB
17 KiB
KM's Linux Desktop Config (chezmoi dotfiles)
This is my chezmoi-managed toolkit for keeping a
consistent i3/terminal-focused Linux desktop across
machines: i3 + i3blocks + i3bar, fish/Zsh/Bash shells,
kitty/ST terminals, tmux, Neovim/Vim, Ranger, mpv, Zathura,
dunst, picom, taskwarrior/taskopen, calcurse, Neomutt/msmtp,
mgba, and a grab bag of helper scripts for wallpapers,
audio, finance tickers, backups, etc. Other coding projects
such as hands-free-tools, psa Arsenal, or kogito live
in their own repos — this repo is solely about the desktop
environment, shell tooling, and workflows that drive it.
Table of Contents
- What This Repo Is
- Installation & Sync
- Shells & Aliases
- Terminal & Editor Stack
- Window Manager & Display
- Productivity Apps & Services
- Scripts, Packages & Assets
- Host Overrides & Secrets
- Customization Tips
What This Repo Is
- A chezmoi repo with
dot_*files targeting$HOME(e.g.dot_vimrc.tmpl→~/.vimrc,dot_tmux.conf,dot_gitconfig.tmpl, etc.) anddot_config/**mirroring~/.config. Every.tmplfile runs throughchezmoitemplating so{{ .chezmoi.hostname }}/.linux_os/.chezmoi.usernamecan tailor behavior. - A place for desktop-focused tooling: i3/i3blocks, fish
- shared aliases, kitty/ST terminals, tmux, Neovim/Vim,
mpv, Ranger, mpv, Zathura, dunst/picom/prefers,
taskwarrior/taskopen, and shell helpers such as
executable_passmenu,dmenu-history,change-sink,bg-chooser, etc.
- shared aliases, kitty/ST terminals, tmux, Neovim/Vim,
mpv, Ranger, mpv, Zathura, dunst/picom/prefers,
taskwarrior/taskopen, and shell helpers such as
- A repository for configuration logic only — the bulk of application/Project code lives in other repos. You can treat this as the “rice” layer for Arch/Ubuntu machines, not as a general diary of every coding sidequest.
Installation & Sync
- Install
chezmoi, clone this repo, and runchezmoi init --apply <repo>(orchezmoi cd ./chezmoi apply). The repo assumes you have a basic Linux desktop already (i3, fish, etc.). - Run
chezmoi applywhenever you change templates. When files touch the ones underaliases/(see below) run~/scripts/sync-shortcuts(or letfishinvoke it on login) to regenerate~/aliases/.key_aliases,~/.config/fish/key_abbr.fish, and~/.config/ranger/key_mappings.conf. - After changing tmux config, reload (
tmux source ~/.tmux.conf) and run the TPM installer (~/.tmux/plugins/tpm/bin/install_plugins). - When you edit
dot_config/mgba/*.ini, rundot_config/mgba/update-mgba-config.fish(or your shell) to keep the~/.config/mgba/*.inicopies and repo templates in sync. - Use
chezmoi data set <key> <value>(or edit~/.config/chezmoi/chezmoi.toml) to tweak host data such asgui,ext_kb, orlinux_os— the template indot_config/chezmoi/chezmoi-template.toml.tmplseeds those values for conditional logic in templates.
Shells & Aliases
dot_bashrcanddot_zshrcboth source~/aliases/.key_aliasesand share settings likexset r rate,xmodmaptweaks,walsequences,BASH_IT/oh-my-zshhooks, andpywalcolors so all interactive shells match.aliases/key_aliases.tmpl,aliases/key_dirs.tmpl, andaliases/key_files.tmplare the canonical alias/directory/file lists.~/scripts/sync-shortcutsconsumes those to build shell-friendly alias files and ranger mappings; editing a key file there and rerunning that script keeps the shells/ranger in sync.- Fish is the primary interactive shell
(
dot_config/fish/config.fish.tmpl). It setsspacefishprompt order,PNPM/GraalVM/Javapaths,PASSWORD_STORE_CLIP_TIME,taskabbrs, and automatically runs~/scripts/sync-shortcutsplussource-ing every file indot_config/fish/functions. That directory contains dozens of helpers: git helpers (git/g*), taskwarrior actions (task/*.fish),watson,timetrace,tmux-attach,pass/clipboardhelpers, miniscripts for AWS/rsync, countdowns,currencyconverters, and more. dot_config/fish/completionsadds completions forbuku,kogito,kubectl,minikube,pass,timetrace, andwatsonso these workflows stay tab-complete.- Fish also watches for logins without a
$DISPLAYto auto-runstartx, bindsGPG_TTY, sources~/.cache/wal/colors.sh, and respects host-specific values such asJENKINS_TOKEN(for NZXT) orext_kb.
Terminal & Editor Stack
dot_config/kitty/kitty.confanddot_config/st/config.def.h.tmplsharewalcolors (~/.cache/wal/colors-kitty.conf/colors-wal-st.h) and Nerd Font setups; kitty enables clipboard control and opacity, st pulls fonts/opacity from the current theme.- Terminal multiplexer:
dot_tmux.confrebinds prefix toC-Space, enables mouse, uses a Powerline-style status bar, and installs TPM plugins (tmux-plugins/tpm,tmux-sensible,vim-tmux-navigator). Mouse/Vi copy mode maps push selection toxclipviacopy-pipe-and-cancel. dot_vimrc.tmplis the canonical Vim/Neovim config. It enablesautoindent, autocommands for markdown/Go/Jenkinsfiles, loadsvim-plug, and wires up plugins (YouCompleteMe,UltiSnips,vimtex,vim-fugitive,vim-auto-save,vim-instant-markdown,vim-tmux-navigator,vim-go,vim-react,vim-latex,vim-mark,vim-surround,rainbow,AutoPairs,vim-indexed-search, etc.). Leader mappings cover yanking, folding, Git, formatting, NERDTree, and quick plugin commands.dot_config/nvim/init.vimjust sources~/.vimrcplus Python host settings.dot_config/mpv/mpv.conf&input.confconfigure subtitles, mouse wheel volume, speed keys, seek commands, zoom, and mark shortcuts for mpv so it works cleanly with keyboard/VR-style controls.
Window Manager & Display
dot_xinitrc.tmplloads~/.Xresources, applies host-specificxmodmap(dot_Xmodmap*), setsredshift,xset r rate(pumped from fish), startsnotification-daemon,picom,imwheel,numlockx, and painswal -i $(scripts/shuffler ...)backgrounds.dot_Xresources.tmplkeeps host DPI/font choices (high DPI forx1-carbon, default for desktops), clickable URLs, transparency, andsxivcolors; i3blocks and kitty re-read it viaxrdb+wal.- There are multiple
dot_Xmodmap*variants (.,-laptop,-laptop-old,-old,-ubuntu,-vm) soxmodmapcan swap Caps/Esc/backspace depending on host;dot_xinitrc.tmpltoggles between them via theext_kbvariable and the helperscripts/executable_xmodmap-custom.tmpl. dot_config/i3/config.tmplwires up: Mod1/Mod4 split,kitty/urxvtterminals, i3 startup apps (notification daemon, picom, imwheel,wal,xbacklight), screenshot bindings, workspace assignments (1/2/3 etc), Slack/Signal/Chromium/Steam assignments, workspace navigation,passmenu,dmenu-history,ticker/fxshortcuts,redshifthotkeys,walshuffle hotkeys,change-sink, andmod-based layout resizing. It also defines stacked/tabbed/floating rules, gap toggles, and bar outputs for both main and secondary monitors. The status command isi3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf(primary) andi3blocks-secondary.conf(secondary) with i3blocks piping through~/scripts/shuffler/pywalcolors.dot_config/i3blocks/i3blocks.conf.tmpldefines blocks forkraken(ETH), Spotify controls, volume, and conditional blocks for laptop (battery,wifi,backlight), plus placeholders fordexscreener/ticker/memory/temperature. Secondary/ display configs reuse the same script directory but focus oncalendar,volume, and additionaltemperature/name/cpu/memoryblocks. Every block relies on scripts underdot_config/i3blocks/scripts/(e.g.executable_calendar,executable_volume,executable_wifi,executable_kraken,executable_dexscreener*,executable_spotify,executable_name,executable_temperature,executable_ticker, etc.) which source~/.cache/wal/colors.shto stay on-theme.- Display/notification stack also includes
dot_config/picom/picom.conf(shadows/fade/opacity rules) anddot_config/dunst/dunstrc(compact, mouse-following notifications, keyboard shortcuts, urgency colors) so popups match the rest of the polished rice. dot_config/neofetch/config.confkeeps theneofetchinfo streamlined to kernel, terminal,font, shell, packages, WM, CPU/GPU, memory, disks, and resolution, with ASCII color blocks and shorthanded kernel/distro strings.
Productivity Apps & Services
dot_taskrcconfigurestaskwarrior(data location~/.task,taskdserver credentials, urgency coefficients per project/tag, and default contextsniper).dot_taskopenrctellstaskopento usenvim, thetaskbinary, and custom note / annotation handling (notes.regex = "Notes").dot_qalcrcforcesqalculate-gtkto use decimal commas for output.dot_inputrcturns readlinevimode on, anddot_imwheelrcremaps vertical scroll forimwheel.- Ranger customization lives under
dot_config/ranger/:rc.conf.tmpltweaks view mode, preview pipeline (customscope.sh), bookmarks, colors, and dozens of keybindings (vim-like navigation, copy/paste/paste symlink macros,fzfintegrations, lightning bookmarks, backgrounds viawal,dragondrop, etc.).ranger/commands.pysuppliesfzf_select,fzf_locate,compress,extracthere, and other helper commands. Plugins include devicons, preview scripts, and sharedkey_mappings.conf(referenced at the bottom ofrc.conf). - Email is handled by
dot_config/neomutt/neomuttrcpointing at~/mail/firemail, callingmsmtp, syncing (mbsync), and a custom<F5>macro.dot_config/msmtp/configdefines afiremailaccount — replace the password with a secret manager or keep this file private (it currently contains a placeholder password). private_dot_calcurse/stores Calcurse CalDAV configs/credentials andprivate_dot_gnupg/holds GPG configs/keys; treat those aschezmoiprivate files (they live inprivate_dot_*in the repo and are decrypted on each machine). Similarly,dot_ssh/authorized_keys-allandknown_hosts-allaggregate SSH entries for quick deployment.dot_config/zathura/zathurarcforces dark mode, custom colors, and clipboard syncing.dot_config/mgba/*-tmpl.inikeeps emulator settings; rundot_config/mgba/update-mgba-config.fishafter editing your local~/.config/mgba/*.iniso the template files stay current.dot_minikube/config/config.jsonfixes the driver to Docker ("driver": "docker").
Scripts, Packages & Assets
- The
scripts/directory hosts dozens ofexecutable_*helpers that i3, fish, and launcher aliases depend on. Highlights:executable_sync-shortcutsreadsaliases/key_*and rewrites~/aliases/.key_aliases,~/.config/fish/key_abbr.fish, and ranger’skey_mappings.conf, keeping shells/ranger consistent.- Wallpaper helpers:
executable_shufflerrolls a directory of backgrounds,executable_bg-chooserpicks "bright"/"dim" sets throughdmenu, andexecutable_dual-monitor-slideshowusesfeh/ImageMagick to fill a single monitor while temporarily disabling others. - Audio/focus helpers:
executable_change-sinkreroutes Pulseaudio sinks,executable_ubuntu-startis an alternative startup script that replays imwheel/picom/wal, andexecutable_tex-cleandeletes LaTeX build artefacts based ontxt/tex-build-files.txt. - Productivity utilities:
executable_passmenuwrapspasswithdmenu,executable_dmenu-historykeeps colorized dmenu launch history,executable_vim-manpops man pages inside Neovim,executable_currencyhitsfrankfurter.app,executable_glhf-metadataqueries an NFT API, andexecutable_ticker/executable_dexscreener*/executable_krakenfeed price data to the i3blocks bar. - Misc scripts include
executable_backup-pc(rsync/tar backups using exclude lists undertxt/),executable_install-arch-pkgs.sh(installs fromtxt/pacman-pkgs/*.txt),executable_spotify-clean(VACUUM Spotify DB), andexecutable_spotify-now/dot_config/i3blocks/scripts/executable_spotifyfor play/pause+display via MPRIS. scripts/colors/contains playful ASCII color art used for celebrations or just curiosity.
txt/contains curated data:txt/nzxt-pkgs.txt,txt/nzxt-aur.txt,txt/nzxt-all.txt,txt/nzxt-new.txt,txt/x1-carbon-pkgs.txt,txt/x1-carbon-aur.txt,txt/arch-2-pkgs.txt,txt/arch-2-aur.txt, and similar lists for Ubuntu/Termux packages.txt/exclude-dirs-backup*.txtprovide directory exclusions for backups.txt/tex-build-files.txtenumerates LaTeX build extensions forexecutable_tex-clean.txt/todo.mdandtxt/terminal-art.txtcapture personal notes.txt/usbs.mdtracks mounted USBs.
Host Overrides & Secrets
dot_config/chezmoi/chezmoi-template.toml.tmplflagsgui,ext_kb, andlinux_osso templates can read host-specific values (e.g.,ext_kbdecides whether desktop laptops load.Xmodmapor.Xmodmap-laptop). Usechezmoi data set(or edit~/.config/chezmoi/chezmoi.toml) to change these values per host.dot_Xresources.tmplanddot_Xmodmap*swap DPI, fonts, and key remaps depending on the machine (x1-carbonvsnzxtvsvm).i3bindings invokexmodmap ~/.Xmodmapor the laptop variant depending on those template variables.private_dot_gnupg/andprivate_dot_calcurse/arechezmoiprivate directories — they contain real keys/certs and are not committed in plaintext. Keep them encrypted and usechezmoi add --privatewhen tracking new secrets.dot_config/msmtp/configcurrently stores a password. In production, replace it with apass-managed credential or environment variable, and never push secrets to a public repo.dot_taskrcembedstaskdcredentials (hosttaskd.khkm.gq), so treat~/.taskrcas private if you edit it, and sync it viachezmoiprivate mode if needed.dot_ssh/authorized_keys-allandknown_hosts-allcollect the SSH state that gets populated on every machine youchezmoi applyto.
Customization Tips
- Adding aliases/dirs/files: edit the
aliases/key_*templates, then run~/scripts/sync-shortcuts(or log in through fish and let the config run it) to regenerate shell aliases, fish abbrs, and ranger maps. - Changing colors/backgrounds: the i3 config,
dot_xinitrc, andscripts/executable_bg-chooser/shufflercallwal -ion directories under~/Pictures/Backgrounds. Keep the structure andfehcall inscripts/executable_dual-monitor-slideshowin sync when you add new folders. - Updating mgba: edit your local
~/.config/mgba/config.ini/qt.ini, then rundot_config/mgba/update-mgba-config.fishto copy them back into the repo templates before committing. - Updating i3blocks: the configs reference scripts under
dot_config/i3blocks/scripts/. Editing or adding a script should maintain thecommandnaming convention and thecolor/pywalsourcing shown in those scripts. - Neovim tweaks: extend
dot_vimrc.tmplwith newPlugentries; after editing, runnvim +PlugInstall +qalland keep the plugin list synchronized withinit.vimsourcing the same file. - Tmux tweaks: change
dot_tmux.conf, then reload (tmux source-file) and reinstall packages via~/.tmux/plugins/tpm/bin/install_pluginsif you add TPM plugins. - Taskwarrior contexts:
dot_taskrcdefines contexts (sniper,pey,mny, etc.) and urgency coefficients. Edit them if you rename project tags, then runtask sync. - Backup scripts:
scripts/executable_backup-pcusestxt/exclude-dirs-backup*.txt, so update those lists whenever you add new directories to exclude fromrsync/tarbackups. - Package installation:
scripts/executable_install-arch-pkgs.shreadstxt/pacman-pkgs/*.txt. Keep that tree up to date before running the script.
Feel free to browse the scripts, dot_config/*, and txt/*
files when you need to understand how a feature works — they
are the single source of truth for this desktop’s
automation.