From: <dom...@us...> - 2014-05-13 17:07:17
|
Revision: 633 http://sourceforge.net/p/fvwm-crystal/code/633 Author: dominique_libre Date: 2014-05-13 17:07:13 +0000 (Tue, 13 May 2014) Log Message: ----------- categories; use user locale when avaible for the menu name; cleanup. + scripts/XDG-Menu: make a XDG application menu in /home/dom/.fvwm-crystal/tmp/XDGMenu. scripts/CheckMenuDate, functions/CheckForFiles: Include the XDG menu at startup and update it at the same time than the regular FVWM-Crystal application menu. bindings/Misc-Keybindings*: made the XDG menu avaible via Alt + A. asciidoc/KeyboardBindings: add Alt + A binding. Modified Paths: -------------- ChangeLog asciidoc/KeyboardBindings bin/fvwm-crystal.generate-menu doc/html/KeyboardBindings.html fvwm/components/bindings/Misc-Keybindings fvwm/components/bindings/Misc-Keybindings_NumLock fvwm/components/functions/CheckForFiles fvwm/scripts/CheckMenuDate man/KeyboardBindings.1 Added Paths: ----------- fvwm/scripts/XDG-Menu Modified: ChangeLog =================================================================== --- ChangeLog 2014-05-02 09:57:35 UTC (rev 632) +++ ChangeLog 2014-05-13 17:07:13 UTC (rev 633) @@ -3,7 +3,12 @@ Vendredi 2 mai 2014 Dominique Michel + addons/makecrystalicon: make fvwm-crystal icons from arbitrary image files. bin/fvwm-crystal.generate-menu: review of the usage comment; add new additional - categories; use Utilities as main catch all categoriy. + categories; use user locale when avaible for the menu name; cleanup. ++ scripts/XDG-Menu: make a XDG application menu in $FVWM_USERDIR/tmp/XDGMenu. + scripts/CheckMenuDate, functions/CheckForFiles: Include the XDG menu at startup and + update it at the same time than the regular FVWM-Crystal application menu. + bindings/Misc-Keybindings*: made the XDG menu avaible via Alt + A. + asciidoc/KeyboardBindings: add Alt + A binding. Lundi 31 mars 2014 Dominique Michel + Add application entries for zynaddsubfx ALSA and JACK Modified: asciidoc/KeyboardBindings =================================================================== --- asciidoc/KeyboardBindings 2014-05-02 09:57:35 UTC (rev 632) +++ asciidoc/KeyboardBindings 2014-05-13 17:07:13 UTC (rev 633) @@ -2,7 +2,7 @@ =================== :doctype: manpage :man source: KeyboardBindings -:man version: 3.2.5 +:man version: 3.3.3 :man manual: FVWM-Crystal NAME @@ -64,7 +64,11 @@ applications. You can use arrow keys or hjkl to move between menu entries, Enter to select an entry and Escape to close the menu. +*Alt + A*:: + Opens a XDG applications menu which contains a list of avaible + applications. You can use the same keys than with the 2 other menus. + Desktop switching & moving windows between desktops: ---------------------------------------------------- *Alt + Escape*:: Modified: bin/fvwm-crystal.generate-menu =================================================================== --- bin/fvwm-crystal.generate-menu 2014-05-02 09:57:35 UTC (rev 632) +++ bin/fvwm-crystal.generate-menu 2014-05-13 17:07:13 UTC (rev 633) @@ -68,6 +68,26 @@ # Don't change anything past this line # # # # # # # # # # # # # # # # # # # # # # # # # # # +# The locale in use +LOC="$(echo $LANG|cut -d "_" -f 1)" +case "$LOC" in + en) + LOC="" + echo "Using English" + ;; + C) + LOC="" + echo "Using English" + ;; + POSIX) + LOC="" + echo "Using English" + ;; + *) + echo "Using $LOC" + ;; +esac + # Type of .desktop files to search for DESKTYPE="Type=Application" @@ -94,8 +114,7 @@ # Load the desktop files preference: loadpref DesktopDirs DesktopDir -# User dependent variables - +# Info screen echo "You are running $0 as user ${your_id}." echo " " echo "FVWM-Crystal menu entries will be installed in" @@ -107,26 +126,6 @@ echo " " echo "Installing the menu entrie in $FC_MENUBASE and the icons in $FC_ICONBASE" -#read PROCESS - -# / FIXME (this part work, see searchkeystrings()) -# Locale test -#echo "" -#echo "This program can search for localized strings in the key Name" -#echo "This way, FVWM-Crystal will use your favorite language if it have been implemented in the desktop file, English otherwise." -#echo "You must enter the right locale string or press enter for the default, English." -#echo "The form of this entry can be lang_COUNTRY@MODIFIER, lang_COUNTRY, lang@MODIFIER or lang." -#echo "Typical values are az, ca, cs, el, en_CA, en_GB, es, fr, hr, hu, ja, ko, mk, ms, nb, nl, #no, pl, pt, sq, sr@Latn, sv or zh_TW. (Non complete list.)" -#echo "Please enter the right locale string and press enter, or press enter for the default, English." -#read LOC - -#if [[ "${LOC}" != "" ]]; then -# USERLOC="[${LOC}]" -# else USERLOC="" -#fi -#echo "The key Name$USERLOC will be searched first." -# END FIXME / - # Parameter test if [ $# -lt 2 ]; then if [[ $1 == "" ]]; then @@ -264,13 +263,17 @@ searchkeystrings() { CATNAME="$(cat ${1} | sed -e '/Desktop Entry/,/Desktop Action/ !d' -e '/Categories=/!d' -e 's/Categories=//' -e 's/;/ /g')" export CATNAME -# echo "CATNAME = $CATNAME" -# if [[ -n "${2}" ]]; then -# SOFTNAME="$(cat ${1} | sed -e '/Name${2}=/!d' -e 's/Name${2}=//')" +# echo "CATNAME = $CATNAME" + SOFTNAME="" + if [[ "$LOC" != "" ]]; then + SOFTNAME="$(cat ${1} | grep ^Name.${LOC}. | sed -e '/^\Name....=/!d' -e 's/Name....=//' -e 's/ /_/g' -e 's:/:-:')" + export SOFTNAME # else + fi + if [[ "$SOFTNAME" == "" ]]; then SOFTNAME="$(cat ${1} | sed -e '/Desktop Entry/,/Desktop Action/ !d' -e '/^\Name=/!d' -e 's/Name=//' -e 's/ /_/g' -e 's:/:-:')" -# fi - export SOFTNAME + export SOFTNAME + fi COMMANDF="$(cat ${1} | sed -e '/Desktop Entry/,/Desktop Action/ !d' -e '/^\Exec=/!d' -e 's/Exec=//' -e 's:.%.*::' -e 's/ -caption//')" export COMMANDF @@ -355,10 +358,10 @@ MAINCAT="/Multimedia/Video" export MAINCAT ;; - *) - MAINCAT="/Utilities" - export MAINCAT - ;; +# *) +# MAINCAT="/Utilities" +# export MAINCAT +# ;; esac } # sub categories Modified: doc/html/KeyboardBindings.html =================================================================== --- doc/html/KeyboardBindings.html 2014-05-02 09:57:35 UTC (rev 632) +++ doc/html/KeyboardBindings.html 2014-05-13 17:07:13 UTC (rev 633) @@ -832,6 +832,15 @@ entries, Enter to select an entry and Escape to close the menu. </p> </dd> +<dt class="hdlist1"> +<strong>Alt + A</strong> +</dt> +<dd> +<p> + Opens a XDG applications menu which contains a list of avaible + applications. You can use the same keys than with the 2 other menus. +</p> +</dd> </dl></div> </div> </div> @@ -1461,7 +1470,7 @@ <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> -Last updated 2013-07-22 17:52:50 CEST +Last updated 2014-05-02 19:59:30 CEST </div> </div> </body> Modified: fvwm/components/bindings/Misc-Keybindings =================================================================== --- fvwm/components/bindings/Misc-Keybindings 2014-05-02 09:57:35 UTC (rev 632) +++ fvwm/components/bindings/Misc-Keybindings 2014-05-13 17:07:13 UTC (rev 633) @@ -27,6 +27,9 @@ # Main menu Key Menu A $[Mod1] Menu /FVWM-Crystal root c c +# XDG application menu +Key A A $[Mod1] Menu FvwmMenu + # FvwmExpose Key E A $[Mod1] FvwmExpose Modified: fvwm/components/bindings/Misc-Keybindings_NumLock =================================================================== --- fvwm/components/bindings/Misc-Keybindings_NumLock 2014-05-02 09:57:35 UTC (rev 632) +++ fvwm/components/bindings/Misc-Keybindings_NumLock 2014-05-13 17:07:13 UTC (rev 633) @@ -18,6 +18,9 @@ # Main menu Key Menu A $[Mod1]2 Menu /FVWM-Crystal root c c +# XDG Application menu +Key A A $[Mod1]2 Menu FvwmMenu + # FvwmExpose Key E A $[Mod1]2 Fvwm-Expose Modified: fvwm/components/functions/CheckForFiles =================================================================== --- fvwm/components/functions/CheckForFiles 2014-05-02 09:57:35 UTC (rev 632) +++ fvwm/components/functions/CheckForFiles 2014-05-13 17:07:13 UTC (rev 633) @@ -1,12 +1,12 @@ # Function CheckForFiles for FVWM-Crystal # -# Version: 1.0.0 +# Version: 1.1.0 # Licence: GPL 2 # # Author: Dominique Michel <dom...@us...> # # Created: 04/19/2014 -# Changed: 04/19/2014 +# Changed: 05/02/2014 # # Description: This file check for preference and application database files at launch the Preferences Editor or fvwm-crystal.generate-menu accordingly. @@ -26,7 +26,9 @@ # and for date of the desktop files DestroyFunc CheckApplicationsDatabase AddToFunc CheckApplicationsDatabase -+ I PipeRead 'if [ ! -d "${FVWM_USERDIR}/Applications" ]; then echo "A fvwm-crystal.generate-menu ${FVWM_SYSTEMDIR} ${FVWM_USERDIR}"; \ ++ I PipeRead 'if [ ! -d "${FVWM_USERDIR}/Applications" ]; then \ + echo "A fvwm-crystal.generate-menu ${FVWM_SYSTEMDIR} ${FVWM_USERDIR}"; \ + echo "A ${FVWM_SYSTEMDIR}/scripts/XDG-Menu"; \ else ${FVWM_SYSTEMDIR}/scripts/CheckMenuDate; fi' CheckPrefFile MediaDirectories Modified: fvwm/scripts/CheckMenuDate =================================================================== --- fvwm/scripts/CheckMenuDate 2014-05-02 09:57:35 UTC (rev 632) +++ fvwm/scripts/CheckMenuDate 2014-05-13 17:07:13 UTC (rev 633) @@ -6,5 +6,7 @@ #echo "DateLastApp=$DateLastApp" if [ "${DateLastApp}" != "`stat --printf="%y\n" ${DesktopDir} | sort -n -r | head -1`" ] -then echo "A fvwm-crystal.generate-menu ${FVWM_SYSTEMDIR} ${FVWM_USERDIR}" +then echo "A fvwm-crystal.generate-menu ${FVWM_SYSTEMDIR} ${FVWM_USERDIR}" + echo "A ${FVWM_SYSTEMDIR}/scripts/XDG-Menu" +else echo "Include tmp/XDGMenu" fi Added: fvwm/scripts/XDG-Menu =================================================================== --- fvwm/scripts/XDG-Menu (rev 0) +++ fvwm/scripts/XDG-Menu 2014-05-13 17:07:13 UTC (rev 633) @@ -0,0 +1,28 @@ +#!/bin/sh +# XDG applicaions menu FVWM-Crystal +# +# Version: 1.0 +# Licence: GPL 2 +# +# Author: <name> <email-address> +# +# Created: <MM/DD/YYYY> +# Changed: <MM/DD/YYYY> +# +# Description: This provide a XDG application menu using fvwm-menu-desktop. + +echo "I make the XDG application menu available via Alt + A." +echo "Wait until this terminal will close." + +mkdir -p ${FVWM_USERDIR}/tmp + +fvwm-menu-desktop \ + --desktop fvwm \ + --menu-type applications \ + --enable-mini-icons \ + --theme FVWM_Xdg \ + --size 32 \ + --mini-icon-dir ${FVWM_USERDIR}/icons/fvwm-desktop > ${FVWM_USERDIR}/tmp/XDGMenu +sed -i -e 's:Module FvwmPerl -l fvwm-menu-desktop-config.fpl:A $[FVWM_SYSTEMDIR]/scripts/XDG-Menu:' ${FVWM_USERDIR}/tmp/XDGMenu + +FvwmCommand 'Include tmp/XDGMenu' Property changes on: fvwm/scripts/XDG-Menu ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: man/KeyboardBindings.1 =================================================================== --- man/KeyboardBindings.1 2014-05-02 09:57:35 UTC (rev 632) +++ man/KeyboardBindings.1 2014-05-13 17:07:13 UTC (rev 633) @@ -2,12 +2,12 @@ .\" Title: KeyboardBindings .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 01/03/2014 +.\" Date: 05/02/2014 .\" Manual: FVWM-Crystal -.\" Source: KeyboardBindings 3.2.5 +.\" Source: KeyboardBindings 3.3.3 .\" Language: English .\" -.TH "KEYBOARDBINDINGS" "1" "01/03/2014" "KeyboardBindings 3\&.2\&.5" "FVWM\-Crystal" +.TH "KEYBOARDBINDINGS" "1" "05/02/2014" "KeyboardBindings 3\&.3\&.3" "FVWM\-Crystal" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -80,6 +80,11 @@ .RS 4 Opens an /Applications menu which contains a list of available applications\&. You can use arrow keys or hjkl to move between menu entries, Enter to select an entry and Escape to close the menu\&. .RE +.PP +\fBAlt + A\fR +.RS 4 +Opens a XDG applications menu which contains a list of avaible applications\&. You can use the same keys than with the 2 other menus\&. +.RE .SH "DESKTOP SWITCHING & MOVING WINDOWS BETWEEN DESKTOPS:" .PP \fBAlt + Escape\fR This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |