Author |
Message |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: Sun 18 Apr 2010, 02:42 Post subject:
Pnote 0.2 - desktop notepad Subject description: 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
Last edited by zigbert on Thu 04 Nov 2010, 13:32; edited 3 times in total
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: Sun 25 Apr 2010, 17:06 Post subject:
|
|
I hoping it can copy to clipboard.
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: 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
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4872 Location: Blue Springs, MO
|
Posted: 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
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: 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
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 935
|
Posted: 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)
Cheers,
s
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: 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)
|
Hey..be creative.. #FFC18C ??
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: 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
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4872 Location: Blue Springs, MO
|
Posted: 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 ...
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6608 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
|