# HG changeset patch # User Christophe Lincoln # Date 1241443640 -7200 # Node ID 95a7fe095e66be140dde38e5644a4db2993cb868 # Parent 1b3e286f13c8f2835bd6da2eee43c5e7cece91bb pekwm: Add custom menu (must still be improved jozee) diff -r 1b3e286f13c8 -r 95a7fe095e66 pekwm/receipt --- a/pekwm/receipt Mon May 04 14:12:10 2009 +0200 +++ b/pekwm/receipt Mon May 04 15:27:20 2009 +0200 @@ -24,15 +24,13 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/bin - mkdir -p $fs/usr/share - mkdir -p $fs/etc + mkdir -p $fs/usr/bin $fs/usr/share/pekwm $fs/etc cp -a $_pkg/usr/bin $fs/usr cp -a $_pkg/usr/share/pekwm $fs/usr/share cp -a $_pkg/etc $fs - # Custom configuration files + # Custom configuration files and scripts cp -a stuff/etc $fs - echo '$TERM="xterm"' > $fs/etc/pekwm/vars + cp -a stuff/scripts $fs/usr/share/pekwm # Set perms. chown -R root.root $fs chmod +x $fs/etc/pekwm/start diff -r 1b3e286f13c8 -r 95a7fe095e66 pekwm/stuff/etc/pekwm/menu --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pekwm/stuff/etc/pekwm/menu Mon May 04 15:27:20 2009 +0200 @@ -0,0 +1,97 @@ +# Menu config for pekwm + +# Variables +INCLUDE = "vars" + +RootMenu = "Pekwm" { + Submenu = "Favorite Applications" { + Entry = "Terminal" { Icon = "$PIXMAPS/xterm.png"; Actions = "Exec $TERM &" } + Entry = "Text Editor" { Icon = "$PIXMAPS/leafpad.png"; Actions = "Exec leafpad &" } + Entry = "Web Browser" { Icon = "$PIXMAPS/firefox.png"; Actions = "Exec firefox &" } + } + Submenu = "Web Applications" { + Entry = "Wikipedia Encyclopedia" { Icon = "$PIXMAPS/wikipedia.png"; Actions = "Exec firefox http://www.wikipedia.org/ &" } + } + Submenu = "All Applications" { + Entry = "" { Actions = "Dynamic /home/dillo/pekwm-freedesktop-menu.sh" } + } + Submenu = "Documentation" { + Entry = "System documentation" { Icon = "$PIXMAPS/slitaz-doc.png"; Actions = "Exec firefox /usr/share/doc/slitaz/index.html &" } + } + Entry = "Run.." { Actions = "ShowCmdDialog" } + Separator {} + + Submenu = "Go to" { + SubMenu = "Workspace" { + # Create goto menu once per pekwm config reload. The fast way that + # will work for most if not all users. + COMMAND = "/usr/share/pekwm/scripts/pekwm_ws_menu.sh goto" + # Create goto menu every time the menu is opened. The slow way. + # This is what you want if you are using external tools to make + # the amount of workspaces something else than what you define in + # ~/.pekwm/config. You will know if you want this. + # Entry = "" { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_ws_menu.sh goto dynamic" } + } + Entry = "Window.." { Actions = "ShowMenu GotoClient True" } + } + Submenu = "Pekwm" { + Submenu = "Themes" { + Entry { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_themeset.sh /usr/share/pekwm/themes" } + Entry { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_themeset.sh ~/.pekwm/themes" } + } + Submenu = "Exit to" { + Entry = "Xterm" { Actions = "RestartOther xterm" } + Entry = "Openbox" { Actions = "RestartOther openbox" } + } + Entry = "Reload" { Actions = "Reload" } + #Entry = "Restart" { Actions = "Restart" } + } + Entry = "Exit" { Actions = "Exit" } +} + +WindowMenu = "Window Menu" { + Entry = "(Un)Stick" { Actions = "Toggle Sticky" } + Entry = "(Un)Shade" { Actions = "Toggle Shaded" } + Entry = "Iconify" { Actions = "Set Iconified" } + Entry = "Command.." { Actions = "ShowCmdDialog" } + + Submenu = "Maximize" { + Entry = "Toggle Full" { Actions = "Toggle Maximized True True" } + Entry = "Toggle Horizontal" { Actions = "Toggle Maximized True False" } + Entry = "Toggle Vertical" { Actions = "Toggle Maximized False True" } + } + Submenu = "Fill" { + Entry = "Full" { Actions = "MaxFill True True" } + Entry = "Horizontal" { Actions = "MaxFill True False" } + Entry = "Vertical" { Actions = "MaxFill False True" } + } + Submenu = "Stacking" { + Entry = "Raise" { Actions = "Raise" } + Entry = "Lower" { Actions = "Lower" } + Entry = "Toggle Always On Top" { Actions = "Toggle AlwaysOnTop" } + Entry = "Toggle Always Below" { Actions = "Toggle AlwaysBelow" } + } + Submenu = "Decorations" { + Entry = "Toggle Decorations" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" } + Entry = "Toggle Borders" { Actions = "Toggle DecorBorder" } + Entry = "Toggle Titlebar" { Actions = "Toggle DecorTitlebar" } + } + Submenu = "Skip" { + Entry = "Toggle showing this frame in menus" { Actions = "Toggle Skip Menus" } + Entry = "Toggle including this frame in focus toggle" { Actions = "Toggle Skip FocusToggle" } + Entry = "Toggle if this frame snaps to other windows" { Actions = "Toggle Skip Snap" } + } + SubMenu = "Send To" { + # Create sendto menu once per pekwm config reload. The fast way that + # will work for most if not all users. + COMMAND = "/usr/share/pekwm/scripts/pekwm_ws_menu.sh send" + # Create sendto menu every time the menu is opened. The slow way. + # This is what you want if you are using external tools to make + # the amount of workspaces something else than what you define in + # ~/.pekwm/config. You will know if you want this. + # Entry = "" { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_ws_menu.sh send dynamic" } + } + Separator {} + Entry = "Close" { Actions = "Close" } + Submenu = "Kill" { Entry = "Kill application" { Actions = "Kill" } } +} diff -r 1b3e286f13c8 -r 95a7fe095e66 pekwm/stuff/etc/pekwm/vars --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pekwm/stuff/etc/pekwm/vars Mon May 04 15:27:20 2009 +0200 @@ -0,0 +1,2 @@ +$TERM="xterm" +$PIXMAPS="/usr/share/pixmaps" diff -r 1b3e286f13c8 -r 95a7fe095e66 pekwm/stuff/scripts/pekwm-freedesktop-menu.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pekwm/stuff/scripts/pekwm-freedesktop-menu.sh Mon May 04 15:27:20 2009 +0200 @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Freedesktop standard Dynamic menu for PekWM. Look into all files +# into /usr/share/applications and display Entry with Exec, no icons +# to speed-up menu generation. Created for SliTaz GNU/Linux project. +# + +echo "Dynamic {" +for app in /usr/share/applications/* +do + name=`grep ^Name= $app | sed s/Name=//` + exec=`grep ^Exec= $app | sed s/Exec=//` + echo " Entry = \"$name\" { Actions = \"Exec $exec\" }" +done +echo "}"