thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.74k stars 241 forks source link

Double click select text option #696

Closed szatanjl closed 3 years ago

szatanjl commented 4 years ago

It would be great if there was an option to specify characters that separate words when double-clicking with mouse. I mean I would like to tell to termite for example that when I double click on "example,text" it should treat comma as word separator and not highlight both words.

In xfce4-terminal, I used before, there is an option "Double Click" in advanced tab that allowed me to specify what characters where part of a word and which weren't, and it would be awesome if I could do the same in termite.

Thanks.

ifohancroft commented 4 years ago

I may be wrong, but I believe this is part of the VTE library. I believe it's VTE that handles words separation. I was going through its source the other day and I saw something about a list of characters that act as word separators. Maybe open a feature request there?

szatanjl commented 4 years ago

My guess was that it is a VTE feature, and VTE already exports API to set word separators. Otherwise how could it work in gnome and xfce4 terminals (which also work on top of VTE). But since I never did anything with VTE I might be wrong.

ifohancroft commented 4 years ago

Oh! I didn't know it works in Gnome Terminal and I had no idea that Xfce terminal uses VTE.

cap4096 commented 4 years ago

It looks it already works.

mchataway commented 4 years ago

Hey guys, I've been searching around but haven't found a way to configure Termite to specify characters that should or shouldn't be selected when double clicking.

For example for my work I will often have printed in the shell a list something like this:

test_v001.*.exr

..and I'd love to be able to double click anywhere in that line and select the whole line of text, however currently if I double click either side of the asterix, it only selects the characters up to the asterix.

I did find in the vte docs a method to set those characters: https://developer.gnome.org/vte/unstable/VteTerminal.html#vte-terminal-set-word-char-exceptions And using the vte test app you can pass a list of those selectable characters into it, ie:

vte-2.91 --word-char-exceptions='*.'

Which allows me to double click a line with the * character in it and selects it as part of the whole word.

Do you know if there is some way for me to configure termite to do the same, since it seems it's built on top of vte?

Thanks and I apologize if I got anything wrong above, it's just my current understanding from my attempts to research it as much as I could on my own.

thestinger commented 3 years ago

Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.