~ivy-read -> completing-read for dx:themes/set-new-theme
completing-read for icomplete-mode but also because it allows others to use it, regardless of completion framework of choice
This commit is contained in:
@@ -37,25 +37,22 @@ Allow user to set a theme from a limited set of candidates, based on
|
|||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setq dx:themes/theme-list '(doom-solarized-dark
|
(setq dx:themes/theme-list '(doom-solarized-dark
|
||||||
doom-gruvbox doom-city-lights
|
doom-gruvbox doom-city-lights
|
||||||
doom-outrun-electric doom-vibrant doom-molokai
|
doom-outrun-electric doom-vibrant doom-molokai
|
||||||
doom-solarized-light doom-acario-light
|
doom-solarized-light doom-acario-light
|
||||||
base16-3024 base16-classic-dark base16-material-vivid))
|
base16-3024 base16-classic-dark base16-material-vivid))
|
||||||
|
|
||||||
(defun dx:themes/set-new-theme ()
|
(defun dx:themes/set-new-theme ()
|
||||||
"Set the theme from my own selection, mutate as you see fit"
|
"Set the theme from my own selection, mutate as you see fit"
|
||||||
(interactive)
|
(interactive)
|
||||||
(ivy-read "Select theme: "
|
(let ((theme (completing-read "Select theme: " dx:themes/theme-list)))
|
||||||
dx:themes/theme-list
|
(condition-case nil
|
||||||
:caller 'oreodave/set-new-theme
|
(progn
|
||||||
:action (lambda (x) ; Shamelessly copied from counsel in case of change
|
(mapc #'disable-theme custom-enabled-themes)
|
||||||
(condition-case nil
|
(load-theme (intern theme) t)
|
||||||
(progn
|
(when (fboundp 'powerline-reset)
|
||||||
(mapc #'disable-theme custom-enabled-themes)
|
(powerline-reset)))
|
||||||
(load-theme (intern x) t)
|
(error "Problem loading theme %s" theme))))
|
||||||
(when (fboundp 'powerline-reset)
|
|
||||||
(powerline-reset)))
|
|
||||||
(error "Problem loading theme %s" x)))))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Password store
|
* Password store
|
||||||
Function to get a password given a key.
|
Function to get a password given a key.
|
||||||
|
|||||||
Reference in New Issue
Block a user