A personal collection of configuration files for my development environment. This repository contains configurations for various tools and applications that I use regularly.
This dotfiles repository uses GNU Stow to manage symlinks, making it easy to set up a consistent environment across different machines. The repository includes configurations for:
- Zsh (shell)
- Neovim (editor)
- Git
- Ghostty (terminal)
- Homebrew packages
- Clone this repository to your home directory:
git clone https://github.com/MichalBastrzyk/dotfiles.git ~/dotfiles- Run the switch script to set up everything:
cd ~/dotfiles
chmod +x .local/bin/switch.sh
./.local/bin/switch.shOptional: Run this to fix dock slowly appearing.
defaults write com.apple.dock autohide-time-modifier -float 0.50; killall Dock- .zshrc: Contains aliases and shell customizations
- .zshenv: Environment variables and path configurations
- .zshenv: Top-level zsh environment loader
- init.lua: Basic Neovim configuration
- .editorconfig: EditorConfig settings
- config: Git user information and default settings
- config: Terminal appearance settings
- switch.sh: Script for setting up the environment, updating packages, and creating symlinks
- Brewfile: List of packages to be installed via Homebrew
Okay, here's a super compact section for your README based on our conversation, focusing on the hidutil with --match approach:
Key Remapping using this guide
Remap keys using a LaunchAgent and hidutil for specific devices.
- List your devices and find
VendorIDandProductIDusinghidutil list. - Use hidutil-generator to see the codes that you want to use to rebind.
- Create
~/Library/LaunchAgents/com.local.KeyRemapping.plistwith the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.KeyRemapping</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
<string>--match</string>
<string>{"VendorID":0x5ac,"ProductID":0x24f}</string>
<string>--set</string>
<string>{"UserKeyMapping":[
{
"HIDKeyboardModifierMappingSrc": 0x700000029,
"HIDKeyboardModifierMappingDst": 0x700000035
},
{
"HIDKeyboardModifierMappingSrc": 0x700000039,
"HIDKeyboardModifierMappingDst": 0x700000029
}
]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>- Load the LaunchAgent with:
launchctl load ~/Library/LaunchAgents/com.local.KeyRemapping.plistTo unload the LaunchAgent, use:
launchctl unload ~/Library/LaunchAgents/com.local.KeyRemapping.plistSource keybinds/com.local.KeyRemapping.plist
Note: Adjust VendorID and ProductID as needed.
After installation, your dotfiles will be symlinked to the appropriate locations. The switch.sh script can be used any time to update your environment:
switchThis will:
- Update Homebrew packages
- Install new Homebrew packages listed in the Brewfile
- Create symlinks for your dotfiles
Feel free to fork this repository and modify it according to your preferences. The modular structure makes it easy to add or remove configurations.
This project is open-source and available under the MIT License.