Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Oct 2014, 16:15
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Pastelist
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Fri 07 Aug 2009, 16:43    Post_subject:  Pastelist
Sub_title: Paste Stock Text Into Any Application
 

I've always liked having a utility that would insert some predetermined text in any application when needed. Unfortunately, there doesn't seem to be anything for Puppy (except a few application specific ones) and I've seen a number of posts from others looking for this as well.

Since I can never remember abbreviations, I prefer a popup list of possibilities.

With that in mind, I've cobbled together an application called Pastelist.

Pastelist works as follows:

You are in any application and need a stock piece of text, hit a hotkey (in this case the default hotkey is Alt+p) and a dialog file selector pops up. Select a file and enter. The dialog leaves and the text you selected is pasted into the application at the cursor point. (Note: definite feelings of power will rush over you every time you do this). Very Happy

Two programs are involved - Xsel and Xdotool - which do the work of selecting and pasting the text, under the control of the pastelist script.

Installing Pastelist will create a hidden directory (.pastelist in root) which is used to store your stock text files. The jwmrc-personal file (under the .jwm directory) will be appended with the default Alt+p hotkey and you need to restart JWM for this to take place. Note: if you would rather have another hotkey, this can be changed by going to Menu > Desktop > JWM configuration > Keyboard Shortcuts.

Other window managers need to just assign a hotkey to usr/local/bin/pastelist.

Anyway.... here is Pastelist.

UPDATE: August 15, 2009.


A companion program - Picksel - which is designed to be used with Pastelist (selects the text items for Pastelist) can be found here -
http://murga-linux.com/puppy/viewtopic.php?p=332600#332600

UPDATE: Feb 1, 2010
Pastelist version using xclip
pastelist.pet
Description  Pastelist - (using xclip)
pet

 Download 
Filename  pastelist.pet 
Filesize  11.79 KB 
Downloaded  518 Time(s) 
pastelist.pet
Description  Pastelist - a stock text paster
pet

 Download 
Filename  pastelist.pet 
Filesize  22 KB 
Downloaded  447 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
jakfish

Joined: 18 Jul 2008
Posts: 756

PostPosted: Sat 08 Aug 2009, 15:27    Post_subject:  

Great app, fills a perfect niche. I use it to insert em dashes in Abiword.

Thank you, thank you,
Jake
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sat 08 Aug 2009, 20:24    Post_subject:  

seaside,
This is a fantastic little tool!Smile Not only will it paste text into my editor, word processor, spreadsheet, browser, etc. but it can also be used to paste bookmarks into whatever browser I happen to be using. Incredible!

I notice you included /usr/share/applications/pastelist.desktop but it contains no specific info. May I suggest:
Code:
[Desktop Entry]
Encoding=UTF-8
Name=Pastelist text paster
Icon=
Comment=Pastelist
Exec=rox /root/.pastelist/
Terminal=false
Type=Application
Categories=TextEditor
GenericName=Pastelist

Which would give easy access to the /root/.pastelist/ folder.

Well done. This will be included in future ChoicePups.

Thanks, J
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Mon 10 Aug 2009, 18:44    Post_subject:  

Jake,

Thanks for your feedback - seems amazing to be forced to use an entire file just to house an em dash .... Wink

JRB, (on Rox link desktop file)

Excellent idea. I had created the pet automatically and then when I saw the blank desktop file, I just left it there because there would be no reason to invoke the program except by hotkey. Managing the Pastelist files by a link on the menu or desktop would be an added benefit.

On another note, I just starting thinking about perhaps making a companion utility to create stock Pastelist files easily from highlighted text. This can be done now by manual cut and paste, text editor, etc.., but it might be more convenient to do it directly.

Any interest or comments would be welcome and thanks for your kind words.
Back to top
View user's profile Send_private_message 
jakfish

Joined: 18 Jul 2008
Posts: 756

PostPosted: Mon 10 Aug 2009, 20:30    Post_subject:  

I think that's a great idea--to have a highlight-save-to-file deal. Dunno if you've seen Barry's blog, but it looks like pastelist will be part of 4.4, and as well it should be.

Jake
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6447
Location: Auckland, New Zealand

PostPosted: Tue 11 Aug 2009, 01:56    Post_subject:  

Interesting... this feature would be a nice fit with glipper or parcellite too, if anyone has some C skills.
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
trio


Joined: 21 Dec 2008
Posts: 1798
Location: अनुमोदना

PostPosted: Wed 12 Aug 2009, 22:06    Post_subject:  

Hi Seaside,

I made up an app called pastecolor

Not really copy and modify your script, but the method and ideas surely came from yours and mix it with ideas from my JWM theme maker

Hope you don't mind, after all it's for puppians

Cheers

_________________
PET Maker|WbarCC
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Thu 13 Aug 2009, 16:46    Post_subject:  

jakfish wrote:
I think that's a great idea--to have a highlight-save-to-file deal. Dunno if you've seen Barry's blog, but it looks like pastelist will be part of 4.4, and as well it should be.

Jake


Thanks Jake,

I think I'll go ahead and make up something. (Trio has so much good stuff, I'm surprised there's any room left for Pastelist) Very Happy

Disciple -

Before any "C" skills, I need "A", "B" and "Puppy" skills first. Question - You're right - a tie in with a clipboard manager would be great.

Trio -

You're so clever, it's hard to imagine that anything I produced would be of interest. Very Happy - those two programs -
Xsel and Xdotools are really very handy and I'm going to immediately run over and download Pastecolor to see if there's anything I can learn. Question

On another topic, do you know if there is a way to have an Xdialog text box exit by a "return" key press. This example:

Xdialog --inputbox <text> <height> <width> [<init>]

will produce a dialog to input text, but it seems that there isn't any way to accept the data by keyboard.

Thanks.
Back to top
View user's profile Send_private_message 
trio


Joined: 21 Dec 2008
Posts: 1798
Location: अनुमोदना

PostPosted: Thu 13 Aug 2009, 19:54    Post_subject:  

Seaside


I don't really get what you mean, but maybe you can use --stdout (like I use to output color) or to use "hit enter key" you may want to take a look at pfind (using gtkdialog)

Cheers

_________________
PET Maker|WbarCC
Back to top
View user's profile Send_private_message 
Stormson5150

Joined: 06 Feb 2009
Posts: 40

PostPosted: Thu 13 Aug 2009, 21:24    Post_subject:  

This is a great idea.... Though maybe not so newbie friendly as it could be.

The greatest program I have ever seen of this sort, and infinitely easy to use for both experienced and non-experienced users was written for Win95, named "Populist".

http://krapplets.org/populist.shtml

It is a clipboard utility (like Glipper), however in addition to the extended clipboard (25 entries if memory serves), it also allows for numerous "snippets", which can even be placed in different "trees" (sections).

Unfortunately, it seems this hasnt been updated, and appears to have never been ported for a linux vers... I have looked long and hard for the linux equivalent, and even a vers that would work on XP, but nothing...

I bring this up in the hopes that if you continue with this program, perhaps you could take a look at this and it might give you some ideas... I think something like this (or especially, if exactly like this) could really be one of those "Killer apps" that really turn heads and could help draw others to linux... And of course, it couldnt hurt if it came first from Puppy Linux Wink Very Happy
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Fri 14 Aug 2009, 17:20    Post_subject:  

trio wrote:
Seaside


I don't really get what you mean, but maybe you can use --stdout (like I use to output color) or to use "hit enter key" you may want to take a look at pfind (using gtkdialog)

Cheers


Trio,

Yes, "hit the enter key" is what I was looking for and after searching around, there is apparently no way to do that in Xdialog. As you suggested, I looked at Pfind (a great program that I use all the time) and quickly came to the conclusion that I'd better figure out how to use GTKdialog. Very Happy

Thanks

Stormson5150,

Yes, windows has had (and still does) a great number of clipboard utilities that could do just about anything.

I'll definitely check out "Populist" (sounds kind of political Very Happy ) and see if there are any possibilities.

Thanks for your comment.
Back to top
View user's profile Send_private_message 
trio


Joined: 21 Dec 2008
Posts: 1798
Location: अनुमोदना

PostPosted: Sat 15 Aug 2009, 01:32    Post_subject:  

seaside, don't get me wrong, I am not expert or anything, here's to get you started on "hit enter key after typing inside a box"

Code:
#!/bin/sh

export enterbox="
<window title=\"Enter Key Box\" icon-name=\"gtk-help\">
<vbox>
    <text><label>\"\"</label></text>
    <entry activates-default=\"true\" width-request=\"300\">
     <variable>ECHO</variable>
     <input>echo 'Type a word an press enter key'</input>
    </entry>
    <hbox>
     <button can-default=\"true\" has-default=\"true\" use-stock=\"true\">
      <input file stock=\"gtk-apply\"></input>
      <action>gxmessage -center -bg orange \"\$ECHO\"\ &</action>
      <action type=\"exit\">0</action>
     </button>
    </hbox>
</vbox>
</window>"

gtkdialog3 --program=enterbox

unset enterbox

exit 0

_________________
PET Maker|WbarCC
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Sat 15 Aug 2009, 11:09    Post_subject:  

trio wrote:
seaside, don't get me wrong, I am not expert or anything, here's to get you started on "hit enter key after typing inside a box"

Code:

    <entry activates-default=\"true\" width-request=\"300\">
   


Trio,

You've got it! That's it. Very Happy

Even though GTKdialog is more powerful, it seems to me that Xdialog is much easier. Have you tried Glade to design any of your programs? It seems very complicated to me Question

Many thanks
Back to top
View user's profile Send_private_message 
trio


Joined: 21 Dec 2008
Posts: 1798
Location: अनुमोदना

PostPosted: Sat 15 Aug 2009, 11:20    Post_subject:  

Yes, once I made up a wallpaper express setter with preview

It supposed to be easy with the help of glade builder gui, but I like gtkdialog better

_________________
PET Maker|WbarCC
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Sat 15 Aug 2009, 16:53    Post_subject:  

I have uploaded a companion pet called Picksel which selects text and saves it to a file in /root/.pastelist. It can be found here -

http://murga-linux.com/puppy/viewtopic.php?p=332600#332600

Idea

(Thanks to Trio for supplying the "mouse clicking avoidance" technique)
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0894s ][ Queries: 12 (0.0039s) ][ GZIP on ]