All Projects → rifazn → dark-toggle

rifazn / dark-toggle

Licence: MIT license
A small POSIX compliant shell script that toggles between the dark and light variants of a GTK theme.

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to dark-toggle

Automathemely
Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
Stars: ✭ 169 (+838.89%)
Mutual labels:  gtk, gnome, theming
Gtk Theming Guide
Novice guide towards making your own first gtk theme!
Stars: ✭ 95 (+427.78%)
Mutual labels:  gtk, gnome, theming
dippi
Calculate display info like DPI and aspect ratio
Stars: ✭ 57 (+216.67%)
Mutual labels:  gtk, gnome
gobject-example-rs
Example for exporting a GObject/C API from Rust
Stars: ✭ 31 (+72.22%)
Mutual labels:  gtk, gnome
gnome-gtk3
Interfacing Perl6 to Gnome GTK+
Stars: ✭ 15 (-16.67%)
Mutual labels:  gtk, gnome
GabTag
A gtk linux application to handle audio tags 🎵
Stars: ✭ 34 (+88.89%)
Mutual labels:  gtk, gnome
Azure-theme
Azure is a clean and fresh blue theme for GTK 3, GTK 2 and Gnome-Shell
Stars: ✭ 100 (+455.56%)
Mutual labels:  gtk, gnome
Gjs-Tutorial
A tutorial for Gjs/GTK+ 3 development, based on https://github.com/sebp/PyGObject-Tutorial
Stars: ✭ 15 (-16.67%)
Mutual labels:  gtk, gnome
proxychanger
Go tool to change system and applications proxy
Stars: ✭ 15 (-16.67%)
Mutual labels:  gtk, gnome
ThemeChanger
Theme changing utility for Linux, etc.
Stars: ✭ 14 (-22.22%)
Mutual labels:  gtk, gnome
pw3270
3270 Emulator for gtk
Stars: ✭ 38 (+111.11%)
Mutual labels:  gtk, gnome
Systemtray
Cross-platform SystemTray support for Swing/AWT, GtkStatusIcon, and AppIndicator on Java 8+
Stars: ✭ 253 (+1305.56%)
Mutual labels:  gtk, gnome
Swiftgtk
A Swift wrapper around gtk-3.x and gtk-4.x that is largely auto-generated from gobject-introspection
Stars: ✭ 180 (+900%)
Mutual labels:  gtk, gnome
gnomit
A simple Git commit message editor for Gnome.
Stars: ✭ 30 (+66.67%)
Mutual labels:  gtk, gnome
Awesome Gtk
List of awesome GTK+ (gtk3) applications
Stars: ✭ 174 (+866.67%)
Mutual labels:  gtk, gnome
gui-python-gtk
Repositório criado para documentar e centralizar conteúdos, dicas, tutoriais e exemplos de código sobre a construção de interfaces com a linguagem de programação Python (PyGObject) e o toolkit gráfico Gtk 4.
Stars: ✭ 85 (+372.22%)
Mutual labels:  gtk, gnome
gtk
🎨 Omni for GTK and Gnome Shell
Stars: ✭ 35 (+94.44%)
Mutual labels:  gtk, gnome
Fractal
Matrix.org gtk+ client
Stars: ✭ 156 (+766.67%)
Mutual labels:  gtk, gnome
Gtkhash
A cross-platform desktop utility for computing message digests or checksums
Stars: ✭ 167 (+827.78%)
Mutual labels:  gtk, gnome
Slate-theme
GTK Mac-like theme for cleaner and flat-er look.
Stars: ✭ 14 (-22.22%)
Mutual labels:  gtk, gnome

icon dark-toggle

A shell script that toggles between the dark and light variants of the current GTK theme. Works for the GNOME shell theme and icon themes too. POSIX compliant.

Demo

dark-toggle-swaywm.mp4

For more demos of dark-toggle running on the default GNOME Shell and Ubuntu can be found below.

Highlights

  • Easy and instantaneous. Toggle darkness at will!
  • Works the same for Window Managers and the Gnome Shell alike. No need to have any Gnome Shell Extensions installed!
  • Is extendable using hooks (WIP). Changing the theme of your terminal emulator will soon be possible!
  • Can easily be used as a hook in other programs like gammastep and redshift.
  • No need to wait for a day/night cycle.
  • No mouse interaction needed.

Dependencies

Installation

Install system-wide for all users (requires root user or sudo):

make

Install for current user only:

make PREFIX=~/.local

For current-user only, make sure ~/.local/bin is in your $PATH.

Usage

Just run dark-toggle or use an app launcher to search and run Dark Toggle. CLI options are not added yet, but see Configuration.

Configuration

By default, dark-toggle only changes the GTK Applications theme. However, further options can be added as necessary from the table below:

Option Description
change-shell Also change the GNOME Shell theme. (GNOME Shell must be running and User Themes extension must be installed.)
change-icons Also change the icon theme.
exec-hooks Execute a hook each time dark-toggle is run (not implemented yet)

The config file can also be used to add user-defined mappings between light and dark variant of themes.

Example of a config file:

# ~/.config/dark-toggle/config

## Options
#
# Guess the icon name from the gtk theme name and change to it
change-icons

# Also change the gnome shell theme
change-shell

# Run hooks found in hooks dir
exec-hooks

# Put user-defined mappings and also mappings for theme names that cannot be guessed.
mappings {
	# Light		Dark
	Adapta		Adapta-Nokto
	Plata		Plata-Noir
	Qogir-win	Qogir-dark
	Plata-Lumine	Plata-Noir
}

This is also useful when a theme might have more than two variants and the user would like to specify which of the two variants they would like to use.

More Demos

GNOME Shell

Adwaita theme

1.Adwaita.mp4

Plata theme

2.Plata.mp4

ZorinGreen theme

3.ZorinGreen.mp4

Ubuntu

Demoing on the themes Yaru, Adwaita and Materia:

http://0x0.st/osSc.mp4

Note:

The demos shown here are using the excellent Dark Reader add-on for Firefox.

Those looking for a Gnome Shell Extension, as opposed to this cli tool, can try the Night Theme Switcher extension... But have you seen this tool's #Highlights?

Credits

This repo was made from a GitHub Gist where I appreciated much help from newnix.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].