Skip to content

My personal collection of dotfiles for macOS with automatic dark mode update across terminal applications.

License

Notifications You must be signed in to change notification settings

jackplus-xyz/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Screenshot 2024-11-07 at 13 19 02 Screenshot 2024-11-19 at 09 57 04

My personal collection of dotfiles for macOS with automatic dark mode update across terminal applications.

Warning

These dotfiles are tailored to my specific workflow and setup. Before using these files, review each script carefully and proceed at your own risk. Some configurations may not be compatible with other systems or setups, and unintended side effects are possible.

Requirements

  • OS: macOS (developed on macOS Sequoia 15.1)
  • Shells Supported: Zsh
  • Dependencies: Some features rely on third-party tools (e.g., bouk/dark-mode-notify for automatic dark mode switching)
  • Neovim >= 0.9.0
  • Git >= 2.19.0

Installation

Warning

Before installing, user should review the code and use at their own risk.

Install with install.sh

git clone https://github.com/jackplus-xyz/dotfiles.git ~/.config
cd ~/.config/dotfiles
chmod +x install.sh
./install.sh

The install.sh will create symbolic links of all the applications in ~/.config/dotfiles/.config. If a symbolic link already exists, it will create a backup in ~/.config/dotfiles_backup.

Manual Setup

To install selectively:

Clone the repo and copy only the configurations you need into the corresponding system directories.

Automatic dark mode on MacOS

Inspired and adapted the fish script to zsh from Automatic dark mode for terminal applications

Requirements:

Dark Mode Notify

  1. Compile the program: Follow the instructions on the bouk/dark-mode-notify or cd ~/.config/dotfiles/scripts/dark-mode-notify && make install

  2. Setup background agent:

  3. Create the following file at ~/Library/LaunchAgents/ke.bou.dark-mode-notify.plist

    <?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>ke.bou.dark-mode-notify</string>
    <key>KeepAlive</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>----Path to a location----/dark-mode-notify-stderr.log</string>
    <key>StandardOutPath</key>
    <string>----Path to a location----/dark-mode-notify-stdout.log</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/dark-mode-notify</string>
        <string>--- Path to your script ---</string>
    </array>
    </dict>
    </plist>

    [!Note] Make sure to change the path accordingly The script path will be: $HOME/.config/dotfiles/scripts/theme_sync.sh

  4. Run launchctl load -w ~/Library/LaunchAgents/ke.bou.dark-mode-notify.plist to keep it running on boot.

theme_sync.sh

This script adjusts theme settings for various applications based on macOS dark mode status. If necessary, it restarts or reloads applications for the changes to take effect.

Miscs

Alacritty

Issues:

  1. Control + / triggers the system alert sound on macOS

    Solutions:

    1. Change the DefaultKeyBind.dict

      1. Create a file ~/Library/KeyBindings/DefaultKeyBinding.dict if it doesn't exist yet

      2. Add the snippet below into DefaultKeyBinding.dict

        {
          "^/" = "noop:";
        }
        
    2. Remap the key(Didn't work for me.)

      bindings = [
      { key = "Slash", mods = "Control", chars = "\u001f" },
      ]

Credits

dotfiles

Awesome dotfiles that inspire my current config.

Related

The tools used in my config.

Readings

License

This repository is licensed under the MIT License. You are free to use, modify, and distribute these dotfiles, provided the original attribution is retained.

About

My personal collection of dotfiles for macOS with automatic dark mode update across terminal applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published