site  contact  subhomenews

Oomox GTK theme designer

April 12, 2022 — BarryK

I posted yesterday about compiling some dependencies in OE:

https://bkhome.org/news/202204/dependencies-for-new-app-compiled-in-oe.html

That mysterious new app is "Oomox". Project page:

https://github.com/themix-project/oomox

This is my experiment "FlatGreyLightBluish", based on "Retro:7of31" theme:

img1

Nice, it creates consistent theme for both GTK2 and GTK3. In the case of GTK2, it requires the "murrine" engine to be installed.

Some criticisms though; the GUI has limited adjustments, mostly just colours. You copy an existing theme, then modify colours -- and you can't import a theme.

Another criticism is that the generated theme is large, mostly because, for gtk 3.20+, it has a file 'gtk.gresource' that is about 5MB.

Hmmm, yes... with GTK2, and GTK3 prior to 3.20, you could define an engine, then just apply modifications to it -- or not even that -- in GTK2 you can just apply changes to individual widgets, modifications to the inbuilt theme. From GTK 3.20, engines are no longer supported, and CSS rules have to be provided for every widget. Absolutely every widget -- if you leave out CSS for a widget, it won't display. There doesn't seem to be any mechanism to fallback to the inbuilt theme.

...which leaves me gobsmacked.

Maybe I was having a period of thickness yesterday, but it took me a few hours to figure out how to build Oomox. I eventually created a script, based on an old SlackBuild script. Here it is:

#!/bin/sh

CWD=$(pwd)
TMP=${CWD}/build
PKG=${TMP}/package-oomox

rm -rf $TMP 2>/dev/null
sync

mkdir -p $PKG
cd $TMP

tar -xf ${CWD}/src/oomox-1.14.tar.gz
cd oomox-1.14
make -f po.mk install
rm -f po/*.po~

mkdir -p $PKG/opt/oomox
cp -a colors locale oomox_gui plugins po terminal_templates \
gui.sh \
$PKG/opt/oomox

tar -xf ${CWD}/src/archdroid-icon-theme-1.0.2.tar.gz --strip-components=1 \
-C $PKG/opt/oomox/plugins/icons_archdroid

tar -xf ${CWD}/src/gnome-colors-icon-theme-5.5.5.tar.gz --strip-components=1 \
-C $PKG/opt/oomox/plugins/icons_gnomecolors
( cd $PKG/opt/oomox/plugins/icons_gnomecolors
rm -rf gnome-colors-icon-theme
mv gnome-colors gnome-colors-icon-theme )

tar -xf ${CWD}/src/oomoxify-1.2.5.tar.gz --strip-components=1 \
-C $PKG/opt/oomox/plugins/oomoxify

tar -xf ${CWD}/src/oomox-gtk-theme-1.12.2.tar.gz --strip-components=1 \
-C $PKG/opt/oomox/plugins/theme_oomox

tar -xf ${CWD}/src/themix-plugin-base16-1.2.tar.gz --strip-components=1 \
-C ${PKG}/opt/oomox/plugins/base16

rm -fr $PKG/opt/oomox/plugins/*/.git* \
$PKG/opt/oomox/plugins/*/*/.git* \
$PKG/opt/oomox/plugins/theme_oomox/.editorconfig \
$PKG/opt/oomox/plugins/theme_oomox/.*.yml \
$PKG/opt/oomox/plugins/theme_oomox/{D,d}ocker* \
$PKG/opt/oomox/plugins/theme_oomox/maintenance* \
$PKG/opt/oomox/plugins/theme_oomox/screenshot* \
$PKG/opt/oomox/plugins/theme_oomox/test*

mkdir -p $PKG/usr/bin
cp -a packaging/bin/* $PKG/usr/bin

mkdir -p $PKG/usr/share/appdata
cp -a packaging/com.github.themix_project.Oomox.appdata.xml $PKG/usr/share/appdata

mkdir -p $PKG/usr/share/applications
cp -a packaging/com.github.themix_project.Oomox.desktop $PKG/usr/share/applications

mkdir -p $PKG/usr/share/icons/hicolor/symbolic/apps
cp -a packaging/com.github.themix_project.Oomox-symbolic.svg \
$PKG/usr/share/icons/hicolor/symbolic/apps/com.github.themix_project.Oomox-symbolic.svg

mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
cp -a packaging/com.github.themix_project.Oomox.svg \
$PKG/usr/share/icons/hicolor/scalable/apps/

sync
echo done
###end###

I got icon exporting to work, at least for "ArchDroid" icons, but had to perform a little hack. Let's see: in /opt/oomox/plugins/icons_archdroid, copied 'change_color.sh' into folder 'archdroid-icon-theme, then inside folder 'archdroid-icon-theme' created a symlink "ln -s . archdroid-icon-theme". Don't know why had to do this, but it worked.

The install instructions are as clear as mud. Seems they just expect you to run their flatpak.

I have made it into an SFS, and later on you will be able to install it via "sfsget" icon on the desktop (or systray); however, wait until EasyOS 3.4.6 is released as that will have some needed extra dependencies.

Note, the dependency list is quite large, so you will be challenged to get this SFS to work on other pups. For a pup based on a mainline distro repository, you might be able to find Oomox package and all the deps will be installed also. Or run the flatpak.    

Tags: easy