Add Zorin themes support
This commit is contained in:
@@ -16,8 +16,6 @@ Supports Night Light, Location Services, manual schedule and on-demand switch.
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
- [Theme compatibility](#theme-compatibility)
|
||||
- [GTK themes](#gtk-themes)
|
||||
- [Shell themes](#shell-themes)
|
||||
- [Graphical installation](#graphical-installation)
|
||||
- [Command line installation](#command-line-installation)
|
||||
- [Contributing](#contributing)
|
||||
@@ -28,7 +26,8 @@ Supports Night Light, Location Services, manual schedule and on-demand switch.
|
||||
|
||||
These themes have been tested and work out of the box without any configuration. Other themes might work as well, let me know if there is a specific theme you'd like supported! And you can also manually set your day and night variants.
|
||||
|
||||
### GTK themes
|
||||
<details>
|
||||
<summary>GTK themes</summary>
|
||||
|
||||
- Adapta
|
||||
- Adwaita (GNOME & Fedora default)
|
||||
@@ -58,8 +57,12 @@ These themes have been tested and work out of the box without any configuration.
|
||||
- WhiteSur
|
||||
- Yaru (Ubuntu default)
|
||||
- Yaru Colors
|
||||
- Zorin
|
||||
|
||||
### Shell themes
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Shell themes</summary>
|
||||
|
||||
- Adapta
|
||||
- Adwaita Colors
|
||||
@@ -83,6 +86,9 @@ These themes have been tested and work out of the box without any configuration.
|
||||
- Vimix
|
||||
- WhiteSur
|
||||
- Yaru Colors
|
||||
- Zorin
|
||||
|
||||
</details>
|
||||
|
||||
## Graphical installation
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ var GtkVariants = class {
|
||||
} else if (name.includes('vimix')) {
|
||||
variants.set(Time.DAY, name.replace('-dark', ''));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace(/vimix(-light)?/, 'vimix-dark'));
|
||||
} else if (name.includes('Zorin')) {
|
||||
variants.set(Time.DAY, name.replace('-Dark', '-Light'));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace('-Light', '-Dark'));
|
||||
} else {
|
||||
variants.set(Time.DAY, name.replace(/-dark(?!er)(est)?/, ''));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace(/(-light|-darker)/, '') + (name.includes('-darkest') ? '-darkest' : '-dark'));
|
||||
|
||||
@@ -80,6 +80,9 @@ var ShellVariants = class {
|
||||
} else if (name.includes('vimix')) {
|
||||
variants.set(Time.DAY, name.replace('-dark', ''));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace(/vimix(-light)?/, 'vimix-dark'));
|
||||
} else if (name.includes('Zorin')) {
|
||||
variants.set(Time.DAY, name.replace('-Dark', '-Light'));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace('-Light', '-Dark'));
|
||||
} else {
|
||||
variants.set(Time.DAY, name.replace(/-dark(?!er)(est)?/, ''));
|
||||
variants.set(Time.NIGHT, variants.get(Time.DAY).replace(/(-light|-darker)/, '') + (name.includes('-darkest') ? '-darkest' : '-dark'));
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const test = require('ava');
|
||||
const { Variants } = require('./_variants');
|
||||
|
||||
|
||||
['Blue', 'Green', 'Grey', 'Orange', 'Purple', 'Red'].forEach(color => {
|
||||
test(`Zorin${color}-Light`, t => {
|
||||
const variants = Variants.guessFrom(`Zorin${color}-Light`);
|
||||
t.is(variants.get('day'), `Zorin${color}-Light`);
|
||||
t.is(variants.get('night'), `Zorin${color}-Dark`);
|
||||
});
|
||||
|
||||
test(`Zorin${color}-Dark`, t => {
|
||||
const variants = Variants.guessFrom(`Zorin${color}-Dark`);
|
||||
t.is(variants.get('day'), `Zorin${color}-Light`);
|
||||
t.is(variants.get('night'), `Zorin${color}-Dark`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const test = require('ava');
|
||||
const { Variants } = require('./_variants');
|
||||
|
||||
|
||||
['Blue', 'Green', 'Grey', 'Orange', 'Purple', 'Red'].forEach(color => {
|
||||
test(`Zorin${color}-Light`, t => {
|
||||
const variants = Variants.guessFrom(`Zorin${color}-Light`);
|
||||
t.is(variants.get('day'), `Zorin${color}-Light`);
|
||||
t.is(variants.get('night'), `Zorin${color}-Dark`);
|
||||
});
|
||||
|
||||
test(`Zorin${color}-Dark`, t => {
|
||||
const variants = Variants.guessFrom(`Zorin${color}-Dark`);
|
||||
t.is(variants.get('day'), `Zorin${color}-Light`);
|
||||
t.is(variants.get('night'), `Zorin${color}-Dark`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user