Giter Club home page Giter Club logo

appearancenotifier's Introduction

Appearance Notifier


This application listens for when the macOS interface theme changes and then does some thing(s). For now, it's hardcoded to switching my kitty and Neovim themes to match the new theme.

Ideally the different things themselves would handle this themselves, as others do.

Demo

appearancenotifier-demo-with-kitty-neovim

NB: This demo is from a 2012 13" MacBook Pro.

Installation

Binaries

  1. Download the latest version from the Releases page.
  2. Move it to your path.

From source

  1. $ git clone [email protected]:jesse-c/AppearanceNotifier.git
  2. $ swift build --configuration release.
  3. $ mv .build/x86_64-apple-macosx/release/AppearanceNotifier /usr/local/bin/

Usage

You'll need to adapt the respond function for your local machine's setup.

Run the compiled binary (e.g. $ AppearanceNotifier). You'll need to leave this running.

Autostart

To have it autostart at login, you can use launchd, with the provided job definition. Copy it to the right location (e.g. $ cp com.jesseclaven.appearancenotifier.plist ~/Library/LaunchAgents/).

Dependencies

Neovim

nvim-remote (aka nvr) is used for controlling the Neovim instances.

kitty

For kitty to receive remote commands, you'll need to update your config to have:

allow_remote_control true

kitty / tmux

If you're using kitty with tmux, you'll need to explicitly set the socket that kitty listens on, since if you run the command from within tmux, kitty won't pick up on it.

How you do this depends on how you start kitty.

If you're starting it from the application icon, you need to set the launch arguments in your kitty config folder. For example, in ~/.config/kitty/macos-launch-services-cmdline I have:

--listen-on unix:/tmp/kitty

NB: If you don't open kitty directly from the application (for example, if you're using Raycast), then it won't pick up these launch arguments.

NB: I haven't tested this with more than 1 kitty window.

Emacs

You'll need to have the server running.

FAQ

Q. What if my laptop is asleep and it passes sunrise/sunset?

A. From what I've observed, my laptop has already switched, or does so immediately, after I directly wake it up.

appearancenotifier's People

Contributors

jesse-c avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.