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 Sat 20 Dec 2014, 10:29
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
jwm_tools-0.9 (was jwm_menu_create)
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 9 [130 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
L18L

Joined: 19 Jun 2010
Posts: 2615
Location: www.eussenheim.de/

PostPosted: Sun 04 Sep 2011, 11:52    Post subject: jwm_tools-0.7 (was jwm_menu_create)
Subject description: jwm_param_gui
 

Code:
#!/bin/sh
# jwm_param_gui
# version added, same as jwm_tools
# filtered empty lines and commented lines
# form field types: number, font, combo and color
#                   file for images (jpg and png)
# fonts: selection in yad from installed fonts, format example: DejaVu Sans 12
# TODO: further testing, ranges for numeric values
#
version=0.7.1
jwm_param_gui-0.7.1.png
 Description   
 Filesize   22.31 KB
 Viewed   1120 Time(s)

jwm_param_gui-0.7.1.png

jwm_param_gui.gz
Description  /usr/bin/jwm_param_gui
gz

 Download 
Filename  jwm_param_gui.gz 
Filesize  1.27 KB 
Downloaded  297 Time(s) 
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Tue 06 Sep 2011, 19:51    Post subject:  

here is the updated sfs linker and executor that _should_ work with multiuser and is toolkit independent (only requires jwm)
Code:
#!/bin/ash

linkmount(){
[ ! -d ${1} ] && echo usage $0 /mnt/directory not $1 && exit
for F in ${1}/* ; do
   NF=/${F#/*/*/} #the root of the mount
   case ${NF} in #multiuser support
      /root*)NF=${HOME}/${NF#/*/}
   esac
   if [ -L ${F} ];then #handle symlinks first in case of looping links (ex ., ../)
      cp ${F} ${NF} && echo ${NF} >>${2}
   elif [ -d ${F} ];then #if its a directory, we want to thread and recurse it
      [ ! -e ${NF} ] && mkdir ${NF} && NEWDIR=true
      linkmount ${F} $2 &
      [ $NEWDIR ] && echo ${NF} >>${2}
   elif [ -f ${F} ];then #we can just use symlinks for all but dir & nodes
   case ${NF} in
      ${HOME}*)cp ${F} ${NF} && echo ${NF} >>${2};;
      *)ln -s ${F} ${NF} && echo ${NF} >>${2};;
   esac
else #for /dev/* mostly ... we need write access to block/char devices
   cp ${F} ${NF} && echo ${NF} >>${2}
fi
done
}

mntdir=/mnt/${1##*/}

if [ -d ${mntdir} ];then
   while read LINE; do
      [ -d ${LINE} ] && rmdir ${LINE} || rm ${LINE} &
   done <${HOME}/.packages/${1##*/}.files
   rm ${HOME}/.packages/${1##*/}.files &
   umount ${mntdir} &&   rmdir ${mntdir} &
else
   mkdir -p ${mntdir} 2>/dev/null
   busybox mount ${1} ${mntdir} 2>/dev/null
   linkmount ${mntdir} ${HOME}/.packages/${1##*/}.files 2>/dev/null
   sleep .2
   if [ -d ${mntdir}/usr/share/applications ];then
      for PROG in ${mntdir}/usr/share/applications/*.desktop; do
         while read LINE; do
            case $LINE in
               Name=*)NAME=${LINE#*=};;
               Exec=*)EXEC=${LINE#*=};;
               Comment=*)COMM=${LINE#*=};;
               Icon=*)ICON=${LINE#*=};;
            esac
         done <${PROG}
         #one prog
         jwm_notify "${NAME}" "${COMM}" "${ICON}" "${EXEC}" close "click here to continue without running $NAME" mini-stop.xpm exit
      done
   fi
fi

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Tue 27 Sep 2011, 14:34    Post subject:  

I just got a bug report by PM about *.desktop files that dont end with a new line character using the desktop entry from the previous

the fix is to replace;

read LINE;
with
read LINE || [ "$LINE" ];

there are several occurrences of this and I _may_ need to a LINE="" prior to the loop?

(this fix will be in 0.Cool

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Tue 27 Sep 2011, 17:06    Post subject:  

that wasn't as bad as I thought it would be, I even added support for groups see first post for an update to 0.8

Edit:
OOps I broke keybindings trying to type in Barry's woof compat fix for the pinstall script - fixed and uploaded

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Sat 08 Oct 2011, 23:33    Post subject:  

New Todo, rewrite udevd and possibly other daemons into a single shell daemon.
http://www.bangmoney.org/presentations/hotplug/

Still todo: keybindings, trays, more translations

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Thu 20 Oct 2011, 10:57    Post subject:  

I had some thoughts, these may not be of any use to you, but I think I'll have a go myself, as I need this in Akita:

Update jwm_menu_create:

- try to remove duplicates if they end up in same sub category

- maybe remove all non JWM .desktop files??

For example, in a .desktop file, we can add 'WM=openbox' or 'WM=windowmaker', and jwm_menu_create can skip any files which contain WM= (when not WM=jwm)...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Thu 20 Oct 2011, 19:56    Post subject:  

sc0ttman wrote:
I had some thoughts, these may not be of any use to you, but I think I'll have a go myself, as I need this in Akita:

Update jwm_menu_create:

- try to remove duplicates if they end up in same sub category

- maybe remove all non JWM .desktop files??

For example, in a .desktop file, we can add 'WM=openbox' or 'WM=windowmaker', and jwm_menu_create can skip any files which contain WM= (when not WM=jwm)...

Part 1 is doable just keep a throwaway variable that contains each subcategory as it is added then use a case ... to check before adding

The 2nd seems like non standard .desktop files, so probably not, however I could have it optionally scan an additional directory like maybe:
$HOME/.jwm/applications/*.desktop
/usr/share/applications.jwm/*.desktop

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Fri 11 Nov 2011, 23:25    Post subject: problems after jwm2-505.pet added!  

Technosausus, with jwm2-505's pet loaded, jwm tools no longer works properly.

I'm getting :

a 2x3 virtual desktop, even if set as 1x1 in jwm config manager, and I can't change it;

multiple menu items for the same application appearing;

it won't start (but no error message either onscreen or the logs).

If I unload 0.8 it's all back to normal(, 0.7 gives the same result).

Could you have a look please.

thanks
scsijon
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Sat 12 Nov 2011, 03:30    Post subject:  

jwm config manager is not distributed with jwm_tools and probably makes some assumptions about include files, you can try jwm_param_gui (requires yad) - thus far that is the only gui that is supported (but it doesn't currently have a menu entry) or if you find out what include file jwm config manager stores the desktop config in, I can add it to the list of include files that are there to support other/legacy jwm config apps (though it would be much better to to just have jwm config modify the JWMRC file directly if possible)

The multiple menu items are there because the developers wanted it to be in multiple categories (they put multiple categories in the .desktop file) If you use submenus, there shouldn't be duplicates in the same submenu though.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Sat 12 Nov 2011, 18:20    Post subject:  

technosaurus wrote:
If you use submenus, there shouldn't be duplicates in the same submenu though.


their are though, in at least the latest wary and lucid528!

and sorry but the first paragraph is goggledegoop to me this morning, rebuilding after losing the dev box's brand new hard drive is still getting to me. The jwm config manager is part of puppy, and to use the gui I also need to have yad installed, is that right?

regards
scsijon
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Mon 21 Nov 2011, 20:19    Post subject:  

to remove duplicates, using a quick dirty fix (im too dumb to understand technos guide above):

remove all tabs and spaces fro mthe start of the <Program> lines

then, right at the end of the script, echo it all to a VAR, then 'uniq' then echo to .jwmrc

# ugly fix to remove duplicates that end up in the same sub menu
FILE1=`cat ${HOME}/.jwmrc | uniq `
echo "$FILE1" > ${HOME}/.jwmrc#

this totally goes against the shell only thing, but it works

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Tue 22 Nov 2011, 00:40    Post subject:  

Hmm interesting solution, could probably pipe it through unique when echoing it to the .jwmrc[/img]
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Sun 27 Nov 2011, 21:17    Post subject:  

I have made some changes to eliminate duplicate menu entries and added support for keybindings... It borks the pretty formatting in the jwmrc, but it works, so I will upload when I get home.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Mon 28 Nov 2011, 00:48    Post subject:  

v0.9 is uploaded and ready for testing, see initial post
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Fri 13 Jan 2012, 19:10    Post subject:  

Ok, trialling this in Slacko on my lappy with jwm-svn572.

This works fine:
Code:
jwm_menu_create && jwm -reload.


*If* I were to use this in the next release this is what I think I would have to do:
    patch petget to run jwm_menu_create && jwm -reload (or -restart depending on version)
    patch the jwm_install_menu_create to read /etc/DISTRO_SPECS which provides DISTRO_FILE_PREFIX (eg "slacko", "wary5", "dpup") and only show those repos, maybe cross reference with ~/.packages/woof-installed-packages for obvious reasons, also filter out the DISTRO_COMPAT_REPOS with "Packages-puppy-*" instead of "Packages-"
    ---Possible support for closest geographical repo based on locale???
    set 'DRIVES=""' as default since I'm using rox-desktop
    anything anyone else can think of?


I really like the speed, simplicity and ease of use, not to mention built in locale support.
jwm1.png
 Description   
 Filesize   99.51 KB
 Viewed   727 Time(s)

jwm1.png


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 4 of 9 [130 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 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:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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