Skip to content

XFCE4 plugin: Switch between light and dark variants of a theme

Notifications You must be signed in to change notification settings

frithrah/xfce4-night-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 Generic Monitor (Genmon) plugin, it will automatically switch at the times specified.

UVSz6QB

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

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 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

  • Add options to change GTK, mouse, icon, and window manager theme

    • Breaking change: You must set these before use

About

XFCE4 plugin: Switch between light and dark variants of a theme

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%