All Projects → toroidal-code → cycle-themes.el

toroidal-code / cycle-themes.el

Licence: other
Because switching between your themes shouldn't be so damn hard

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to cycle-themes.el

Blossom
A free open-source design framework for the modern web
Stars: ✭ 26 (+4%)
Mutual labels:  theming
Interfacss
The CSS-inspired styling and layout framework for iOS
Stars: ✭ 92 (+268%)
Mutual labels:  theming
React Native Extended Stylesheet
Extended StyleSheets for React Native
Stars: ✭ 2,732 (+10828%)
Mutual labels:  theming
Styled Theming
Create themes for your app using styled-components
Stars: ✭ 1,067 (+4168%)
Mutual labels:  theming
Create Mui Theme
online tool for creating material-ui themes
Stars: ✭ 80 (+220%)
Mutual labels:  theming
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+7368%)
Mutual labels:  theming
Themekit
macOS theming library
Stars: ✭ 836 (+3244%)
Mutual labels:  theming
flavours
🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
Stars: ✭ 331 (+1224%)
Mutual labels:  theming
Theme Builder
The theming system helps you in building a theme of your choice and apply it to test live. Why wait? Just give it a try.
Stars: ✭ 82 (+228%)
Mutual labels:  theming
Automathemely
Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
Stars: ✭ 169 (+576%)
Mutual labels:  theming
Theming Demo
https://codesandbox.io/s/github/juliaqiuxy/theming-demo/tree/master/?from-embed
Stars: ✭ 59 (+136%)
Mutual labels:  theming
Favicon Switcher
Make favicon react on media queries
Stars: ✭ 76 (+204%)
Mutual labels:  theming
Storybook Addon
Develop themable components with Emotion/Styled Components/Material-UI with help of Storybook & React Theming
Stars: ✭ 122 (+388%)
Mutual labels:  theming
Kawaiify
OSX theming script, WIP
Stars: ✭ 20 (-20%)
Mutual labels:  theming
ndaify-web
NDAify helps you keep your trade secrets under wraps 🔒
Stars: ✭ 33 (+32%)
Mutual labels:  theming
React Styling Hoc
Механизм темизации для React-компонентов, написанных с использованием CSS модулей.
Stars: ✭ 25 (+0%)
Mutual labels:  theming
Gtk Theming Guide
Novice guide towards making your own first gtk theme!
Stars: ✭ 95 (+280%)
Mutual labels:  theming
ui patterns
[NOTE] Development has moved to https://drupal.org/project/ui_patterns
Stars: ✭ 87 (+248%)
Mutual labels:  theming
NumericUpDownLib
Implements numeric up down WPF controls to edit/display values (byte, integer, short, ushort etc.) with a textbox and optional up/down arrow (repeat) buttons. Value editing is possible by dragging the mouse vertically/horizontally, clicking up/down buttons, using up/down or left right cursor keys, spinning mousewheel on mouseover, or editing th…
Stars: ✭ 68 (+172%)
Mutual labels:  theming
Zathura Pywal
🎨📖 A script that dynamically generates a zathura colorscheme based on the current wal colors.
Stars: ✭ 147 (+488%)
Mutual labels:  theming

cycle-themes.el

Because switching between your themes shouldn't be so damn hard

How it works

Define a list of themes you want to be able to switch between. Then, enable the global minor mode. If you don't list any themes, we default to switching between all the ones emacs knows about.

(setq cycle-themes-theme-list
      '(leuven monokai solarized-dark))

(require 'cycle-themes)
(cycle-themes-mode)

That's it! Now, you can switch between your themes by calling M-x cycle-themes, or with the (easily re-definable) binding of C-c C-t.

If you use use-package, it'll look something like this:

(use-package cycle-themes
  :ensure t
  :init (setq cycle-themes-theme-list
          '(leuven monokai solarized-dark))
  :config (cycle-themes-mode))

Hooks

Additionally, there is a custom variable for attaching your own hooks to be run after switching themes. For example, I don't like having my fringes be a different color than the background, so I simply use this:

(add-hook 'cycle-themes-after-cycle-hook
          #'(lambda ()
              (dolist (frame (frame-list))
                (set-face-attribute 'fringe frame 
                   :background (face-background 'default)))))

If you add any hooks and call cycle-themes-mode anywhere in your init file, it will automatically enable the first theme in the list and run all of your hooks.

Caveats

If you find that it's skipping themes in your list, make sure that all of your themes are installed and loaded properly. This is especially important for users of use-package, as it will require the theme, but not actually load it into emacs' list of valid themes (which makes (custom-theme-p my-theme) return nil).

(use-package solarized-theme
  :ensure t
  :config (progn (load-theme 'solarized-dark t t)
                 (load-theme 'solarized-light t t)))

Thanks

This package was inspired by a stackoverflow answer. I thought that snippet was great, and that it really deserved to be made into a true package. So I did.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].