You are not logged in.

#1 2021-05-08 23:08:28

Hachiman
New Member
Registered: 2021-05-08
Posts: 3

editing Conky to display a specific character

Greetings one and all

I used to be a CrunchBang user, and since Bunsenlabs started producing this excellent distro, I've switched all my linux pc's over to BunsenLabs (currently, I'm running Lithium).
I have looked through the forums and haven't found anything of this nature, so I thought I'd put it to the collective minds here.

What I would like to do is create a Conky entry so that I can use a keyboard shortcut to print the Euro symbol. My laptops don't have that option on the keyboards, and trying to use the unicode or ALT shortcut always fails.  Can anyone who knows conky better than I (which is to say, just about anyone) give me some tips on how to edit the associated files to get Conky to print a Euro symbol wherever the cursor happens to be in a text field?

I have been able to find these various means of producing a Euro symbol, should this be of any use...

ASCII Type    Code
Decimal            8364
Hexadecimal    20AC
Alt-code:    Alt + 0128
HTML Number    €
HTML Name    €
Unicode            U+20AC
ISO/IEC 8859-15    0164
Symbol            €

Offline

#2 2021-05-08 23:52:05

damo
....moderator....
Registered: 2015-08-20
Posts: 6,619

Re: editing Conky to display a specific character

Are you sure that you mean "Conky"? Conky is for displaying system data etc, and isn't interactive.


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

#3 2021-05-08 23:56:57

Hachiman
New Member
Registered: 2021-05-08
Posts: 3

Re: editing Conky to display a specific character

I see what you mean.... Conky displays the shortcuts. So, what file do I need to edit, so I can create a shortcut similar to the "windows+w" to open a web browser, "windows+t" to open the terminal, etc?

Offline

#4 2021-05-09 03:26:53

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,003
Website

Re: editing Conky to display a specific character

Hi Hachiman, I don't have the exact solution you want, but  I'll explain what I use which is a more general way of typing special characters. (There are others.)

To type a € symbol, what I have to do is:
hit CapsLock
then press = and e in turn ( e = works too )

You can get various other characters the same way, eg
CapsLock e ' gives you é

If that's good enough for you, what you need to do is convert your CapsLock key (or any other key) into a "Compose" key.
There is some commented-out code in ~/.config/bunsen/autostart

setxkbmap -option compose:caps

but I've found this a bit unreliable - tends to stop working for no reason - so I edit /etc/default/keyboard, adding this line:

XKBOPTIONS="compose:caps"

which works better for me.

As for what specific key combinations you need to type a certain character using the Compose key, see here: https://help.ubuntu.com/community/GtkComposeTable
or for a full list check /usr/share/X11/locale/en_US.UTF-8/Compose


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#5 2021-05-09 07:32:46

damo
....moderator....
Registered: 2015-08-20
Posts: 6,619

Re: editing Conky to display a specific character

Hachiman wrote:

I see what you mean.... Conky displays the shortcuts. So, what file do I need to edit, so I can create a shortcut similar to the "windows+w" to open a web browser, "windows+t" to open the terminal, etc?

Have you looked through Getting Started > Introduction to the Bunsenlabs Lithium Desktop? The Openbox section describes how to approach keybinds; the Conky section describes how to display them.

There is also Menu > Preferences and Menu > Help & Resources


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

#6 2021-05-09 07:37:08

ohnonot
...again
Registered: 2015-09-29
Posts: 5,482

Re: editing Conky to display a specific character

To directly answer your question:
You can add a keybind to your ~/.config/openbox/bl-rc.xml
that executes the following:

xdotool key 0x20ac

(assuming xdotool is installed of course).

Then, in your root menu, go to preferences => openbox => reconfigure.

Does it work?


Give to COVAX! Here or here. (explanation)

Offline

#7 2021-05-09 18:28:45

Hachiman
New Member
Registered: 2021-05-08
Posts: 3

Re: editing Conky to display a specific character

@damo after your suggestion, I did discover (read: locate because now I was looking for it) the help files, but unfortunately they did not help. But it's good to know that they exist, nonetheless. smile

@ohnonot I do have xdotool installed, but unfortunately "xdotool key 0x20ac" doesn't work. I tried it in ~/.config/openbox/bl-rc.xml and in .xbindkeysrc ... neither accepted it.
I also tried "xdotool type " combined with hexadecimal, UTF-8, ASCII, and cutting-and-pasting the Euro symbol into the command.... none worked.

Offline

#8 2021-05-09 20:31:40

damo
....moderator....
Registered: 2015-08-20
Posts: 6,619

Re: editing Conky to display a specific character

BL uses xbindkeys for general keybinds, and bl-rc.xml is used for window keybinds.

Menu > Preferences > Keybinds > Edit xbindkeysrc, then Restart xbindkeys (also in the menu)

In the Getting Sarted tutorial there is:

The menu is run with jgmenu, keybinds for commands are set by xbindkeys, and Openbox keybinds are set with bl-rc.xml.


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

#9 2021-05-10 01:41:02

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,003
Website

Re: editing Conky to display a specific character

Not to flog a dead horse, but I still recommend setting up a Compose key, as described above. Once done, you'll be able to input almost any unusual character.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#10 2021-05-10 05:48:39

ohnonot
...again
Registered: 2015-09-29
Posts: 5,482

Re: editing Conky to display a specific character

damo wrote:

BL uses xbindkeys for general keybinds, and bl-rc.xml is used for window keybinds.

Nevertheless other keybinds should still work.

Hachiman wrote:

I do have xdotool installed, but unfortunately "xdotool key 0x20ac" doesn't work. I tried it in ~/.config/openbox/bl-rc.xml and in .xbindkeysrc ... neither accepted it.

Show us what exactly you did.

Also, the Euro sign might have a different hex code on different keyboard layouts. You can find out with

xev

then type the desired key.

For me it was

KeyRelease event, serial 48,KeyRelease event, serial 48, synthetic NO, window 0x6000001,
    root 0x759, subw 0x0, time 3129770, (573,714), root:(575,742),
    state 0x80, keycode 26 (keysym 0x20ac, EuroSign), same_screen YES,
    XLookupString gives 3 bytes: (e2 82 ac) "€"
    XFilterEvent returns: False

Give to COVAX! Here or here. (explanation)

Offline

Board footer

Powered by FluxBB