User Tools

Site Tools


sway:dark-mode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
sway:dark-mode [2020/10/12 22:16] adminsway:dark-mode [2020/10/14 16:32] admin
Line 11: Line 11:
 satisfaction of knowing what's going on. satisfaction of knowing what's going on.
  
-In my own history through fvwm, fluxbox, i3wm and now sway I've never+In my own history through **fvwm****fluxbox****i3wm** and now **sway** I've never
 really wanted to bother with themes. I just made terminals and emacs really wanted to bother with themes. I just made terminals and emacs
 have a black background and other programs could do what ever they have a black background and other programs could do what ever they
Line 161: Line 161:
 KDE/Qt5/Plasma/whatcha-ma-call-it KDE/Qt5/Plasma/whatcha-ma-call-it
  
-Here be dragons. I have NO IDEA how to script thisIf you know how to +Thanks to redditor r/progandy for this: 
-script a theme change, please let me know!+ 
 +''**qt5ct**(1)'' is the key - install it (Fedora) with: 
 + 
 +<code> 
 +sudo dnf install qt5ct 
 +</code> 
 + 
 +This needs to be in the session environment: 
 + 
 +<code> 
 +export QT_QPA_PLATFORMTHEME=qt5ct 
 +</code> 
 + 
 +After running ''**qt5ct**(1)'' now have a ''~/.config/qt5ct/qt5ct.conf'' file that contains a line: 
 + 
 +<code> 
 +style=Adwaita 
 +</code> 
 + 
 +... I can hit that with my script and the qt5 programs automatically change their appearance! 
 + 
 +Oddly, there's a 4s delay after changing the style in the file before the new style takes effect. But that's OK. 
 + 
 +I also built [[https://gitlab.com/zetaPRIME/qt5ct-refresh|qt5ct-refresh]] but it doesn't seem to speed up the 4s delay - or do anything AFAICT.
  
 ===dark-mode=== ===dark-mode===
Line 240: Line 263:
     dconf write /org/gnome/desktop/interface/gtk-theme "'$new_gtk_theme'"     dconf write /org/gnome/desktop/interface/gtk-theme "'$new_gtk_theme'"
     #gsettings set org.gnome.desktop.interface gtk-theme $new_gtk_theme     #gsettings set org.gnome.desktop.interface gtk-theme $new_gtk_theme
 +
 +    f=~/.config/qt5ct/qt5ct.conf
 +    [[ -w $f ]] &&
 +        sed -i "s/^style=.*/style=$new_gtk_theme/" $f
  
     [[ "$KITTY_WINDOW_ID" ]] &&     [[ "$KITTY_WINDOW_ID" ]] &&
sway/dark-mode.txt · Last modified: 2021/01/07 23:54 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki