C2N14 / AutomaThemely

Simple, set-and-forget python application for changing between desktop themes according to light and dark hours
GNU General Public License v3.0
206 stars 31 forks source link

Suggestion: LibreOffice Icon style #23

Open ajdunevent opened 5 years ago

ajdunevent commented 5 years ago

Some of the icon styles for LibreOffice offer a dark and a light mode and look weird if not used with a correspondingly light or dark theme (examples: "Sifr" and "Sifr (dark)").

The following line: <item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SymbolStyle" oor:op="fuse"><value>sifr_dark</value></prop></item>

in the following file: ~/.config/libreoffice/4/user/registrymodifications.xcu

changes the theme on my machine.

Annoying note: Any changes to the file that are made while LibreOffice is open will be overwritten.

ajdunevent commented 5 years ago

In case anyone is looking for an immediate solution, I use AutomaThemely's Scripts option under Extras to run at sunrise a script with the following:

#!/usr/bin/bash

while [ -n "`pgrep soffice`" ]
do
  sleep 5
done

sed -i 's/sifr/sifr_dark/g' ~/.config/libreoffice/4/user/registrymodifications.xcu

and at sunset:

#!/usr/bin/bash

while [ -n "`pgrep soffice`" ]
do
  sleep 5
done

sed -i 's/sifr_dark/sifr/g' ~/.config/libreoffice/4/user/registrymodifications.xcu

Note, I'm not great at this stuff so there are probably better ways to achieve this. Feedback welcome, of course!