From ddbbeee688c2d43bec9550f8b2dd799255126143 Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Thu, 13 Feb 2020 14:44:03 +0100 Subject: [PATCH] Add Vimix theme support --- README.md | 1 + src/extension.js | 4 ++++ src/metadata.json | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea58b69..154a242 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ These themes have been tested and work: - Matcha (thank you @Chrysostomus) - Materia - Mojave +- Vimix - Yaru Let me know if the theme you use works as well, or if it doesn't, I can try to make it work. diff --git a/src/extension.js b/src/extension.js index 8e14b83..bf896f9 100644 --- a/src/extension.js +++ b/src/extension.js @@ -192,6 +192,10 @@ class Variants { variants.day = name.replace('-dark', '-light'); variants.night = variants.day.replace('-light', '-dark'); } + else if ( name.includes('vimix') ) { + variants.day = name.replace('-dark', ''); + variants.night = variants.day.replace(/vimix(-light)?/g, 'vimix-dark'); + } else { variants.day = name.replace(/-dark(?!er)/g, ''); variants.night = variants.day.replace(/(-light)?(-darker)?/g, '') + '-dark'; diff --git a/src/metadata.json b/src/metadata.json index c5032c8..4f03018 100644 --- a/src/metadata.json +++ b/src/metadata.json @@ -1,6 +1,6 @@ { "name": "Night Theme Switcher", - "description": "Automatically change the GTK theme to dark variant when Night Light activates.\n\nTHEME COMPATIBILITY:\nYour theme must have a `-dark` variant, e.g. `Adwaita` and `Adwaita-dark`.\nThese themes have been tested and work:\n- Adwaita\n- Arc\n- HighContrast\n- Matcha\n- Materia\n- Mojave\n- Yaru\n\nLet me know if the theme you use works as well, or if it doesn't, I can try to make it work.\n\nDo you need to change your GNOME shell theme as well? Try Night Shell Switcher! https://extensions.gnome.org/extension/2356/night-shell-switcher/", + "description": "Automatically change the GTK theme to dark variant when Night Light activates.\n\nTHEME COMPATIBILITY:\nYour theme must have a `-dark` variant, e.g. `Adwaita` and `Adwaita-dark`.\nThese themes have been tested and work:\n- Adwaita\n- Arc\n- HighContrast\n- Matcha\n- Materia\n- Mojave\n- Vimix\n- Yaru\n\nLet me know if the theme you use works as well, or if it doesn't, I can try to make it work.\n\nDo you need to change your GNOME shell theme as well? Try Night Shell Switcher! https://extensions.gnome.org/extension/2356/night-shell-switcher/", "uuid": "nightthemeswitcher@romainvigier.fr", "url": "https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/", "version": 13,