Some fancy decors and a color-picker

Here is the pixelcapture.tcl in FvwmButton (without the output button).

How to get active and inactive RGB color codes on a text file? For the output button to grab and add to PickColorsFromBG function?

pick-color-box

EDIT
Found the Apply output in pixelcapture.tcl line 23.
The below string works and finds the variable $colorpair(active) works fine when it is added below line 67.

exec echo $colorpair(active) > applyText.txt

Thomas Adam helped me figure out what’s happening, and it’s user-correctable. Here’s my diagnosis:

OK this is a trifle embarrassing but I think what’s been happening is that when fvwm invokes FvwmCommand from inside itself, it gets the fvwm2 version in /usr/bin instead of the new one in /usr/local/bin. When I invoke it from my shell, it gets /usr/local/bin. A consequence of having both versions installed. So when I run my script from its function, it says

FvwmCommand: invalid option – ‘d’

but when I explicitly type “Exec pixelcapture.tcl plain | /usr/local/bin/FvwmCommand -cd” into the console, it all works:
Trying to determine if /tmp/fvwm_mfl.sock exists as MFL socket …
Using /tmp/fvwm_mfl.sock as MFL socket.
Connecting to /tmp/fvwm_mfl.sock
Sending data to MFL socket /tmp/fvwm_mfl.sock

After I changed my PATH in both .tcshrc (my normal login shell) and .bashrc so that /usr/local/bin comes before bin, it started working right. But that’s a little sub-optimal because I may have broken fvwm2 on my machine, if not this time but if something similar happens in the future.

In Fvwm3 the FvwmCommand is located and named /usr/bin/Fvwm3Command. Tried different strings, gives the same stdout error.

EDIT:
exec echo $colorpair(active) $colorpair(inactive) > applyText.txt works fine when it is added below line 67 of pixelcapture.tcl

Thanks, everything works fine. I did a test on a fresh MX Linux install and tested it on both Fvwm2 and Fvwm3. Using the fvwmdecordemos v1.3.

Fvwm2 works without any changes.
Fvwm3 requires editing decor-setup.fvwm
+ I Exec $[DecorDemoHome]/pixelcapture.tcl $0 | /usr/bin/Fvwm3Command -c

Suggestion for the ReadMeDecors.txt.

  1. Requires packages tk and grabc to run Color-picker.
  2. Read $./decor-setup.fvwm
  3. Module FvwmCommandS
  4. For Fvwm3, edit decor-setup.fvwm line 92.

$[FVWMCMD_BIN]/FvwmCommand -c with /usr/bin/Fvwm3Command -c

It will be good to add one Fvwm version checker that does the editing at the startup. I am using a checker to run my configs in both Fvwm2 and 3.

fvwm3 -V > ver.txt
fvwm -V > ver.txt

Thank you, Fancy Decors is a great addition to Fvwm.

Color Picker:
color-picker

Good suggestions about the README. I’ll expand my note about the FvwmCommand issue, telling them to make sure they’re getting FvwmCommand from the same bin directory their fvwm version is in. It’s by no means certain that fvwm2 will be in /usr/bin and fwm3 in /usr/local/bin. With FreeBSD packages, I’ll have one or the other and not both, but either one will be in /usr/local. At my job, I would have compiled and installed for the whole department into /usr/pevtools/$VCO, where VCO was a 3-letter code that designated architecture, OS, and OS version. I think my guess at FVWMCMD_BIN would work for the majority of installation cases, but it’s not foolproof.

I think it’s a bug, or at least very sub-optimal, that fvwm doesn’t keep track of where it’s running from, only of where the user’s configuration is. From your mention of Fvwm3Command, it seems like that was done to address the problem but that solution was discarded for one reason or another.

Anyway, thank you very much for guiding me through all this.

Easier for the users, to have the correct FvwmCommand location and name in decor-setup.fvwm, is to make it into a variable.

FCom=$(find /usr -type f -name Fvwm*Command)
+ I Exec $[DecorDemoHome]/pixelcapture.tcl $0 | $FCom -c

Or with a Test (works fine)

Test (x /usr/bin/Fvwm3Command) + I Exec $[DecorDemoHome]/pixelcapture.tcl $0 | /usr/bin/Fvwm3Command -c
Test (x /usr/local/bin/FvwmCommand) + I Exec $[DecorDemoHome]/pixelcapture.tcl $0 | $[FVWMCMD_BIN]/FvwmCommand -c
Test (x /usr/bin/FvwmCommand) + I Exec $[DecorDemoHome]/pixelcapture.tcl $0 | /usr/bin/FvwmCommand -c

I filled out the Readme as you suggested. I didn’t implement the changes in the function, since hard paths are so prone to failure. And the find would fail often. For example, if I installed fvwm to run under Xquartz on my Mac, it would be in /opt. For the network setup I described above, /usr/pevtools would be an NFS mount and wouldn’t be found at all. Testing for Fvwm3Command is still a good idea, but I’ll need to play with that some more before I trust the added complexity.

Version 1.4 is released now.

Nice work, got the link from MX Linux. A few questions, one I already found is how permanently load same decor on startup. Example, nouveau decor
Function SwitchDecor nouveau.decor

Inactive and active title bar is black #000000, how to make the inactive with lighter color #5e5e5e

Hi, the only way to change the colors of any decor except “plain” and “minimalist” is to edit its file in the FancyDecors directory. For Nouveau, that would be FancyDecors/nouveau.decor. None of the background colorsets are really black, although Nouveau is very transparent and would look like that against a dark background. Decreasing the transparency (closer to 80 than 50) and/or changing the tint might do what you want.

Got the idea. From experience, RootTransparent does not work well in Fvwm. Compton and Xcompmgr make wallpaper become 100% transparent (grey).

Answer to my question, to have a different color for inactive and active bar, it seems there is minor bug in Nouveau and award.decor.

AddToDecor “nouveau” TitleStyle Inactive Colorset 0
AddToDecor “nouveau” TitleStyle Inactive MultiPixmap
Main Colorset 1 \

Changing Main Colorset 1 to 0, gives a different color.
For my own style, Colorset 1 fg cornsilk, bg ‘#888888 to #000000, looks nice.

nouveau

Ah yes, I see the typo. award.decor has it too, as I thought it might. Thank you for finding that, I’ll fix it.

I copied and modified a few decors to my Fvwm Extensions (myExt) collection of modules, decors, styles, etc. Only the title bar decor script part, not the menu and other modules.

What I like about having a choice of title bar decors, is to change the desktop look at any time. They are beautiful and able to change the mode from classic to modern to any choice. I have 9 of the fancy decors. Not as a function but as READ files. And each, one with a link to this forum. For example…

## Decors: aqua.decor
# Inspired by FancyDecors by robinlily
# https://fvwmforums.org/t/some-fancy-decors-and-a-color-picker/4180/1

Click the image to a screenshot

fancy-decors-fvwmExt-tmb

FVWM3 myExt GitHub
Click on folders /extraEXT/Decors/FancyDecor

@robinlily there is an excellent compositor for Fvwm which is light and fast. Check this recent topic Picom - compositor for Xorg.

@robinlily Finally I found how transparency is activated with terminal command that is missing in default Fvwm config, in the InitBackground and SetBG functions. To check a quick result, run this command in terminal. Depending on Fvwm version, either fvwm3-root or fvwm-root.
fvwm-root -r ~/.fvwm/.BGdefault

Add this line in the two functions and Restart.
+ I Exec exec fvwm-root -r ~/.fvwm/.BGdefault

Now I can see the beauty of the decors.
fancy-decor-transp

I find fvwm-root somewhat lacking in capabilities. At first I was sending gsettings commands to the session manager, with which I’m still trying to co-exist, but then I found out everyone uses “feh” to set their backdrop and I see why. My command is now “feh --bg-fill --no-fehbg ${PIC}”