Skip to content

splintersuidman/cosmic-theme-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cosmic-theme-watcher

Change Emacs’ theme based on the theme mode (light or dark) of Cosmic Desktop. This package watches Cosmic’s theme mode option, and accordingly switches the Emacs theme to a user-specified light or dark theme.

Usage

First, one should install the package from source. Then, one can configure the package using use-package like so (in this example, using the Modus themes):

(use-package cosmic-theme-watcher
  :custom
  (cosmic-theme-watcher-light-theme 'modus-operandi)
  (cosmic-theme-watcher-dark-theme 'modus-vivendi)
  :config
  (cosmic-theme-watcher-mode))

Configuration

The cosmic-theme-watcher-light-theme and cosmic-theme-watcher-dark-theme variables should be set to themes associated to light and dark mode, respectively. The themes will be loaded using the function configured in cosmic-theme-watcher-load-theme-function, which defaults to (lambda (theme) (load-theme theme t)). The variable cosmic-theme-watcher-theme-mode-file should point to the is_dark file storing Cosmic’s theme mode configuration value; by default, it is ~/.config/cosmic/com.system76.CosmicTheme.Mode/v1/is_dark.

About

Make Emacs follows the Cosmic theme mode

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published