* Suite of Color Themes for console
@ 2014-10-21 23:32 Tim Johnson
2014-10-22 0:10 ` Alexis
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Tim Johnson @ 2014-10-21 23:32 UTC (permalink / raw)
To: Emacs
I'm "breaking in" myself on emacs 24 running out of iTerm on Mac OS
X 10.7. I need to be able to switch color themes from dark to light
to blue to off-white (or something similar) depending on eyestrain
and ambient light in my environment.
I've downloaded a whole lot of color themes and have been
experimenting with them. In some cases I find "munged" colors when I
switch color schemes - and I'm guessing that is because when Theme B
follows theme A, Theme B may not have all of the same attributes set
as Theme A and thus "inherits" colors from Theme A. I don't really
care for that.
Example : fogus appears to have no settings for 'link and radiance
does, so when I switch from radiance to fogus, links show up with
the same background and foreground as radiance.
Has anyone a suite of color themes that they would be willing to
recommend or to share?
Alternatively can anyone recommend a remedy for my example?
thanks
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-21 23:32 Suite of Color Themes for console Tim Johnson
@ 2014-10-22 0:10 ` Alexis
2014-10-22 0:35 ` Tim Johnson
2014-10-22 0:10 ` John Mastro
2014-10-22 21:22 ` Tim Johnson
2 siblings, 1 reply; 11+ messages in thread
From: Alexis @ 2014-10-22 0:10 UTC (permalink / raw)
To: help-gnu-emacs
Tim Johnson writes:
> I've downloaded a whole lot of color themes and have been
> experimenting with them. In some cases I find "munged" colors when I
> switch color schemes - and I'm guessing that is because when Theme B
> follows theme A, Theme B may not have all of the same attributes set
> as Theme A and thus "inherits" colors from Theme A. I don't really
> care for that.
>
> Example : fogus appears to have no settings for 'link and radiance
> does, so when I switch from radiance to fogus, links show up with the
> same background and foreground as radiance.
Aiui, the theming system has been deliberately designed to allow theme
additivity, i.e. enabling theme A doesn't automatically disable theme B
by default. So if you want theme B to completely replace theme A, you
need to M-x disable-theme before enabling theme B.
Alexis.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-21 23:32 Suite of Color Themes for console Tim Johnson
2014-10-22 0:10 ` Alexis
@ 2014-10-22 0:10 ` John Mastro
2014-10-22 21:22 ` Tim Johnson
2 siblings, 0 replies; 11+ messages in thread
From: John Mastro @ 2014-10-22 0:10 UTC (permalink / raw)
To: Emacs; +Cc: tim
Tim Johnson <tim@akwebsoft.com> wrote:
> I've downloaded a whole lot of color themes and have been
> experimenting with them. In some cases I find "munged" colors when I
> switch color schemes - and I'm guessing that is because when Theme B
> follows theme A, Theme B may not have all of the same attributes set
> as Theme A and thus "inherits" colors from Theme A. I don't really
> care for that.
The issue is that the old themes are still enabled. You can disable a
theme with `M-x disable-theme'.
If you'd prefer it to happen automatically when you `load-theme' a new
one, you could do something like this (untested):
(defun disable-themes (&optional themes)
(interactive)
(mapc #'disable-theme (or themes custom-enabled-themes)))
(defadvice load-theme (before disable-first activate)
(disable-themes))
Actually, that disables the old theme before you've even selected a new
one, so it would probably be better to define your own `my-load-theme'
that disables the old theme(s) immediately before enabling the new one
but after you've selected it.
--
john
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-22 0:10 ` Alexis
@ 2014-10-22 0:35 ` Tim Johnson
2014-10-22 6:48 ` Alexis
2014-10-22 14:43 ` Jacob Gerlach
0 siblings, 2 replies; 11+ messages in thread
From: Tim Johnson @ 2014-10-22 0:35 UTC (permalink / raw)
To: help-gnu-emacs
* Alexis <flexibeast@gmail.com> [141021 16:22]:
>
> Tim Johnson writes:
>
> > I've downloaded a whole lot of color themes and have been
> > experimenting with them. In some cases I find "munged" colors when I
> > switch color schemes - and I'm guessing that is because when Theme B
> > follows theme A, Theme B may not have all of the same attributes set
> > as Theme A and thus "inherits" colors from Theme A. I don't really
> > care for that.
> >
> > Example : fogus appears to have no settings for 'link and radiance
> > does, so when I switch from radiance to fogus, links show up with the
> > same background and foreground as radiance.
>
> Aiui, the theming system has been deliberately designed to allow theme
> additivity, i.e. enabling theme A doesn't automatically disable theme B
> by default. So if you want theme B to completely replace theme A, you
> need to M-x disable-theme before enabling theme B.
Aha! so where I have
["Badger - Dark" (load-theme 'badger) :active t]
I could replace with
["Badger - Dark" (disable-previous-and-load-new-theme 'badger) :active t]
Where I have 'disable-previous-and-load-new-theme as a wrapper
that first disables ...
Am I correct?
Thanks for the reply and also thanks to John Mastro.
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-22 0:35 ` Tim Johnson
@ 2014-10-22 6:48 ` Alexis
2014-10-22 14:43 ` Jacob Gerlach
1 sibling, 0 replies; 11+ messages in thread
From: Alexis @ 2014-10-22 6:48 UTC (permalink / raw)
To: help-gnu-emacs
Tim Johnson writes:
> Aha! so where I have
> ["Badger - Dark" (load-theme 'badger) :active t]
>
> I could replace with
> ["Badger - Dark" (disable-previous-and-load-new-theme 'badger) :active t]
> Where I have 'disable-previous-and-load-new-theme as a wrapper
> that first disables ...
>
> Am I correct?
That sounds reasonable, yes .... But then, i don't use themes myself, so
perhaps take that with a grain of salt. :-)
Alexis.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-22 0:35 ` Tim Johnson
2014-10-22 6:48 ` Alexis
@ 2014-10-22 14:43 ` Jacob Gerlach
2014-10-22 14:54 ` Drew Adams
2014-10-23 23:42 ` Sharon Kimble
1 sibling, 2 replies; 11+ messages in thread
From: Jacob Gerlach @ 2014-10-22 14:43 UTC (permalink / raw)
To: help-gnu-emacs
I believe there is some important distinction between custom themes and
color themes (although I can't recall what it is). My setup is below
(collected from various sources like the wiki - I don't claim any credit).
I think this is the "wrapper" you're looking for.
(add-to-list 'custom-theme-load-path
(file-name-as-directory
"/home/jacob/.emacs.d/replace-colorthemes"))
;; Cycle through this set of themes
(setq my-themes '(robin-hood charcoal-black classic dark-blue desert))
(setq my-cur-theme nil)
(defun cycle-my-theme ()
"Cycle through a list of themes, my-themes"
(interactive)
(when my-cur-theme
(disable-theme my-cur-theme)
(setq my-themes (append my-themes (list my-cur-theme))))
(setq my-cur-theme (pop my-themes))
(load-theme my-cur-theme t))
;; Switch to the first theme in the list above
(cycle-my-theme)
(global-set-key (kbd "C-t") 'cycle-my-theme)
The first theme in "my-themes" will be loaded on startup, and you can bind
cycling (as I have to C-t) to make it quick and easy.
On Tue, Oct 21, 2014 at 8:35 PM, Tim Johnson <tim@akwebsoft.com> wrote:
> * Alexis <flexibeast@gmail.com> [141021 16:22]:
> >
> > Tim Johnson writes:
> >
> > > I've downloaded a whole lot of color themes and have been
> > > experimenting with them. In some cases I find "munged" colors when I
> > > switch color schemes - and I'm guessing that is because when Theme B
> > > follows theme A, Theme B may not have all of the same attributes set
> > > as Theme A and thus "inherits" colors from Theme A. I don't really
> > > care for that.
> > >
> > > Example : fogus appears to have no settings for 'link and radiance
> > > does, so when I switch from radiance to fogus, links show up with the
> > > same background and foreground as radiance.
> >
> > Aiui, the theming system has been deliberately designed to allow theme
> > additivity, i.e. enabling theme A doesn't automatically disable theme B
> > by default. So if you want theme B to completely replace theme A, you
> > need to M-x disable-theme before enabling theme B.
> Aha! so where I have
> ["Badger - Dark" (load-theme 'badger) :active t]
>
> I could replace with
> ["Badger - Dark" (disable-previous-and-load-new-theme 'badger) :active t]
> Where I have 'disable-previous-and-load-new-theme as a wrapper
> that first disables ...
>
> Am I correct?
>
> Thanks for the reply and also thanks to John Mastro.
> --
> Tim
> tim at tee jay forty nine dot com or akwebsoft dot com
> http://www.akwebsoft.com, http://www.tj49.com
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Suite of Color Themes for console
2014-10-22 14:43 ` Jacob Gerlach
@ 2014-10-22 14:54 ` Drew Adams
2014-10-23 23:42 ` Sharon Kimble
1 sibling, 0 replies; 11+ messages in thread
From: Drew Adams @ 2014-10-22 14:54 UTC (permalink / raw)
To: Jacob Gerlach, help-gnu-emacs
> I believe there is some important distinction between custom themes
> and color themes (although I can't recall what it is).
Yes, they are different. See this page:
http://www.emacswiki.org/ColorAndCustomThemes
> ;; Cycle through this set of themes ...
See this page for ways to cycle both custom themes and color themes:
http://www.emacswiki.org/ColorAndCustomThemes#ChooseByCycling
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-21 23:32 Suite of Color Themes for console Tim Johnson
2014-10-22 0:10 ` Alexis
2014-10-22 0:10 ` John Mastro
@ 2014-10-22 21:22 ` Tim Johnson
2 siblings, 0 replies; 11+ messages in thread
From: Tim Johnson @ 2014-10-22 21:22 UTC (permalink / raw)
To: Emacs
* Tim Johnson <tim@akwebsoft.com> [141021 15:33]:
> I'm "breaking in" myself on emacs 24 running out of iTerm on Mac OS
> X 10.7. I need to be able to switch color themes from dark to light
> to blue to off-white (or something similar) depending on eyestrain
> and ambient light in my environment.
>
> I've downloaded a whole lot of color themes and have been
> experimenting with them. In some cases I find "munged" colors when I
> switch color schemes - and I'm guessing that is because when Theme B
> follows theme A, Theme B may not have all of the same attributes set
> as Theme A and thus "inherits" colors from Theme A. I don't really
> care for that.
>
> Example : fogus appears to have no settings for 'link and radiance
> does, so when I switch from radiance to fogus, links show up with
> the same background and foreground as radiance.
>
> Has anyone a suite of color themes that they would be willing to
> recommend or to share?
>
> Alternatively can anyone recommend a remedy for my example?
I sure appreciate the replies that I got on this topic. Emacs is
just like a box of chocolates!
The following code works for me as a solution (so far) :
;; set up a variable and initialize it
(defvar tj-current-theme 'better-tango-dark "Current Color Theme")
;; Install the default scheme
(load-theme tj-current-theme t)
;; Function to first disable current theme, then create
;; and install a new one
(defun tj-load-theme (new-theme)
"Disable existing themes before loading new theme"
(interactive)
(disable-theme tj-current-theme)
(setq tj-current-theme new-theme)
(load-theme tj-current-theme))
;; Example menu
(easy-menu-add-item ;; console
nil nil
(easy-menu-create-menu
"Colors"
'(["1) Blue - Blackboard" (tj-load-theme 'blackboard) :active t]
["2) Dark - Better Tango" (tj-load-theme 'better-tango-dark) :active t]
["3) Dark - Junio" (tj-load-theme 'junio) :active t]
["4) Dark - Tango" (tj-load-theme 'better-tango-dark) :active t]
["5) Light - Github" (tj-load-theme 'github) :active t]
["6) Light - Professional" (tj-load-theme 'professional) :active t]
["7) Light - Snowish" (tj-load-theme 'snowish) :active t]
["8) Light - Tango" (tj-load-theme 'tango) :active t]
["9) Medium Blue - Resolve" (tj-load-theme 'resolve) :active t]
))))
thanks and best wishes
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-22 14:43 ` Jacob Gerlach
2014-10-22 14:54 ` Drew Adams
@ 2014-10-23 23:42 ` Sharon Kimble
2014-10-24 14:57 ` Jacob Gerlach
2014-10-24 15:43 ` Tim Johnson
1 sibling, 2 replies; 11+ messages in thread
From: Sharon Kimble @ 2014-10-23 23:42 UTC (permalink / raw)
To: Jacob Gerlach; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 3797 bytes --]
Jacob Gerlach <jacobgerlach@gmail.com> writes:
> I believe there is some important distinction between custom themes and
> color themes (although I can't recall what it is). My setup is below
> (collected from various sources like the wiki - I don't claim any credit).
> I think this is the "wrapper" you're looking for.
>
> (add-to-list 'custom-theme-load-path
> (file-name-as-directory
> "/home/jacob/.emacs.d/replace-colorthemes"))
>
> ;; Cycle through this set of themes
> (setq my-themes '(robin-hood charcoal-black classic dark-blue desert))
>
> (setq my-cur-theme nil)
> (defun cycle-my-theme ()
> "Cycle through a list of themes, my-themes"
> (interactive)
> (when my-cur-theme
> (disable-theme my-cur-theme)
> (setq my-themes (append my-themes (list my-cur-theme))))
> (setq my-cur-theme (pop my-themes))
> (load-theme my-cur-theme t))
>
> ;; Switch to the first theme in the list above
> (cycle-my-theme)
> (global-set-key (kbd "C-t") 'cycle-my-theme)
>
> The first theme in "my-themes" will be loaded on startup, and you can bind
> cycling (as I have to C-t) to make it quick and easy.
Thanks for this Jacob, it is very useful. But I do wonder if it could be
"tweaked" such that it displays the name of the theme in that black bar
at the top of emacs just before it gets onto the system-bar of the
desktop? Also, I've got a lot of themes from ELPA, which on this box is
at "/home/boudiccas/.emacs.d/elpa" which I would dearly love to use,
like this, and it works!
--8<---------------cut here---------------start------------->8---
(add-to-list 'custom-theme-load-path
(file-name-as-directory
"/home/boudiccas/git/replace-colorthemes"))
(add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/themes")
(add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/elpa")
--8<---------------cut here---------------end--------------->8---
Any ideas please?
Thanks
Sharon.
> On Tue, Oct 21, 2014 at 8:35 PM, Tim Johnson <tim@akwebsoft.com> wrote:
>
>> * Alexis <flexibeast@gmail.com> [141021 16:22]:
>> >
>> > Tim Johnson writes:
>> >
>> > > I've downloaded a whole lot of color themes and have been
>> > > experimenting with them. In some cases I find "munged" colors when I
>> > > switch color schemes - and I'm guessing that is because when Theme B
>> > > follows theme A, Theme B may not have all of the same attributes set
>> > > as Theme A and thus "inherits" colors from Theme A. I don't really
>> > > care for that.
>> > >
>> > > Example : fogus appears to have no settings for 'link and radiance
>> > > does, so when I switch from radiance to fogus, links show up with the
>> > > same background and foreground as radiance.
>> >
>> > Aiui, the theming system has been deliberately designed to allow theme
>> > additivity, i.e. enabling theme A doesn't automatically disable theme B
>> > by default. So if you want theme B to completely replace theme A, you
>> > need to M-x disable-theme before enabling theme B.
>> Aha! so where I have
>> ["Badger - Dark" (load-theme 'badger) :active t]
>>
>> I could replace with
>> ["Badger - Dark" (disable-previous-and-load-new-theme 'badger) :active t]
>> Where I have 'disable-previous-and-load-new-theme as a wrapper
>> that first disables ...
>>
>> Am I correct?
>>
>> Thanks for the reply and also thanks to John Mastro.
>> --
>> Tim
>> tim at tee jay forty nine dot com or akwebsoft dot com
>> http://www.akwebsoft.com, http://www.tj49.com
>>
>>
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.4.1.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-23 23:42 ` Sharon Kimble
@ 2014-10-24 14:57 ` Jacob Gerlach
2014-10-24 15:43 ` Tim Johnson
1 sibling, 0 replies; 11+ messages in thread
From: Jacob Gerlach @ 2014-10-24 14:57 UTC (permalink / raw)
To: Sharon Kimble; +Cc: help-gnu-emacs
>
> Thanks for this Jacob, it is very useful. But I do wonder if it could be
> "tweaked" such that it displays the name of the theme in that black bar
> at the top of emacs just before it gets onto the system-bar of the
> desktop?
I wouldn't know where to begin on this, and I'm not even sure which bar
you're talking about. The last bar I have before the system bar is the menu
bar (which for me isn't black). I've never played with menus, but perhaps
it's feasible to create a dummy menu which displays the theme name. You
could also probably define a minor mode that displays your theme name in
the mode line
<https://www.gnu.org/software/emacs/manual/html_node/emacs/Mode-Line.html>.
> Also, I've got a lot of themes from ELPA, which on this box is
> at "/home/boudiccas/.emacs.d/elpa" which I would dearly love to use,
> like this, and it works!
>
> --8<---------------cut here---------------start------------->8---
> (add-to-list 'custom-theme-load-path
> (file-name-as-directory
> "/home/boudiccas/git/replace-colorthemes"))
> (add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/themes")
> (add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/elpa")
> --8<---------------cut here---------------end--------------->8---
>
My setup doesn't pick up the themes automatically from the custom theme
load path - you have to add each theme to the variable my-themes.
;; Cycle through this set of themes
(setq my-themes '(robin-hood charcoal-black classic dark-blue desert))
I'm sure there's a way to generate this list automatically by parsing the
folders in custom-theme-load-path.
>
>
> Any ideas please?
>
> Thanks
> Sharon.
>
Cheers,
Jake
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Suite of Color Themes for console
2014-10-23 23:42 ` Sharon Kimble
2014-10-24 14:57 ` Jacob Gerlach
@ 2014-10-24 15:43 ` Tim Johnson
1 sibling, 0 replies; 11+ messages in thread
From: Tim Johnson @ 2014-10-24 15:43 UTC (permalink / raw)
To: help-gnu-emacs
* Sharon Kimble <boudiccas@skimble.plus.com> [141023 15:43]:
> Jacob Gerlach <jacobgerlach@gmail.com> writes:
>
> > I believe there is some important distinction between custom themes and
> > color themes (although I can't recall what it is). My setup is below
> > (collected from various sources like the wiki - I don't claim any credit).
> > I think this is the "wrapper" you're looking for.
> >
> > (add-to-list 'custom-theme-load-path
> > (file-name-as-directory
> > "/home/jacob/.emacs.d/replace-colorthemes"))
> >
> > ;; Cycle through this set of themes
> > (setq my-themes '(robin-hood charcoal-black classic dark-blue desert))
> >
> > (setq my-cur-theme nil)
> > (defun cycle-my-theme ()
> > "Cycle through a list of themes, my-themes"
> > (interactive)
> > (when my-cur-theme
> > (disable-theme my-cur-theme)
> > (setq my-themes (append my-themes (list my-cur-theme))))
> > (setq my-cur-theme (pop my-themes))
> > (load-theme my-cur-theme t))
> >
> > ;; Switch to the first theme in the list above
> > (cycle-my-theme)
> > (global-set-key (kbd "C-t") 'cycle-my-theme)
> >
> > The first theme in "my-themes" will be loaded on startup, and you can bind
> > cycling (as I have to C-t) to make it quick and easy.
>
> Thanks for this Jacob, it is very useful. But I do wonder if it could be
> "tweaked" such that it displays the name of the theme in that black bar
> at the top of emacs just before it gets onto the system-bar of the
> desktop? Also, I've got a lot of themes from ELPA, which on this box is
> at "/home/boudiccas/.emacs.d/elpa" which I would dearly love to use,
> like this, and it works!
>
> --8<---------------cut here---------------start------------->8---
> (add-to-list 'custom-theme-load-path
> (file-name-as-directory
> "/home/boudiccas/git/replace-colorthemes"))
> (add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/themes")
> (add-to-list 'custom-theme-load-path "/home/boudiccas/.emacs.d/elpa")
> --8<---------------cut here---------------end--------------->8---
>
>
> Any ideas please?
>
> Thanks
> Sharon.
What I would do (bearing in mind my limited knowledge of emacs and
the fact that I prefer console mode) is have a variable that
keeps track of the current theme - in my coded solution that
would be 'tj-current-theme and include that variable in
mode-line-format. That should be easy but also redundant as it
would appear in every window.
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-10-24 15:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 23:32 Suite of Color Themes for console Tim Johnson
2014-10-22 0:10 ` Alexis
2014-10-22 0:35 ` Tim Johnson
2014-10-22 6:48 ` Alexis
2014-10-22 14:43 ` Jacob Gerlach
2014-10-22 14:54 ` Drew Adams
2014-10-23 23:42 ` Sharon Kimble
2014-10-24 14:57 ` Jacob Gerlach
2014-10-24 15:43 ` Tim Johnson
2014-10-22 0:10 ` John Mastro
2014-10-22 21:22 ` Tim Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).