Architecture rewrite and new features
This commit is contained in:
@@ -1 +0,0 @@
|
||||
exports.Variants = Variants;
|
||||
@@ -0,0 +1 @@
|
||||
exports.Variants = GtkVariants;
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
test('Adapta', t => {
|
||||
const variants = Variants.guess_from('Adapta');
|
||||
t.is(variants.get('day'), 'Adapta');
|
||||
t.is(variants.get('night'), 'Adapta-Nokto');
|
||||
});
|
||||
|
||||
test('Adapta-Nokto', t => {
|
||||
const variants = Variants.guess_from('Adapta-Nokto');
|
||||
t.is(variants.get('day'), 'Adapta');
|
||||
t.is(variants.get('night'), 'Adapta-Nokto');
|
||||
});
|
||||
|
||||
test('Adapta-Eta', t => {
|
||||
const variants = Variants.guess_from('Adapta-Eta');
|
||||
t.is(variants.get('day'), 'Adapta-Eta');
|
||||
t.is(variants.get('night'), 'Adapta-Nokto-Eta');
|
||||
});
|
||||
|
||||
test('Adapta-Nokto-Eta', t => {
|
||||
const variants = Variants.guess_from('Adapta-Nokto-Eta');
|
||||
t.is(variants.get('day'), 'Adapta-Eta');
|
||||
t.is(variants.get('night'), 'Adapta-Nokto-Eta');
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
test('Arc', t => {
|
||||
const variants = Variants.guess_from('Arc');
|
||||
t.is(variants.get('day'), 'Arc');
|
||||
t.is(variants.get('night'), 'Arc-Dark');
|
||||
});
|
||||
|
||||
test('Arc-Dark', t => {
|
||||
const variants = Variants.guess_from('Arc-Dark');
|
||||
t.is(variants.get('day'), 'Arc');
|
||||
t.is(variants.get('night'), 'Arc-Dark');
|
||||
});
|
||||
|
||||
test('Arc-Dark-solid', t => {
|
||||
const variants = Variants.guess_from('Arc-Dark-solid');
|
||||
t.is(variants.get('day'), 'Arc-solid');
|
||||
t.is(variants.get('night'), 'Arc-Dark-solid');
|
||||
});
|
||||
|
||||
test('Arc-solid', t => {
|
||||
const variants = Variants.guess_from('Arc-solid');
|
||||
t.is(variants.get('day'), 'Arc-solid');
|
||||
t.is(variants.get('night'), 'Arc-Dark-solid');
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-blue', '-indigo'].forEach(color => {
|
||||
test(`Canta${color}`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}`);
|
||||
t.is(variants.get('day'), `Canta${color}`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark`);
|
||||
});
|
||||
|
||||
test(`Canta${color}-dark`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}-dark`);
|
||||
t.is(variants.get('day'), `Canta${color}`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark`);
|
||||
});
|
||||
|
||||
test(`Canta${color}-light`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}-light`);
|
||||
t.is(variants.get('day'), `Canta${color}-light`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark`);
|
||||
});
|
||||
|
||||
test(`Canta${color}-compact`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}-compact`);
|
||||
t.is(variants.get('day'), `Canta${color}-compact`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark-compact`);
|
||||
});
|
||||
|
||||
test(`Canta${color}-dark-compact`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}-dark-compact`);
|
||||
t.is(variants.get('day'), `Canta${color}-compact`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark-compact`);
|
||||
});
|
||||
|
||||
test(`Canta${color}-light-compact`, t => {
|
||||
const variants = Variants.guess_from(`Canta${color}-light-compact`);
|
||||
t.is(variants.get('day'), `Canta${color}-light-compact`);
|
||||
t.is(variants.get('night'), `Canta${color}-dark-compact`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
['', '-compact'].forEach(size => {
|
||||
test(`ChromeOS${size}`, t => {
|
||||
const variants = Variants.guess_from(`ChromeOS${size}`);
|
||||
t.is(variants.get('day'), `ChromeOS${size}`);
|
||||
t.is(variants.get('night'), `ChromeOS-dark${size}`);
|
||||
});
|
||||
|
||||
test(`ChromeOS-dark${size}`, t => {
|
||||
const variants = Variants.guess_from(`ChromeOS-dark${size}`);
|
||||
t.is(variants.get('day'), `ChromeOS${size}`);
|
||||
t.is(variants.get('night'), `ChromeOS-dark${size}`);
|
||||
});
|
||||
|
||||
test(`ChromeOS-light${size}`, t => {
|
||||
const variants = Variants.guess_from(`ChromeOS-light${size}`);
|
||||
t.is(variants.get('day'), `ChromeOS-light${size}`);
|
||||
t.is(variants.get('night'), `ChromeOS-dark${size}`);
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
['', '-Miami'].forEach(color => {
|
||||
['', '-fullPanel'].forEach(size => {
|
||||
test(`Flat-Remix${color}${size}`, t => {
|
||||
const variants = Variants.guess_from(`Flat-Remix${color}${size}`);
|
||||
t.is(variants.get('day'), `Flat-Remix${color}${size}`);
|
||||
t.is(variants.get('night'), `Flat-Remix${color}-Dark${size}`);
|
||||
});
|
||||
|
||||
test(`Flat-Remix${color}-Dark${size}`, t => {
|
||||
const variants = Variants.guess_from(`Flat-Remix${color}-Dark${size}`);
|
||||
t.is(variants.get('day'), `Flat-Remix${color}${size}`);
|
||||
t.is(variants.get('night'), `Flat-Remix${color}-Dark${size}`);
|
||||
});
|
||||
|
||||
test(`Flat-Remix${color}-Darkest${size}`, t => {
|
||||
const variants = Variants.guess_from(`Flat-Remix${color}-Darkest${size}`);
|
||||
t.is(variants.get('day'), `Flat-Remix${color}${size}`);
|
||||
t.is(variants.get('night'), `Flat-Remix${color}-Darkest${size}`);
|
||||
});
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
test('Layan', t => {
|
||||
const variants = Variants.guess_from('Layan');
|
||||
t.is(variants.get('day'), 'Layan');
|
||||
t.is(variants.get('night'), 'Layan-dark');
|
||||
});
|
||||
|
||||
test('Layan-dark', t => {
|
||||
const variants = Variants.guess_from('Layan-dark');
|
||||
t.is(variants.get('day'), 'Layan');
|
||||
t.is(variants.get('night'), 'Layan-dark');
|
||||
});
|
||||
|
||||
test('Layan-light', t => {
|
||||
const variants = Variants.guess_from('Layan-light');
|
||||
t.is(variants.get('day'), 'Layan-light');
|
||||
t.is(variants.get('night'), 'Layan-dark');
|
||||
});
|
||||
|
||||
test('Layan-solid', t => {
|
||||
const variants = Variants.guess_from('Layan-solid');
|
||||
t.is(variants.get('day'), 'Layan-solid');
|
||||
t.is(variants.get('night'), 'Layan-dark-solid');
|
||||
});
|
||||
|
||||
test('Layan-dark-solid', t => {
|
||||
const variants = Variants.guess_from('Layan-dark-solid');
|
||||
t.is(variants.get('day'), 'Layan-solid');
|
||||
t.is(variants.get('night'), 'Layan-dark-solid');
|
||||
});
|
||||
|
||||
test('Layan-light-solid', t => {
|
||||
const variants = Variants.guess_from('Layan-light-solid');
|
||||
t.is(variants.get('day'), 'Layan-light-solid');
|
||||
t.is(variants.get('night'), 'Layan-dark-solid');
|
||||
});
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['aliz', 'azul', 'sea'].forEach(color => {
|
||||
test(`Matcha-${color}`, t => {
|
||||
const variants = Variants.guess_from(`Matcha-${color}`);
|
||||
t.is(variants.get('day'), `Matcha-${color}`);
|
||||
t.is(variants.get('night'), `Matcha-dark-${color}`);
|
||||
});
|
||||
|
||||
test(`Matcha-dark-${color}`, t => {
|
||||
const variants = Variants.guess_from(`Matcha-dark-${color}`);
|
||||
t.is(variants.get('day'), `Matcha-${color}`);
|
||||
t.is(variants.get('night'), `Matcha-dark-${color}`);
|
||||
});
|
||||
|
||||
test(`Matcha-light-${color}`, t => {
|
||||
const variants = Variants.guess_from(`Matcha-light-${color}`);
|
||||
t.is(variants.get('day'), `Matcha-light-${color}`);
|
||||
t.is(variants.get('night'), `Matcha-dark-${color}`);
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-compact'].forEach(size => {
|
||||
test(`Materia${size}`, t => {
|
||||
const variants = Variants.guess_from(`Materia${size}`);
|
||||
t.is(variants.get('day'), `Materia${size}`);
|
||||
t.is(variants.get('night'), `Materia-dark${size}`);
|
||||
});
|
||||
|
||||
test(`Materia-dark${size}`, t => {
|
||||
const variants = Variants.guess_from(`Materia-dark${size}`);
|
||||
t.is(variants.get('day'), `Materia${size}`);
|
||||
t.is(variants.get('night'), `Materia-dark${size}`);
|
||||
});
|
||||
|
||||
test(`Materia-light${size}`, t => {
|
||||
const variants = Variants.guess_from(`Materia-light${size}`);
|
||||
t.is(variants.get('day'), `Materia-light${size}`);
|
||||
t.is(variants.get('night'), `Materia-dark${size}`);
|
||||
});
|
||||
})
|
||||
@@ -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(`Mojave-light${transparency}${alt}`, t => {
|
||||
const variants = Variants.guess_from(`Mojave-light${transparency}${alt}`);
|
||||
t.is(variants.get('day'), `Mojave-light${transparency}${alt}`);
|
||||
t.is(variants.get('night'), `Mojave-dark${transparency}${alt}`);
|
||||
});
|
||||
|
||||
test(`Mojave-dark${transparency}${alt}`, t => {
|
||||
const variants = Variants.guess_from(`Mojave-dark${transparency}${alt}`);
|
||||
t.is(variants.get('day'), `Mojave-light${transparency}${alt}`);
|
||||
t.is(variants.get('night'), `Mojave-dark${transparency}${alt}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-compact'].forEach(size => {
|
||||
test(`Orchis${size}`, t => {
|
||||
const variants = Variants.guess_from(`Orchis${size}`);
|
||||
t.is(variants.get('day'), `Orchis${size}`);
|
||||
t.is(variants.get('night'), `Orchis-dark${size}`);
|
||||
});
|
||||
|
||||
test(`Orchis-dark${size}`, t => {
|
||||
const variants = Variants.guess_from(`Orchis-dark${size}`);
|
||||
t.is(variants.get('day'), `Orchis${size}`);
|
||||
t.is(variants.get('night'), `Orchis-dark${size}`);
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-Compact'].forEach(size => {
|
||||
test(`Plata${size}`, t => {
|
||||
const variants = Variants.guess_from(`Plata${size}`);
|
||||
t.is(variants.get('day'), `Plata${size}`);
|
||||
t.is(variants.get('night'), `Plata-Noir${size}`);
|
||||
});
|
||||
|
||||
test(`Plata-Noir${size}`, t => {
|
||||
const variants = Variants.guess_from(`Plata-Noir${size}`);
|
||||
t.is(variants.get('day'), `Plata${size}`);
|
||||
t.is(variants.get('night'), `Plata-Noir${size}`);
|
||||
});
|
||||
|
||||
test(`Plata-Lumine${size}`, t => {
|
||||
const variants = Variants.guess_from(`Plata-Lumine${size}`);
|
||||
t.is(variants.get('day'), `Plata-Lumine${size}`);
|
||||
t.is(variants.get('night'), `Plata-Noir${size}`);
|
||||
});
|
||||
})
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-manjaro', '-ubuntu'].forEach(color => {
|
||||
['', '-win'].forEach(alt => {
|
||||
test(`Qogir${color}${alt}`, t => {
|
||||
const variants = Variants.guess_from(`Qogir${color}${alt}`);
|
||||
t.is(variants.get('day'), `Qogir${color}${alt}`);
|
||||
t.is(variants.get('night'), `Qogir${color}${alt}-dark`);
|
||||
});
|
||||
|
||||
test(`Qogir${color}${alt}-dark`, t => {
|
||||
const variants = Variants.guess_from(`Qogir${color}${alt}-dark`);
|
||||
t.is(variants.get('day'), `Qogir${color}${alt}`);
|
||||
t.is(variants.get('night'), `Qogir${color}${alt}-dark`);
|
||||
});
|
||||
|
||||
test(`Qogir${color}${alt}light`, t => {
|
||||
const variants = Variants.guess_from(`Qogir${color}${alt}-light`);
|
||||
t.is(variants.get('day'), `Qogir${color}${alt}-light`);
|
||||
t.is(variants.get('night'), `Qogir${color}${alt}-dark`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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');
|
||||
|
||||
|
||||
['', '_Blue', '_Cyan', '_Green', '_Orange', '_Purple'].forEach(color => {
|
||||
['', '_Envolved'].forEach(variant => {
|
||||
test(`Simply_Circles${color}_Light${variant}`, t => {
|
||||
const variants = Variants.guess_from(`Simply_Circles${color}_Light${variant}`);
|
||||
t.is(variants.get('day'), `Simply_Circles${color}_Light${variant}`);
|
||||
t.is(variants.get('night'), `Simply_Circles${color}_Dark${variant}`);
|
||||
});
|
||||
|
||||
test(`Simply_Circles${color}${variant}`, t => {
|
||||
const variants = Variants.guess_from(`Simply_Circles${color}_Dark${variant}`);
|
||||
t.is(variants.get('day'), `Simply_Circles${color}_Light${variant}`);
|
||||
t.is(variants.get('night'), `Simply_Circles${color}_Dark${variant}`);
|
||||
});
|
||||
})
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
test('Teja', t => {
|
||||
const variants = Variants.guess_from('Teja');
|
||||
t.is(variants.get('day'), 'Teja');
|
||||
t.is(variants.get('night'), 'Teja_Dark');
|
||||
});
|
||||
|
||||
test('Teja_Dark', t => {
|
||||
const variants = Variants.guess_from('Teja_Dark');
|
||||
t.is(variants.get('day'), 'Teja');
|
||||
t.is(variants.get('night'), 'Teja_Dark');
|
||||
});
|
||||
|
||||
test('Teja_Darkest', t => {
|
||||
const variants = Variants.guess_from('Teja_Darkest');
|
||||
t.is(variants.get('day'), 'Teja');
|
||||
t.is(variants.get('night'), 'Teja_Darkest');
|
||||
});
|
||||
|
||||
test('Teja_Black', t => {
|
||||
const variants = Variants.guess_from('Teja_Black');
|
||||
t.is(variants.get('day'), 'Teja');
|
||||
t.is(variants.get('night'), 'Teja_Black');
|
||||
});
|
||||
|
||||
test('Teja_Light', t => {
|
||||
const variants = Variants.guess_from('Teja_Light');
|
||||
t.is(variants.get('day'), 'Teja_Light');
|
||||
t.is(variants.get('night'), 'Teja_Dark');
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
['', '-laptop'].forEach(size => {
|
||||
['', '-beryl', '-doder', '-ruby'].forEach(color => {
|
||||
test(`vimix${size}${color}`, t => {
|
||||
const variants = Variants.guess_from(`vimix${size}${color}`);
|
||||
t.is(variants.get('day'), `vimix${size}${color}`);
|
||||
t.is(variants.get('night'), `vimix-dark${size}${color}`);
|
||||
});
|
||||
|
||||
test(`vimix-dark${size}${color}`, t => {
|
||||
const variants = Variants.guess_from(`vimix-dark${size}${color}`);
|
||||
t.is(variants.get('day'), `vimix${size}${color}`);
|
||||
t.is(variants.get('night'), `vimix-dark${size}${color}`);
|
||||
});
|
||||
test(`vimix-light${size}${color}`, t => {
|
||||
const variants = Variants.guess_from(`vimix-light${size}${color}`);
|
||||
t.is(variants.get('day'), `vimix-light${size}${color}`);
|
||||
t.is(variants.get('night'), `vimix-dark${size}${color}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
|
||||
test('Yaru', t => {
|
||||
const variants = Variants.guess_from('Yaru');
|
||||
t.is(variants.get('day'), 'Yaru');
|
||||
t.is(variants.get('night'), 'Yaru-dark');
|
||||
});
|
||||
|
||||
test('Yaru-dark', t => {
|
||||
const variants = Variants.guess_from('Yaru-dark');
|
||||
t.is(variants.get('day'), 'Yaru');
|
||||
t.is(variants.get('night'), 'Yaru-dark');
|
||||
});
|
||||
|
||||
test('Yaru-light', t => {
|
||||
const variants = Variants.guess_from('Yaru-light');
|
||||
t.is(variants.get('day'), 'Yaru-light');
|
||||
t.is(variants.get('night'), 'Yaru-dark');
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
exports.Variants = ShellVariants;
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
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');
|
||||
|
||||
test('default', t => {
|
||||
const variants = Variants.guess_from('default');
|
||||
t.is(variants.get('day'), 'default');
|
||||
t.is(variants.get('night'), 'default-dark');
|
||||
});
|
||||
|
||||
test('default-dark', t => {
|
||||
const variants = Variants.guess_from('default-dark');
|
||||
t.is(variants.get('day'), 'default');
|
||||
t.is(variants.get('night'), 'default-dark');
|
||||
});
|
||||
|
||||
test('default-light', t => {
|
||||
const variants = Variants.guess_from('default-light');
|
||||
t.is(variants.get('day'), 'default-light');
|
||||
t.is(variants.get('night'), 'default-dark');
|
||||
});
|
||||
|
||||
test('default-darker', t => {
|
||||
const variants = Variants.guess_from('default-darker');
|
||||
t.is(variants.get('day'), 'default-darker');
|
||||
t.is(variants.get('night'), 'default-dark');
|
||||
});
|
||||
|
||||
test('default-darkest', t => {
|
||||
const variants = Variants.guess_from('default-darkest');
|
||||
t.is(variants.get('day'), 'default');
|
||||
t.is(variants.get('night'), 'default-darkest');
|
||||
});
|
||||
Reference in New Issue
Block a user