Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-26-2009, 09:45 PM
|
#1
|
Member
Registered: Apr 2007
Distribution: CrunchBang 10 Statler
Posts: 106
Rep:
|
paste commonly used chunks of text?
I want to easily paste commonly used selections of text. I regularly edit wiki pages, and send emails with similar core text, so this would be handy. Something light and quick with a simple hotkey popup would be ideal.
I've heard of such things, but can't find one now - lacking the right search terms I think ( insert commonly used text didn't work, even in http://www.google.com/linux).
Any suggestions?
|
|
|
11-26-2009, 09:52 PM
|
#2
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
I am not sure if this is what you need. But you can give it a try.
Parcellite is a clipboard manager that can be used for many things, but amongst its many features it has a history that can be accessed with the keyboard, using control+alt+h. You can run parcellite (it will live in your system tray if you have one), then select the many text fragments in any arbitrary order, and then just use the history menu to select whatever you can to paste at a given time. Then just paste as usual.
|
|
|
11-27-2009, 12:09 AM
|
#3
|
Member
Registered: Apr 2007
Distribution: CrunchBang 10 Statler
Posts: 106
Original Poster
Rep:
|
An adapted Parcellite might do it
Thanks, i92guboj.
Quote:
Originally Posted by i92guboj
Parcellite is a clipboard manager that can be used for many things, but amongst its many features it has a history that can be accessed with the keyboard, using control+alt+h. You can run parcellite (it will live in your system tray if you have one), then select the many text fragments in any arbitrary order, and then just use the history menu to select whatever you can to paste at a given time. Then just paste as usual.
|
Actually I already use Parcellite and it's great (but I didn't know about the keyboard shortcut - thanks).
What would be great would be another version of Parcellite, where the text fragments are put there manually, rather than updated when I paste text.
|
|
|
11-27-2009, 12:50 AM
|
#4
|
Member
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Rep:
|
You might look at xsel. This gives the ability to write text from the command line directly into the X selection buffer:
Code:
echo "asdf asdf asdf" | xsel
or from a file:
Let's say that you have a shell open, then
Code:
$ alias texta='echo text A that I want to paste|xsel'
$ alias textb='echo text B that I want to paste|xsel'
then, whenever you want to past 'text A that I want to paste' into your document, you alt-tab to your shell and type 'texta'. This loads the cut and paste buffer, then you can paste into your application. Same goes for 'textb' and 'text B that I want to paste'.
Granted, it's a little clunky; being able to load copy buffers directly, then paste them with a key combination would be a lot quicker. Still, it's probably better than re-selecting text over and over, especially if you use one-letter aliases.
now, if I could only get this to work with the cut and paste buffer in windows, where I actually need this for my 9-5 job...
|
|
|
11-27-2009, 11:35 PM
|
#5
|
Member
Registered: Apr 2007
Distribution: CrunchBang 10 Statler
Posts: 106
Original Poster
Rep:
|
bartonski: thanks, interesting.
So, if no one has made a light program to do this already, all that needs to be done is to build a very simple interface on top of what you've done there, to make it smoother. Actually, I'm not a coder, so... is this simple?
My thought:
* create a simple program that pops up with a list when run. This is where I'm fuzziest - could parcellite be hacked to provide this?
* each item in the list triggers a command when selected. This would be echo "asdf asdf asdf" | xsel for example.
* hopefully the list in the GUI either shows the text to be pasted, or at least can be edited.
* ideally, the text would then also be pasted - to do this the window would have to close itself and operate the paste command in whatever window and edit box you were in previously. Don't know how easy that is.
The program can then be given a hot key by the user, or have one allocated automatically as with parcellite.
So... easy or hard?
|
|
|
11-28-2009, 12:33 AM
|
#6
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825
Rep: 
|
One word: klipper
|
|
|
11-28-2009, 08:54 PM
|
#7
|
Member
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Rep:
|
Quote:
Originally Posted by Chriswaterguy
bartonski: thanks, interesting.
So, if no one has made a light program to do this already, all that needs to be done is to build a very simple interface on top of what you've done there, to make it smoother. Actually, I'm not a coder, so... is this simple?
|
I don't know; I've never written that type of program (all the stuff I write is text manipulation, mostly in Perl or shell+grep/awk/sed). Having said that, there's not a whole lot there, so it shouldn't be that hard to write.
Come to think of it, I think that xsel comes with an API in C, even that shouldn't be that hard to hack with.
Definitely sounds like an interesting educational project.
|
|
|
11-29-2009, 06:29 AM
|
#8
|
Member
Registered: Apr 2007
Distribution: CrunchBang 10 Statler
Posts: 106
Original Poster
Rep:
|
user's own choice of text chunks
Quote:
Originally Posted by Elv13
One word: klipper
|
No, that's a heavy (but slightly more fully featured) equivalent of Parcellite. Glipper does the same for GNOME. Those all store a history, rather than the user's own choice of text chunks.
|
|
|
11-29-2009, 05:38 PM
|
#9
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
In KDE, you have knotes; in Gnome, you have gnotes. Add the samples of text to the post-it note, then click on the icon in the tray to bring the notes to foreground when you need them. Highlight the text you want, ctrl-C to copy. Put the cursor in the document you want text pasted into, and ctrl-V to paste.
|
|
|
11-30-2009, 02:09 AM
|
#10
|
Member
Registered: Apr 2007
Distribution: CrunchBang 10 Statler
Posts: 106
Original Poster
Rep:
|
post-it options
Quote:
Originally Posted by bigrigdriver
In KDE, you have knotes; in Gnome, you have gnotes. Add the samples of text to the post-it note, then click on the icon in the tray to bring the notes to foreground when you need them. Highlight the text you want, ctrl-C to copy. Put the cursor in the document you want text pasted into, and ctrl-V to paste.
|
Nice solution, thanks.
There are a bunch of postit package options - I see xpad is installed on my system (probably much lighter than anything Gnome-specific) and xpostit is available and even smaller (29 kB download). There must be others too.
Just have to figure out which is most suitable, with a light footprint (I'm thinking less than 5MB RAM usage, preferably much less), and the least keystrokes & clicks needed.
|
|
|
11-30-2009, 07:28 AM
|
#11
|
Member
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Rep:
|
Quote:
Originally Posted by Chriswaterguy
Nice solution, thanks.
There are a bunch of postit package options - I see xpad is installed on my system (probably much lighter than anything Gnome-specific) and xpostit is available and even smaller (29 kB download). There must be others too.
Just have to figure out which is most suitable, with a light footprint (I'm thinking less than 5MB RAM usage, preferably much less), and the least keystrokes & clicks needed.
|
You may be able to shave some keystrokes by creating keyboard shortcuts using system->preferences->keyboard shortcuts under gnome. I was trying to work this out last night with my 'xsel' solution. The problem is that I believe that simply launching xsel isn't enough; the process where it is launched from needs to stay open... on the other hand I don't just want to launch processes that I'm not going to terminate, every time I hit one of the keyboard shortcuts. I don't think that these are insurmountable problems, but I haven't had the time to play around with them.
|
|
|
All times are GMT -5. The time now is 02:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|