Skip to content
MichalBastrzykPublic

About

A personal collection of configuration files for various tools and applications used in my development environment. This repository includes configurations for Zsh, Neovim, Git, Ghostty terminal, and Homebrew packages. It uses GNU Stow to manage symlinks, ensuring a consistent setup across different machines.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

61 Commits

Folders and files

Repository files navigation

Dotfiles

A personal collection of configuration files for my development environment. This repository contains configurations for various tools and applications that I use regularly.

Overview

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

Requirements

Installation

  1. Clone this repository to your home directory:
git clone https://github.com/MichalBastrzyk/dotfiles.git ~/dotfiles
  1. Run the switch script to set up everything:
cd ~/dotfiles
chmod +x .local/bin/switch.sh
./.local/bin/switch.sh

Optional: Run this to fix dock slowly appearing.

defaults write com.apple.dock autohide-time-modifier -float 0.50; killall Dock

What's Included

Shell Configuration

  • .zshrc: Contains aliases and shell customizations
  • .zshenv: Environment variables and path configurations
  • .zshenv: Top-level zsh environment loader

Neovim Configuration

  • init.lua: Basic Neovim configuration
  • .editorconfig: EditorConfig settings

Git Configuration

  • config: Git user information and default settings

Ghostty Terminal

  • config: Terminal appearance settings

Utility Scripts

  • switch.sh: Script for setting up the environment, updating packages, and creating symlinks

Package Management

  • 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.

  1. List your devices and find VendorID and ProductID using hidutil list.
  2. Use hidutil-generator to see the codes that you want to use to rebind.
  3. Create ~/Library/LaunchAgents/com.local.KeyRemapping.plist with 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>
  1. Load the LaunchAgent with:
launchctl load ~/Library/LaunchAgents/com.local.KeyRemapping.plist

To unload the LaunchAgent, use:

launchctl unload ~/Library/LaunchAgents/com.local.KeyRemapping.plist

Source keybinds/com.local.KeyRemapping.plist

Note: Adjust VendorID and ProductID as needed.

Usage

After installation, your dotfiles will be symlinked to the appropriate locations. The switch.sh script can be used any time to update your environment:

switch

This will:

  • Update Homebrew packages
  • Install new Homebrew packages listed in the Brewfile
  • Create symlinks for your dotfiles

Customization

Feel free to fork this repository and modify it according to your preferences. The modular structure makes it easy to add or remove configurations.

License

This project is open-source and available under the MIT License.

About

A personal collection of configuration files for various tools and applications used in my development environment. This repository includes configurations for Zsh, Neovim, Git, Ghostty terminal, and Homebrew packages. It uses GNU Stow to manage symlinks, ensuring a consistent setup across different machines.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages