Skip to content

Commit

Permalink
feat: detect Dark/Light mode-change on enable #79
Browse files Browse the repository at this point in the history
  • Loading branch information
neuromorph committed Oct 3, 2024
1 parent e665a18 commit dd28ee7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions openbar@neuromorph/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,8 @@ export default class Openbar extends Extension {
else {
// If mode was changed (by script/extension) while OpenBar was disabled (screen-lock),
// detect mode-change and update styles
let bguriDark = this._bgSettings.get_string('picture-uri-dark');
let bguriLight = this._bgSettings.get_string('picture-uri');
let currentBgUri = (this.colorScheme == 'prefer-dark') ? bguriDark : bguriLight;
if(bguri != currentBgUri)
let obarScheme = this._settings.get_string('color-scheme');
if(obarScheme != this.colorScheme)
this.onModeChange();
}

Expand Down

0 comments on commit dd28ee7

Please sign in to comment.