AutoDarkLinux
Fix auto dark mode for sublime on Linux :sunglasses:
Details
Installs
- Total 238
- Win 0
- Mac 0
- Linux 238
| Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 | 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 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
autodark-sublime-plugin
Fix auto dark mode for sublime v4 on Linux. Sublime text 4 supposedly has such a feature, but it seems to not be working for me. If you also experience the same, this plugin bridges that gap and provides an adequate solution until the problem is fixed.
Dependencies:
- Sublime text (build 4050+)
- Systemd (for
busctlcommand) - A desktop environment or a DBus service which implements
org.freedesktop.portal.Settings. The major DE's provide this already
Installation:
- Install Package Control
- Search for
Auto Darkand install
Configuration/Usage:
- Edit your preferences and configure the following keys:
dark_color_schemelight_color_schemedark_themelight_theme
- Either from the context menu (under View), or from the command pallet (search for AutoDark)
System: Sublime follows the system settingsLight: Sublime sticks to only light modeDark: Sublime sticks to only dark mode
- Any option selected is set as the default and will be remembered
FAQ
Q: Switching to system mode does not automatically infer my preferred colorscheme
A: This might be caused when you have two competing xdg-desktop-portal implementations installed on your system. e.g.
kdeandgtk, butgtkwins because its name comes first alphabetically.:shrug:You can check the
/usr/share/xdg-desktop-portal/portals/folder to see which portals are installed. e.g.kde.portal,gkt.portal, etc. Once you determine which implementation you want to use (this would most likely be determined by your current desktop), create a file called~/.config/xdg-desktop-portal/portals.conf(see portals.conf manpage), and add the following to it:[preferred] default=enter-your-choice-here-without.portal-suffix
Restart xdg-desktop-portal service using
systemctl restart --user xdg-desktop-service, or logout and log back in to see the new changes.This should hopefully fix the issue with automatically switching modes.
Development
These are just reminders for myself, but feel free to follow along if you need to start developing packages
Clone this project into the folder
~/.config/sublime-text-3/Packages/AutoDarkLinux. If you already cloned the project elsewhere, just symlink it inside the above folder using the command:ln --symbolic --target-directory ~/.config/sublime-text-3/Packages/ /path/to/autodark-sublime-plugin/ mv ~/.config/sublime-text-3/Packages/{autodark-sublime-plugin,AutoDarkLinux}
See link for more info.
Note: The reason for using the name AutoDarkLinux is because that's the name this plugin was published under. It's also the name you have to use if you want to import other modules from within this package during development and at runtime.
(Optional) Install the virtualenv using
pipenv install --dev. This is useful for auto completion during developmentRestart sublime to make sure the plugin is loaded. Enable viewing of commands and logs from the console. Open console with
Ctrl + `and type the following commands:sublime.log_commands(True) sublime.log_input(True)
Start developing :hammer: (see docs, especially api_ref, and this one)
Enable
INFOlogging to see more logs in the consoleCommit changes
Release a new version using the
scripts/release.shscriptRemove the symlinked dev package from the sublime folder