themix-gui icon indicating copy to clipboard operation
themix-gui copied to clipboard

Multi-Export CLI custom filepath issue

Open nnra6864 opened this issue 8 months ago • 13 comments

How am I supposed to use the Base16 CLI? I was doing this till now:

/opt/oomox/plugins/theme_oomox/change_color.sh ~/.config/OomoxRicer -o Ricer
/opt/oomox/plugins/icons_suruplus_aspromauros/change_color.sh ~/.config/OomoxRicer -o Ricer
nwg-look -a

In order to apply the gtk theme and icons, however, I wanna have the gtk4 support which Base16 appears to have. So I generated a config, like in the examples I saw:

scheme: "Ricer"
author: "nnra"
base00: "ricer.col.background"
base01: "ricer.col.background_alt"
base02: "ricer.col.background_highlight"
base03: "ricer.col.foreground_inactive"
base04: "ricer.col.foreground_alt"
base05: "ricer.col.foreground"
base06: "ricer.col.foreground_highlight"
base07: "ricer.col.background_highlight"
base08: "ricer.col.br_red"
base09: "ricer.col.yellow"
base0A: "ricer.col.br_yellow"
base0B: "ricer.col.br_green"
base0C: "ricer.col.br_cyan"
base0D: "ricer.col.br_blue"
base0E: "ricer.col.br_magenta"
base0F: "ricer.col.foreground_highlight"

And I just can't figure out how to apply it via CLI.

nnra6864 avatar Apr 24 '25 08:04 nnra6864

if the CLI too complicated to understand how prepare setup in its file format manually - you could first do the multi-export from GUI, save that Export Config, and next just reuse it in CLI ( ~/.config/oomox/export_config/ )

also see themix-multi-export --help

actionless avatar Apr 25 '25 18:04 actionless

Hey, I only now realized what you were saying with the multiexport thing and it's awesome. However, there is a major issue that I can't solve. Whenever I try to use it via CLI:

themix-multi-export ~/.config/oomox/export_config/multi_export_Ricer.json ~/.config/OomoxRicer

It renames all my config file names to oomox-Gigavolt:

Image

For example, if the original path was:

/home/nn/.config/nvim/lua/Ricer.lua

It will be changed to

/home/nn/.config/nvim/colors/oomox-Gigavolt.lua

Am I doing something wrong or is this a bug?

nnra6864 avatar Sep 30 '25 10:09 nnra6864

you mean, it does replaces those paths right inside ~/.config/oomox/export_config/multi_export_Ricer.json file? if so then it must be a bug because CLI supposed to read it only

also, does that happens after or before export of theme files, e.g. where does the theme getting exported to, to original location or to overwritten one

actionless avatar Oct 01 '25 07:10 actionless

Everything gets exported to the overwritten location. It doesn't happen with just the CLI or export, it happens when I try to duplicate(save as) the export config too:

Original: Image

Duplicate: Image

Original after duplication: Image

nnra6864 avatar Oct 01 '25 09:10 nnra6864

As for the export config file, it doesn't seem to contain any custom paths I entered, here:

multi_export_Ricer.json

nnra6864 avatar Oct 01 '25 09:10 nnra6864

thanks for the details, i'll look into it later

actionless avatar Oct 01 '25 18:10 actionless

btw i've noticed that for some reason on your screen export dialog looks broken (missing the checkboxes) - is that some problem with your gtk theme or mb you're using some outdated version of themix-gui?

Image

actionless avatar Oct 01 '25 18:10 actionless

i've checked, it seems indeed that only the parent directory is being saved, not the filename, could you confirm the parent directory saved correctly or it's not saved for you at all, or being reset afterwards?

{
  "0": {
    "name": "theme",
    "config": {
      "gtk2_hidpi": true,
      "self.OPTIONS.GTK3_CURRENT_VERSION_ONLY": true,
      "self.OPTIONS.EXPORT_CINNAMON_THEME": false,
      "default_path": "/home/lie/.themes/<THEME_NAME>"
    }
  },
  "1": {
    "name": "icons",
    "config": {
      "default_path": "/home/lie/.icons/<THEME_NAME>"
    }
  },
  "2": {
    "name": "base16",
    "config": {
      "default_path": "/home/lie",
      "last_variant": "gtk4-libadwaita1.7.2",
      "last_app": "gtk4-oodwaita",
      "default_path_gtk4-oodwaita": "/home/lie"
    }
  },
  "3": {
    "name": "base16",
    "config": {
      "default_path": "/home/lie",
      "last_variant": "breeze",
      "last_app": "qt5ct",
      "default_path_qt5ct": "/home/lie"
    }
  },
  "4": {
    "name": "base16",
    "config": {
      "default_path": "/home/lie",
      "last_variant": "breeze",
      "last_app": "qt6ct",
      "default_path_qt6ct": "/home/lie"
    }
  },
  "5": {
    "name": "export_xresources",
    "config": {
      "default_path": "/home/lie/.Xcolours/<THEME_NAME>"
    }
  }
}

actionless avatar Oct 01 '25 18:10 actionless

The basename of file is not saved on purpose - because if it will be saved, then if you'll try to export a different theme using the same multi-export preset - it would still have the name of the previous theme

actionless avatar Oct 01 '25 19:10 actionless

btw i've noticed that for some reason on your screen export dialog looks broken (missing the checkboxes) - is that some problem with your gtk theme or mb you're using some outdated version of themix-gui?

That is just my GTK theme, for some reason, transparency causes issues such as that one.

i've checked, it seems indeed that only the parent directory is being saved, not the filename, could you confirm the parent directory saved correctly or it's not saved for you at all, or being reset afterwards?

The path also gets changed, but the behavior is quite weird. For example, if I change the telegram path from: Image

To: Image

And then save and duplicate the export layout, it ends up this way: Image

The basename of file is not saved on purpose - because if it will be saved, then if you'll try to export a different theme using the same multi-export preset - it would still have the name of the previous theme

I see, it'd be nice if there was an option to save the name as I always use the same theme with different colors. On top of Themix, I use my own app Ricer, to generate all the themes(including the Oomox one), which I then process with Themix to get GTK and a few other themes I can't generate myself. Therefore, it'd be nice if I could always just name the exported theme Ricer instead of oomox-Ricer.

nnra6864 avatar Oct 02 '25 05:10 nnra6864

thanks for details, it seems there is a bug during computing parent directory, i'll look into it later on

and regarding fixed filenames option - if you have some clear idea how to implement that in UI - then we could agree on it, and you could make a PR for implementing such option

actionless avatar Oct 02 '25 08:10 actionless

thanks for details, it seems there is a bug during computing parent directory, i'll look into it later on

I see, thanks for taking a look at it!

and regarding fixed filenames option - if you have some clear idea how to implement that in UI - then we could agree on it, and you could make a PR for implementing such option

The best idea I currently have is to use placeholders in names, e.g. $themeName, that would get replaced with the theme name or something else if needed. As for taking a look at the code, I am a bit busy atm but might give it a try at a later date, I am also not too familiar with python but I might be able to pull it off. Will get back to you and make a PR if I figure something out.

nnra6864 avatar Oct 02 '25 14:10 nnra6864

actually the idea with placeholders could be quite nice, especially as they already used under the hood, so they should be just exposed, so i could do that while fixing the thing with dirpath

actionless avatar Oct 02 '25 19:10 actionless

I am using multi-export from the GUI only.

  • When saving the path, ~ gets turned into an absolute path. This prevents me from syncing my config between 2 different machines where I have different usernames.
  • Base16 paths don't seem to be saved at all. They always become /home/user/.config/themes/oomox-BWnB.dunstrc, even if I, for example, manually input and save /home/user/.config/dunst/theme.dunstrc

The basename of file is not saved on purpose - because if it will be saved, then if you'll try to export a different theme using the same multi-export preset - it would still have the name of the previous theme

This could actually be a good thing. Imagine you have a theme called mytheme, you set it as the default theme everywhere, then whenever you want to change it you multi-export on top of it, overwriting the old configs.

I think the best solution would be to have themix not touch export paths at all, except replacing some mytheme-${THEMENAME}.css in the path, with a "reset to default" button next to the textbox, which would automatically generate the path as it currently does.

wait-what avatar Dec 10 '25 14:12 wait-what

@wait-what we already came to conclusion above that the most optimal solution to that problem would be to use template strings like "{THEME_NAME}" in the export path, so it could be either dynamic or hardcoded if not using the template.

the problem that i caught up a bit in my DSP / AI development, so didn't had a moment yet to implement any of what we discussed

actionless avatar Dec 10 '25 15:12 actionless

and btw if any of you feeling like trying to make a PR with fix - i could help you if you'll stuck

actionless avatar Dec 19 '25 07:12 actionless