| Author |
Message |
L18L
Joined: 19 Jun 2010 Posts: 1706 Location: Burghaslach, Germany
|
Posted: Thu 15 Mar 2012, 16:21 Post subject:
jwm_tools-0.9 (was jwm_menu_create) Subject description: version 0.9.3 |
|
Please delete config file /root/.jwm/JWMRC
then install 0.9.3.pet
What´s new?
jwm_param_gui can be launched from JWM configuration
known bugs are fixed
menu has an alternative for translations now
no more inside /usr/share/applications/*.desktop
but simply in 1 file, ex: /usr/share/locales/de/names
| /usr/share/locales/de/names wrote: | s%"Abiword wordprocessor"%"Abiword Textverarbeitung"%
s%"FFConvert multimedia converter"%"FFConvert Multimedia-Konverter"%
s%"Mixer generic sound mixer"%"Mixer Sound-Mischpult"%
s%"Pmount mount/unmount drives"%"Pmount Laufwerke ein-/aushängen"%
|
Copy this file (170 program names from racy, extendable) into your locales and you can translate everything very quick (momanager needed more than 1 minute for each word and I think this is much better)
----
edited 2012-10-18
downloaded 164 times
deleted jwm_tools-0.9.3.pet
use jwm_tools-0.9.4.pet please
Last edited by L18L on Thu 18 Oct 2012, 07:53; edited 2 times in total
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 02 Jun 2012, 03:28 Post subject:
|
|
J have been working on some C projects lately and haven't gotten the stuff done here that I wanted to, so I am posting a quick, updated todo list. - let me know if I am missing something
sync up with patches - thanks guys
finish support for multiple custom trays, including app trays, swallow and all other niceties.
have option for drives as a menu instead of a tray (then jwm -reload will update them on the fly)
remove the %* from the execs in the menu - jwm does not support drag and drop, so %U, %s, %f and whatever are meaningless
(NOTE: what if there is an rxvt -e with a printf "%s...", ...)
add tools for viewing pdf and other doc types that can be converted to images to reduce resource usage similar to the image viewer (mubusy in mupdf will do pdf and several other formats, abiword's cli can do others, etc...)
Explain the purpose of unix-ifying the tools and general documentation.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
maxerro

Joined: 10 Oct 2010 Posts: 65
|
Posted: Sat 02 Jun 2012, 08:34 Post subject:
|
|
You might consider using data from /sys/block (instead of /sys/dev/block) in that lite drive-detector, and get it all organized even easier (and slightly faster). Partitions could be displayed as sub-menus. (And every partition could have its own sub-menu, if you want to add more options like mount/unmount/open-in-fm/info/[dare to blank/format/backup/play]/...)
Also consider displaying partition size next to the name (since it's handed on a plate):
size = /sys/block/drive/queue/hw_sector_size x /sys/block/drive[/partname]/size
Wanted to suggest something else too, but can't remember... It'll strike me later...
|
|
Back to top
|
|
 |
maxerro

Joined: 10 Oct 2010 Posts: 65
|
Posted: Sat 02 Jun 2012, 10:17 Post subject:
|
|
OK, forget that little size formula.
It appears that on newer hard-drives (after 2010) you may need to check /sys/block/drive/queue/logical_block_size or physical_block_size.
Last edited by maxerro on Sat 02 Jun 2012, 11:56; edited 1 time in total
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 02 Jun 2012, 10:29 Post subject:
|
|
There is a nifty little trick for that.
[ -f "file" ] && Var=$(<file)
Then use
${Var:-default_value}
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
maxerro

Joined: 10 Oct 2010 Posts: 65
|
Posted: Sat 02 Jun 2012, 11:59 Post subject:
|
|
These are the values that should be used:
/sys/block/drive[/partname]/size * 512 (in bytes)
or
/sys/block/drive[/partname]/size / 2048 (in MBytes)
... for all drives (for now).
Anyone who buys one of the new Advanced-Format HDDs and gets the wrong size reading, please report here (kindly).
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Mon 04 Jun 2012, 00:14 Post subject:
|
|
I have built a static version of jwm 579 against musl libc and tinyx11 - confirm, icons, png, xpm and jpeg enabled. No Xinerama or Xft, but should work on just about any distro and only uses 1.6Mb RAM with a solid background.
Looks like garbage with the builtin font (DejaVu Sans is not supported) so I set all the fonts to:
-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1
... and it looks pretty good.
| Description |
confirm dialogs disabled here
|

Download |
| Filename |
jwm-579.tar.gz |
| Filesize |
272.99 KB |
| Downloaded |
162 Time(s) |
| Description |
the binary inside is _NOT_ upx'd
|

Download |
| Filename |
jwm-579.tar.gz |
| Filesize |
275.11 KB |
| Downloaded |
172 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7018 Location: qld
|
Posted: Sat 16 Jun 2012, 21:43 Post subject:
|
|
I made a patch for jwm_menu_create to show icons that have entries in the .desktop file that don't have an extension, presuming they are .png format. I have kept it pure bash, there may be a better way though.
See here.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Tue 26 Jun 2012, 00:45 Post subject:
|
|
I am glad you brought that up, I had forgotten that non-compliance.
I'll add a todo to patch jwm - looks like its in image.c @
ImageNode *LoadImage(const char *fileName) {
it could just try to add the suffixes after the first pass to fileName and retry
still need to remove the %U %f etc from the execs though
I think it can be fixed in command.c by doing a s*printf and using NULL values prior to exec (maybe using strstr 1st to see if it has a %*) ... the problem with % is that it gets special treatment compared to normal characters.
I think I'd do this though:
| Code: | Icon=*.xpm|Icon=*.png|Icon=*.jpg||Icon=*.jpeg) ICON="${LINE#*=}"'' ;;
Icon=*)ICON="${LINE#*=}.png"'' ;; |
here is some tentative code for doing desktop icons using *.desktop files in $HOME/Desktop (useful for systems, including virtual machines with as little as 4Mb of RAM)
| Code: | #!/bin/sh
[ -f ${HOME}/.jwm/JWMRC ] || cp /etc/JWMRC ${HOME}/.jwm/JWMRC
. ${HOME}/.jwm/JWMRC
[ -f ${HOME}/.jwm/jwm-icons ] && mv -f ${HOME}/.jwm/jwm-icons ${HOME}/.jwm/jwm-icons~ && echo "<JWM>" >${HOME}/.jwm/jwm-icons &
{ #localization block
[ $myLANG ] || myLANG=${LANGUAGE%% *}
[ $myLANG ] || myLANG=${LANG%_*}
[ -f /usr/share/locale/$myLANG/LC_MESSAGES/jwm ] && . /usr/share/locale/$myLANG/LC_MESSAGES/jwm
LANG=C
}
#should make check for display, but we can also set MAX_X in the JWMRC
[ ! "$MAX_X" ] && SCREEN_WIDTH=`xwininfo -root |awk '/geometry/{print $2}' |awk 'BEGIN{FS="x"}/x/{print $1}'` && MAX_X=$(($SCREEN_WIDTH-75))
XPOS=25
YPOS=25
for A_FILE in ${HOME}/Desktop/* ; do
ICON="" CATS="" NAME="" EXEC="" LINE="" COMMENT="" #prevent carryover from previous file
case "$A_FILE" in
*.desktop)
while read LINE || [ "$LINE" ]; do
case $LINE in
Name=*|Name?${myLANG%_*}?=*) NAME="${LINE#*=}"'' ;;
Comment=*|Comment?${LANG%_*}?=*) COMMENT="${LINE#*=}"'' ;;
Icon=*.xpm|Icon=*.png|Icon=*.jpg|Icon=*.jpeg) ICON="${LINE#*=}"'' ;;
Icon=*)ICON="${LINE#*=}.png"'';;
Exec=*) EXEC="${LINE#*=}"'' ;;
esac
done < $A_FILE
[ "${EXEC}" ] && wait && echo '<Tray layout="vertical" x="'$XPOS'" y="'$YPOS'" layer="0" border="0" width="50" >
<TrayButton popup="'${COMMENT:-$NAME}'" icon="'${ICON:-mini-dog.xpm}'">exec:'$EXEC'</TrayButton>
<TrayButton popup="'${COMMENT:-$NAME}'" label="'${NAME:0:6}'">exec:'$EXEC'</TrayButton>
</Tray>' >>${HOME}/.jwm/jwm-icons &
XPOS=$(($XPOS+75))
[ $XPOS -gt $MAX_X ] && YPOS=$(($YPOS+75)) XPOS=25
;;
*)echo "$A_FILE" not supported >/dev/stderr;; #todo xdg-open it?
#find $ICONPATH -iname $A_FILE*
esac
done
wait && echo "</JWM>" >>${HOME}/.jwm/jwm-icons |
 |
| Description |
here is a screeny with jwm providing the desktop... sortof |
| Filesize |
37.34 KB |
| Viewed |
476 Time(s) |

|
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Tue 26 Jun 2012, 04:43 Post subject:
|
|
Does JWM/fixmenus/jwm_menu_create/whatever handle applications with "Terminal=true" in the .desktop file correctly?
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Tue 26 Jun 2012, 15:43 Post subject:
|
|
I could, but unfortunately it probably would not work on all puppy's hacked desktop files... normally they would end up running
$TERM -e $EXEC
in older Puppy this would typically end up being
rxvt -e rxvt -e sh -c command args
(newer Pups have terminal=false set when the exec= already has been modified with the terminal)
I'd rather it be compliant and fix issues that it identifies rather than try to work around them though, but I'd need to look at the spec.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 04 Jul 2012, 18:40 Post subject:
|
|
I wish I had never started looking at this, Puppy has a _lot_ of non-compliant behavior that could actually be simplified if it were (well it could be simplified without making it compliant too, but why bother with that?)
For instance I doubt we need 4 instances of delayedrun... or about 100 variations of autostarting sfs files on mount:
instead implement autostart
The menu generator in ALL standard directories
Create icons for each of standard icon names (look into patching jwm for imlib2 like icewm ... then it would also be pretty cool to implement my simple icon tray directly in jwm - just need to inotify watch each image and redraw on change)
Include these standard categories and add an OnlyShowIn support for jwm (and Rox?)
implement a better default handler (that does not depend on ROX-Filer) using mime info from desktop file entries including Trash and thumbnail support if possible (basically xdg-open lite)
shift jwm tools to using recently released xsettings spec
In order to do this programatically I will be going to 1 include file per operation: menu, install, tray, desktop, theme, temp (for notify, imageviewer, etc...) This will allow things like seamless jwm -refresh upon program installation (one for main menu and one for slower install menu) or operations on drive trays being inserted/removed to trigger jwm -refresh ... as well as some experimental features such as controlling desktop icons, drive menus, viewing images, notifications etc...
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Thu 05 Jul 2012, 02:37 Post subject:
|
|
| Quote: | | instead implement autostart |
Yes.
For when your window manager doesn't provide the functionality, I thought there was a shell script somewhere like github or gitorious produced by some Arch person... but if there was, I can't find it now. Maybe I was thinking of http://gitorious.org/xdg-autostart/ (not a shell script).
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Thu 05 Jul 2012, 02:51 Post subject:
|
|
| Quote: | | implement a better default handler (that does not depend on ROX-Filer) using mime info from desktop file entries including Trash and thumbnail support if possible (basically xdg-open lite) |
I think the "new generation" pcmanfm actually handles this (file associations, not opening files from the command line like xdg-open), quite well, and I've been wondering what the chances would be of linking something like Rox or the old GTK searchmonkey against libfm to get this functionality... but I'm sure it's a lot too difficult for me.
This thing looks fun:
https://bbs.archlinux.org/viewtopic.php?pid=1124843https://github.com/Cloudef/PKGBUILDS/tree/master/linopen
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Sun 15 Jul 2012, 08:55 Post subject:
|
|
| disciple wrote: | | Quote: | | instead implement autostart |
Yes.
For when your window manager doesn't provide the functionality, I thought there was a shell script somewhere like github or gitorious produced by some Arch person... but if there was, I can't find it now. Maybe I was thinking of http://gitorious.org/xdg-autostart/ (not a shell script). |
Another one (also not a shell script): https://bitbucket.org/jjacky/dapper
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
|