Skip to content

Jekwwer/dotfiles

Repository files navigation

dotfiles

Personal development environment configuration for Linux/Codespaces and macOS.

Features ✨

  • Shell Configuration:
    • .shell_common: Shared aliases, functions, and environment variables sourced by both shells.
    • .bashrc (Linux/Codespaces): Bash-specific history, completions, and prompt.
    • .zshrc (macOS): Zsh-specific history, options, and prompt.
  • Editor Configuration (.editorconfig): Enforces consistent coding styles for various file types.
  • Git Configuration (.gitattributes_global, .gitconfig, .gitignore_global, .gitmessage, keys/signing.pub): Standardized settings, improved workflows, commit message templates, and SSH commit signing.
  • Curl Configuration (.curlrc): Enhanced curl settings for security, performance, and usability.
  • Wget Configuration (.wgetrc): Enhanced wget settings for reliability, security, and convenience.
  • Login Banner Suppression (.hushlogin): Hides the Last login: ... banner (and MOTD on PAM-configured Linux/Codespaces) on login shells.
  • Scripts:
    • install.sh: A setup script for linking dotfiles and preparing the environment.
    • prune-cspell-words: Remove stale words from a cspell.json words list.

License 🛡️

This project is released under the MIT License.

Installation 📦

Codespaces users: If you've already set this repo as your "dotfiles" in your GitHub Codespaces settings, no further setup is required—your Codespaces environment will automatically apply these configurations.

  1. Clone the repository into your Codespaces or local machine:

    git clone https://github.com/Jekwwer/dotfiles.git ~/.dotfiles
  2. Run the install.sh script:

    ~/.dotfiles/install.sh
  3. Restart your terminal or apply the changes:

    macOS:

    source ~/.zshrc

    Linux/Codespaces:

    source ~/.bashrc

.bashrc

Bash shell config for Linux/Codespaces. Sources .shell_common for shared settings.

  • Interactive-only guard, lesspipe integration, and bash-completion setup
  • History: 5 000 in memory / 10 000 on disk, dedup, ignores trivial commands, append-only, timestamped, multi-line saved as one entry
  • Shell options: globstar, dirspell, cdspell
  • Prompt: user@host dir (branch)$ in color

.shell_common

Shared config sourced by both .bashrc and .zshrc. See CHEATSHEET.md for the full alias and function reference.

  • Environment: EDITOR/VISUAL=vim, PAGER=less, LESS=FRX, UTF-8 locale, ~/bin and ~/.local/bin on PATH, DOCKER_CLI_HINTS=false (no "What's next" prompts)
  • Navigation aliases: .., ..., ....
  • File aliases: ll, la, l; safe rm/mv/cp (with -i)
  • Git aliases: 21 g*-prefixed shortcuts covering status/commit/branch/diff/log/push/pull/rebase/stash etc. (see CHEATSHEET for full list)
  • Functions: hgrep <text> (history search), reload (re-source config)
  • OS-specific: CLICOLOR/LSCOLORS + brew update alias on macOS; ls --color=auto + apt update alias on Linux
  • git_branch helper used by both prompts (falls back to (short-sha) when detached)

.zshrc

Zsh shell config for macOS. Sources .shell_common for shared settings.

  • Completion: compinit
  • History: 5 000 in memory / 10 000 on disk, dedup-all, ignores trivial commands, shared across terminals, timestamped, ! expansion verified, blanks normalized
  • Shell options: GLOB_STAR_SHORT, CORRECT
  • Prompt: user@host dir (branch)$ in color using PROMPT_SUBST

.hushlogin

Empty marker file that suppresses the Last login: ... banner on login shells. Existence is the flag — contents are ignored.

  • macOS Terminal/iTerm: hides the last-login line shown when opening a new login shell
  • Linux/Codespaces SSH (PAM): hides last-login + MOTD via pam_lastlog / pam_motd
  • No effect on non-login interactive shells (most local terminal emulators)

.curlrc

  • Progress bar, follows redirects (capped at 10), retries 3× on transient errors (5xx/408/429/network — not 4xx)
  • Timeouts: 15 s connect, 120 s max (override with --max-time 0 for large downloads)
  • TLS 1.2 floor (portable across all curl backends); schemeless URLs default to https
  • --compressed: requests gzip/deflate, transparently decompresses
  • --fail-with-body: exits non-zero on 4xx/5xx but still prints the response

.wgetrc

  • Retries up to 3×; timeouts: 15 s connect, 20 s read, 10 s DNS
  • Resumes partial downloads (continue = on)
  • Uses system CA certificates (/etc/ssl/certs)

.editorconfig

Fallback coding-style rules when a project has no .editorconfig of its own.

  • Defaults: UTF-8, LF endings, 2-space indent, trim trailing whitespace, final newline, 88-char line limit
  • Lockfiles (*.lock, package-lock.json): preserve trailing whitespace
  • Makefile: tab indent (4-size)
  • CSS/HTML/SVG: 120-char line limit
  • Markdown: 120-char limit, preserve trailing whitespace (for line breaks)
  • Python: 4-space indent
  • RST: 120-char line limit
  • Shell scripts: 4-space indent
  • Text/log files: preserve trailing whitespace

.gitattributes_global

Applied globally via core.attributesfile. Per-repo .gitattributes still wins for matching patterns.

  • Auto-detects text + normalizes line endings; forces LF on common languages, configs, docs, shell, build files
  • Marks images, audio/video, fonts, archives, executables, packages, and databases as binary
  • SVG kept as text with markup-aware diff (diff=html)
  • Suppresses diffs for noisy files (*.log, *.lock, package-lock.json)
  • Linguist hints: lockfiles + dist/build/coverage/ marked generated; vendor/ marked vendored
  • Excludes temp files, editor dirs, and node_modules/ from git archive

.gitconfig

See CHEATSHEET.md for the full alias reference.

  • User: Evgenii Shiliaev; ~/.gitmessage template; verbose commit editor
  • Signing: SSH-signed commits (gpg.format = ssh, user.signingkey = ~/.ssh/id_ed25519_signing.pub); local verification via ~/.config/git/allowed_signers
  • Core: code --wait editor, histogram diff, less -RFX pager, fsmonitor, untracked cache
  • Globals: sources ~/.gitignore_global (excludesfile) and ~/.gitattributes_global (attributesfile)
  • Credentials: macOS Keychain with cache fallback (1-hour timeout)
  • Diff polish: moved-code with reindent, mnemonic prefixes, copy detection
  • Workflow: rebase on pull, autoSetupRemote, pushf, rerere, autoStash, autoSquash of fixup commits, tags follow commits on push
  • Log: abbreviated hashes, ISO dates, short decorations, custom pretty format
  • Branches sorted by most recent commit; tags sorted by version, pruned with refs on fetch

.gitignore_global

Applied globally via core.excludesfile. Per-repo .gitignore adds repo-specific patterns on top.

Aggregated from upstream Node, Python, and Visual Studio gitignore templates:

  • Node.js: package managers (npm, pnpm, yarn), modern frameworks (Next/Nuxt/Sveltekit/Vite/Vuepress/etc.), build/cache dirs
  • Python: byte-compiled, virtualenvs, packaging, test caches, Jupyter, pyenv/poetry/pdm
  • Visual Studio / .NET: build dirs, IDE caches, NuGet, Azure, profilers

.gitmessage

Conventional Commits template. Commit types that trigger a release:

Type Release
feat minor
fix, security, deps, perf, build patch

Append ! for breaking changes (feat!:); add BREAKING CHANGE: <description> as the last footer — nothing after it, or the trailing content becomes part of the changelog note.

install.sh

Symlinks all dotfiles into $HOME. Detects OS to link .zshrc (macOS) or .bashrc (Linux/Codespaces).

  • Self-locating: works wherever the repo is cloned
  • Always symlinks: .shell_common, .curlrc, .editorconfig, .gitattributes_global, .gitconfig, .gitignore_global, .gitmessage, .hushlogin, .wgetrc
  • OS-aware: .zshrc on macOS, .bashrc on Linux/Codespaces
  • Creates ~/bin/ and symlinks scripts/prune-cspell-words into it
  • SSH signing: symlinks keys/signing.pub~/.ssh/id_ed25519_signing.pub and writes ~/.config/git/allowed_signers from user.email + pubkey; warns if keys/signing.pub is missing

keys/signing.pub

SSH ed25519 public key used for commit signing. Private key lives on the host and is forwarded into devcontainers via ssh-agent.

  • Wired up by install.sh: symlinked to ~/.ssh/id_ed25519_signing.pub; ~/.config/git/allowed_signers written from user.email + this pubkey
  • Generate a fresh key (host-side): ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_signing -N ''
  • Replace keys/signing.pub with the new pubkey contents and commit
  • Upload to GitHub for verified-badge: gh ssh-key add ~/.ssh/id_ed25519_signing.pub --type signing

prune-cspell-words

Remove stale words from a cspell config words list. Symlinked into ~/bin/ by install.sh.

prune-cspell-words [-c PATH] [-n] [-v]
  • -c / --config PATH: path to cspell config (default: auto-detect standard JSON config in cwd — .cspell.json, cspell.json, .cSpell.json, cSpell.json, or cspell.config.json)
  • -n / --dry-run: preview removals without modifying the file
  • -v / --verbose: print each word as it is checked

Contact 📬

For questions, reach out via evgenii.shiliaev@jekwwer.com.

About

Personal dotfiles for quickly bootstrapping development environments.

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages