How to change icon-theme when the system switches to dark/light?

Hi!
I use LibreOffice on Linux, and I am a big user or dark/light theme switcher.
I do not have any issue about the global theme of LibreOffice which automatically switches with the system, however it is not the case for the icons.

When I switch to dark theme, since the icon-theme do not switch too, it is very difficult to see them since most of them are black on a dark background.

I know Ubuntu found a trick with the Yaru icon-theme for LibreOffice being dark with a white outline, but I’m not fond of the Yaru icons.

I’ve found two icon-themes available through two extensions that both provide a light and a dark version of the icons :
https://github.com/rizmut/libreoffice-style-breeze
idem/libreoffice-style-colibre

But I can only change them manually.

I have therefore two questions :
1. Is there a way to automatically change the icon set? I could make a script to change the icon-theme of LibreOffice when I switch to dark/light theme, but… I don’t know how to change the icon-theme other than via the LO options, so via the graphical interface. Is there a command to change this setting?

2. If you do not know or if it is not possible to change the icon-theme automatically or through the command line : maybe you can suggest me another icon theme that would have found the same trick as the Yaru icon-theme for LibreOffice?

I want to change the default automatic icon theme to my liking as well, as I don’t like the preset default on Linux (Elementary on light them, and Sifr on dark theme).

The only solution to this issue, as I am switching between light and dark themes a lot, is to use the Yaru theme. It’s better than both Elementary and Sifr. But I would prefer Colibre icons.

I think this bug report is working towards the solution you want, Bug 148764 - Icon themes need to include metadata and different variants in one package

Was patched to your current icons in tdf#127138

1 Like
' Change Icon Theme to "Breeze"
Sub ChangeIconTheme
    Dim keyNode As Object, oDriver As Object
    With GlobalScope.Basiclibraries
        If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
    End With
    keyNode = Tools.Misc.GetRegistryKeyContent("org.openoffice.Office.Common/Misc", True)
     
    KeyNode.SymbolStyle="breeze"     ' Breeze style  
    ' KeyNode.SymbolStyle="auto"     ' Automatic style
    
    keyNode.commitChanges    
End Sub
1 Like