From cb1b6fc77c93d2de8f9d4f632069da655a4592f5 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Mon, 3 Sep 2012 14:08:52 -0500
Subject: wmaker_settings:  Fix the default menu to only include applications
 installed on the machine, also added all the possible options for mythinstall
 config screens

---
 .../wmaker_settings/GNUstep/Defaults/WMRootMenu    | 146 ++++++---------------
 abs/core/wmaker_settings/GNUstep/Defaults/aux_menu |  20 +++
 .../wmaker_settings/GNUstep/Defaults/myth_menu     |  21 +++
 abs/core/wmaker_settings/GNUstep/wm_menu.sh        |   2 +
 abs/core/wmaker_settings/PKGBUILD                  |   2 +-
 5 files changed, 82 insertions(+), 109 deletions(-)
 create mode 100644 abs/core/wmaker_settings/GNUstep/Defaults/aux_menu
 create mode 100644 abs/core/wmaker_settings/GNUstep/Defaults/myth_menu
 create mode 100755 abs/core/wmaker_settings/GNUstep/wm_menu.sh

diff --git a/abs/core/wmaker_settings/GNUstep/Defaults/WMRootMenu b/abs/core/wmaker_settings/GNUstep/Defaults/WMRootMenu
index 508c70e..c09c64f 100644
--- a/abs/core/wmaker_settings/GNUstep/Defaults/WMRootMenu
+++ b/abs/core/wmaker_settings/GNUstep/Defaults/WMRootMenu
@@ -1,105 +1,34 @@
 (
-  Applications,
-  (
-    Info,
-    ("Info Panel", INFO_PANEL),
-    (Legal, LEGAL_PANEL),
-    ("System Console", EXEC, xconsole),
-    ("System Load", SHEXEC, "xosview || xload"),
-    ("Process List", EXEC, "xterm -e top"),
-    ("Manual Browser", EXEC, xman)
-  ),
-  (Run..., EXEC, "%a(Run,Type command to run:)"),
-  (XTerm, EXEC, "xterm -sb"),
-  ("Mozilla Firefox", EXEC, firefox),
-  (Workspaces, WORKSPACE_MENU),
-  (
-    Applications,
-    (Gimp, SHEXEC, "gimp >/dev/null"),
-    (Ghostview, EXEC, "ghostview %a(Enter file to view)"),
-    (Xpdf, EXEC, "xpdf %a(Enter PDF to view)"),
-    (Abiword, EXEC, abiword),
-    (Dia, EXEC, dia),
-    (
-      OpenOffice.org,
-      (OpenOffice.org, EXEC, ooffice),
-      (Writer, EXEC, oowriter),
-      (Spreadsheet, EXEC, oocalc),
-      (Draw, EXEC, oodraw),
-      (Impress, EXEC, ooimpress)
-    ),
-    (
-      Editors,
-      (XEmacs, EXEC, xemacs),
-      (Emacs, EXEC, emacs),
-      (XJed, EXEC, xjed),
-      (VI, EXEC, "xterm -e vi"),
-      (GVIM, EXEC, gvim),
-      (NEdit, EXEC, nedit),
-      (Xedit, EXEC, xedit)
-    ),
-    (
-      Multimedia,
-      (
-        XMMS,
-        (XMMS, EXEC, xmms),
-        ("XMMS play/pause", EXEC, "xmms -t"),
-        ("XMMS stop", EXEC, "xmms -s")
-      ),
-      ("Xine video player", EXEC, xine),
-      (MPlayer, EXEC, mplayer)
-    )
-  ),
-  (
-    Utils,
-    (Calculator, EXEC, xcalc),
-    (
-      "Window Properties",
-      SHEXEC,
-      "xprop | xmessage -center -title 'xprop' -file -"
-    ),
-    ("Font Chooser", EXEC, xfontsel),
-    (Magnify, EXEC, wmagnify),
-    (Colormap, EXEC, xcmap),
-    ("Kill X Application", EXEC, xkill)
-  ),
-  (
-    Selection,
-    (Copy, SHEXEC, "echo '%s' | wxcopy"),
-    ("Mail To", EXEC, "xterm -name mail -T Pine -e pine %s"),
-    (Navigate, EXEC, "mozilla %s"),
-    ("Search in Manual", EXEC, "MANUAL_SEARCH(%s)")
-  ),
-  (
-    Commands,
-    ("Hide Others", HIDE_OTHERS),
-    ("Show All", SHOW_ALL),
-    ("Arrange Icons", ARRANGE_ICONS),
-    (Refresh, REFRESH),
-    (Lock, EXEC, "xlock -allowroot -usefirst")
-  ),
+  "Window Maker",
+  (Applications, OPEN_MENU, "/usr/share/wm_data/GNUstep/Defaults/aux_menu"),
+  (MythTV, OPEN_MENU, "/usr/share/wm_data/GNUstep/Defaults/myth_menu"),
+  (Run..., EXEC, "%A(Run, Type command:)"),
   (
     Appearance,
     (
       Themes,
       OPEN_MENU,
-      "-noext /usr/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle"
+      "-noext /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle"
     ),
     (
       Styles,
       OPEN_MENU,
-      "-noext /usr/share/WindowMaker/Styles $HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle"
+      "-noext /usr/local/share/WindowMaker/Styles $HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle"
     ),
     (
       "Icon Sets",
       OPEN_MENU,
-      "-noext /usr/share/WindowMaker/IconSets $HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons"
+      "-noext /usr/local/share/WindowMaker/IconSets $HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons"
     ),
     (
       Background,
       (
         Solid,
-        (Black, EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, black)'"),
+        (
+          Black,
+          EXEC,
+          "wdwrite WindowMaker WorkspaceBack '(solid, \"black\")'"
+        ),
         (
           Blue,
           EXEC,
@@ -113,7 +42,7 @@
         (
           Bluemarine,
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(solid, \"#224477\")'"
+          "wdwrite WindowMaker WorkspaceBack '(solid, \"#243e6c\")'"
         ),
         (
           Purple,
@@ -123,7 +52,7 @@
         (
           Wheat,
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(solid, wheat4)'"
+          "wdwrite WindowMaker WorkspaceBack '(solid, \"wheat4\")'"
         ),
         (
           "Dark Gray",
@@ -146,68 +75,69 @@
         (
           Sky,
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, blue4, white)'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"blue4\", \"white\"'"
         ),
         (
           "Blue Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#7080a5\", \"#101020\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#7080a5\", \"#101020\"'"
         ),
         (
           "Indigo Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#746ebc\", \"#242e4c\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#746ebc\", \"#242e4c\"'"
         ),
         (
           "Purple Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#654c66\", \"#151426\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#654c66\", \"#151426\"'"
         ),
         (
           "Wheat Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#a09060\", \"#302010\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#a09060\", \"#302010\"'"
         ),
         (
           "Grey Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#636380\", \"#131318\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#636380\", \"#131318\"'"
         ),
         (
           "Wine Shades",
           EXEC,
-          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#600040\", \"#180010\")'"
+          "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#600040\", \"#180010\"'"
         )
       ),
       (
         Images,
         OPEN_MENU,
-        "-noext /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t"
+        "-noext $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t"
       )
     ),
     (
       "Save Theme",
-      SHEXEC,
-      "getstyle -t $HOME/GNUstep/Library/WindowMaker/Themes/\"%a(Theme name)\""
+      EXEC,
+      "getstyle -p \"%a(Theme name, Name to save theme as)\""
     ),
     (
       "Save IconSet",
       SHEXEC,
-      "geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/\"%a(IconSet name)\""
-    ),
-    (
-      "Preferences Utility",
-      EXEC,
-      "/usr/local/GNUstep/Applications/WPrefs.app/WPrefs"
+      "geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/\"%a(IconSet name,Name to save icon set as)\""
     )
   ),
+  (Workspaces, WORKSPACE_MENU),
   (
-    Session,
+    Workspace,
+    ("Hide Others", HIDE_OTHERS),
+    ("Show All", SHOW_ALL),
+    ("Arrange Icons", ARRANGE_ICONS),
+    (Refresh, REFRESH),
     ("Save Session", SAVE_SESSION),
-    ("Clear Session", CLEAR_SESSION),
-    ("Restart Window Maker", RESTART),
-    ("Start BlackBox", RESTART, blackbox),
-    ("Start IceWM", RESTART, icewm),
-    (Exit, EXIT)
-  )
+    ("Clear Session", CLEAR_SESSION)
+  ),
+  ("Regenerate application menu", EXEC, "/usr/share/wm_data/GNUstep/wm_menu.sh"),
+  ("Configure Window Maker", EXEC, WPrefs),
+  ("Info Panel", INFO_PANEL),
+  ("Restart Window Maker", RESTART),
+  ("Exit Window Maker", EXIT)
 )
diff --git a/abs/core/wmaker_settings/GNUstep/Defaults/aux_menu b/abs/core/wmaker_settings/GNUstep/Defaults/aux_menu
new file mode 100644
index 0000000..0bce5c5
--- /dev/null
+++ b/abs/core/wmaker_settings/GNUstep/Defaults/aux_menu
@@ -0,0 +1,20 @@
+"Applications" MENU
+ "Internet" MENU
+  "Avahi SSH Server Browser" EXEC /usr/bin/bssh
+  "Avahi VNC Server Browser" EXEC /usr/bin/bvnc
+ "Internet" END
+ "Programming" MENU
+  "Qt Assistant" EXEC /usr/bin/assistant
+  "Qt Designer" EXEC /usr/bin/designer
+  "Qt Linguist" EXEC /usr/bin/linguist
+ "Programming" END
+ "Sound & Video" MENU
+  "QT V4L2 test Utility" EXEC qv4l2
+ "Sound & Video" END
+ "System Tools" MENU
+  "Avahi Zeroconf Browser" EXEC /usr/bin/avahi-discover
+  "Tilda" EXEC tilda
+  "UXTerm" EXEC uxterm
+  "XTerm" EXEC xterm
+ "System Tools" END
+"Applications" END
diff --git a/abs/core/wmaker_settings/GNUstep/Defaults/myth_menu b/abs/core/wmaker_settings/GNUstep/Defaults/myth_menu
new file mode 100644
index 0000000..444f9f1
--- /dev/null
+++ b/abs/core/wmaker_settings/GNUstep/Defaults/myth_menu
@@ -0,0 +1,21 @@
+"Applications" MENU
+  "MythFrontend" EXEC mythfrontend
+  "MythTV setup" EXEC mythtv-setup
+ "System configuration" MENU
+  "Access " EXEC mythinstall -s accesscontrol 
+  "Network " EXEC mythinstall -s network
+  "System Type " EXEC mythinstall -s hostype
+  "Screensaver " EXEC mythinstall -s screensaver
+  "Remotes " EXEC mythinstall -s ir 
+  "Add/Remove software " EXEC mythinstall -s plugins,software
+  "Shutdown settings " EXEC mythinstall -s sleep
+  "Display " EXEC mythinstall -s advancedX
+  "Advanced" EXEC mythinstall -s advanced 
+  "User accounts" EXEC mythinstall -s user
+  "Web security" EXEC mythinstall -s webuser 
+  "vnc service " EXEC mythinstall -s vnc 
+  "User accounts" EXEC mythinstall -s user
+  "File shares" EXEC mythinstall -s fileshare
+ "System Configuration" END
+
+"Applications" END
diff --git a/abs/core/wmaker_settings/GNUstep/wm_menu.sh b/abs/core/wmaker_settings/GNUstep/wm_menu.sh
new file mode 100755
index 0000000..b0dce82
--- /dev/null
+++ b/abs/core/wmaker_settings/GNUstep/wm_menu.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+xdg_menu --format WindowMaker --root-menu /etc/xdg/menus/arch-applications.menu >/usr/share/wm_data/GNUstep/Defaults/aux_menu
diff --git a/abs/core/wmaker_settings/PKGBUILD b/abs/core/wmaker_settings/PKGBUILD
index 0565676..8b29e41 100644
--- a/abs/core/wmaker_settings/PKGBUILD
+++ b/abs/core/wmaker_settings/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=wmaker_settings
 pkgver=1.0
-pkgrel=12
+pkgrel=18
 pkgdesc="Default settings for windowmaker+ theme"
 depends=('windowmaker' 'linhes-scripts>=7-24')
 source=()
-- 
cgit v0.12

