Page 2 of 8

jwm_menu_create

Posted: Thu 18 Aug 2011, 16:27
by L18L
For anyone who wants to play with it (or improve it):

Code: Select all

	de*)	#this is a template, just remove any unnecessary translations
		jwm_Desktop="Desktop" 
		jwm_DesktopSettings="Desktop-Einstellungen" 
		jwm_DesktopCountry="Regionale Einstellungen" 
		jwm_DesktopApplets="Applets" 
		jwm_System="System" 
		jwm_SystemConfig="" 
		jwm_SystemMemory="Geräte" 
		jwm_SystemSchedule="Zeitplan" 
		jwm_Setup="Konfiguration" 
		jwm_SetupEntry="" 
		jwm_SetupWizard="Einrichtungshelfer" 
		jwm_SetupUtility="Installationswerkzeuge" 
		jwm_Utility="Werkzeuge" 
		jwm_UtilityUtilities="" 
		jwm_UtilityArchiving="Archivierung" 
		jwm_UtilityConsole="Konsole" 
		jwm_Filesystem="Dateisystem" 
		jwm_FilesystemManager="Verwaltung" 
		jwm_FilesystemMount="Laufwerkseinbinder" 
		jwm_FilesystemUtilities="Hilfsprogramme" 
		jwm_FilesystemFind="Finden" 
		jwm_Graphic="Grafik" 
		jwm_GraphicGraphics="Betrachter" 
		jwm_GraphicEdit="Bearbeitung" 
		jwm_GraphicUtility="Hilfsprogramme" 
		jwm_Document="Dokument" 
		jwm_DocumentCompose="Gestaltung" 
		jwm_DocumentText="Text" 
		jwm_DocumentUtilities="Hilfsprogramme" 
		jwm_Business="" 
		jwm_BusinessSheets="" 
		jwm_BusinessCalculator="Taschenrechner" 
		jwm_BusinessUtilities="" 
		jwm_Personal="Persönlich" 
		jwm_PersonalPlan="" 
		jwm_PersonalUtilities="" 
		jwm_Network="Netzwerk" 
		jwm_NetworkDialup="" 
		jwm_NetworkRemote="" 
		jwm_Internet="Internet" 
		jwm_InternetWWW="" 
		jwm_Multimedia="" 
		jwm_MultimediaMedia="" 
		jwm_MultimediaBurn="Brennersoftware" 
		jwm_Fun="Spaß" 
		jwm_Help="Hilfe" 
		jwm_Shutdown="Herunterfahren" 
		jwm_Exit="zur Kommandozeile" 
		jwm_Reboot="Computer neustarten" 
		jwm_Poweroff="Computer ausschalten" 
		jwm_RestartX="X-Server neustarten" 
		jwm_RestartJWM="JWM neustarten"
		;;

Re: jwm_menu_create

Posted: Thu 18 Aug 2011, 17:49
by technosaurus
L18L wrote:Thanks for having added the LANGUAGE thing :)

line 179 of jwm_menu_create should be now:
Name=*|Name?${myLANG}?=*) NAME="${LINE#*=}"'' ;;
until a better storage for translations is created.

TPM (TechnosaurusPackageManager) is looking very interesting :D

That is how the translations of NAME are stored in lang_pack's
Good catch, now that I have a translation I can test it. :)

Before anyone starts translation of .desktop files, take a look in another distro... many have been manually cut down. I typically copy the full desktop files to the NLS package and cutdown the one in the main package.

Re: jwm_menu_create

Posted: Fri 19 Aug 2011, 04:42
by disciple
technosaurus wrote:I typically copy the full desktop files to the NLS package and cutdown the one in the main package.
Brilliant! that would be a good feature for new2dir or whatever the current tool is :)

Re: jwm_menu_create

Posted: Fri 19 Aug 2011, 12:28
by L18L
technosaurus wrote:...take a look in another distro...
They seem to keep it TOP SECRET :lol: :lol: :lol:
http://forum.tinycorelinux.net/index.ph ... 69.15.html

---------

Please have a look at my idea.

Let everything stay English only and let sed to the translation.

Code: Select all

 [ "$myLANG" != "en" && "$myLANG" != "C" ] && sed -f translate_$myLANG ${HOME}/.jwmrc > /dev/shm/tr && cp /dev/shm/tr ${HOME}/.jwmrc
Tested succesfully
translate_de is:

Code: Select all

s/Asunder audio CD ripper/Asunder Audio\/CD-Ripper/g
That could be the way to translate everything (menu related and PPM related).

Posted: Fri 19 Aug 2011, 15:43
by technosaurus
something like this:
(for the imaginary reverse alphabet english language)

Code: Select all

#!/bin/sh
for FILE in $@; do
[ -e ${FILE} ] && sed -i "
s/a/z/
s/b/y/
s/c/x/
" ${FILE} || echo $FILE not a file >/dev/stderr
done
brilliantly simple - I like it ... and it would work for any script/text file ... but beware of translating key words in scripts (file, echo etc...)

Posted: Fri 19 Aug 2011, 16:34
by technosaurus
v 0.3 uploaded - see initial post
renamed to jwm_tools
improvements to install menu
german localization
bugfixes
added jwm_notify

usage:
jwm_notify "short msg" "long message" icon command_to_run timeout

jwm_menu_create

Posted: Fri 19 Aug 2011, 17:43
by L18L
technosaurus wrote:... but beware of translating key words in scripts (file, echo etc...)
Use some regex to generate the translation templates :?:
Simple example: Translate Help

<Program label="'${jwm_Help:-Help}'" icon="help24.png">exec defaulthtmlviewer file:///usr/share/doc/index.html</Program>

or just

<Program label="'${jwm_Help:-Help}'" icon="help24.png">exec defaulthtmlviewer file:///usr/share/doc/index.html</Program>

s/Help/Help/g
-----

There was no menu entry for jwm-tools
wary513 Xvesa

----
Used T(?)PM to install tetris successfully. Thank you very much :) .

Re: jwm_menu_create

Posted: Fri 19 Aug 2011, 18:12
by technosaurus
L18L wrote:There was no menu entry for jwm-tools
wary513 Xvesa
There is no gui => I didn't make an entry, but since it is fairly quick it could be part of a wrapper for "Restart JWM"
It may also be a good idea for an option to update the .package files for the install menu.
I guess now that I have jwm_notify, they could get menu entries and a little dialog to say what is going on.
I haven't finished recoding the JWM configuration tools, but that is where jwm_notify is headed (it has some minimal dialog capabilities). Then maybe some other tools from zigbert, goingnuts, scottman and others for drive trays, desktop backgrounds, app-trays etc... till jwm's capabilities are exhausted.

need to look into pet-packages-woof ... assumed they were the ones that recently became common, but i'm getting broken links ATM

Ideally I would like to eventually be able to have a Puppy start out with only static uclibc busybox, Xvesa, jwm and terminal (+ a few helpers). Then one could build a distro/toolkit independent version and remaster. Debian + QT, Ubuntu + gtk, Slackware + wine, TinyCore + fltk, ... FOX?, tcl/tk?, ...

I may also try to port these to jwm's replacement as it matures:
http://uwm.sourceforge.net/

Posted: Fri 19 Aug 2011, 19:39
by sc0ttman
I should probably post this elsewhere, but anyway...

This little script will get google translations your .desktop files, based on the english "Name=" .. It should then put the new translation into the correct .desktop file, if no transltion was already found for your chosen language..

A folder /usr/share/applications/[lang] is created, look in there for all the translations...

I ran it a few times, for de, fr, es .. Seems to work OK for me, but I havent tested the 2nd loop, which actually adds them back in to the original .desktop files.. Running it now.. not the fastest script ever!

Code: Select all

#!/bin/sh
LOC=ru
DIR="/usr/share/applications/${LOC}"
[ -d ${DIR} ] || mkdir "${DIR}"
for file in /usr/share/applications/*; do
	[ -f $file ] && name=$(cat "$file" | grep '^Name=')
	name1=${name#*[}
	name1=${name1%]*}
	name1=${name1/Puppy /XPUP}
	sleep "4.${RANDOM}"
	name_loc=`wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=${name1#*=}&langpair=en|${LOC}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/'`
	name_loc=${name_loc/XPUP/Puppy }
	echo "Name[${LOC}]=${name_loc/ \\u003d /=}" > $DIR/$(basename $file)
done 

for file in /usr/share/applications/*; do
	en_name=`$(cat $file) | grep "Name\[$LOC\]"`
	if [ "$en_name" = "" ];then
		name_loc="`cat $DIR/$(basename $file)`"
		[ "$name_loc" != "" ] && echo "$name_loc" >> "$file"
	fi
done
For example, heres the French output ..probably half nonsense and more sanitation is required (see 'd\u0026#39;') :

Code: Select all

Name[fr]=Accès-Finder
Name[fr]=Alsamixer - mélangeur audio
Name[fr]=Assistant son ALSA
Name[fr]=Asunder - CD Ripper
Name[fr]=Émulateur de terminal aterm
Name[fr]=Xautoconnect au réseau sans fil
Name[fr]=Chiot accélérateur de téléchargement
Name[fr]=BashBurn - Graver un CD / DVD
Name[fr]=BashPodder - Podcast gestionnaire
Name[fr]=Bluefish Editor
Name[fr]=BootManager - démarrage configurer
Name[fr]=Installer le navigateur - choisissez un navigateur
Name[fr]=Burniso2cd - graver un fichier ISO sur CD / DVD
Name[fr]=Lecteur CD / DVD Wizard
Name[fr]=Chooselocale - localisation des pays
Name[fr]=Clinet - CLI réseau
Name[fr]=Réglages Pays Countrywizard
Name[fr]=Deadbeef - Lecteur de musique
Name[fr]=Default-Programmes-Sélecteur
Name[fr]=Modèles Desksetup pour les icônes bureau
Name[fr]=Disque icônes du bureau gestionnaire
Name[fr]=Edit-ESF - ESF éditeur de fichier
Name[fr]=Elinks - navigateur web CLI
Name[fr]=ePDFView - PDF Viewer
Name[fr]=Ex - petit éditeur vi
Name[fr]=FFConvert-1.1 version de développement
Name[fr]=PcurlFtp - partage de fichiers
Name[fr]=Bûche - Firewall Monitor
Name[fr]=Firewall Genie
Name[fr]=Pare-feu - Plateau Applet
Name[fr]=Adobe Flash - Installer
Name[fr]=Adobe Flash Player
Name[fr]=Disquettes - Formatter
Name[fr]=FlSynclient - paramètres du pavé tactile
Name[fr]=Frugal-Installer - installer Puppy à la HD
Name[fr]=Gadmin-rsync - outil de sauvegarde
Name[fr]=Gaiksaurus - minuscules thésaurus rapide
Name[fr]=Galculator - calculatrice scientifique
Name[fr]=Gcolor2 - Color Chooser
Name[fr]=Utilisation GGdmap graphique de disque
Name[fr]=Geany - éditeur de texte
Name[fr]=Getez - facile Downloader
Name[fr]=Gexec - exécuter une commande
Name[fr]=gFnRename - renamer fichier batch
Name[fr]=Gfontsel - Font Viewer
Name[fr]=Client FTP
Name[fr]=hachages de fichier gHasher calculer
Name[fr]=GHunter
Name[fr]=Glurp - petits clients mpd
Name[fr]=Gmeasures - Convertisseur d\u0026#39;unités
Name[fr]=GParted - gestionnaire de partition
Name[fr]=GPeriodic - tableau périodique
Name[fr]=Gpicview - Image Viewer
Name[fr]=Gpptp VPN PPTP client
Name[fr]=Grub4dos - config bootloader
Name[fr]=Gstpw - gtk chrono
Name[fr]=Gtkam appareil gestionnaire
Name[fr]=GTK - thème chooser
Name[fr]=GTK LXSplit - File Splitter
Name[fr]=GTK-Splitter - File Splitter
Name[fr]=Google Translator
Name[fr]=Hardinfo - le matériel du système vue
Name[fr]=Htop - Process Viewer
Name[fr]=Icône - Theme Switcher
Name[fr]=ISO Master - Éditeur de fichier ISO
Name[fr]=JWM de configuration
Name[fr]=Theme Maker JWM
Name[fr]=Wallpaper-changeur
Name[fr]=Leafpad - éditeur de texte
Name[fr]=Linux-Firewall - pare-feu
Name[fr]=Linux-Firewall Wizard
Name[fr]=LightSword - Alarme et Timer
Name[fr]=LightSword - gestionnaire d\u0026#39;alarmes multiples
Name[fr]=Lxrandr - les paramètres d\u0026#39;affichage mis en
Name[fr]=Gestionnaire des tâches
Name[fr]=Macchanger - modifier votre adresse MAC
Name[fr]=MC - Gestionnaire de fichiers CLI
Name[fr]=Memtest - test de la RAM
Name[fr]=Maker entrée de menu
Name[fr]=éditeur de fichiers-sons mhWaveEdit
Name[fr]=Type MIME éditeur
Name[fr]=GPM joueur - CLI lecteur de musique
Name[fr]=Singe - webserver minuscules
Name[fr]=Souris / clavier Assistant
Name[fr]=MP - console de l\u0026#39;éditeur
Name[fr]=mtPaint - éditeur d\u0026#39;image
Name[fr]=MTR - traceroute
Name[fr]=Assistant Réseau
Name[fr]=Man - Linux Online manuelle
Name[fr]=Éditeur de texte NicoEdit
Name[fr]=NoBlankScreen
Name[fr]=NTFS-sauvegarde sauvegarde de la partition de Windows
Name[fr]=Opéra
Name[fr]=Opera Widget Installer
Name[fr]=Opera Widget directeur
Name[fr]=Osmo - organiseur personnel
Name[fr]=Parcellite - Clipboard Manager
Name[fr]=Tailles Partview partition de vue
Name[fr]=PawdioConverter - convertisseur audio
Name[fr]=Pbackup sauvegarde et de synchronisation
Name[fr]=Pburn CD / DVD / graveur Blu-ray
Name[fr]=Pccrypt - fichier de cryptage / suppression sécurisée
Name[fr]=pCD CD-audio player
Name[fr]=Pcdripper CD Ripper chanson
Name[fr]=pClock - minuterie multifonctions
Name[fr]=PCountdown - compte à rebours
Name[fr]=Sélecteur curseur Puppy
Name[fr]=Pdict - dictionnaire en ligne
Name[fr]=Pdisk - gestionnaire de partition
Name[fr]=Pdvdrsab - RIP / rétrécir / graver des DVD
Name[fr]=pEqualizer graphique Equalizer
Name[fr]=Personnalisez - Paramètres
Name[fr]=pfilesearch - File Finder avancés
Name[fr]=File Finder Pfind
Name[fr]=PGPRS - Connecter
Name[fr]=Configuration PGPRS
Name[fr]=Sélecteur de fichier Acrobat
Name[fr]=PMConky - Information sur le système de bureau
Name[fr]=Pmenu - éditeur de menu Puppy
Name[fr]=Pmirror - un répertoire de sauvegarde
Name[fr]=Pmount - monter / démonter des lecteurs
Name[fr]=Lecteur CD / ripper
Name[fr]=Pmusic lecteur audio
Name[fr]=Pnethood partages Samba
Name[fr]=Pnetlive - réseau de garder vivante
Name[fr]=PPLOG - site blog personnel
Name[fr]=Gestionnaire de processus pProcess
Name[fr]=Precord mp3, ogg, wav lecteur / enregistreur
Name[fr]=Prenom - renamer fichier batch, simple
Name[fr]=Assistant Ajout d\u0026#39;imprimante CUPS
Name[fr]=Pschedule tâche à temps
Name[fr]=Synchronisation psync Time Server
Name[fr]=Ptag éditeur audio tag de fichier
Name[fr]=Ptimer - chronomètre, réveil
Name[fr]=pTiming - système de minuterie événement
Name[fr]=PUDD - Disque copier / partition
Name[fr]=Pup-annonce-Blocker - bloquer les publicités en ligne
Name[fr]=PupApps - lanceur d\u0026#39;applications
Name[fr]=PupControl - panneau de contrôle
Name[fr]=PupDial - dialup modem
Name[fr]=Puppizard - Package Builder
Name[fr]=Event Manager Puppy
Name[fr]=Package Manager Puppy
Name[fr]=Puppy Package désinstallateur
Name[fr]=Puppy Universal Installer
Name[fr]=pupRadio / media pupTelly de streaming
Name[fr]=PupSaveConfig configuration de stockage personnel
Name[fr]=PupSaveConfig - Enregistrer les paramètres
Name[fr]=PupScan - informations d\u0026#39;interface
Name[fr]=Capture d\u0026#39;écran PupSnap
Name[fr]=PupTransmission - CLI torrent downloads
Name[fr]=Lanceur d\u0026#39;application PupTray
Name[fr]=pupX - définir les propriétés de X
Name[fr]=PureFTPd serveur FTP
Name[fr]=Pwput - uploader de fichier simple
Name[fr]=Pwsget - fichier sécurisé Downloader
Name[fr]=Remaster Puppy live-CD
Name[fr]=Renamcon - renamer fichier batch
Name[fr]=Redimensionner - stockage de fichiers personnels
Name[fr]=Retrovol - mélangeur audio
Name[fr]=éditeur d\u0026#39;image rgbpaint
Name[fr]=Escroquerie - CD Ripper
Name[fr]=Rover - Fichier du Finder
Name[fr]=Gestionnaire de fichiers ROX-Filer
Name[fr]=ROX Toolbar Icon Switcher
Name[fr]=Rxvt - émulateur de terminal
Name[fr]=Samba-TNG - part du réseau
Name[fr]=Outil de Scratchfile - partitions linux dans les fichiers
Name[fr]=Secure - ssh telnet
Name[fr]=Régler la date et l\u0026#39;heure
Name[fr]=Régler la taille de police mondiale
Name[fr]=Régler fuseau horaire
Name[fr]=SFS Converter
Name[fr]=SFS-charge sur la volée
Name[fr]=SimpleWALL établir le fond
Name[fr]=Startmount - disques autostart et applications
Name[fr]=Startups - gérer les services de démarrage
Name[fr]=Superscan - scanner réseau
Name[fr]=Multimédia Assistant Touches
Name[fr]=Swapfile - Directeur
Name[fr]=Informations sur le matériel SysInfoBox
Name[fr]=Termit - émulateur de terminal
Name[fr]=SGTT - Time Tracker
Name[fr]=Basculer bureau Rox
Name[fr]=Transmission - Client BitTorrent
Name[fr]=Frontend Trayfm Bac shell-fm
Name[fr]=Tray Manager
Name[fr]=TreeSize - Analyseur de l\u0026#39;utilisation du disque
Name[fr]=Uget - gestionnaire de téléchargement
Name[fr]=Émulateur de terminal urxvt
Name[fr]=Viewnior - Image Viewer
Name[fr]=VLC-gtk - simple interface de VLC
Name[fr]=Wacom Assistant
Name[fr]=WakePup - créer une disquette de démarrage
Name[fr]=Outil CPU Scaling Fréquence
Name[fr]=Les polices Windows
Name[fr]=Woofy - outil de remasteriser
Name[fr]=Xarchiver - Gestionnaire de fichiers zip
Name[fr]=Hotkey configuration
Name[fr]=Xcalc - calculatrice scientifique
Name[fr]=Xchat - client IRC
Name[fr]=Xclipboard
Name[fr]=Xconsole - moniteur de la console
Name[fr]=Xdelta - Directeur Différence
Name[fr]=Xfdiff coupe - comparer deux fichiers
Name[fr]=Scanner de virus XF-Prot
Name[fr]=Xlock - verrouillage de l\u0026#39;écran
Name[fr]=Configurer le verrouillage d\u0026#39;écran Xlock
Name[fr]=Assistant vidéo Xorg
Name[fr]=Xpad - Sticky Notes
Name[fr]=Xvesa vidéo Assistant
Name[fr]=You2pup - YouTube Downloader
Name[fr]=Zathura PDF Viewer

Posted: Fri 19 Aug 2011, 23:23
by technosaurus
Optimization aside, it appears that Google translate skips capitalized words (as it should, grammatically it indicates a proper name) fortunately sed has a tolower function, but then there is a twist, usually the first word _is_ a proper name. Also the localized names follow name= alphabetically by locale, so doing the read while trick could help out.

Httpd may be able to fix some of those.... http -d .... there was a thread with a better method that zigbert started for pmusic lyrics.

Posted: Sat 20 Aug 2011, 12:26
by sc0ttman
technosaurus wrote:Optimization aside, it appears that Google translate skips capitalized words (as it should, grammatically it indicates a proper name) fortunately sed has a tolower function, but then there is a twist, usually the first word _is_ a proper name. Also the localized names follow name= alphabetically by locale, so doing the read while trick could help out.

Httpd may be able to fix some of those.... http -d .... there was a thread with a better method that zigbert started for pmusic lyrics.
I was looking for a 'tolower' option :)

And you are correct, a lot of capitalized names should not be translated... To be honest, the first word of each entry should not be translated, most of the time...

And I know I should have posted it elsewhere, but my HD was/is dying on me, and I had to get it uploaded quick - I only had it in terminal, not saved (hence the needless bits/mistakes in there).. Sorry!

Posted: Sat 20 Aug 2011, 12:27
by sc0ttman
also, I read users of netbooks (and smaller screens in general) complaining that sub-menus are a real pain the neck... I personally feel no need for them, but dont mind having them.. So I'm not voting either way..

Posted: Sat 20 Aug 2011, 14:17
by sc0ttman
EDIT: translations for french, german, russian and spanish here: http://www.murga-linux.com/puppy/viewto ... 135#555135

jwm_tools

Posted: Mon 22 Aug 2011, 18:57
by L18L
technosaurus wrote:something like this:
(for the imaginary reverse alphabet english language)

Code: Select all

#!/bin/sh
for FILE in $@; do
[ -e ${FILE} ] && sed -i "
s/a/z/
s/b/y/
s/c/x/
" ${FILE} || echo $FILE not a file >/dev/stderr
done
brilliantly simple - I like it ... and it would work for any script/text file ... but beware of translating key words in scripts (file, echo etc...)
Success in translating the original .jwmrc by simply adding double quotes and omitting keywords (there was just "false in acomment")
wary513

jwm_menu_create_translate_template:

Code: Select all

#!/bin/sh
# translation at end of jwm_menu_create
OUT="jwm_menu_create_tr"
echo -n > $OUT

cat /root/.jwmrc | grep label= | cut -d '"' -f2 > /dev/shm/jwm_menu_translate
keywords="false "
while read LINE ; do
 [[ "$keywords" =~ "$LINE" ]] || echo "s#"${LINE}#"${LINE}#g" >> $OUT
done <  /dev/shm/jwm_menu_translate

# copy $OUT to $OUT_myLANG
# translate $OUT_myLANG
# sed -f jwm_menu_create_tr_de /root/.jwmrc > /dev/shm/.jwmrc_de
# cp /dev/shm/.jwmrc_de  /root/.jwmrc
# jwm -restart
Attached a little gui for switching language of menu
technosaurus wrote:Ideally I would like to eventually be able to have a Puppy start out with only static uclibc busybox, Xvesa, jwm and terminal (+ a few helpers).
FIne, Xvesa is important for my VIA mini-ITX box :D

Posted: Tue 23 Aug 2011, 00:59
by technosaurus
v 0.4 is released with more translations and a bugfix that fixes broken keybindings. See initial post for .pet.

Would it be easier on everyone (read developers) if I return jwm_menu_create going to stdout instead of creating the jwmrc file directly? I could always include a wrapper script(s) for the general user.

This is a little template for my next jwm tool (jwm_image_view), I still need to write the script to go with it, but it will be similar to jwm_notify

Code: Select all

<Tray  autohide="false" insert="right" halign="center" y="1" border="0">
<TrayButton popup="Previous" label="<" ></TrayButton>
<TrayButton popup="Next" label=">" ></TrayButton>
<TrayButton popup="Smaller" label="-" ></TrayButton>
<TrayButton popup="Larger" label="+" ></TrayButton>
<TrayButton popup="Maximize" label="[]" ></TrayButton>
<TrayButton popup="Close" label="X"></TrayButton>
</Tray>

<Tray  autohide="false" insert="right" halign="center" y="28"  border="0" height="192" >
<TrayButton popup="$MESSAGE_HERE" icon="/usr/share/backgrounds/default.jpg"></TrayButton>
</Tray>

Posted: Tue 23 Aug 2011, 04:18
by technosaurus
Ok here is the next jwm tool as promised, you will need to add

Code: Select all

<Include>/root/.jwm/jwmrc-image</Include>
somewhere in your jwmrc ... it will be in v 0.5

Code: Select all

#!/bin/ash

while ([ $1 ]) do
case ${1} in
	*.png|*.jpg|*.xpm)[ $IMAGE1 ] && IMAGES=${IMAGES}' '${1} && IMAGELAST=${1} || IMAGE1=${1};;
	height=*)eval ${1};;
	Close)rm -rf ${HOME}/.jwm/jwmrc-image;jwm -restart;exit;;
	*);;
esac
shift
done

PREVIOUS=${IMAGELAST}' '${IMAGE1}' '${IMAGES%*${IMAGELAST}}
NEXT=${IMAGES}' '${IMAGE1}
SMALLER='height='$((${height:-192}/2))' '${IMAGE1}' '${IMAGES}
LARGER='height='$((${height:-192}*2))' '${IMAGE1}' '${IMAGES}

MAXHEIGHT=`xwininfo -root`
MAXHEIGHT=${MAXHEIGHT##*-geometry *x};
MAXHEIGHT=$((${MAXHEIGHT%%+*}-50));
MAXIMIZE='height='${MAXHEIGHT}' '${IMAGE1}' '${IMAGES}


[ $height ] && height='height="'$height'"'
echo '<JWM><Tray  autohide="false" halign="center" y="1" border="0">
	<TrayButton popup="Previous - not yet implemented" label="<" >exec:jwm_image_view '${height}' '${PREVIOUS}'</TrayButton>
	<TrayButton popup="Next - not yet implemented" label=">" >exec:jwm_image_view '${height}' '${NEXT}'</TrayButton>
	<TrayButton popup="Smaller" label="-" >exec:jwm_image_view '${SMALLER}'</TrayButton>
	<TrayButton popup="Larger" label="+" >exec:jwm_image_view '${LARGER}'</TrayButton>
	<TrayButton popup="Maximize" label="[]" >exec:jwm_image_view '${MAXIMIZE}'</TrayButton>
	<TrayButton popup="Close" label="X">exec:jwm_image_view Close</TrayButton>
</Tray>
<Tray  autohide="false" halign="center" y="25"  border="2" '$height' >
<TrayButton popup="'${IMAGE1}'" icon="'${IMAGE1:-mini-dog.xpm}'">exec:jwm_image_view Close</TrayButton>
</Tray></JWM>' > ${HOME}/.jwm/jwmrc-image
jwm -restart
Note: I intentionally used xwininfo because it has been ported to xcb and will compile into a low resource binary with uclibc or musl. Let me know if anyone has a shell only way that will work in Xorg _and_ Xvesa to get the screen resolution.

I think for Xorg I can look in xorg.conf for "PreferredMode"
  • Option "PreferredMode" "####x###"
usually Xvesa has its own file in /etc/videomode too
  • 0x011B 1280x800x24
does anyone know if these are consistent across hardware and puppy versions?

Posted: Tue 23 Aug 2011, 10:20
by Bert
JWM Menu categories Dutch translation.

Code: Select all

nl*)   #Dutch
      jwm_Desktop="Bureaublad"
      jwm_DesktopSettings="Bureaublad Instellingen"
      jwm_DesktopCountry="Land Instellingen"
      jwm_DesktopApplets="Applets"
      jwm_System="Systeem"
      jwm_SystemConfig="Systeem Configuratie"
      jwm_SystemMemory="Apparaten"
      jwm_SystemSchedule="Planning"
      jwm_Setup="Instellingen"
      jwm_SetupEntry=""
      jwm_SetupWizard="Wizard Instellingen"
      jwm_SetupUtility="Hulpmiddelen"
      jwm_Utility="Hulpmiddelen"
      jwm_UtilityUtilities=""
      jwm_UtilityArchiving="Archief"
      jwm_UtilityConsole="Terminal"
      jwm_Filesystem="Bestandssysteem"
      jwm_FilesystemManager="Bestandsbeheer"
      jwm_FilesystemMount="Schijven aan-/afkoppelen"
      jwm_FilesystemUtilities="Hulpprogramma's"
      jwm_FilesystemFind="Vinden"
      jwm_Graphic="Grafisch"
      jwm_GraphicGraphics=""
      jwm_GraphicEdit="Grafische editor"
      jwm_GraphicUtility="Hulpprogramma's"
      jwm_Document="Document"
      jwm_DocumentCompose="Opstellen"
      jwm_DocumentText="Tekst"
      jwm_DocumentUtilities="Hulpoprogramma's"
      jwm_Business="Zakelijk"
      jwm_BusinessSheets="Rekenblad"
      jwm_BusinessCalculator="Rekenmachine"
      jwm_BusinessUtilities="Hulpprogramma's"
      jwm_Personal="Persoonlijk"
      jwm_PersonalPlan="Agenda"
      jwm_PersonalUtilities="Hulpprogramma's"
      jwm_Network="Netwerk"
      jwm_NetworkDialup="Inbel-netwerk"
      jwm_NetworkRemote="Netwerk"
      jwm_Internet="Internet"
      jwm_InternetWWW=""
      jwm_Multimedia=""
      jwm_MultimediaMedia=""
      jwm_MultimediaBurn="Media branden"
      jwm_Fun="Spelletjes"
      jwm_Help="Hulp"
      jwm_Shutdown="Afsluiten"
      jwm_Exit="Exit naar prompt"
      jwm_Reboot="Herstarten"
      jwm_Poweroff="Computer afsluiten"
      jwm_RestartX="X herstarten"
      jwm_RestartJWM="JWM herstarten"
      ;; 
Image

Posted: Tue 23 Aug 2011, 10:58
by sc0ttman
0.4 is looking awesome!!
technosaurus wrote:Would it be easier on everyone (read developers) if I return jwm_menu_create going to stdout instead of creating the jwmrc file directly? I could always include a wrapper script(s) for the general user.
That would be nice, although to be honest, I dont see myself redirecting it anywhere else - as long as I have a backup .jwmrc I don't really mind replacing it directly...

And obviously I am no expert, but I have used the Xvesa videomode file to get resolutions in Puppy Arcade.. As far as I remember it works fine..

jwm_tools-0.5

Posted: Tue 23 Aug 2011, 22:31
by technosaurus
jwm_tools-0.5 released see initial post for .pet
Changelog:
v 0.5
added jwm_image_view ... usage: jwm_image_view [images]
add drive tray ... usage jwm_create_drives
fixed a bug in jwm_notify -- used by the drive tray
removed static ${HOME}/.jwm/jwmrc-install - autogenerate with jwm_install_menu_create
blacklisted only BuildingBlock,DOC,DEV in jwm_install_menu_create (NLS should appear now)
added TODOs
- split out localizations in separate files to be sources
- background setting - already have image_viewer & gtk2jwm for the colors

Posted: Fri 26 Aug 2011, 05:59
by technosaurus
Ok, I now have a goal for the 1.0 version

I am tired of simple little changes to the "static" xml files (which are still valid xml) borking some aspect of something. There a several different tools out there with various methods of poking/prodding the xml with the shell to beat it into submission and as many different styles of breaking it all out. So I tried to come up with the simplest way to fix/support all of these issues/concerns.

as I posted in the pupngo thread

I think I have come up with a way to let users (or pupleteers) choose and support everywhere from a single jwmrc to a separate include for every parameter. Almost too simple, so I am sure it will need tweaks....

just use a separate config file with

Var1=
Var2=
... where the vars are all the parameters covered in http://joewing.net/programs/jwm/config.shtml

Easily sourced by...for instance?
. $HOME/.JWMRC
A program could choose to use only 1 or all vars to generate 1 or many xml files

And it would be fast and easy to modify with the while read line case format.

Thoughts?