You are not logged in.
Pages: 1
Check out all the options for yad dialog - it is becoming a hugely useful tool these days. One of them is for a colour picker, which can be run with:
yad --color --button=OK --undecorated --center
When you click "OK", the colour value (#xxxxxx) is output to the terminal.
I have this in the Accessories section in my menu.xml:
<item label="Colour Picker">
<action name="Execute">
<command>yad --color --undecorated --button=OK --center</command>
</action>
</item>
And in ./bash_aliases I have
alias color='yad --color --button=OK --undecorated --center'
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
That is nice! Makes gcolor2 unnecessary.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Very nice. Added to my toolbox.
Offline
Cool, thanks Damo.
Offline
I have this in the Accessories section in my menu.xml:
<item label="Colour Picker"> <action name="Execute"> <command>yad --color --undecorated --button=OK --center</command> </action> </item>
Come to think of it, how does this work? Without a terminal, where does the return colour value go? (I suppose it might be found in ~/.xsession-errors.) It might be nice to trigger a little script that put the return value into the clipboard instead of running yad directly?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
My version:
yad --title="Select Color" --color --center | xsel -ib
This saves the result to the clipboard. If you omit "--button", you get both a cancel and an OK button. (I also prefer titled to undecorated). Xsel is standards compliant so I can only assume it is well-behaved with a clipboard manager (I don't use one).
p.s. You'll have to package that as:
sh -c "yad --title='Select Color' --color --center | xsel -ib"
for obmenu, or:
<command>sh -c "yad --title='Select Color' --color --center | xsel -ib"</command>
if you're editting menu.xml directly.
Last edited by cpoakes (2017-07-20 18:20:42)
Offline
^ Thanks for that. I am working on something along those lines ATM.
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Much nicer than my OB Menu entry:
yad --color
yad --font
Both excellent conky tools. Of course you'd be using them with graphics stuff.
Thank you.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Pages: 1