* night-mode?
@ 2020-11-20 21:25 Stefan Monnier
2020-11-21 2:36 ` night-mode? Pankaj Jangid
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Stefan Monnier @ 2020-11-20 21:25 UTC (permalink / raw)
To: emacs-devel
Based on previous discussions, I think we should add some way to toggle
the dark/light mode. I'm not completely sure what the interface should
look like, nor what'd be the better implementation, but see the patch
below for a first cut to add a `night-mode` command, which does
basically the "inverse video" by swapping the foreground and the
background of the default face (and then resetting the background-mode
accordingly, of course).
Stefan
Along the way I saw a few other issues:
- `frame-set-background-mode` currently doesn't use `color-dark-p`, and
the code it uses for that uses a different algorithm, AFAICT.
- The only current use of `color-dark-p`, as well as the potential new
use of it in `frame-set-background-mode` both have an RGB in form
[0,65535] and need to scale it to p0,1] before calling `color-dark-p`,
so maybe `color-dark-p` should be changed to accept colors using the
[0,65535] scale.
diff --git a/lisp/faces.el b/lisp/faces.el
index 7355e1dd0a..a417979547 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1798,6 +1798,9 @@ color-luminance-dark-limit
This value was determined experimentally.")
(defun color-dark-p (rgb)
+ ;; FIXME: The only 2 uses of this function I can find both need to
+ ;; (mapcar (lambda (c) (/ c 65535.0)) because they have RGB on
+ ;; [0,65535] instead of [0,1]!
"Whether RGB is more readable against white than black.
RGB is a 3-element list (R G B), each component in the range [0,1].
This predicate can be used both for determining a suitable (black or white)
diff --git a/lisp/frame.el b/lisp/frame.el
index 772ba3d8c4..57ffb8bee9 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1159,8 +1159,8 @@ frame-background-mode
:group 'faces
:set #'(lambda (var value)
(set-default var value)
- (mapc 'frame-set-background-mode (frame-list)))
- :initialize 'custom-initialize-changed
+ (mapc #'frame-set-background-mode (frame-list)))
+ :initialize #'custom-initialize-changed
:type '(choice (const dark)
(const light)
(const :tag "automatic" nil)))
@@ -1173,6 +1173,27 @@ frame-background-mode
(defvar inhibit-frame-set-background-mode nil)
+(defun frame--current-backround-mode (frame)
+ (let* ((frame-default-bg-mode (frame-terminal-default-bg-mode frame))
+ (bg-color (frame-parameter frame 'background-color))
+ (tty-type (tty-type frame))
+ (default-bg-mode
+ (if (or (window-system frame)
+ (and tty-type
+ (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
+ tty-type)))
+ 'light
+ 'dark)))
+ (cond (frame-default-bg-mode)
+ ((equal bg-color "unspecified-fg") ; inverted colors
+ (if (eq default-bg-mode 'light) 'dark 'light))
+ ((not (color-values bg-color frame))
+ default-bg-mode)
+ ((color-dark-p (mapcar (lambda (c) (/ c 65535.0))
+ (color-values bg-color frame)))
+ 'dark)
+ (t 'light))))
+
(defun frame-set-background-mode (frame &optional keep-face-specs)
"Set up display-dependent faces on FRAME.
Display-dependent faces are those which have different definitions
@@ -1181,30 +1202,8 @@ frame-set-background-mode
If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate
face specs for the new background mode."
(unless inhibit-frame-set-background-mode
- (let* ((frame-default-bg-mode (frame-terminal-default-bg-mode frame))
- (bg-color (frame-parameter frame 'background-color))
- (tty-type (tty-type frame))
- (default-bg-mode
- (if (or (window-system frame)
- (and tty-type
- (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
- tty-type)))
- 'light
- 'dark))
- (non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
- (bg-mode
- (cond (frame-default-bg-mode)
- ((equal bg-color "unspecified-fg") ; inverted colors
- non-default-bg-mode)
- ((not (color-values bg-color frame))
- default-bg-mode)
- ((>= (apply '+ (color-values bg-color frame))
- ;; Just looking at the screen, colors whose
- ;; values add up to .6 of the white total
- ;; still look dark to me.
- (* (apply '+ (color-values "white" frame)) .6))
- 'light)
- (t 'dark)))
+ (let* ((bg-mode
+ (frame--current-backround-mode frame))
(display-type
(cond ((null (window-system frame))
(if (tty-display-color-p frame) 'color 'mono))
@@ -1270,6 +1269,18 @@ frame-terminal-default-bg-mode
(intern (downcase bg-resource))))
(terminal-parameter frame 'background-mode)))
+(define-minor-mode night-mode
+ "Use light text on dark background."
+ :global t
+ ;; FIXME: The code below is partly per-frame and partly all-frames :-(
+ (when (eq night-mode
+ (eq 'light (frame--current-backround-mode (selected-frame))))
+ ;; FIXME: Change the face's SPEC instead?
+ (set-face-attribute 'default nil
+ :foreground (face-attribute 'default :background)
+ :background (face-attribute 'default :foreground))
+ (frame-set-background-mode (selected-frame))))
+
\f
;;;; Frame configurations
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-20 21:25 night-mode? Stefan Monnier
@ 2020-11-21 2:36 ` Pankaj Jangid
2020-11-21 5:00 ` Modus themes toggle (was: night-mode?) Protesilaos Stavrou
2020-11-21 19:21 ` night-mode? Juri Linkov
[not found] ` <87r1onmjpx.fsf@gmail.com>
2 siblings, 1 reply; 20+ messages in thread
From: Pankaj Jangid @ 2020-11-21 2:36 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Based on previous discussions, I think we should add some way to toggle
> the dark/light mode. I'm not completely sure what the interface should
> look like, nor what'd be the better implementation, but see the patch
> below for a first cut to add a `night-mode` command, which does
> basically the "inverse video" by swapping the foreground and the
> background of the default face (and then resetting the background-mode
> accordingly, of course).
Your's is a more generic solution I guess. But after inclusion of
`modus-themes', I just use this snippet,
(defun modus-theme-toggle ()
"Toggle between modus-operandi and modus-vivendi themes."
(interactive)
(if (member 'modus-operandi custom-enabled-themes)
(progn
(disable-theme 'modus-operandi)
(load-theme 'modus-vivendi t))
(disable-theme 'modus-vivendi)
(load-theme 'modus-operandi t)))
^ permalink raw reply [flat|nested] 20+ messages in thread
* Modus themes toggle (was: night-mode?)
2020-11-21 2:36 ` night-mode? Pankaj Jangid
@ 2020-11-21 5:00 ` Protesilaos Stavrou
2020-11-21 7:22 ` Modus themes toggle Pankaj Jangid
0 siblings, 1 reply; 20+ messages in thread
From: Protesilaos Stavrou @ 2020-11-21 5:00 UTC (permalink / raw)
To: Pankaj Jangid; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
On 2020-11-21, 08:06 +0530, Pankaj Jangid <pankaj@codeisgreat.org> wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Based on previous discussions, I think we should add some way to toggle
>> the dark/light mode. I'm not completely sure what the interface should
>> look like, nor what'd be the better implementation, but see the patch
>> below for a first cut to add a `night-mode` command, which does
>> basically the "inverse video" by swapping the foreground and the
>> background of the default face (and then resetting the background-mode
>> accordingly, of course).
>
> Your's is a more generic solution I guess. But after inclusion of
> `modus-themes', I just use this snippet,
>
> (defun modus-theme-toggle ()
> "Toggle between modus-operandi and modus-vivendi themes."
> (interactive)
> (if (member 'modus-operandi custom-enabled-themes)
> (progn
> (disable-theme 'modus-operandi)
> (load-theme 'modus-vivendi t))
> (disable-theme 'modus-vivendi)
> (load-theme 'modus-operandi t)))
Just to note that I am in the process of refactoring aspects of the
Modus themes. There will be a toggle command on offer. Please find the
current version of it attached (note that I may still change things).
--
Protesilaos Stavrou
protesilaos.com
[-- Attachment #2: modus-themes-toggle-tentative.el --]
[-- Type: text/plain, Size: 1345 bytes --]
(defvar modus-themes-after-load-theme-hook nil
"Hook that runs after the `modus-themes-toggle' routines.")
(defun modus-themes--light ()
"Load `modus-operandi' and disable `modus-vivendi'."
(disable-theme 'modus-vivendi)
(load-theme 'modus-operandi)
(run-hooks 'modus-themes-after-load-theme-hook))
(defun modus-themes--dark ()
"Load `modus-vivendi' and disable `modus-operandi'."
(disable-theme 'modus-operandi)
(load-theme 'modus-vivendi)
(run-hooks 'modus-themes-after-load-theme-hook))
(defun modus-themes--load-prompt ()
"Helper for `modus-themes-toggle'."
(let ((theme
(intern
(completing-read "Load Modus theme (will disable all others): "
'(modus-operandi modus-vivendi) nil t))))
(mapc #'disable-theme custom-enabled-themes)
(pcase theme
('modus-operandi (modus-themes--light))
('modus-vivendi (modus-themes--dark)))))
;;;###autoload
(defun modus-themes-toggle ()
"Toggle between `modus-operandi' and `modus-vivendi' themes.
Also runs `modus-themes-after-load-theme-hook' by virtue of
calling the internal `modus-themes--light' and
`modus-themes--dark' functions."
(interactive)
(pcase (car custom-enabled-themes)
('modus-operandi (modus-themes--dark))
('modus-vivendi (modus-themes--light))
(_ (modus-themes--load-prompt))))
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-20 21:25 night-mode? Stefan Monnier
2020-11-21 2:36 ` night-mode? Pankaj Jangid
@ 2020-11-21 19:21 ` Juri Linkov
2020-11-21 21:20 ` night-mode? Stefan Monnier
[not found] ` <87r1onmjpx.fsf@gmail.com>
2 siblings, 1 reply; 20+ messages in thread
From: Juri Linkov @ 2020-11-21 19:21 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> Based on previous discussions, I think we should add some way to toggle
> the dark/light mode. I'm not completely sure what the interface should
> look like, nor what'd be the better implementation, but see the patch
> below for a first cut to add a `night-mode` command, which does
> basically the "inverse video" by swapping the foreground and the
> background of the default face (and then resetting the background-mode
> accordingly, of course).
I've tested it with `emacs -rv`, and the effect of `night-mode`
is the same as `--reverse-video'. But a minor problem is that
after starting Emacs with `-rv`, the first invocation of `night-mode`
has no effect.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-21 19:21 ` night-mode? Juri Linkov
@ 2020-11-21 21:20 ` Stefan Monnier
2020-11-22 8:40 ` night-mode? Juri Linkov
0 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2020-11-21 21:20 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
> I've tested it with `emacs -rv`, and the effect of `night-mode`
> is the same as `--reverse-video'. But a minor problem is that
> after starting Emacs with `-rv`, the first invocation of `night-mode`
> has no effect.
The initial-value of `night-mode` is arbitrarily set to nil, which is
bound to be wrong half the times, yes.
That's one of the problems in the current code.
Patches welcome,
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-21 21:20 ` night-mode? Stefan Monnier
@ 2020-11-22 8:40 ` Juri Linkov
2020-11-22 15:09 ` night-mode? Stefan Monnier
2020-11-22 15:16 ` night-mode? Eli Zaretskii
0 siblings, 2 replies; 20+ messages in thread
From: Juri Linkov @ 2020-11-22 8:40 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
>> I've tested it with `emacs -rv`, and the effect of `night-mode`
>> is the same as `--reverse-video'. But a minor problem is that
>> after starting Emacs with `-rv`, the first invocation of `night-mode`
>> has no effect.
>
> The initial-value of `night-mode` is arbitrarily set to nil, which is
> bound to be wrong half the times, yes.
>
> That's one of the problems in the current code.
> Patches welcome,
Maybe something like this:
diff --git a/lisp/startup.el b/lisp/startup.el
index 9f67dfde12..71d640701b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -834,6 +834,7 @@ tty-handle-args
argval)))
default-frame-alist))
((member argi '("-r" "-rv" "-reverse"))
+ (setq night-mode t)
(push '(reverse . t)
default-frame-alist))
((equal argi "-color")
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 8:40 ` night-mode? Juri Linkov
@ 2020-11-22 15:09 ` Stefan Monnier
2020-11-22 15:16 ` night-mode? Eli Zaretskii
1 sibling, 0 replies; 20+ messages in thread
From: Stefan Monnier @ 2020-11-22 15:09 UTC (permalink / raw)
To: Juri Linkov; +Cc: emacs-devel
> ((member argi '("-r" "-rv" "-reverse"))
> + (setq night-mode t)
I think this will still do the wrong thing if your background color was
originally dark.
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 8:40 ` night-mode? Juri Linkov
2020-11-22 15:09 ` night-mode? Stefan Monnier
@ 2020-11-22 15:16 ` Eli Zaretskii
2020-11-22 16:09 ` night-mode? Jean Louis
2020-11-22 16:38 ` night-mode? Arthur Miller
1 sibling, 2 replies; 20+ messages in thread
From: Eli Zaretskii @ 2020-11-22 15:16 UTC (permalink / raw)
To: Juri Linkov; +Cc: monnier, emacs-devel
> From: Juri Linkov <juri@linkov.net>
> Date: Sun, 22 Nov 2020 10:40:19 +0200
> Cc: emacs-devel@gnu.org
>
> diff --git a/lisp/startup.el b/lisp/startup.el
> index 9f67dfde12..71d640701b 100644
> --- a/lisp/startup.el
> +++ b/lisp/startup.el
> @@ -834,6 +834,7 @@ tty-handle-args
> argval)))
> default-frame-alist))
> ((member argi '("-r" "-rv" "-reverse"))
> + (setq night-mode t)
> (push '(reverse . t)
> default-frame-alist))
> ((equal argi "-color")
I don't see why we should consider -rv be the sign of "night". Many
people use dark backgrounds for reasons that have nothing to do with
the time of day, and -rv is not such a sign, either.
I think we should ask users who'd want to have a special theme for the
night and that routinely use the dark-background colors what would
they like to see by night. It isn't enough just to invert the colors,
IMO.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 15:16 ` night-mode? Eli Zaretskii
@ 2020-11-22 16:09 ` Jean Louis
2020-11-22 19:55 ` night-mode? Stefan Monnier
2020-11-22 16:38 ` night-mode? Arthur Miller
1 sibling, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-22 16:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, monnier, Juri Linkov
* Eli Zaretskii <eliz@gnu.org> [2020-11-22 18:17]:
> > From: Juri Linkov <juri@linkov.net>
> > Date: Sun, 22 Nov 2020 10:40:19 +0200
> > Cc: emacs-devel@gnu.org
> >
> > diff --git a/lisp/startup.el b/lisp/startup.el
> > index 9f67dfde12..71d640701b 100644
> > --- a/lisp/startup.el
> > +++ b/lisp/startup.el
> > @@ -834,6 +834,7 @@ tty-handle-args
> > argval)))
> > default-frame-alist))
> > ((member argi '("-r" "-rv" "-reverse"))
> > + (setq night-mode t)
> > (push '(reverse . t)
> > default-frame-alist))
> > ((equal argi "-color")
>
> I don't see why we should consider -rv be the sign of "night". Many
> people use dark backgrounds for reasons that have nothing to do with
> the time of day, and -rv is not such a sign, either.
Dark backgrounds are useful rather when it is dark around the
user such as for those behind thick curtains or in garages without
good lightning installations. This also includes wooden cabins that
are dark inside but have solar powerered batteries to run computers.
From that context maybe `night-mode' wants to call itself `dark-mode'
as it is useful in the darkness where brightness hurt eyes.
> I think we should ask users who'd want to have a special theme for the
> night and that routinely use the dark-background colors what would
> they like to see by night. It isn't enough just to invert the colors,
> IMO.
There are those who have bright lights during the night and do not
sleep due to long sessions of thinking and programming but who do not
turn off the lights, and in that case those light backgrounds are
quite pleasing.
In other words day is not necessarily lighted and night is not
necessarily dark.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 15:16 ` night-mode? Eli Zaretskii
2020-11-22 16:09 ` night-mode? Jean Louis
@ 2020-11-22 16:38 ` Arthur Miller
2020-11-22 17:27 ` night-mode? Jean Louis
1 sibling, 1 reply; 20+ messages in thread
From: Arthur Miller @ 2020-11-22 16:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, monnier, Juri Linkov
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Juri Linkov <juri@linkov.net>
>> Date: Sun, 22 Nov 2020 10:40:19 +0200
>> Cc: emacs-devel@gnu.org
>>
>> diff --git a/lisp/startup.el b/lisp/startup.el
>> index 9f67dfde12..71d640701b 100644
>> --- a/lisp/startup.el
>> +++ b/lisp/startup.el
>> @@ -834,6 +834,7 @@ tty-handle-args
>> argval)))
>> default-frame-alist))
>> ((member argi '("-r" "-rv" "-reverse"))
>> + (setq night-mode t)
>> (push '(reverse . t)
>> default-frame-alist))
>> ((equal argi "-color")
>
> I don't see why we should consider -rv be the sign of "night". Many
> people use dark backgrounds for reasons that have nothing to do with
> the time of day, and -rv is not such a sign, either.
>
> I think we should ask users who'd want to have a special theme for the
> night and that routinely use the dark-background colors what would
> they like to see by night. It isn't enough just to invert the colors,
> IMO.
Indeed; it probably is not. Some themes are not designed to be
inverted. Solarized is; but not all are. I think day/night theme should
probably be treated as two different themes as they are. The fact that
one is produced from the other is just an implementation detail ....
By the way, I wonder how many users actually change their themes past
first few days of amazement?
Personally I would be annoyed if everything just changed beneagh my
cursor; it would be like pulling the floor under my feet; but who am I
to tell? I jump out of airplanes so I like being without floor sometimes :D.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 16:38 ` night-mode? Arthur Miller
@ 2020-11-22 17:27 ` Jean Louis
2020-11-23 7:21 ` night-mode? Arthur Miller
0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-22 17:27 UTC (permalink / raw)
To: Arthur Miller; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
* Arthur Miller <arthur.miller@live.com> [2020-11-22 19:39]:
> By the way, I wonder how many users actually change their themes past
> first few days of amazement?
For new users I do not know. I remember having nice greenish kind of
survival type of theme in Emacs back in time that I loved so much and
I think it was Lucid kit. Every day I am changing themes as it makes
it more pleasant to change. The plain light them I never used before
and in last days I started using it and became pleasant, preferences
change over time. I am using only built-in themes.
Per day I change normally one time, sometimes 2-3 times and I just hit
one of built-in themes.
One annoying thing with themes is that they do not always switch
colors if I have default face defined. In emacs -Q it works well. I do
not define colors in default face, I try to leave them undefined but
they always come back. Maybe theme system some times considers my
preferences preceeding them and sometimes not.
Then when I wish to change the theme it does not really work with
front and background colors. Then again I switch to customize-face
default to remove colors, to save configuration that I become able to
switch the theme. This worked well before but since some time does not
behave as I expect it. Sometimes it does work, it appears confusing
and not controlable. Majority of times I have to remove background and
foreground colors from default face to be able to change the theme
properly.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-22 17:27 ` night-mode? Jean Louis
@ 2020-11-23 7:21 ` Arthur Miller
2020-11-23 8:36 ` night-mode? Jean Louis
0 siblings, 1 reply; 20+ messages in thread
From: Arthur Miller @ 2020-11-23 7:21 UTC (permalink / raw)
To: Jean Louis; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
Jean Louis <bugs@gnu.support> writes:
> * Arthur Miller <arthur.miller@live.com> [2020-11-22 19:39]:
>> By the way, I wonder how many users actually change their themes past
>> first few days of amazement?
>
> For new users I do not know. I remember having nice greenish kind of
> survival type of theme in Emacs back in time that I loved so much and
> I think it was Lucid kit. Every day I am changing themes as it makes
> it more pleasant to change. The plain light them I never used before
> and in last days I started using it and became pleasant, preferences
> change over time. I am using only built-in themes.
>
> Per day I change normally one time, sometimes 2-3 times and I just hit
> one of built-in themes.
>
> One annoying thing with themes is that they do not always switch
> colors if I have default face defined. In emacs -Q it works well. I do
> not define colors in default face, I try to leave them undefined but
> they always come back. Maybe theme system some times considers my
> preferences preceeding them and sometimes not.
>
> Then when I wish to change the theme it does not really work with
> front and background colors. Then again I switch to customize-face
> default to remove colors, to save configuration that I become able to
> switch the theme. This worked well before but since some time does not
> behave as I expect it. Sometimes it does work, it appears confusing
> and not controlable. Majority of times I have to remove background and
> foreground colors from default face to be able to change the theme
> properly.
I understand people like to switch to different theme for different
reasons. What you are describing is changing theme on demand,
actively. But if you are in the middle of typing, and suddenly
everything you look at changes into something radically different; I
don't know. I think brain is used to look at things, to connect colours
to some semantic meaning, that is the purpose of syntax colouring (part
Solarize got correct because they don't change accent colours); and
suddenly you just pull it away and reconfigure everything. I am sure it
is not hard and happends uncoscious, but it still is extra work for the
brain; isn't it?
By the way; I understand your feeling for change. Back in time, some 20+
years ago when I discovered X11 and window managers I was changing them
on a daily basis, reconfiguring them, changing how my computer
interaction looked and felt.
I was also rebuilding my computer, my OS, and everything else I could,
until I got tired of it after maybe a year or tow times and decided I
will not every rebuild my computers and systems again untill they break,
by break, I mean, I have to buy new stuff and build new system. But I
was always in quest for more efficiency. I always wanted things faster
and cheaper :-).
I have now for long time stop doing that; I use über simple window
manager, no bling-bling desktops, same look for several years now
(solarized dark); life is so much better. But I am unbootable when it
comes to chasing for efficiency; otherwise I wouldn't be arguing about
~200 ms of Emacs init time as i did this weekend :D.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-23 7:21 ` night-mode? Arthur Miller
@ 2020-11-23 8:36 ` Jean Louis
2020-11-23 17:06 ` night-mode? Arthur Miller
0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-23 8:36 UTC (permalink / raw)
To: Arthur Miller; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
* Arthur Miller <arthur.miller@live.com> [2020-11-23 10:21]:
> I understand people like to switch to different theme for different
> reasons. What you are describing is changing theme on demand,
> actively. But if you are in the middle of typing, and suddenly
> everything you look at changes into something radically different; I
> don't know.
heh, I can fully understand as I felt this way for long period of
time. Now I can change to any built-in theme and it needs 2-3 seconds
to accommodate the eyes and I am fine. But I do not change my default
face, so more or less only colors change.
> I think brain is used to look at things, to connect colours to some
> semantic meaning, that is the purpose of syntax colouring (part
> Solarize got correct because they don't change accent colours); and
> suddenly you just pull it away and reconfigure everything. I am sure
> it is not hard and happends uncoscious, but it still is extra work
> for the brain; isn't it?
I would say the same before just one year or two years, and
preferences changed. For years I used colors in `mutt' and rejected
ever using it plain black white. Colors helped me recognize quote
levels, I could quickly locate pieces of information on screen. Since
I removed all colors I find it pleasant and less disturbing without
colors. And I would not say that I would ever enjoy simplicity before
even one month.
On console I have used Emacs so much and it was always black
background and that themes exist I did not even know.
> By the way; I understand your feeling for change. Back in time, some 20+
> years ago when I discovered X11 and window managers I was changing them
> on a daily basis, reconfiguring them, changing how my computer
> interaction looked and felt.
Majority of users did so as fascination with software is great. Then I
have decided to see which Window Manager is most usable, most easy to
understand and never crashes and has good speed, since then I used
IceWm and I see nothing much changed until today. WMs are crashing
less, but their speed remain the same in 20 years. Gnome and KDE
became just more bloated so personally I am using IceWM, and I used
StumpWM and I would be using more EXWM if there would be no swapping
problems or maybe memory leaks preventing me to use long sessions,
bugs which are now being researched. IceWM also has by its
configuration quick change of the theme by using mouse so I can change
to any theme now. Before some years I would despise specific themes,
but now I am kind of liberated and fine with many themes in Emacs or
outside Emacs. I just like readable faces and minibuffer to be
somewhat larger.
> I was also rebuilding my computer, my OS, and everything else I could,
> until I got tired of it after maybe a year or tow times and decided I
> will not every rebuild my computers and systems again untill they break,
> by break, I mean, I have to buy new stuff and build new system. But I
> was always in quest for more efficiency. I always wanted things faster
> and cheaper :-).
We are together.
> I have now for long time stop doing that; I use über simple window
> manager, no bling-bling desktops, same look for several years now
> (solarized dark); life is so much better. But I am unbootable when
> it comes to chasing for efficiency; otherwise I wouldn't be arguing
> about ~200 ms of Emacs init time as i did this weekend :D.
Good, only that I do not have efficiency, I am mostlyu using T410 or
T400 Thinkpad and maybe that is why. It is fast on desktop.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-23 8:36 ` night-mode? Jean Louis
@ 2020-11-23 17:06 ` Arthur Miller
2020-11-23 19:38 ` night-mode? Jean Louis
0 siblings, 1 reply; 20+ messages in thread
From: Arthur Miller @ 2020-11-23 17:06 UTC (permalink / raw)
To: Jean Louis; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
Jean Louis <bugs@gnu.support> writes:
>> I think brain is used to look at things, to connect colours to some
>> semantic meaning, that is the purpose of syntax colouring (part
>> Solarize got correct because they don't change accent colours); and
>> suddenly you just pull it away and reconfigure everything. I am sure
>> it is not hard and happends uncoscious, but it still is extra work
>> for the brain; isn't it?
>
> I would say the same before just one year or two years, and
> preferences changed. For years I used colors in `mutt' and rejected
> ever using it plain black white. Colors helped me recognize quote
> levels, I could quickly locate pieces of information on screen. Since
> I removed all colors I find it pleasant and less disturbing without
> colors. And I would not say that I would ever enjoy simplicity before
> even one month.
> Now I can change to any built-in theme and it needs 2-3 seconds
> to accommodate the eyes and I am fine. But I do not change my default
> face, so more or less only colors change.
Isn't that what I am talking about :-). Brain needs a bit of time to
adapt.
> I would be using more EXWM if there would be no swapping
> problems or maybe memory leaks preventing me to use long sessions,
> bugs which are now being researched.
Indeed, I would really like to have everythign in same process, so I
could C-x C-b between other X11 windows just as I can between Emacs
buffers, but I am affraid of Emacs locking me out of desktop.
> Good, only that I do not have efficiency, I am mostlyu using T410 or
> T400 Thinkpad and maybe that is why. It is fast on desktop.
If you use an old laptop, shouldn't you bee worried about efficiency
even more? I mean as few extras and as tiny things as you can? My
current emacs init starts in around ~0.2 secs.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-23 17:06 ` night-mode? Arthur Miller
@ 2020-11-23 19:38 ` Jean Louis
2020-11-24 8:55 ` night-mode? Arthur Miller
0 siblings, 1 reply; 20+ messages in thread
From: Jean Louis @ 2020-11-23 19:38 UTC (permalink / raw)
To: Arthur Miller; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
* Arthur Miller <arthur.miller@live.com> [2020-11-23 20:07]:
> > Now I can change to any built-in theme and it needs 2-3 seconds
> > to accommodate the eyes and I am fine. But I do not change my default
> > face, so more or less only colors change.
> Isn't that what I am talking about :-). Brain needs a bit of time to
> adapt.
Alright. I know what you feel as some time back I was more stressed
with the theme change, not just that I could not adapt after 2-3
seconds, I could not adapt at all and I would even delete the
theme. This personal behavior changed into being adaptable to built-in
themes and not wasting time with any external themes.
Guess what, now is night, lights are on, and I use plain white
background that stubbornly contradicts the meaning of night-mode.
> > I would be using more EXWM if there would be no swapping
> > problems or maybe memory leaks preventing me to use long sessions,
> > bugs which are now being researched.
>
> Indeed, I would really like to have everythign in same process, so I
> could C-x C-b between other X11 windows just as I can between Emacs
> buffers, but I am affraid of Emacs locking me out of desktop.
EXWM works just well. One need to know that external programs should
be launched with M-& and not with M-! as that would block. In general
I can watch embeded video within Emacs session and move that buffer to
something else when I fish, screen can be tiled as Emacs is tiled.
Desktop I do not know what is meaning of it, I know that people use
Windows to place stuff on virtual desktop. I protest against the
automatic creation of ~/Desktop in my file system and it is empty
directory I delete from time to time. Do you mean that?
Either I am using IceWM that has no icons on the root screen, or I use
EXWM. For icons on the root screen I can use rox filer with option -p
and with it I can have unlimited desktop settings if desktop means
ordered directories or files on the root screen.
>
> > Good, only that I do not have efficiency, I am mostlyu using T410 or
> > T400 Thinkpad and maybe that is why. It is fast on desktop.
> If you use an old laptop, shouldn't you bee worried about efficiency
> even more? I mean as few extras and as tiny things as you can? My
> current emacs init starts in around ~0.2 secs.
For you is old, for me is just fine. I am worried of programs being
developed in such a way that I have to have faster and faster computer
to run them. Terrible condition. I would buy some new laptop would it
be possible to liberate the BIOS from non-free software.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-23 19:38 ` night-mode? Jean Louis
@ 2020-11-24 8:55 ` Arthur Miller
2020-11-24 9:47 ` night-mode? Jean Louis
0 siblings, 1 reply; 20+ messages in thread
From: Arthur Miller @ 2020-11-24 8:55 UTC (permalink / raw)
To: Jean Louis; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
Jean Louis <bugs@gnu.support> writes:
> Guess what, now is night, lights are on, and I use plain white
> background that stubbornly contradicts the meaning of night-mode.
I am not the one who thinks "night-modes" are for night and "day-modes" are
for days. I run nigh-mode 24h/day (solarized dark) :-)
> EXWM works just well. One need to know that external programs should
> be launched with M-& and not with M-! as that would block.
Yeah sure; I am aware of that, but do you run Firefox (or whatver
browser) from within Emacs? You use Emacs as your process-runner? Is it
stable?
I use xbindkyes for few apps I use often (firefox, emacs, st)
and Rofi as more general process launcher. I just don't want everything
else to crash if Emacs crashes.
> In general
> I can watch embeded video within Emacs session and move that buffer to
> something else when I fish, screen can be tiled as Emacs is tiled.
How do you embedd video in Emacs?
> Desktop I do not know what is meaning of it, I know that people use
> Windows to place stuff on virtual desktop. I protest against the
> automatic creation of ~/Desktop in my file system and it is empty
> directory I delete from time to time. Do you mean that?
No, no :-). It is just me not expressing myself very precise; with desktop,
I ment my X11 session; I don't run any desktop icons either, or
taskbars, menubars, etc.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: night-mode?
2020-11-24 8:55 ` night-mode? Arthur Miller
@ 2020-11-24 9:47 ` Jean Louis
0 siblings, 0 replies; 20+ messages in thread
From: Jean Louis @ 2020-11-24 9:47 UTC (permalink / raw)
To: Arthur Miller; +Cc: Eli Zaretskii, Juri Linkov, monnier, emacs-devel
* Arthur Miller <arthur.miller@live.com> [2020-11-24 11:55]:
> Jean Louis <bugs@gnu.support> writes:
> > Guess what, now is night, lights are on, and I use plain white
> > background that stubbornly contradicts the meaning of night-mode.
> I am not the one who thinks "night-modes" are for night and "day-modes" are
> for days. I run nigh-mode 24h/day (solarized dark) :-)
>
> > EXWM works just well. One need to know that external programs should
> > be launched with M-& and not with M-! as that would block.
> Yeah sure; I am aware of that, but do you run Firefox (or whatver
> browser) from within Emacs? You use Emacs as your process-runner? Is it
> stable?
Yes, I run anything within EXWM, it works just fine. Some frame
customization I need for those programs with multiple frame such as
Gimp for example, or dia and in general all programs work well. Maybe
few not so.
Everything is stable and working well and fine.
Switching WM windows I do not use, I use switch buffer as Emacs buffer
I can switch to video player or browser.
Then I use workspaces, all 10 with M-w to change workspace or quick
M-2 and so on. So often I have let us say email handling on workspace
1, that is where I handle emails, but I may be watching video on
workspace 7, while chat is on workspace 2 and browsing on workspace 3.
> I use xbindkyes for few apps I use often (firefox, emacs, st)
> and Rofi as more general process launcher. I just don't want everything
> else to crash if Emacs crashes.
I have never experienced Emacs crush with EXMW, but did experience
more faster swapping problem or memory problem which we are trying to
handle on the bugs mailing list.
> > In general
> > I can watch embeded video within Emacs session and move that buffer to
> > something else when I fish, screen can be tiled as Emacs is tiled.
> How do you embedd video in Emacs?
I just launch video in EXWM. That is all. Install and try, it is
nothing hard to do. Any program I can launch and it looks like it is
within Emacs.
^ permalink raw reply [flat|nested] 20+ messages in thread
[parent not found: <87r1onmjpx.fsf@gmail.com>]
end of thread, other threads:[~2020-11-24 9:47 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-20 21:25 night-mode? Stefan Monnier
2020-11-21 2:36 ` night-mode? Pankaj Jangid
2020-11-21 5:00 ` Modus themes toggle (was: night-mode?) Protesilaos Stavrou
2020-11-21 7:22 ` Modus themes toggle Pankaj Jangid
2020-11-21 19:21 ` night-mode? Juri Linkov
2020-11-21 21:20 ` night-mode? Stefan Monnier
2020-11-22 8:40 ` night-mode? Juri Linkov
2020-11-22 15:09 ` night-mode? Stefan Monnier
2020-11-22 15:16 ` night-mode? Eli Zaretskii
2020-11-22 16:09 ` night-mode? Jean Louis
2020-11-22 19:55 ` night-mode? Stefan Monnier
2020-11-22 16:38 ` night-mode? Arthur Miller
2020-11-22 17:27 ` night-mode? Jean Louis
2020-11-23 7:21 ` night-mode? Arthur Miller
2020-11-23 8:36 ` night-mode? Jean Louis
2020-11-23 17:06 ` night-mode? Arthur Miller
2020-11-23 19:38 ` night-mode? Jean Louis
2020-11-24 8:55 ` night-mode? Arthur Miller
2020-11-24 9:47 ` night-mode? Jean Louis
[not found] ` <87r1onmjpx.fsf@gmail.com>
[not found] ` <jwvtutiy783.fsf-monnier+emacs@gnu.org>
2020-11-22 0:03 ` night-mode? Caio Henrique
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).