Hide quick settings tile for dark mode 🚸

This commit is contained in:
Daniel Thwaites 2023-01-19 18:17:15 +00:00
parent 16d6d932a0
commit 7078443eff
No known key found for this signature in database
GPG key ID: D8AFC4BF05670F9D
3 changed files with 35 additions and 1 deletions

View file

@ -16,6 +16,9 @@ with lib;
picture-uri-dark = "file://${config.stylix.image}";
};
# We show the same colours regardless of this setting, and the quick
# settings tile is removed. The value is still used by Epiphany to
# request dark mode for websites which support it.
"org/gnome/desktop/interface".color-scheme =
if config.stylix.polarity == "dark"
then "prefer-dark"
@ -42,7 +45,10 @@ with lib;
rm data/theme/gnome-shell-sass/{_colors.scss,_palette.scss}
cp ${colors} data/theme/gnome-shell-sass/_colors.scss
'';
patches = (oldAttrs.patches or []) ++ [ ./shell.patch ];
patches = (oldAttrs.patches or []) ++ [
./shell_colors.patch
./shell_remove_dark_mode.patch
];
});
});
})];

View file

@ -0,0 +1,28 @@
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 94dffda73..8decf5629 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -361,7 +361,6 @@ class QuickSettings extends PanelMenu.Button {
this._location = new imports.ui.status.location.Indicator();
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
this._nightLight = new imports.ui.status.nightLight.Indicator();
- this._darkMode = new imports.ui.status.darkMode.Indicator();
this._powerProfiles = new imports.ui.status.powerProfiles.Indicator();
this._rfkill = new imports.ui.status.rfkill.Indicator();
this._autoRotate = new imports.ui.status.autoRotate.Indicator();
@@ -374,7 +373,6 @@ class QuickSettings extends PanelMenu.Button {
this._indicators.add_child(this._nightLight);
if (this._network)
this._indicators.add_child(this._network);
- this._indicators.add_child(this._darkMode);
this._indicators.add_child(this._powerProfiles);
if (this._bluetooth)
this._indicators.add_child(this._bluetooth);
@@ -397,7 +395,6 @@ class QuickSettings extends PanelMenu.Button {
this._addItems(this._bluetooth.quickSettingsItems);
this._addItems(this._powerProfiles.quickSettingsItems);
this._addItems(this._nightLight.quickSettingsItems);
- this._addItems(this._darkMode.quickSettingsItems);
this._addItems(this._rfkill.quickSettingsItems);
this._addItems(this._autoRotate.quickSettingsItems);
this._addItems(this._unsafeMode.quickSettingsItems);