Add support for WhiteSur theme
This commit is contained in:
@@ -37,6 +37,7 @@ These themes have been tested and work out of the box without any configuration.
|
|||||||
- Simply Circles
|
- Simply Circles
|
||||||
- Teja
|
- Teja
|
||||||
- Vimix
|
- Vimix
|
||||||
|
- WhiteSur
|
||||||
- Yaru (Ubuntu default)
|
- Yaru (Ubuntu default)
|
||||||
- Yaru Colors
|
- Yaru Colors
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@ These themes have been tested and work out of the box without any configuration.
|
|||||||
- Simply Circles
|
- Simply Circles
|
||||||
- Teja
|
- Teja
|
||||||
- Vimix
|
- Vimix
|
||||||
|
- WhiteSur
|
||||||
- Yaru Colors
|
- Yaru Colors
|
||||||
|
|
||||||
## Graphical installation
|
## Graphical installation
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ var GtkVariants = class {
|
|||||||
const version = name.split('-').pop();
|
const version = name.split('-').pop();
|
||||||
variants.set('day', `McOS-CTLina-Gnome-${version}`);
|
variants.set('day', `McOS-CTLina-Gnome-${version}`);
|
||||||
variants.set('night', `Mc-OS-CTLina-Gnome-Dark-${version}`);
|
variants.set('night', `Mc-OS-CTLina-Gnome-Dark-${version}`);
|
||||||
} else if (name.includes('Mojave')) {
|
} else if (name.match(/^(Mojave|WhiteSur)/)) {
|
||||||
variants.set('day', name.replace('-dark', '-light'));
|
variants.set('day', name.replace('-dark', '-light'));
|
||||||
variants.set('night', variants.get('day').replace('-light', '-dark'));
|
variants.set('night', variants.get('day').replace('-light', '-dark'));
|
||||||
} else if (name.includes('Plata')) {
|
} else if (name.includes('Plata')) {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ var ShellVariants = class {
|
|||||||
const version = name.split('-').pop();
|
const version = name.split('-').pop();
|
||||||
variants.set('day', `McOS-CTLina-Gnome-${version}`);
|
variants.set('day', `McOS-CTLina-Gnome-${version}`);
|
||||||
variants.set('night', `Mc-OS-CTLina-Gnome-Dark-${version}`);
|
variants.set('night', `Mc-OS-CTLina-Gnome-Dark-${version}`);
|
||||||
} else if (name.includes('Mojave')) {
|
} else if (name.match(/^(Mojave|WhiteSur)/)) {
|
||||||
variants.set('day', name.replace('-dark', '-light'));
|
variants.set('day', name.replace('-dark', '-light'));
|
||||||
variants.set('night', variants.get('day').replace('-light', '-dark'));
|
variants.set('night', variants.get('day').replace('-light', '-dark'));
|
||||||
} else if (name.includes('Plata')) {
|
} else if (name.includes('Plata')) {
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Night Theme Switcher Gnome Shell extension
|
||||||
|
|
||||||
|
Copyright (C) 2020 Romain Vigier
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const test = require('ava');
|
||||||
|
const { Variants } = require('./_variants');
|
||||||
|
|
||||||
|
|
||||||
|
['', '-solid'].forEach(transparency => {
|
||||||
|
['', '-alt'].forEach(alt => {
|
||||||
|
test(`WhiteSur-light${transparency}${alt}`, t => {
|
||||||
|
const variants = Variants.guessFrom(`WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('day'), `WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('night'), `WhiteSur-dark${transparency}${alt}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
test(`WhiteSur-dark${transparency}${alt}`, t => {
|
||||||
|
const variants = Variants.guessFrom(`WhiteSur-dark${transparency}${alt}`);
|
||||||
|
t.is(variants.get('day'), `WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('night'), `WhiteSur-dark${transparency}${alt}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Night Theme Switcher Gnome Shell extension
|
||||||
|
|
||||||
|
Copyright (C) 2020 Romain Vigier
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http s ://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const test = require('ava');
|
||||||
|
const { Variants } = require('./_variants');
|
||||||
|
|
||||||
|
|
||||||
|
['', '-solid'].forEach(transparency => {
|
||||||
|
['', '-alt'].forEach(alt => {
|
||||||
|
test(`WhiteSur-light${transparency}${alt}`, t => {
|
||||||
|
const variants = Variants.guessFrom(`WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('day'), `WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('night'), `WhiteSur-dark${transparency}${alt}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
test(`WhiteSur-dark${transparency}${alt}`, t => {
|
||||||
|
const variants = Variants.guessFrom(`WhiteSur-dark${transparency}${alt}`);
|
||||||
|
t.is(variants.get('day'), `WhiteSur-light${transparency}${alt}`);
|
||||||
|
t.is(variants.get('night'), `WhiteSur-dark${transparency}${alt}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user