-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change colorscheme
of all active Micro instances from outside of Micro
#2509
Comments
@zyedidia Does it sound like a reasonable feature? I could contribute it. |
I found there's another way to get automatic dark/light mode. Some of the colorschemes, like |
I think we shouldn't have code that tries to read the system default for light/dark mode, but there are non 256-color colorschemes (like cmc-16 or simple) that just use the 16 colors from the terminal palette that should be able to serve this purpose well. |
By the way, you can modify the colorscheme of all instances by modifying the settings in |
Cool! Looks like |
I have this in my if command -v micro >/dev/null 2>&1; then
if [ "$(uname)" = Darwin ]; then
# automatically set light/dark theme on macOS
alias micro="micro -colorscheme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo monokai || echo bubblegum)"
fi
fi |
Description of the problem or steps to reproduce
I'd like to be able to make Micro dynamically react to OS-wide dark theme setting. To do this, I'd like to be able to change a colorscheme of a running Micro instance from outside
I wanted to write a Python script which runs in the background all the time and listens for OS theme changes. When such change occurs, the script would do something like:
But the above commands do the different thing than I expected – they launch a new
micro
instance with changedcolorscheme
, and not modify thecolorscheme
of all running micro instances.So, how can I achieve that auto-theme-changing behavior?
Specifications
OS: macOS 12.4
Terminal: iTerm 2 v3.4.16
The text was updated successfully, but these errors were encountered: