Dark mode for KDE/Qt apps: write kdeglobals colors and set QT_QPA_PLATFORMTHEME
CI / test (push) Failing after 17s
CI / test (push) Failing after 17s
KWrite stayed light with the Dark mode switch on. KDE apps read their colors from the [Colors:*] groups of kdeglobals, not from the scheme's name, and the switch only set [General] ColorScheme with kwriteconfig. Qt 6 apps also had no platform theme under XDG_CURRENT_DESKTOP=chandra, so Qt reported an unknown (light) color scheme whatever the portal said, and KDE Frameworks 6 apps picked Breeze Light. - session/chandra-kde-colors dark|light copies the scheme's color groups into kdeglobals (counterpart of the current scheme, else Breeze, else Chandra's own ChandraDark/ChandraLight) and emits KGlobalSettings.notifyChange so running apps repaint. The compositor calls it from the switch. - chandra-session sets QT_QPA_PLATFORMTHEME to kde (plasma-integration) or xdgdesktopportal when unset, and passes it to the activation environment. - install.py installs the script and the two color schemes. - scripts/test-kde-colors.sh tests the rewriting, and that a running KWrite turns dark live; docs/dark-mode.md explains it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hjmk6mgq6Gg5vgKfMp
This commit is contained in:
8 files changed
+523
-12
No files matched your search
@@ -0,0 +1,125 @@
|
||||
# Chandra's own dark KDE color scheme, from the Moon Night desktop palette (config/themes).
|
||||
# chandra-kde-colors uses it when Breeze's schemes aren't installed.
|
||||
|
||||
[Colors:Window]
|
||||
BackgroundAlternate=39,49,64
|
||||
BackgroundNormal=31,41,55
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:View]
|
||||
BackgroundAlternate=24,32,48
|
||||
BackgroundNormal=17,24,39
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:Button]
|
||||
BackgroundAlternate=59,70,88
|
||||
BackgroundNormal=55,65,81
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:Selection]
|
||||
BackgroundAlternate=98,124,210
|
||||
BackgroundNormal=124,156,255
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=11,16,32
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=11,16,32
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=11,16,32
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:Tooltip]
|
||||
BackgroundAlternate=31,41,55
|
||||
BackgroundNormal=17,24,39
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:Complementary]
|
||||
BackgroundAlternate=31,41,55
|
||||
BackgroundNormal=17,24,39
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[Colors:Header]
|
||||
BackgroundAlternate=39,49,64
|
||||
BackgroundNormal=31,41,55
|
||||
DecorationFocus=124,156,255
|
||||
DecorationHover=124,156,255
|
||||
ForegroundActive=124,156,255
|
||||
ForegroundInactive=156,163,175
|
||||
ForegroundLink=124,156,255
|
||||
ForegroundNegative=248,113,113
|
||||
ForegroundNeutral=251,191,36
|
||||
ForegroundNormal=243,244,246
|
||||
ForegroundPositive=74,222,128
|
||||
ForegroundVisited=180,140,255
|
||||
|
||||
[ColorEffects:Disabled]
|
||||
Color=56,56,56
|
||||
ColorAmount=0
|
||||
ColorEffect=0
|
||||
ContrastAmount=0.65
|
||||
ContrastEffect=1
|
||||
IntensityAmount=0.1
|
||||
IntensityEffect=2
|
||||
|
||||
[ColorEffects:Inactive]
|
||||
ChangeSelectionColor=true
|
||||
Enable=false
|
||||
|
||||
[General]
|
||||
ColorScheme=ChandraDark
|
||||
Name=Chandra Dark
|
||||
|
||||
[WM]
|
||||
activeBackground=31,41,55
|
||||
activeBlend=243,244,246
|
||||
activeForeground=243,244,246
|
||||
inactiveBackground=17,24,39
|
||||
inactiveBlend=156,163,175
|
||||
inactiveForeground=156,163,175
|
||||
Reference in new issue
Block a user