You are not logged in.

#1 2026-03-15 03:24:32

akai
Member
Registered: 2026-01-11
Posts: 23

Matugen scheme generation integration.

After the latest update matugen only works on tty showing an interactive panel to choose primary scheme from so couldnt get around to interact with rofi and qt. have anyone got around with it?


"一期一会"
聞くは一時の恥聞かぬは一生の恥 o

Offline

#2 2026-03-15 03:37:27

5hridhyan
Member
Registered: 2025-12-25
Posts: 384

Re: Matugen scheme generation integration.

Instead of letting matugen ask you for a scheme, explicitly pass the scheme type...


Keep your virtue sharpened in a kingdom of carrion, and the throne they offer will be built from your ribs.

Offline

#3 2026-03-15 03:40:01

akai
Member
Registered: 2026-01-11
Posts: 23

Re: Matugen scheme generation integration.

akai@akai ~> matugen image Pictures/Wallpapers/konachan_random_imageff.png --type scheme-tonal-spot
Select the color you want to use as source color
Use arrow keys to navigate and Enter to select:
> #1dd5d5   
  #e0aa49   
  #024984   
  #b1bca6

even though its showing


"一期一会"
聞くは一時の恥聞かぬは一生の恥 o

Offline

#4 2026-03-15 04:03:11

5hridhyan
Member
Registered: 2025-12-25
Posts: 384

Re: Matugen scheme generation integration.

hmm, I think you need to also add the source color option so Matugen doesn’t open the picker, or explicitly give a hex color


Keep your virtue sharpened in a kingdom of carrion, and the throne they offer will be built from your ribs.

Offline

#5 2026-03-15 07:45:42

akai
Member
Registered: 2026-01-11
Posts: 23

Re: Matugen scheme generation integration.

Man...
Done..

#!/bin/bash

WALL_DIR="$HOME/Pictures/Wallpapers"
PWD="$(pwd)"

cd "$WALL_DIR" || exit 1
IFS=$'\n'

SLCTD_WALL=$(for a in *.png *.jpg *.webp *.gif; do echo -en "$a\0icon\x1f$WALL_DIR/$a\n" ; done | rofi -dmenu -show-icons -config ~/.config/rofi/dmenu.rasi -transient-window -name wallselect -p "")
if [ -n "$SLCTD_WALL" ]; then
  timeout 0.5s script -q -c "matugen image $SLCTD_WALL" /tmp/matugen.txt
  grep -o "#[0-9a-f]*" /tmp/matugen.txt > /tmp/matugen_choice.txt
  CHOICE=$(cat /tmp/matugen_choice.txt | rofi -dmenu -p "Choose scheme")
  matugen image $SLCTD_WALL --source-color-index $(grep -n "$CHOICE" /tmp/matugen_choice.txt | cut -d: -f1)
fi

cd "$PWD" || exit


"一期一会"
聞くは一時の恥聞かぬは一生の恥 o

Offline

#6 2026-03-15 08:46:50

5hridhyan
Member
Registered: 2025-12-25
Posts: 384

Re: Matugen scheme generation integration.

lol that script and timeout combo is a wild workaround, and glad you got it working, like you can actually skip the TTY scraping entirely, matugen has a --color (or -c) flag specifically to handle this headlessly, if you pass --color first, it'll just grab the primary color and run without asking, or you can feed it a hex directly if you still want that second Rof! menu for choices, saves you from having to mess with /tmp files and pseudo--terminals!

since your original issue is resolved, please mark the thread as solved by editing #1, so others can know there is no task left to do, but maybe a solution to find...
Thanks ^^

edit:
fixed typo.

Last edited by 5hridhyan (2026-03-15 10:29:35)


Keep your virtue sharpened in a kingdom of carrion, and the throne they offer will be built from your ribs.

Offline

#7 2026-03-15 09:13:24

akai
Member
Registered: 2026-01-11
Posts: 23

Re: Matugen scheme generation integration.

5hridhyan wrote:

lol that script and timeout combo is a wild workaround, and glad you got it working, but I just got to know, you can actually skip the TTY scraping entirely, matugen has a --color (or -c) flag specifically to handle this headlessly, if you pass --color first, it'll just grab the primary color and run without asking, or you can feed it a hex directly if you still want that second Rof! menu for choices, saves you from having to mess with /tmp files and pseudo--terminals!

since your original issue is resolved, please mark the thread as solved by editing #1, so others can know there is no task left to do, but maybe a solution to find...
Thanks ^^

MM.. big_smile I just needed to get it worked to add in qs. I already had one script for rofi so tried. And the color need a hex value and i cant quite get around with it..  So,.


"一期一会"
聞くは一時の恥聞かぬは一生の恥 o

Offline

#8 Yesterday 22:39:47

rensaro
Member
Registered: Yesterday
Posts: 1

Re: Matugen scheme generation integration.

I made it like this: matugen image $SELECTED_PATH -m dark --source-color-index 1

So --source-color-index skip interaction and choose 2 variant

Last edited by rensaro (Today 08:57:20)

Offline

Board footer

Powered by FluxBB