wok-6.x rev 2880
pekwm: Add custom menu (must still be improved jozee)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon May 04 15:27:20 2009 +0200 (2009-05-04) |
parents | 1b3e286f13c8 |
children | ebb2ca1fcaba |
files | pekwm/receipt pekwm/stuff/etc/pekwm/menu pekwm/stuff/etc/pekwm/vars pekwm/stuff/scripts/pekwm-freedesktop-menu.sh |
line diff
1.1 --- a/pekwm/receipt Mon May 04 14:12:10 2009 +0200 1.2 +++ b/pekwm/receipt Mon May 04 15:27:20 2009 +0200 1.3 @@ -24,15 +24,13 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr/bin 1.8 - mkdir -p $fs/usr/share 1.9 - mkdir -p $fs/etc 1.10 + mkdir -p $fs/usr/bin $fs/usr/share/pekwm $fs/etc 1.11 cp -a $_pkg/usr/bin $fs/usr 1.12 cp -a $_pkg/usr/share/pekwm $fs/usr/share 1.13 cp -a $_pkg/etc $fs 1.14 - # Custom configuration files 1.15 + # Custom configuration files and scripts 1.16 cp -a stuff/etc $fs 1.17 - echo '$TERM="xterm"' > $fs/etc/pekwm/vars 1.18 + cp -a stuff/scripts $fs/usr/share/pekwm 1.19 # Set perms. 1.20 chown -R root.root $fs 1.21 chmod +x $fs/etc/pekwm/start
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/pekwm/stuff/etc/pekwm/menu Mon May 04 15:27:20 2009 +0200 2.3 @@ -0,0 +1,97 @@ 2.4 +# Menu config for pekwm 2.5 + 2.6 +# Variables 2.7 +INCLUDE = "vars" 2.8 + 2.9 +RootMenu = "Pekwm" { 2.10 + Submenu = "Favorite Applications" { 2.11 + Entry = "Terminal" { Icon = "$PIXMAPS/xterm.png"; Actions = "Exec $TERM &" } 2.12 + Entry = "Text Editor" { Icon = "$PIXMAPS/leafpad.png"; Actions = "Exec leafpad &" } 2.13 + Entry = "Web Browser" { Icon = "$PIXMAPS/firefox.png"; Actions = "Exec firefox &" } 2.14 + } 2.15 + Submenu = "Web Applications" { 2.16 + Entry = "Wikipedia Encyclopedia" { Icon = "$PIXMAPS/wikipedia.png"; Actions = "Exec firefox http://www.wikipedia.org/ &" } 2.17 + } 2.18 + Submenu = "All Applications" { 2.19 + Entry = "" { Actions = "Dynamic /home/dillo/pekwm-freedesktop-menu.sh" } 2.20 + } 2.21 + Submenu = "Documentation" { 2.22 + Entry = "System documentation" { Icon = "$PIXMAPS/slitaz-doc.png"; Actions = "Exec firefox /usr/share/doc/slitaz/index.html &" } 2.23 + } 2.24 + Entry = "Run.." { Actions = "ShowCmdDialog" } 2.25 + Separator {} 2.26 + 2.27 + Submenu = "Go to" { 2.28 + SubMenu = "Workspace" { 2.29 + # Create goto menu once per pekwm config reload. The fast way that 2.30 + # will work for most if not all users. 2.31 + COMMAND = "/usr/share/pekwm/scripts/pekwm_ws_menu.sh goto" 2.32 + # Create goto menu every time the menu is opened. The slow way. 2.33 + # This is what you want if you are using external tools to make 2.34 + # the amount of workspaces something else than what you define in 2.35 + # ~/.pekwm/config. You will know if you want this. 2.36 + # Entry = "" { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_ws_menu.sh goto dynamic" } 2.37 + } 2.38 + Entry = "Window.." { Actions = "ShowMenu GotoClient True" } 2.39 + } 2.40 + Submenu = "Pekwm" { 2.41 + Submenu = "Themes" { 2.42 + Entry { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_themeset.sh /usr/share/pekwm/themes" } 2.43 + Entry { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_themeset.sh ~/.pekwm/themes" } 2.44 + } 2.45 + Submenu = "Exit to" { 2.46 + Entry = "Xterm" { Actions = "RestartOther xterm" } 2.47 + Entry = "Openbox" { Actions = "RestartOther openbox" } 2.48 + } 2.49 + Entry = "Reload" { Actions = "Reload" } 2.50 + #Entry = "Restart" { Actions = "Restart" } 2.51 + } 2.52 + Entry = "Exit" { Actions = "Exit" } 2.53 +} 2.54 + 2.55 +WindowMenu = "Window Menu" { 2.56 + Entry = "(Un)Stick" { Actions = "Toggle Sticky" } 2.57 + Entry = "(Un)Shade" { Actions = "Toggle Shaded" } 2.58 + Entry = "Iconify" { Actions = "Set Iconified" } 2.59 + Entry = "Command.." { Actions = "ShowCmdDialog" } 2.60 + 2.61 + Submenu = "Maximize" { 2.62 + Entry = "Toggle Full" { Actions = "Toggle Maximized True True" } 2.63 + Entry = "Toggle Horizontal" { Actions = "Toggle Maximized True False" } 2.64 + Entry = "Toggle Vertical" { Actions = "Toggle Maximized False True" } 2.65 + } 2.66 + Submenu = "Fill" { 2.67 + Entry = "Full" { Actions = "MaxFill True True" } 2.68 + Entry = "Horizontal" { Actions = "MaxFill True False" } 2.69 + Entry = "Vertical" { Actions = "MaxFill False True" } 2.70 + } 2.71 + Submenu = "Stacking" { 2.72 + Entry = "Raise" { Actions = "Raise" } 2.73 + Entry = "Lower" { Actions = "Lower" } 2.74 + Entry = "Toggle Always On Top" { Actions = "Toggle AlwaysOnTop" } 2.75 + Entry = "Toggle Always Below" { Actions = "Toggle AlwaysBelow" } 2.76 + } 2.77 + Submenu = "Decorations" { 2.78 + Entry = "Toggle Decorations" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" } 2.79 + Entry = "Toggle Borders" { Actions = "Toggle DecorBorder" } 2.80 + Entry = "Toggle Titlebar" { Actions = "Toggle DecorTitlebar" } 2.81 + } 2.82 + Submenu = "Skip" { 2.83 + Entry = "Toggle showing this frame in menus" { Actions = "Toggle Skip Menus" } 2.84 + Entry = "Toggle including this frame in focus toggle" { Actions = "Toggle Skip FocusToggle" } 2.85 + Entry = "Toggle if this frame snaps to other windows" { Actions = "Toggle Skip Snap" } 2.86 + } 2.87 + SubMenu = "Send To" { 2.88 + # Create sendto menu once per pekwm config reload. The fast way that 2.89 + # will work for most if not all users. 2.90 + COMMAND = "/usr/share/pekwm/scripts/pekwm_ws_menu.sh send" 2.91 + # Create sendto menu every time the menu is opened. The slow way. 2.92 + # This is what you want if you are using external tools to make 2.93 + # the amount of workspaces something else than what you define in 2.94 + # ~/.pekwm/config. You will know if you want this. 2.95 + # Entry = "" { Actions = "Dynamic /usr/share/pekwm/scripts/pekwm_ws_menu.sh send dynamic" } 2.96 + } 2.97 + Separator {} 2.98 + Entry = "Close" { Actions = "Close" } 2.99 + Submenu = "Kill" { Entry = "Kill application" { Actions = "Kill" } } 2.100 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/pekwm/stuff/etc/pekwm/vars Mon May 04 15:27:20 2009 +0200 3.3 @@ -0,0 +1,2 @@ 3.4 +$TERM="xterm" 3.5 +$PIXMAPS="/usr/share/pixmaps"
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/pekwm/stuff/scripts/pekwm-freedesktop-menu.sh Mon May 04 15:27:20 2009 +0200 4.3 @@ -0,0 +1,15 @@ 4.4 +#!/bin/sh 4.5 +# 4.6 +# Freedesktop standard Dynamic menu for PekWM. Look into all files 4.7 +# into /usr/share/applications and display Entry with Exec, no icons 4.8 +# to speed-up menu generation. Created for SliTaz GNU/Linux project. 4.9 +# 4.10 + 4.11 +echo "Dynamic {" 4.12 +for app in /usr/share/applications/* 4.13 +do 4.14 + name=`grep ^Name= $app | sed s/Name=//` 4.15 + exec=`grep ^Exec= $app | sed s/Exec=//` 4.16 + echo " Entry = \"$name\" { Actions = \"Exec $exec\" }" 4.17 +done 4.18 +echo "}"