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 Thu 27 Nov 2014, 04:22
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Pnote 0.2 - desktop notepad
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
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Sun 18 Apr 2010, 02:42    Post_subject:  Pnote 0.2 - desktop notepad
Sub_title: 5.May 2010
 

Pnote

Pnote is a simple notepad where you can write things that drops into your mind. - nothing new.....

What is different from other pads, is the way to use it in combination with JWM. 'Throw' your mouse-pointer into the upper-left corner of the screen, and Pnote will show up. It autohides when not in use. To get this feature working, it must be set up to as a unique tray calling 'pnote'. My extended tray configuration looks like this
Code:
<JWM>
 <Tray autohide="true" insert="right" border="0" layer="10" halign="left" valign="top" height="0" layout="horizontal" >
  <Swallow name="pnote">
   pnote
  </Swallow>
 </Tray>
</JWM>


Pnote is a integrated part of DuDE (starDust Desktop Environment), and configures via Pcorner. It will show up in DuDE-0.2.
It can also be used as a standalone app.



Download
username: puppy
password: linux

Pnote-0.2 (1 kb)


Sigmund Berglund

_________________
Stardust resources

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 23 Apr 2010, 03:12    Post_subject:  

--a bit temperamental on my Dell D600 getting it to load from the desktop with a pointer (flickers about 5 times before finally getting it--sometimes worse). It loads much easier if there's a browser or something already filling the window. A hot key is far more reliable.

It might be more useful if it didn't fill the entire column. I once used a transparent vim as a writable desktop that didn't block anything out.
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Fri 23 Apr 2010, 11:57    Post_subject:  

Improved for the upcoming DuDE-0.2.

The reason for posting it here is not because of Pnotes brilliance, but because it shows a new way of using JWM.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 25 Apr 2010, 17:06    Post_subject:  

I hoping it can copy to clipboard.
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Mon 26 Apr 2010, 14:14    Post_subject:  

jpeps
The way it is set up now it can only paste from clipboard. - Simply because you quit Pnote at once mouse-pointer leaves the yellow pad.

To copy to clipboard, Pnote must be running when pasting. This could be solved by running Pnote inside a tray (like xvkbd), but the downside is
- no delay before showing app.
- All left side of screen would become activating area for Pote - very annoying (I think).


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 26 Apr 2010, 16:11    Post_subject:  

I like the version within the gtkdialog window; being able to copy/paste contents is huge plus.

Edit: I substituted in the gtkdialog window version after (after pasting in the necessary code) with dude-0.2. Works great.

Code:

#!/bin/sh
VERSION=0.1

#jwmrc-trayX calls this activation area
if [ "$PAR" = "-m" ]; then #set mouse activation area of tray
export Pnotetray='
   <window width-request="30" height-request="1">
    <text><label>ok</label></text>
     <action signal="focus-in-event">pnote -m2 &</action>
     <action signal="enter-notify-event">pnote -m2 &</action>
    </window>'
   gtkdialog3 -p Pnotetray --name=pnotetray
   exit 0
fi

   #delay to see if user really wants Pnote to appear
#if mouse is still in upper-left corner
if [ "$PAR" = "-m2" ]; then
      sleep 0.3
        [ `getcurpos | cut -d' ' -f1` -gt 5 ] && exit
        [ `getcurpos | cut -d' ' -f2` -gt 30 ] && exit
        #exit if already running
        TMP="`ps`"
        [ "`echo "$TMP" | grep 'Pnote '`" ] && exit
fi

#exit if already running
                                    
#set gtk-theme
echo 'style "menu" {
  font_name            = "DejaVu sans italic 14"
  bg[NORMAL]         = "#FFF4AF"
  base[NORMAL]         = "#FFF4AF"
  text[NORMAL]         = "#222222"
  }
class "*t*" style "menu"' > /tmp/gtkrc
export GTK2_RC_FILES=/tmp/gtkrc:/root/.gtkrc-2.0

[ ! -d $HOME/.stardust ] && mkdir $HOME/.stardust

export Pnote='
<window width-request="330" height-request="600">
 <edit left-margin="10"><variable>PAD</variable><input file>'$HOME'/.stardust/pnote</input></edit>
 <action signal="leave-notify-event">echo "$PAD" > $HOME/.stardust/pnote</action>
</window>'
gtkdialog3 -p Pnote --name=pnote
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4380

PostPosted: Mon 26 Apr 2010, 21:59    Post_subject:  

Kiosk mode
Code:
<Tray x="0" y="0">
   <Swallow name="seamonkey-bin">
      seamonkey
   </Swallow>
</Tray>


put it after your main tray in .jwmrc-tray to cover it or before to go under it

you can also set the x & y position to place a small window in the desktop and also have a clickable tray button label to one side (or above/below with align="vertical")... for something like a calendar or various parts of pwidgets... I haven't tried the translucent trays in a while but that may appeal to others using this technique

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 03 May 2010, 20:57    Post_subject:  

Pnote is rapidly becoming indispensable in my use of the desktop (although I need the cut & paste version). One of those seeming simple yet GREAT ideas......
Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Mon 03 May 2010, 22:51    Post_subject:  

jpeps,

If you put the following line of code just before the "exit" line, it will paste the pad contents to the clipboard.

Code:
  <action signal="focus-out-event">echo "$PAD" | xclip -i -selection clipboard</action>


(I wonder how yellow became a standard for notetaking) Very Happy

Cheers,
s
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 04 May 2010, 02:51    Post_subject:  

seaside wrote:
jpeps,

If you put the following line of code just before the "exit" line, it will paste the pad contents to the clipboard.


That works; although I kindof like the look and feel of the window..so you don't have to kill from the task bar.

Quote:


(I wonder how yellow became a standard for notetaking) Very Happy


Hey..be creative.. #FFC18C ??
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Tue 04 May 2010, 14:06    Post_subject:  

Script for changing Pnote colors:

Code:

#!/bin/sh

## Changes background colors in Pnote

PNOTE="/usr/sbin/pnote"
OLD=`grep -E 'bg' $PNOTE | cut -f2 -d\"`
echo "enter number: 1 Yellow, 2 Pink, 3 Purple, 4 Gray"
read Choice
case $Choice in
  "1" )  sed -i "s/${OLD}/#FFF4AF/g" ${PNOTE} ;;
  "2" )  sed -i "s/${OLD}/#FFC18C/g" ${PNOTE} ;;
  "3" )  sed -i "s/${OLD}/#BD8787/g" ${PNOTE} ;;
  "4" )  sed -i "s/${OLD}/#B7AFF/g" ${PNOTE} ;;
esac
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4380

PostPosted: Tue 04 May 2010, 16:01    Post_subject:  

I wanted to put this other ptray related idea out to you in case I forget before I get home.

swallowing a gtkdialog entrybox something like (there is probably something better than gtkdialog for this??)

...tooltip="Enter a URL">ENTRY ...

defaultbrowser $ENTRY


similar for running programs instead of gexec

...tooltip="Enter a program">ENTRY

$ENTRY

(or I guess you could always swallow rxvt using its inbuilt geometry)

... I guess they could easily be pwidgets too ...

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Wed 05 May 2010, 03:45    Post_subject:  

seaside wrote:
Code:
  <action signal="focus-out-event">echo "$PAD" | xclip -i -selection clipboard</action>
Great stuff. Included for next release.


Thank you
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Wed 05 May 2010, 04:00    Post_subject:  

Version 0.2
See main post

This is the improved version used in DuDE 0.2. It also includes:
- Paste content of Pnote. (thanks to seaside)
- Pnote can use different colors of background/font (thanks to jpeps)

Be aware that the integration of jwm has changed and become much simpler (see jwm-config example in main post).

The next challenge is to wrap the text ??????


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
zigbert


Joined: 29 Mar 2006
Posts: 5788
Location: Valåmoen, Norway

PostPosted: Wed 05 May 2010, 04:51    Post_subject:  

technosaurus wrote:
I wanted to put this other ptray related idea out to you in case I forget before I get home.

swallowing a gtkdialog entrybox something like (there is probably something better than gtkdialog for this??)

...tooltip="Enter a URL">ENTRY ...

defaultbrowser $ENTRY


similar for running programs instead of gexec

...tooltip="Enter a program">ENTRY

$ENTRY

(or I guess you could always swallow rxvt using its inbuilt geometry)

... I guess they could easily be pwidgets too ...
Sounds more like Ptray than Pwidgets to me........


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_website 
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) » Desktop
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.0878s ][ Queries: 13 (0.0054s) ][ GZIP on ]