edit: I guess I’ll put it on Sourceforge. Busy weekend, it’ll be up in a few days.
I have this collection of decors, and I’ve made a tool that lets you pick two colors from your screen wallpaper and use them in titlebars in a couple of simple themes. Some of the decors don’t make much sense unless you see the wallpaper they were designed to go with, but they demonstrate some configs anyway. I’ve got it all in a tarball with a readme. I suppose I could release it on Sourceforge but not sure that’s the best way to distribute it.
I made thumbnails as you suggested. I put them in the same directory with the buttons though. I rearranged things so that almost all the files are in a subdirectory, which will make it cleaner to drop into a config. I also moved a couple of lines to the setup file so the user doesn’t have to bother with them. I like the thumbnails myself; I was just too lazy to do it. :-) Releasing as version 1.1 on Sourceforge.
Great improvement including decor-setup.fvwm in the root folder for users to modify. Also, there is a choice not to decorate the menu by not loading the menuDecors.fvwm script.
The color-picker cannot get it to work in the terminal.
$ tclsh pixelcapture.tcl
invalid command name "wm"
while executing
"wm geometry . 300x200"
(file "pixelcapture.tcl" line 18)
You need to invoke wish, not tclsh, for the GUI tool. You should be able to just type “./pixelcapture.tcl” though, since the script starts with a #!. It should have retained executable permission. I’ll check again. Sometimes SVN loses the executable status.
Installed tk package and the GUI tool appears. After picking the active and inactive colors, it gives a stdout error.
error writing "stdout": broken pipe
error writing "stdout": broken pipe
while executing
"puts "Function PlainDecor $decor $colorpair(active) $colorpair(inactive)""
invoked from within
".controls.applyquit.apply invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 22)
invoked from within
"tk::ButtonUp .controls.applyquit.apply"
(command bound to event)
I am not familiar with .tlc files and wish. If it works for you, then I am missing something.
Maybe the FvwmCommandS module died, or got confused about its socket. I heard it isn’t very robust, and I had that happen when I accidentally had two instances of the color picker running. There’s nothing special about tcl/tk (well, except sensible people hate it but the EDA industry is unusual that way for reasons) but FvwmCommandS (does the S stand for socket, or server?) is trying to capture its stdout. and it looks like something happened to the socket. I’d kill and restart Module FvwmCommandS, after all possible instances of pixelcapture have been killed. If you ran the pixelpicker from the command line, it would output a command like “Function PlainDecor plain #d9d9d9#000000” which is what FvwmCommandS is supposed to intercept and execute.
Without using the FvwmCommandS but terminal command ./pixelcapture.tcl that works fine and gives the output Function PlainDecor plain #d9d9d9 #6e8c85. Can it be used?
EDIT
To use Bash, awk and sed. Make a variable of the output of column 4 (print $4) and 5 (print $5), and then edit (sed) decor-setup.fvwm line 91 and 92.
The color picker is invoked like this
Exec $[DecorDemoHome]/pixelcapture.tcl $0 | FvwmCommand -c
So it’s just piping the output string to FvwmCommandS, which has a socket for it, or should. It needs to be started in the StartFunction with “Module FvwmCommandS”
It occurs to me that I’m running fairly conservative versions of fvwm2. FvwmCommand seems to be a rather obscure feature. It took me awhile to hunt it down. If you’re using fvwm3, maybe it’s not working? I’ll try compiling fvwm3 to investigate.
Oops, that gets us back to where I started. The problem isn’t getting the output, it’s WAITING for the output. So even if we write to a file, something has to detect when the file exists and then find some way to asynchronously process it. I started with a PipeRead, but that’s TOO blocking - it hangs the whole window manager. Hence FvwmCommand. Have to take a break now, back tomorrow.
Good, thanks.
For the time being it requires two steps to do the color-picker. 1)Exec $[DecorDemoHome]/pixelcapture.tcl and 2) to add the output in PickColorsFromBG function.
I have a similar case with another script. To make it look like “this is how it works”, I will embed the pixelcapture.tcl in a FvwmButton with one button. Ask the user to select the colors and then click the button that adds the output and runs the function.
Huh, that’s an interesting solution. I thought I would have to re-write it in FvwmScript. I think it could be done, but after looking at that language I don’t want it to be me :-)