No description
Find a file
frithrah 4c6ae90598 Set GTK theme
Some apps don't react to automatic theme changes via xfconf-query
because they instead monitor the gtk-theme setting - Sublime Text is a
good example. This quick fix additionally sets the gtk-theme gsetting
to the target theme so these kind of apps will respond to theme
changes.
2022-05-20 12:29:11 +02:00
.editorconfig Add .editorconfig 2021-12-28 10:09:34 +01:00
README.adoc Documentation update 2022-03-29 21:10:33 +02:00
xfce4-night-mode-redshift.sh Read themes from Settings Editor 2021-12-28 11:07:11 +01:00
xfce4-night-mode.sh Set GTK theme 2022-05-20 12:29:11 +02:00

= XFCE Night Mode

Shell script that allows you to easily *switch between dark and light variants
of the currently used themes*. When used as a
https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin[Generic Monitor
(Genmon)] plugin, it will automatically switch at the times specified.

image::https://i.imgur.com/UVSz6QB.gif[]

*It is important to set the desired color schemes before use* (see Settings).

* https://gitlab.com/bimlas/xfce4-night-mode (main repository)
* https://github.com/bimlas/xfce4-night-mode (mirror, *please star if you like the plugin*)

== Command line usage

....
$ xfce4-night-mode.sh [day|night|toggle]
....

*Parameters*

`day`:: Use light variant
`night`:: Use dark variant
`toggle`:: Switch between light and dark variants

Without parameters, it will use dark variant from sunset to sunrise according
to the settings (see later).

== Generic Monitor (Genmon) plugin usage

* First you have to install `xfce4-genmon-plugin` package if it is not on your system
* Add the monitor to the panel
** Right click on the panel
** Select _Panel -> Add new items_
** Add _Generic Monitor_ plugin
* Set up the generic monitor to use with night mode
** Right click on the newly added generic monitor -> _Properties_
** Command: `/path/to/xfce4-night-mode.sh`
** Uncheck the checkbox of _Label_
** Set _Period_ to `300` seconds (5 minutes)

== Settings

For settings, open the XFCE Settings Editor -> `night-mode` channel.

To find out what values to enter, set the color schemes you want and copy them
from the appropriate location:

* GTK theme
** `xsettings/Net/ThemeName`
* Icon theme
** `xsettings/Net/IconThemeName`
* Cursor theme
** `xsettings/Gtk/CursorThemeName`
* Window manager theme
** `xfwm4/general/theme`

=== Switch at a time specified by antoher program

For example, to use http://jonls.dk/redshift/[Redshift] or another program to
determine when it is night, use `xfce4-night-mode-redshift.sh` (or a modified
version of it) instad of `xfce4-night-mode.sh` in "Generic Monitor plugin
usage".

== Changes

=== https://gitlab.com/bimlas/xfce4-night-mode/-/compare/v1.0.0\...v2.0.0[2.0.0]

* Add options to change GTK, mouse, icon, and window manager theme
** *Breaking change*: You must set these before use