Add support for Matcha themes

This commit is contained in:
Matti Hyttinen
2020-01-27 10:02:06 +00:00
committed by Romain
parent fe2fcda94d
commit 2de52dd108
+5
View File
@@ -2,6 +2,7 @@
Night Theme Switcher Gnome Shell extension Night Theme Switcher Gnome Shell extension
Copyright (C) 2019 Romain Vigier Copyright (C) 2019 Romain Vigier
Copyright (C) 2020 Matti Hyttinen
This program is free software: you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
@@ -182,6 +183,10 @@ class Variants {
variants.day = name.replace(/-Dark(?!er)/g, ''); variants.day = name.replace(/-Dark(?!er)/g, '');
variants.night = variants.day.replace('-Darker', '') + '-Dark'; variants.night = variants.day.replace('-Darker', '') + '-Dark';
} }
else if ( name.includes('Matcha') ) {
variants.day = name.replace(/-dark-/g, '-');
variants.night = variants.day.replace('Matcha-', 'Matcha-dark-');
}
else { else {
variants.day = name.replace(/-dark(?!er)/g, ''); variants.day = name.replace(/-dark(?!er)/g, '');
variants.night = variants.day.replace(/(-light)?(-darker)?/g, '') + '-dark'; variants.night = variants.day.replace(/(-light)?(-darker)?/g, '') + '-dark';