ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.18k stars 157 forks source link

Dark Mode doesn't automatically activate based upon the DE's colouration. #491

Open RokeJulianLockhart opened 2 months ago

RokeJulianLockhart commented 2 months ago

Expected Behavior

I expect Proton Bridge to adhere to my DE's colouration. This applies to at least Windows 10, Windows 11, KDE Plasma 5, KDE Plasma 6, and GNOME 30 and GNOME 40.

Possible Solution

Adhere to it.

Steps to Reproduce

#!/usr/bin/env -S pwsh

#```PS1
#Requires -PSEdition 'Core'
#```

Get-Command -Name 'protonmail-bridge'
If ($? -Eq $True) {& protonmail-bridge}
If ("$Env:XDG_CURRENT_DESKTOP" -Eq "KDE") {
    If (lookandfeeltool --list | Select-String -Pattern 'org.kde.breezedark.desktop') {
        lookandfeeltool --apply 'org.kde.breezedark.desktop'
    }
}

Current Behavior

Notice how it remains white?

Version Information

```log PS /home/RokeJulianLockhart> dnf5 info protonmail-bridge Updating and loading repositories: Repositories loaded. Installed packages Name : protonmail-bridge Epoch : 0 Version : 3.12.0 Release : 1 Architecture : x86_64 Installed size : 168.1 MiB Source : protonmail-bridge-3.12.0-1.src.rpm From repository : @commandline Summary : Proton Mail Bridge URL : https://proton.me/mail/bridge License : GPLv3 Description : Proton Mail Bridge is a desktop application that runs in the background, encrypting and decrypting messages as they enter and leave your computer. Vendor : Proton AG PS /home/RokeJulianLockhart> ```

Context (Environment)

I have to manually change the theme in the application every time I access it, because my DE automatically switches between dark and light themes based upon local sunset/sunrise times (I use https://github.com/oskarsh/Yin-Yang/releases/tag/v3.4).

Detailed Description

Merely change the boolean value currently set by that toggle in the GUI based upon the undermentioned.

Possible Implementation

The current theme is probably exposed via DBus, so you can wait for a command from there, rather than constantly poll for the current theme.

RokeJulianLockhart commented 2 months ago

https://github.com/ProtonMail/proton-bridge/issues/491#issue-2501090201

This vaguely relates to https://github.com/ProtonMail/proton-bridge/issues/475#issue-2283034235, since implementing that shall probably require the same implementation method.