A comprehensive, configuration-as-code approach to managing development environment dotfiles with TypeScript/Deno, featuring custom keyboard shortcuts, text expansion, and automated symlink management.
- πΉ Custom Keyboard Shortcuts - Programmatic Karabiner Elements configuration with leader keys and modal editing
- π Text Expansion - Espanso integration with dynamic snippets and clipboard management
- π Automated Symlinks - Smart dotfiles synchronization with custom Deno-based management system
- π Enhanced Shell - Zsh with modern plugins, fzf integration, and custom functions
- π Modern Terminal - Wezterm + Zellij/Tmux with session management and layouts
- β‘ Neovim IDE - Comprehensive Lua configuration with LSP, treesitter, and custom keybindings
- π¦ Package Management - Automated Homebrew package installation and management
- π¨ Consistent Theming - Catppuccin theme across all applications
Tool | Purpose | Configuration |
---|---|---|
Karabiner Elements | Keyboard remapping & shortcuts | karabiner.config.ts |
Espanso | Text expansion & snippets | espanso.config.ts |
Deno | Configuration management | dotfiles.config.ts |
Zsh | Shell with plugins | zsh/ |
Neovim | Text editor | config/nvim/ |
Wezterm | Terminal emulator | config/wezterm/ |
Tmux | Terminal multiplexer | config/tmux/ |
The configuration creates a powerful modal system with Caps Lock as the hyper key:
- Hyper + hjkl - Vim-style navigation arrows
- Hyper + Return - Tmux leader key bindings
- Hyper + w - Window management (Aerospace)
- Hyper + s - System controls (brightness, volume)
- Hyper + v - Vim mode for system-wide navigation
- Hyper + r - Raycast shortcuts
- Hyper + b - Browser profile switching
Trigger: ;
prefix
- Social:
;git
,;blog
,;linkedin
- Personal links - Utilities:
;uuid
,;pass[length]
,;cpf
,;cnpj
- Generators - Colors:
;hex
,;rgb
,;hsl
- Color conversions - Dates:
;date
,;time
,;now
- Date/time insertion - Emojis:
;eyes
,;s2
,;blz
- Quick emoji access
- Zsh with Oh My Zsh and modern plugins
- Starship prompt with git integration
- FZF for fuzzy finding with custom bindings
- Zoxide for smart directory jumping
- Mise for runtime version management
- Wezterm with custom theming and zen mode
- tmux with project-based session management
- Integrated file manager (Yazi)
dotfiles/
βββ bin/ # Custom scripts and utilities
βββ config/ # Application configurations
β βββ nvim/ # Neovim configuration
β βββ wezterm/ # Terminal configuration
β βββ zellij/ # Terminal multiplexer
β βββ aerospace/ # Window manager
β βββ ...
βββ zsh/ # Shell configuration
βββ dotbot/ # Custom dotfiles management system
βββ dotfiles.config.ts # Main configuration
βββ karabiner.config.ts # Keyboard shortcuts
βββ espanso.config.ts # Text expansion
This dotfiles system uses a custom TypeScript-based configuration management built on Deno:
# Sync all configurations
deno task dotfiles sync
# Add new file to dotfiles
deno task dotfiles add --target ~/.newfile
# Create symlinks
deno task dotfiles link --from ~/dotfiles/file --to ~/.file
# Install packages
deno task dotfiles pkg neovim --cask
# Migrate existing setup
deno task dotfiles migrate
The system supports custom plugins for:
- Espanso - Dynamic snippet generation
- Karabiner - Programmatic shortcut creation
- VSCode - Extension and settings management
Example plugin configuration:
plugins: [
espansoPlugin(EspansoRules),
vscodePlugin({ path: "vscode", extensionsFile: "vscode/extensions.txt" }),
karabinerPlugin({
rules: KarabinerConfig.map,
whichKey: KarabinerConfig.whichKey,
configFile: "karabiner/karabiner.json"
}),
]
Consistent Catppuccin Mocha theme across:
- Terminal (Wezterm)
- Shell (Zsh syntax highlighting)
- Editor (Neovim)
- File manager (Yazi)
- Directory listings (LSD)
Located in bin/
:
- Session Management:
tmux-fzf-session
,zellij-sessionx
- Git Utilities:
git-branch.sh
,release-cli
- System Tools:
clear-notifications
,github-icon
- Development:
relative-time-commit
,fishfy-path
- Neovim - Primary editor with LSP, Treesitter, and modern plugins
- VSCode - Secondary editor with synchronized extensions
- Git - Enhanced with forgit, fzf integration, and custom aliases
- Wezterm - GPU-accelerated terminal with custom config
- Tmux - Terminal multiplexer
- Starship - Cross-shell prompt with git integration
- Karabiner Elements - Advanced keyboard customization
- Espanso - Universal text expander
- Aerospace - Tiling window manager
- Raycast - Spotlight replacement with custom extensions
Edit karabiner.config.ts
:
const modKeys = karabiner.createHyperSubLayers({
// Add new shortcut
n: { to: [{ key_code: "page_down" }], description: "Page down" },
});
My karabiner config was very inspired by karabiner keybind - mxstbr. You can check the Youtube videos below:
- Max Stoiber Owns His Workflow with Raycast
- How I Programed the Most Productive MacOS Keyboard Setup Ever: Karabiner Elements
With these videos I have the idea to implement keybindings like Tmux, with a prefix + key. My karabiner config have two modes:
single
: that just press one time the prefix + keyhold
: you need to hold the prefix until the karabiner notification and press the other key. With this mode you can repeat all keys at layer. Hold again to exit from this mode
Edit espanso.config.ts
:
espanso.insert("mykey", "My expanded text", "Description"),
Espanso it's an amazing tool to expand your texts to other utilities. I work in frontend and I need a lots of texts like lorem
ipsum or random brazilian documents (CPF/CNPJ) to test some accounts. Since I have some personal information at my espanso config, this file will not
be able to check at this repo. But you can generate using the make
or check this sample.
The espanso command key is ;
, since I use the :
for emojis in most applications.
matches:
- trigger: ";cnpj"
replace: "{{cnpj}}"
vars:
- name: "cnpj"
type: "shell"
params:
shell: "bash"
cmd: "deno ~/dotfiles/espanso/cnpj"
- trigger: ";date"
replace: "{{date}}"
vars:
- name: "date"
type: "date"
params:
format: "%d/%m/%Y"
- trigger: ";time"
replace: "{{time}}"
vars:
- name: "time"
type: "date"
params:
format: "%H:%M"
- trigger: ";youtube"
replace: "https://www.youtube.com/@allangarcez"
Edit files in zsh/
:
alias.sh
- Command aliasesexports.sh
- Environment variablesfunctions.sh
- Custom functions
First, check the requirements:
- zsh > v4
- git > v2
- deno >= 2.1.0
git clone https://github.com/g4rcez/dotfiles $HOME/dotfiles
cd $HOME/dotfiles
bash install
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
deno task dotfiles sync
- Submit a pull request
- Oh My Zsh - Zsh framework
- Neovim - Modern Vim
- Catppuccin - Soothing pastel theme
- Karabiner Elements - Keyboard customization
- Espanso - Text expander
β Star this repo if you find it useful!