Closed C-Yassin closed 3 weeks ago
This isn't a bug. There are no themes name -mixed. This is just a combination of light and dark themes and the dark mode set to "Let application decide". So you will get a mix of light and dark applications.
If that the case, how to differentiate between them.
Or just how to know the user selected the "mixed" option?
i fixed it using this. Thank you tho!
def is_dark_mode_enabled_linux_mint(self):
theme_cmd = ["gsettings", "get", "org.cinnamon.theme", "name"]
theme_result = subprocess.run(theme_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
if theme_result.returncode != 0:
return "dark"
theme_name = theme_result.stdout.strip().replace("'", "") # Remove any single quotes
# Construct the path to the theme's CSS file
theme_path = f"/usr/share/themes/{theme_name}/cinnamon/cinnamon.css"
# Run grep command to check for the dark mode color
cmd = ["grep", "-i", "background-color: *#2f2f2f", theme_path]
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
# Get the output of the grep command
theme_check = result.stdout.strip().lower()
# Check if the grep command returned any result
if not theme_check:
return "light"
else:
return "dark"
Distribution
Linux Mint 22 Wilma
Package version
6.2.9
Graphics hardware in use
Intel 3rd Gen Core processor Graphics
Frequency
Always
Bug description
Hello everyone! Why the mixed theme and the light theme have the same name? i think it's a bug, it causes me troubles when making my app
both the light and mixed one output [code]'mint-y-aqua'[/code] except the dark theme which does good
'mint-y-dark-aqua'
Steps to reproduce
Expected behavior
Mixed theme should output 'mint-y-mixed-aqua'
Additional information
No response