You are not logged in.

#1 2019-03-25 14:01:20

Bobby Wan-Kenobi
Banned
Registered: 2019-03-22
Posts: 15

How to paste XLFD font specifier using with xfontsel

So here I am trying to get a XLFD font specifier using xfontsel, but when I finish my selection, I don't know how to paste it. According to the xfontsel man page:

If -print is specified, the selected font specifier will be written to standard output when the quit   button is  activated. Regardless of whether or not -print was specified, the font specifier may be made the PRIMARY   (text) selection by activating the
select   button.

I've tried two ways:
1. The -print option does not output anything to the terminal when I quit.
2. I tried the other way, using the select   button, and maybe the font specifier is in the PRIMARY, but I try to paste it (urxvt) with shift + insert but nothing.

Oh, I don't have a mouse, just an Apple magic trackpad.

Last edited by Bobby Wan-Kenobi (2019-03-28 16:12:58)

Offline

#2 2019-03-27 12:46:32

Hwiparam
Member
From: Poland
Registered: 2011-09-26
Posts: 95

Re: How to paste XLFD font specifier using with xfontsel

In xfontsel you click the "select" button, then you paste with middle mouse button if that's what you mean.

EDIT: using a trackpad you'll probably have to press both of the trackpad buttons at the same time - try this and tell us if it did the job.

Last edited by Hwiparam (2019-03-27 12:48:17)

Offline

#3 2019-03-27 19:19:31

Bobby Wan-Kenobi
Banned
Registered: 2019-03-22
Posts: 15

Re: How to paste XLFD font specifier using with xfontsel

Hwiparam wrote:

In xfontsel you click the "select" button, then you paste with middle mouse button if that's what you mean.

EDIT: using a trackpad you'll probably have to press both of the trackpad buttons at the same time - try this and tell us if it did the job.

Apple magic trackpad, no buttons on it at all ))

Offline

#4 2019-03-28 01:25:37

mountaineerbr
Banned
Registered: 2018-12-08
Posts: 48

Re: How to paste XLFD font specifier using with xfontsel

Did you try pasting in Urxvt with CTRL+META+V (which is CTRL+ALT+V)?
https://unix.stackexchange.com/question … with-urxvt

Make sure the text is being copied to the right buffer....

Also, you may want to set some Urxvt keybindings to use the
buffer (PRIMARY or SECONDARY) of your choice...

Offline

#5 2019-03-28 01:28:59

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to paste XLFD font specifier using with xfontsel

Please edit your first post and change your thread title to one that actually describes your issuse: https://wiki.archlinux.org/index.php/Co … ow_to_post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2019-03-28 20:06:40

Bobby Wan-Kenobi
Banned
Registered: 2019-03-22
Posts: 15

Re: How to paste XLFD font specifier using with xfontsel

mountaineerbr wrote:

Did you try pasting in Urxvt with CTRL+META+V (which is CTRL+ALT+V)?
https://unix.stackexchange.com/question … with-urxvt

Make sure the text is being copied to the right buffer....

Also, you may want to set some Urxvt keybindings to use the
buffer (PRIMARY or SECONDARY) of your choice...

I had already tried the shortcut for paste the Primary buffer, Shift + Insert, with no result. After reading your post, I gave it another try, and this time worked.

But this is the catch: If I close the xfontsel window, the buffer it's lost. I can't paste in the same  terminal where I launched it from, or even another terminal .

So to paste successfully the Primary buffer, it must be always while xfontsel is open:
1. In another terminal window
2. Or in the same one, if we launched xfontsel as a background process.

Is that how the Primary buffer works?

Offline

#7 2019-03-28 22:32:24

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: How to paste XLFD font specifier using with xfontsel

Arch Wiki wrote:

It is also important to realize that according to the selection protocols, nothing is copied until it is pasted. For example, if you select some word in a terminal window, close the terminal and then want to paste it somewhere else, it will not work because the terminal is gone and the text has not been copied anywhere. If you want the word to be preserved after closing terminal window, consider installing a clipboard manager.

https://wiki.archlinux.org/index.php/Cl … Selections

Offline

#8 2019-03-28 23:04:53

mountaineerbr
Banned
Registered: 2018-12-08
Posts: 48

Re: How to paste XLFD font specifier using with xfontsel

Hey Bobby...

In X, programmes may have  many buffers but, more orthodox programmes have one called *cutbuffer* that  holds anything the programme you are using arbitrarily chooses to put in there (sometimes not so arbitrarily).. It is a programme specific buffer. You can nicely perceive the cutbuffer being used  inside vim compiled without graphical support ( vim/vi as opposed to gvim ), where it uses cutbuffer for keeping yanked text, and if you paste, you get the text from its cutbuffer. You can also use your terminal emulator support use  X buffers, in which case you can use vi with a multitude of 'clipboards',  its own cutbuffer internally and, also, PRIMARY and SECONDARY buffers by means of the *XTerm/URXVT* capabilities to work with these buffers...

Now, if you use gvim, it transfers the selection to the PRIMARY buffer or the CLIPBOARD (SECONDARY) -- I cannot remember exactly which one is set as default, so it actually owns the selection in the transfer area instead of relying on XTerm to own the selection that will be available in PRIMARY and/or SECONDARY to other programmes...

PRIMARY buffer is very volatile, any text you highlight/select with the mouse will go to the PRIMARY automatically in X.. I think URXVT works the same way as XTerm in this case by default... PRIMARY is the default buffer used by these terminal emulators, so you copy by selecting any text  and paste by middle-click or Shift-Insert... You can also set keybinddings to easily use the CLIPBOARD ( one shortcut for copying and one for pasting)... In the default behaviour, if you select a text it will go to the PRIMARY, if you then use a custom keybindding to 'send' the selection to the SECONDARY, the same text will be available in both buffers!

Now, it is very important to understand the transfer area... It is _not_ true that a programme sends or receives any selection to or from these buffers.. When you select a text in  the terminal emulator that has X buffers support, it will immediately send a sign to the transfer area that it now *owns* the PRIMARY, at least it tries to take ownership of one of those buffers... So now when you are in another X programme  and middle-click, your terminal emulator that owns the PRIMARY will send the selection over to be pasted under the mouse cursor... If you kill the primary source of the selection, then the programme loses ownership of the X buffer  and  your selection is lost.

Last edited by mountaineerbr (2019-03-28 23:07:13)

Offline

Board footer

Powered by FluxBB