ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Auto​Appearance

by navisidhu ST4 Linux

Sublime Text 4 plugin for Linux desktops that follow the xdg-desktop-portal appearance setting

Details

  • 1.0.2
  • github.​com
  • github.​com
  • 2 months ago
  • 33 minutes ago
  • 2 months ago

Installs

  • Total 21
  • Win 0
  • Mac 0
  • Linux 21
Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 2 2 1 3 0

Readme

Source
raw.​githubusercontent.​com

AutoAppearance

AutoAppearance is a Sublime Text 4 plugin for Linux desktops that follow the xdg-desktop-portal appearance setting. It runs busctl --user monitor in the background, detects portal SettingChanged signals, reads org.freedesktop.appearance color-scheme, and updates Sublime's theme and color_scheme preferences from Sublime's own light/dark settings.

The portal color-scheme values are:

  • 0: no preference
  • 1: prefer dark
  • 2: prefer light

Install

Place this folder in your Sublime Text Packages directory, for example:

~/.config/sublime-text/Packages/AutoAppearance

Then restart Sublime Text or run sublime_plugin.reload_plugin("auto_appearance") from the Sublime console.

For package-based testing, build and install a .sublime-package:

make build
make install

The installer copies dist/AutoAppearance.sublime-package into Sublime's Installed Packages directory. If your Sublime data directory lives somewhere custom, pass it explicitly:

make install SUBLIME_INSTALLED_PACKAGES_DIR="$HOME/.config/sublime-text/Installed Packages"

Configure

AutoAppearance reads these settings from Preferences.sublime-settings:

Error: language “jsonc” is not supported
{
  "light_theme": "Default.sublime-theme",
  "dark_theme": "Default Dark.sublime-theme",
  "light_color_scheme": "Celeste.sublime-color-scheme",
  "dark_color_scheme": "Mariana.sublime-color-scheme",
}

When the system switches appearance, AutoAppearance copies the matching light/dark values into Sublime's active theme and color_scheme settings.

Open Preferences: Package Settings > AutoAppearance > Settings, or edit AutoAppearance.sublime-settings directly for plugin behavior such as busctl lookup and how to handle the portal's no preference value.

If Sublime cannot find busctl when launched from your desktop environment, set:

Error: language “jsonc” is not supported
{
  "busctl_binary": "/usr/bin/busctl",
}

Commands

The command palette includes:

  • AutoAppearance: Sync Appearance Now
  • AutoAppearance: Restart busctl Monitor

Package Control displays the install instructions from messages/install.txt.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md before opening issues or pull requests.

License

AutoAppearance is released under the MIT License. See LICENSE.