Merge branch 'patch-1' into 'master'

Add support for Matcha themes

See merge request rmnvgr/nightthemeswitcher-gnome-shell-extension!1
This commit is contained in:
Romain
2020-01-27 10:02:07 +00:00
+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';