Difference between revisions of "OpenBox"

From Pandora Wiki
Jump to: navigation, search
(menu.xml)
(added intro)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Default Config =
+
[[File:Lead_Photo_For_OpenBox0-04113554098570138.png|thumbnail|openbox logo]]
== Default Keybindings ==
 
  
* Root Menu: "Pandora Key" or "Ctrl-M" "Right-Nub-Right-Click"
+
== Introduction ==
 +
[http://openbox.org/ Openbox] is a highly configurable, next generation window manager with extensive standards support. OpenBox is lightweight and very fast. Pnd download here [[http://repo.openpandora.org/includes/download.php?app=switchguiopenbox]]
 +
 
 +
 
 +
Openbox for the Pandora aims to provide a GUI that's quick, responsive, and highly configurable.  The PND (Switch GUI: Openbox) installs a number of components - namely: the window manager itself; the "Warlock Bar" for launching PNDs you've placed in pandora/apps or pandora/menu, and "tint2" - a panel that provides a taskbar, system tray, clock, and battery indicator.  Configuration for each component is typically done by editing text files, or by using a graphical application that will edit the files for you, and let you preview the results.
 +
 
 +
[[File:OpenboxScreenshot.png|center]]
 +
 
 +
== Configuring the Window Manager ==
 +
 
 +
Openbox lets you assign key and/or mouse events with actions.  By default, the following are defined:
 +
 
 +
* Root Menu: "Pandora Key" or "Right-Nub-Right-Click"
 
* Go To Desktop 1: Alt DPAD-left
 
* Go To Desktop 1: Alt DPAD-left
 
* Go To Desktop 2: Alt DPAD-right
 
* Go To Desktop 2: Alt DPAD-right
Line 12: Line 23:
 
* Toggle Shade: Ctrl DPAD-down
 
* Toggle Shade: Ctrl DPAD-down
 
* Quit Application: Ctrl-q
 
* Quit Application: Ctrl-q
 +
* Long press on "Pandora Key": a kill menu
 +
 +
You can add more by editing $XDG_CONFIG_HOME/openbox/rc.xml (Root Menu -> Config -> Edit rc.xml - keybinding start around line 177).  Additional keybindings from CountOrlock's setup are here: [[OpenBox#rc.xml]]
 +
 +
You can also define exactly how each application is launched.  Line 660 onwards of rc.xml shows that XFCE's terminal is always launched maximized, and - commented out - how jumanji can be launched fullscreen, and how the size, position and appearance of applications can be controlled.
 +
 +
The contents Root Menu is defined in $XDG_CONFIG_HOME/openbox/menu.xml (Choose Root Menu -> Config -> Edit menu.xml).  You can remove submenus and shortcuts you don't need, and add ones you do - as exemplified by CountOrlock's additions [[OpenBox#menu.xml]]
 +
 +
After making your changes and saving the file, reconfigure openbox (Root Menu -> Config -> Reconfigure) to see the results.
 +
 +
The graphical application for configuring the window manager is called obconf, and is accessed via Root Menu -> Config -> Config Manager.  Amongst other things, this lets you choose and preview an Openbox theme.  Openbox themes (as distinct from GTK+ themes), control the appearence of the Root Menu, application window frames (but not the contents), and buttons such as Maximize and Close.  Additional themes can be downloaded from sites such as http://box-look.org - they are typically packaged in the ".obt "achive file understood by obconf.
 +
 +
== Configuring GTK+ Applications ==
 +
 +
The appearance of GTK+ applications such as Mousepad and Geany are controlled by GTk+ engines and themes, the choice of which is determined in the $HOME/.gtkrc-2.0 file.  This file can be manipulated by choosing Root Menu -> Config -> GTK+ Theme Switcher.  GTK+ themes control the contents of application windows - the scrollbar, the colours, and the menu items.  If you want to extend a theme, you can edit $HOME/.gtkrc.mine - the file placed there by default shows how to make scrollbars bigger as an example.
 +
 +
==Configuring the Panel==
 +
 +
By default, the tint2 panel is started along with the window manager.  To change this, edit $XDG_CONFIG_HOME/openbox/autostart (Root Menu -> Config -> Edit autostart).  You can also change whether it appears or not via Root Menu -> Toggle Tint2 Panel.  The graphical application for configuration is launched by choosing Root Menu -> Config -> Tint2 Panel Wizard.  Interesting options can be found in Panel -> Panel Display (to move the panel to the bottom of the screen for example); Panel -> Panel Autohide (to choose whether the panel only appears when you mouseover its area, to give you the maximum screen real estate for applications), and in Launchers.  There's 3 slots for application launchers, with a Root Menu launcher in slot 1 by default.  To add a launcher for a PND, add the path to it's desktop file (e.g. /usr/share/applications/hdonk_firefox_001#0.desktop) to one of the slots.  You can also create your own desktop files for custom actions, e.g. launching the File Manager for the root of a SD card:
 +
 +
<pre>
 +
[Desktop Entry]
 +
Name=Show SD 1 Contents
 +
Type=Application
 +
Version=1.0
 +
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-media-sdmmc.png
 +
Exec=Thunar /media/mmcblk0p1
 +
</pre>
 +
 +
Save this text in a file called $XDG_CONFIG_HOME/tint2/showSD1.desktop and add this path to one of the launcher slots.
  
= Customize your environment =
+
==Configuring the Warlock Bar==
* start-up file: /usr/bin/openbox-session
+
 
* pnd menu: /etc/xdg/menus/openbox-pnd.menu
+
By default, the Warlock Bar is started along with the window manager.  To change this, edit $XDG_CONFIG_HOME/openbox/autostart (Root Menu -> Config -> Edit autostart). You can also change whether it appears or not via Root Menu -> Toggle Warlock Bar.  The bar's contents are auto-generated at startup by merging the file at $XDG_CONFIG_HOME/openbox/wbar_custom.cfg with a config created from the PNDs installed in pandora/apps or pandora/desktop (or - more accurately, it's created from the .desktop files in $HOME/Desktop). You can add or remove other entries by choosing Root Menu -> Config -> Edit wbar_custom.cfg, and change it's appearance by editing the first entry in that file (e.g. changing the second line to "c: wbar --bpress --pos right --vbar --isize 48 --idist 15 --nanim 4 --falfa 65" would put a vertical bar on the right of the screen).  After making changes, choose Root Menu -> Config -> Reload Warlock bar to see them.
* root menu: /home/<yourname>/Applications/Settings/openbox/menu.xml
 
* openbox settings: /home/<yourname>/Applications/Settings/openbox/rc.xml
 
* execute before openbox starts: /home/<yourname>/Applications/Settings/openbox/environment
 
* execute after openbox starts: /home/<yourname>/Applications/Settings/openbox/autostart
 
* manually add stuff to warlock bar: /home/<yourname>/Applications/Settings/openbox/wbar_custom.cfg
 
  
 
= CountOrlock Config =
 
= CountOrlock Config =
Line 41: Line 77:
 
* Launch urxvt : Ctrl Shift t
 
* Launch urxvt : Ctrl Shift t
 
* Launch Thunar : Ctrl Shift f
 
* Launch Thunar : Ctrl Shift f
 +
* Launch FireFox : Ctrl Shift w
 +
* Launch mousepad : Ctrl Shift e
 +
* Launch mplayer : Ctrl Shift m
  
And this is the content of the rc.xml, make a backup of your config before tying this. :
+
And this is the content of keyboard section in the rc.xml, make a backup of your config before tying this :
  <pre>
+
  <pre>
<?xml version="1.0" encoding="UTF-8"?>
 
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
 
  <resistance>
 
    <strength>10</strength>
 
    <screen_edge_strength>20</screen_edge_strength>
 
  </resistance>
 
  <focus>
 
    <focusNew>yes</focusNew>
 
    <!-- always try to focus new windows when they appear. other rules do
 
      apply -->
 
    <followMouse>no</followMouse>
 
    <!-- move focus to a window when you move the mouse into it -->
 
    <focusLast>yes</focusLast>
 
    <!-- focus the last used window when changing desktops, instead of the one
 
      under the mouse pointer. when followMouse is enabled -->
 
    <underMouse>no</underMouse>
 
    <!-- move focus under the mouse, even when the mouse is not moving -->
 
    <focusDelay>200</focusDelay>
 
    <!-- when followMouse is enabled, the mouse must be inside the window for
 
      this many milliseconds (1000 = 1 sec) before moving focus to it -->
 
    <raiseOnFocus>no</raiseOnFocus>
 
    <!-- when followMouse is enabled, and a window is given focus by moving the
 
      mouse into it, also raise the window -->
 
  </focus>
 
  <placement>
 
    <policy>Smart</policy>
 
    <!-- 'Smart' or 'UnderMouse' -->
 
    <center>yes</center>
 
    <!-- whether to place windows in the center of the free area found or
 
      the top left corner -->
 
    <monitor>Primary</monitor>
 
    <!-- with Smart placement on a multi-monitor system, try to place new windows
 
      on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
 
      the active window is, 'Primary' - only on the primary monitor -->
 
    <primaryMonitor>1</primaryMonitor>
 
    <!-- The monitor where Openbox should place popup dialogs such as the
 
      focus cycling popup, or the desktop switch popup.  It can be an index
 
      from 1, specifying a particular monitor.  Or it can be one of the
 
      following: 'Mouse' - where the mouse is, or
 
                  'Active' - where the active window is -->
 
  </placement>
 
  <theme>
 
    <name>Clearlooks</name>
 
    <titleLayout>NLIMC</titleLayout>
 
    <!--
 
      available characters are NDSLIMC, each can occur at most once.
 
      N: window icon
 
      L: window label (AKA title).
 
      I: iconify
 
      M: maximize
 
      C: close
 
      S: shade (roll up/down)
 
      D: omnipresent (on all desktops).
 
  -->
 
    <keepBorder>yes</keepBorder>
 
    <animateIconify>yes</animateIconify>
 
    <font place="ActiveWindow">
 
      <name>Sans</name>
 
      <size>9</size>
 
      <!-- font size in points -->
 
      <weight>Bold</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
    <font place="InactiveWindow">
 
      <name>Sans</name>
 
      <size>9</size>
 
      <!-- font size in points -->
 
      <weight>Bold</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
    <font place="MenuHeader">
 
      <name>Sans</name>
 
      <size>10</size>
 
      <!-- font size in points -->
 
      <weight>Normal</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
    <font place="MenuItem">
 
      <name>Sans</name>
 
      <size>10</size>
 
      <!-- font size in points -->
 
      <weight>Normal</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
    <font place="ActiveOnScreenDisplay">
 
      <name>Sans</name>
 
      <size>10</size>
 
      <!-- font size in points -->
 
      <weight>Bold</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
    <font place="InactiveOnScreenDisplay">
 
      <name>Sans</name>
 
      <size>10</size>
 
      <!-- font size in points -->
 
      <weight>Bold</weight>
 
      <!-- 'bold' or 'normal' -->
 
      <slant>Normal</slant>
 
      <!-- 'italic' or 'normal' -->
 
    </font>
 
  </theme>
 
  <desktops>
 
    <!-- this stuff is only used at startup, pagers allow you to change them
 
      during a session
 
 
      these are default values to use when other ones are not already set
 
      by other applications, or saved in your session
 
 
      use obconf if you want to change these without having to log out
 
      and back in -->
 
    <number>1</number>
 
    <firstdesk>1</firstdesk>
 
    <names>
 
      <!-- set names up here if you want to, like this: -->
 
      <name>Desktop 1</name>
 
<!--      <name>Desktop 2</name>-->
 
    </names>
 
    <popupTime>875</popupTime>
 
    <!-- The number of milliseconds to show the popup for when switching
 
      desktops.  Set this to 0 to disable the popup. -->
 
  </desktops>
 
  <resize>
 
    <drawContents>yes</drawContents>
 
    <popupShow>Nonpixel</popupShow>
 
    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
 
    <popupPosition>Center</popupPosition>
 
    <!-- 'Center', 'Top', or 'Fixed' -->
 
    <popupFixedPosition>
 
      <!-- these are used if popupPosition is set to 'Fixed' -->
 
      <x>10</x>
 
      <!-- positive number for distance from left edge, negative number for
 
        distance from right edge, or 'Center' -->
 
      <y>10</y>
 
      <!-- positive number for distance from top edge, negative number for
 
        distance from bottom edge, or 'Center' -->
 
    </popupFixedPosition>
 
  </resize>
 
  <!-- You can reserve a portion of your screen where windows will not cover when
 
    they are maximized, or when they are initially placed.
 
    Many programs reserve space automatically, but you can use this in other
 
    cases. -->
 
  <margins>
 
    <top>0</top>
 
    <bottom>0</bottom>
 
    <left>0</left>
 
    <right>0</right>
 
  </margins>
 
  <dock>
 
    <position>TopRight</position>
 
    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
 
    <!--
 
    <floatingX>0</floatingX>
 
    <floatingY>0</floatingY>
 
 
 
    <noStrut>no</noStrut>
 
    -->
 
    <stacking>Above</stacking>
 
    <!-- 'Above', 'Normal', or 'Below' -->
 
    <direction>Vertical</direction>
 
    <!-- 'Vertical' or 'Horizontal' -->
 
    <autoHide>no</autoHide>
 
    <hideDelay>300</hideDelay>
 
    <!-- in milliseconds (1000 = 1 second) -->
 
    <showDelay>300</showDelay>
 
    <!-- in milliseconds (1000 = 1 second) -->
 
    <moveButton>Middle</moveButton>
 
    <!-- 'Left', 'Middle', 'Right' -->
 
    <decor>no</decor>
 
    <border>no</border>
 
  </dock>
 
 
   <keyboard>
 
   <keyboard>
 
     <!-- Pandora keybindings start -->
 
     <!-- Pandora keybindings start -->
 
     <!-- Keybinding for root menu (Pandora button) -->
 
     <!-- Keybinding for root menu (Pandora button) -->
     <keybind key="XF86MenuKB">
+
     <keybind key="C-XF86MenuKB">
 
       <action name="ShowMenu">
 
       <action name="ShowMenu">
 
         <menu>root-menu</menu>
 
         <menu>root-menu</menu>
Line 237: Line 96:
 
       </action>
 
       </action>
 
     </keybind>
 
     </keybind>
     <!-- Keybindings for widow switching & window size -->
+
     <!-- Keybindings for window related stuff -->
 
     <keybind key="C-Up">  
 
     <keybind key="C-Up">  
 
       <action name="ToggleMaximizeFull">
 
       <action name="ToggleMaximizeFull">
Line 276: Line 135:
 
       </action>
 
       </action>
 
     </keybind>
 
     </keybind>
    <!-- Keybindings for windows -->
 
 
     <keybind key="C-q">
 
     <keybind key="C-q">
 
       <action name="Close"/>
 
       <action name="Close"/>
Line 346: Line 204:
 
       <action name="Execute">
 
       <action name="Execute">
 
         <command>urxvt -title "Pandora Term"</command>  
 
         <command>urxvt -title "Pandora Term"</command>  
 +
      </action>
 +
    </keybind>
 +
    <keybind key="C-S-e">
 +
      <action name="Execute">
 +
        <command>mousepad</command>
 +
      </action>
 +
    </keybind>
 +
    <keybind key="C-S-m">
 +
      <action name="Execute">
 +
        <command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/apps/smplayer2_r6.pnd</command>
 +
      </action>
 +
    </keybind>
 +
    <keybind key="C-S-w">
 +
      <action name="Execute">
 +
        <command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/apps/firefox-17.0.1-1.pnd</command>
 
       </action>
 
       </action>
 
     </keybind>
 
     </keybind>
Line 355: Line 228:
 
     <!-- Pandora keybindings end -->
 
     <!-- Pandora keybindings end -->
 
   </keyboard>
 
   </keyboard>
  <mouse>
 
    <dragThreshold>1</dragThreshold>
 
    <!-- number of pixels the mouse must move before a drag begins -->
 
    <doubleClickTime>200</doubleClickTime>
 
    <!-- in milliseconds (1000 = 1 second) -->
 
    <screenEdgeWarpTime>400</screenEdgeWarpTime>
 
    <!-- Time before changing desktops when the pointer touches the edge of the
 
      screen while moving a window, in milliseconds (1000 = 1 second).
 
      Set this to 0 to disable warping -->
 
    <screenEdgeWarpMouse>false</screenEdgeWarpMouse>
 
    <!-- Set this to TRUE to move the mouse pointer across the desktop when
 
      switching due to hitting the edge of the screen -->
 
    <context name="Frame">
 
      <mousebind button="A-Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="A-Left" action="Click">
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <!-- Pandora xfce-style shift-drag -->
 
      <mousebind button="S-Left" action="Drag">
 
        <action name="Move"/>
 
      </mousebind>
 
      <mousebind button="A-Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="A-Right" action="Drag">
 
        <action name="Resize"/>
 
      </mousebind>
 
      <mousebind button="A-Middle" action="Press">
 
        <action name="Lower"/>
 
        <action name="FocusToBottom"/>
 
        <action name="Unfocus"/>
 
      </mousebind>
 
      <mousebind button="A-Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="C-A-Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="C-A-Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-S-Up" action="Click">
 
        <action name="SendToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-S-Down" action="Click">
 
        <action name="SendToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Titlebar">
 
      <mousebind button="Left" action="Drag">
 
        <action name="Move"/>
 
      </mousebind>
 
      <mousebind button="Left" action="DoubleClick">
 
        <action name="ToggleMaximize"/>
 
      </mousebind>
 
      <mousebind button="Up" action="Click">
 
        <action name="if">
 
          <shaded>no</shaded>
 
          <then>
 
            <action name="Shade"/>
 
            <action name="FocusToBottom"/>
 
            <action name="Unfocus"/>
 
            <action name="Lower"/>
 
          </then>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Down" action="Click">
 
        <action name="if">
 
          <shaded>yes</shaded>
 
          <then>
 
            <action name="Unshade"/>
 
            <action name="Raise"/>
 
          </then>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Middle" action="Press">
 
        <action name="Lower"/>
 
        <action name="FocusToBottom"/>
 
        <action name="Unfocus"/>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="ShowMenu">
 
          <menu>client-menu</menu>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Top">
 
      <mousebind button="Left" action="Drag">
 
        <action name="Resize">
 
          <edge>top</edge>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Left">
 
      <mousebind button="Left" action="Drag">
 
        <action name="Resize">
 
          <edge>left</edge>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Right">
 
      <mousebind button="Left" action="Drag">
 
        <action name="Resize">
 
          <edge>right</edge>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Bottom">
 
      <mousebind button="Left" action="Drag">
 
        <action name="Resize">
 
          <edge>bottom</edge>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="ShowMenu">
 
          <menu>client-menu</menu>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="TRCorner BRCorner TLCorner BLCorner">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Drag">
 
        <action name="Resize"/>
 
      </mousebind>
 
    </context>
 
    <context name="Client">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="Middle" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
    </context>
 
    <context name="Icon">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
        <action name="ShowMenu">
 
          <menu>client-menu</menu>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="ShowMenu">
 
          <menu>client-menu</menu>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="AllDesktops">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Click">
 
        <action name="ToggleOmnipresent"/>
 
      </mousebind>
 
    </context>
 
    <context name="Shade">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Click">
 
        <action name="ToggleShade"/>
 
      </mousebind>
 
    </context>
 
    <context name="Iconify">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Click">
 
        <action name="Iconify"/>
 
      </mousebind>
 
    </context>
 
    <context name="Maximize">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Middle" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Click">
 
        <action name="ToggleMaximize"/>
 
      </mousebind>
 
      <mousebind button="Middle" action="Click">
 
        <action name="ToggleMaximize">
 
          <direction>vertical</direction>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Right" action="Click">
 
        <action name="ToggleMaximize">
 
          <direction>horizontal</direction>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="Close">
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
        <action name="Unshade"/>
 
      </mousebind>
 
      <mousebind button="Left" action="Click">
 
        <action name="Close"/>
 
      </mousebind>
 
    </context>
 
    <context name="Desktop">
 
      <mousebind button="Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="C-A-Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="C-A-Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Left" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="Focus"/>
 
        <action name="Raise"/>
 
      </mousebind>
 
    </context>
 
    <context name="Root">
 
      <!-- Menus -->
 
      <mousebind button="Middle" action="Press">
 
        <action name="ShowMenu">
 
          <menu>client-list-combined-menu</menu>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Right" action="Press">
 
        <action name="ShowMenu">
 
          <menu>root-menu</menu>
 
        </action>
 
      </mousebind>
 
    </context>
 
    <context name="MoveResize">
 
      <mousebind button="Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-Up" action="Click">
 
        <action name="GoToDesktop">
 
          <to>previous</to>
 
        </action>
 
      </mousebind>
 
      <mousebind button="A-Down" action="Click">
 
        <action name="GoToDesktop">
 
          <to>next</to>
 
        </action>
 
      </mousebind>
 
    </context>
 
  </mouse>
 
  <menu><!-- You can specify more than one menu file in here and they are all loaded,
 
      just don't make menu ids clash or, well, it'll be kind of pointless --><!-- default menu file (or custom one in $HOME/.config/openbox/) --><file>menu.xml</file><showicons>yes</showicons><hideDelay>200</hideDelay><!-- if a press-release lasts longer than this setting (in milliseconds), the
 
      menu is hidden again --><middle>no</middle><!-- center submenus vertically about the parent entry --><submenuShowDelay>100</submenuShowDelay><!-- time to delay before showing a submenu after hovering over the parent
 
      entry.
 
      if this is a negative value, then the delay is infinite and the
 
      submenu will not be shown until it is clicked on --><submenuHideDelay>400</submenuHideDelay><!-- time to delay before hiding a submenu when selecting another
 
      entry in parent menu -->
 
      if this is a negative value, then the delay is infinite and the
 
      submenu will not be hidden until a different submenu is opened --&gt;
 
  <applicationIcons>yes</applicationIcons>
 
  <!-- controls if icons appear in the client-list-(combined-)menu -->
 
  <manageDesktops>yes</manageDesktops>
 
  <!-- show the manage desktops section in the client-list-(combined-)menu -->
 
</menu>
 
  <applications>
 
    <application name="mousepad">
 
      <maximized>true</maximized>
 
    </application>
 
  </applications>
 
  <!--
 
  # this is an example with comments through out. use these to make your
 
  # own rules, but without the comments of course.
 
  # you may use one or more of the name/class/role/title/type rules to specify
 
  # windows to match
 
 
  <application name="the window's _OB_APP_NAME property (see obxprop)"
 
              class="the window's _OB_APP_CLASS property (see obxprop)"
 
              role="the window's _OB_APP_ROLE property (see obxprop)"
 
              title="the window's _OB_APP_TITLE property (see obxprop)"
 
              type="the window's _OB_APP_TYPE property (see obxprob)..
 
                      (if unspecified, then it is 'dialog' for child windows)">
 
  # you may set only one of name/class/role/title/type, or you may use more
 
  # than one together to restrict your matches.
 
 
  # the name, class, role, and title use simple wildcard matching such as those
 
  # used by a shell. you can use * to match any characters and ? to match
 
  # any single character.
 
 
  # the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
 
  #    or desktop
 
 
  # when multiple rules match a window, they will all be applied, in the
 
  # order that they appear in this list
 
 
 
    # each rule element can be left out or set to 'default' to specify to not
 
    # change that attribute of the window
 
 
    <decor>yes</decor>
 
    # enable or disable window decorations
 
 
    <shade>no</shade>
 
    # make the window shaded when it appears, or not
 
 
    <position force="no">
 
      # the position is only used if both an x and y coordinate are provided
 
      # (and not set to 'default')
 
      # when force is "yes", then the window will be placed here even if it
 
      # says you want it placed elsewhere.  this is to override buggy
 
      # applications who refuse to behave
 
      <x>center</x>
 
      # a number like 50, or 'center' to center on screen. use a negative number
 
      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from the
 
      # right edge (or bottom).
 
      <y>200</y>
 
      <monitor>1</monitor>
 
      # specifies the monitor in a xinerama setup.
 
      # 1 is the first head, or 'mouse' for wherever the mouse is
 
    </position>
 
 
    <focus>yes</focus>
 
    # if the window should try be given focus when it appears. if this is set
 
    # to yes it doesn't guarantee the window will be given focus. some
 
    # restrictions may apply, but Openbox will try to
 
 
    <desktop>1</desktop>
 
    # 1 is the first desktop, 'all' for all desktops
 
 
    <layer>normal</layer>
 
    # 'above', 'normal', or 'below'
 
 
    <iconic>no</iconic>
 
    # make the window iconified when it appears, or not
 
 
    <skip_pager>no</skip_pager>
 
    # asks to not be shown in pagers
 
 
    <skip_taskbar>no</skip_taskbar>
 
    # asks to not be shown in taskbars. window cycling actions will also
 
    # skip past such windows
 
 
    <fullscreen>yes</fullscreen>
 
    # make the window in fullscreen mode when it appears
 
 
    <maximized>true</maximized>
 
    # 'Horizontal', 'Vertical' or boolean (yes/no)
 
  </application>
 
 
  # end of the example
 
-->
 
</openbox_config>
 
 
  </pre>
 
  </pre>
  
Line 796: Line 233:
 
Menu changed to get easy access to config files as I spend a lot of time tuning them. And also some new stuff:
 
Menu changed to get easy access to config files as I spend a lot of time tuning them. And also some new stuff:
 
* "Pandora Setting" menu: Wifi on/off, BT etc.
 
* "Pandora Setting" menu: Wifi on/off, BT etc.
* "OpenBox Tools" menu: toggle System tray, warlock Bar.
+
* "OpenBox Tools" menu: toggle tint2, warlock Bar.
* Direct spell a term
+
* Direct cast a term
* Direct spell mousepad
+
* Direct cast an editor
* Direct spell a Browser
+
* Direct cast a Web Browser
 +
* Direct cast a FileManager
 +
* Direct cast a PNDManager
  
 
  <pre>
 
  <pre>
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
  
Line 814: Line 252:
 
label="Config"
 
label="Config"
 
execute="openbox-functions configmenu" />
 
execute="openbox-functions configmenu" />
 
<menu id="Status-menu"
 
label="Status"
 
execute="openbox-functions showstatus" />
 
 
  
 
<menu id="root-menu" label="Openbox 3">
 
<menu id="root-menu" label="Openbox 3">
Line 827: Line 260:
 
<separator />
 
<separator />
  
<menu id="Status-menu" />
+
         <menu id="PandoraSettings" label="Pandora Settings">
<separator />
+
        <item label="Toggle Bluetooth" icon="/usr/share/icons/hicolor/32x32/apps/bluetooth.png">
 
+
    <action name="Execute">
         <menu id="PandoraSettings" label="Pandora Settings">
 
 
 
  <item label="Toggle Bluetooth" icon="/usr/share/icons/hicolor/32x32/apps/bluetooth.png">
 
      <action name="Execute">
 
 
     <command>/usr/pandora/scripts/op_bluetooth.sh</command>
 
     <command>/usr/pandora/scripts/op_bluetooth.sh</command>
      </action>
+
    </action>
    </item>     
+
  </item>     
  
  <item label="Toggle WiFi" icon="/usr/share/icons/openbox/wifi.png">
+
<item label="Toggle WiFi" icon="/usr/share/icons/openbox/wifi.png">
      <action name="Execute">
+
    <action name="Execute">
     <command>sudo /usr/pandora/scripts/op_wifi.sh</command>
+
     <command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_wifi.pnd" -e "op_wifi.sh" -b "op_wifi"</command>
      </action>
+
    </action>
    </item>
+
  </item>
  
  <item label="Edit Connections" icon="/usr/share/icons/gnome/32x32/status/network-idle.png">
+
<item label="Edit Connections" icon="/usr/share/icons/gnome/32x32/status/network-idle.png">
      <action name="Execute">
+
    <action name="Execute">
 
     <command>nm-connection-editor</command>
 
     <command>nm-connection-editor</command>
      </action>
+
    </action>
    </item>
+
  </item>
 +
 
 +
  <item label="Auto Connect" icon="/usr/share/icons/gnome/32x32/status/network-transmit.png">
 +
    <action name="Execute">
 +
    <command>openbox-functions autoconnect</command>
 +
    </action>
 +
  </item>   
  
          <item label="Auto Connect" icon="/usr/share/icons/gnome/32x32/status/network-transmit.png">
+
<separator />
        <action name="Execute">
+
  <item label="Toggle USB Host" icon="/usr/share/icons/openbox/op_usbhost.png">
          <command>openbox-functions autoconnect</command>
+
    <action name="Execute">
        </action>
+
      <command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_usbhost.pnd" -e "op_usbhost.sh" -b "op_usbhost"</command>
          </item>  
+
    </action>
   
+
</item>
          <item label="Toggle USB Host" icon="/usr/share/icons/openbox/op_usbhost.png">
+
  <item label="SD-Mass Storage" icon="/usr/share/icons/openbox/op_storage.png">
      <action name="Execute">
+
    <action name="Execute">
          <command>/usr/pandora/scripts/op_usbhost.sh</command>
+
      <command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_storage.pnd" -e "op_storage.sh" -b "op_storage"</command>
            </action>
+
    </action>
  </item>
+
</item>
 
         </menu>
 
         </menu>
  
 
<separator />
 
<separator />
 +
 
         <menu id="OpenBox-tools" label="OpenBox Tools">
 
         <menu id="OpenBox-tools" label="OpenBox Tools">
  <item label="Toggle System Tray  " icon="/usr/share/icons/gnome/32x32/actions/remove.png">
+
<item label="Toggle Tint2 Panel" icon="/usr/share/icons/gnome/32x32/actions/remove.png">
      <action name="Execute">
+
    <action name="Execute">
       <command>openbox-functions togglesystray</command>
+
       <command>openbox-functions toggletint2</command>
      </action>
+
    </action>
  </item>
+
</item>
  <item label="Toggle Warlock Bar " icon="/usr/share/pixmaps/wbar/wbar.png">
+
<item label="Toggle Warlock Bar" icon="/usr/share/pixmaps/wbar/wbar.png">
      <action name="Execute">
+
    <action name="Execute">
 
       <command>openbox-functions togglewbar</command>
 
       <command>openbox-functions togglewbar</command>
      </action>
+
    </action>
  </item>     
+
</item>     
 
         </menu>
 
         </menu>
  
 
<separator />
 
<separator />
<item label="PND Installer" icon="/usr/share/icons/gnome/32x32/status/software-update-available.png">
+
<item label="PND Manager" icon="/usr/share/icons/gnome/32x32/status/software-update-available.png">
    <action name="Execute">
+
<action name="Execute">
<command>openbox-functions pndinstaller</command>
+
<command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/menu/pndmanager.pnd </command>
</action>
+
</action>
 
   </item>     
 
   </item>     
  
Line 907: Line 343:
 
     </action>
 
     </action>
 
   </item>     
 
   </item>     
 
 
 
   <separator />
 
   <separator />
 
    
 
    
Line 918: Line 353:
 
   <item label="Shutdown">
 
   <item label="Shutdown">
 
     <action name="Execute">
 
     <action name="Execute">
       <command>openbox-functions shutdown</command>
+
       <command>sudo shutdown -h now </command>
 
     </action>
 
     </action>
 
   </item>
 
   </item>
Line 925: Line 360:
  
 
</openbox_menu>
 
</openbox_menu>
 
 
 
  </pre>
 
  </pre>

Latest revision as of 07:08, 31 October 2013

openbox logo

Introduction

Openbox is a highly configurable, next generation window manager with extensive standards support. OpenBox is lightweight and very fast. Pnd download here [[1]]


Openbox for the Pandora aims to provide a GUI that's quick, responsive, and highly configurable. The PND (Switch GUI: Openbox) installs a number of components - namely: the window manager itself; the "Warlock Bar" for launching PNDs you've placed in pandora/apps or pandora/menu, and "tint2" - a panel that provides a taskbar, system tray, clock, and battery indicator. Configuration for each component is typically done by editing text files, or by using a graphical application that will edit the files for you, and let you preview the results.

OpenboxScreenshot.png

Configuring the Window Manager

Openbox lets you assign key and/or mouse events with actions. By default, the following are defined:

  • Root Menu: "Pandora Key" or "Right-Nub-Right-Click"
  • Go To Desktop 1: Alt DPAD-left
  • Go To Desktop 2: Alt DPAD-right
  • Send To Desktop 1: Ctrl DPAD-left
  • Send To Desktop 2: Ctrol DPAD-right
  • Client Menu: Alt DPAD-up
  • Switch Applications: Alt DPAD-down
  • Toggle Maximize: Ctrl DPAD-up
  • Toggle Shade: Ctrl DPAD-down
  • Quit Application: Ctrl-q
  • Long press on "Pandora Key": a kill menu

You can add more by editing $XDG_CONFIG_HOME/openbox/rc.xml (Root Menu -> Config -> Edit rc.xml - keybinding start around line 177). Additional keybindings from CountOrlock's setup are here: OpenBox#rc.xml

You can also define exactly how each application is launched. Line 660 onwards of rc.xml shows that XFCE's terminal is always launched maximized, and - commented out - how jumanji can be launched fullscreen, and how the size, position and appearance of applications can be controlled.

The contents Root Menu is defined in $XDG_CONFIG_HOME/openbox/menu.xml (Choose Root Menu -> Config -> Edit menu.xml). You can remove submenus and shortcuts you don't need, and add ones you do - as exemplified by CountOrlock's additions OpenBox#menu.xml

After making your changes and saving the file, reconfigure openbox (Root Menu -> Config -> Reconfigure) to see the results.

The graphical application for configuring the window manager is called obconf, and is accessed via Root Menu -> Config -> Config Manager. Amongst other things, this lets you choose and preview an Openbox theme. Openbox themes (as distinct from GTK+ themes), control the appearence of the Root Menu, application window frames (but not the contents), and buttons such as Maximize and Close. Additional themes can be downloaded from sites such as http://box-look.org - they are typically packaged in the ".obt "achive file understood by obconf.

Configuring GTK+ Applications

The appearance of GTK+ applications such as Mousepad and Geany are controlled by GTk+ engines and themes, the choice of which is determined in the $HOME/.gtkrc-2.0 file. This file can be manipulated by choosing Root Menu -> Config -> GTK+ Theme Switcher. GTK+ themes control the contents of application windows - the scrollbar, the colours, and the menu items. If you want to extend a theme, you can edit $HOME/.gtkrc.mine - the file placed there by default shows how to make scrollbars bigger as an example.

Configuring the Panel

By default, the tint2 panel is started along with the window manager. To change this, edit $XDG_CONFIG_HOME/openbox/autostart (Root Menu -> Config -> Edit autostart). You can also change whether it appears or not via Root Menu -> Toggle Tint2 Panel. The graphical application for configuration is launched by choosing Root Menu -> Config -> Tint2 Panel Wizard. Interesting options can be found in Panel -> Panel Display (to move the panel to the bottom of the screen for example); Panel -> Panel Autohide (to choose whether the panel only appears when you mouseover its area, to give you the maximum screen real estate for applications), and in Launchers. There's 3 slots for application launchers, with a Root Menu launcher in slot 1 by default. To add a launcher for a PND, add the path to it's desktop file (e.g. /usr/share/applications/hdonk_firefox_001#0.desktop) to one of the slots. You can also create your own desktop files for custom actions, e.g. launching the File Manager for the root of a SD card:

[Desktop Entry]
Name=Show SD 1 Contents
Type=Application
Version=1.0
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-media-sdmmc.png
Exec=Thunar /media/mmcblk0p1

Save this text in a file called $XDG_CONFIG_HOME/tint2/showSD1.desktop and add this path to one of the launcher slots.

Configuring the Warlock Bar

By default, the Warlock Bar is started along with the window manager. To change this, edit $XDG_CONFIG_HOME/openbox/autostart (Root Menu -> Config -> Edit autostart). You can also change whether it appears or not via Root Menu -> Toggle Warlock Bar. The bar's contents are auto-generated at startup by merging the file at $XDG_CONFIG_HOME/openbox/wbar_custom.cfg with a config created from the PNDs installed in pandora/apps or pandora/desktop (or - more accurately, it's created from the .desktop files in $HOME/Desktop). You can add or remove other entries by choosing Root Menu -> Config -> Edit wbar_custom.cfg, and change it's appearance by editing the first entry in that file (e.g. changing the second line to "c: wbar --bpress --pos right --vbar --isize 48 --idist 15 --nanim 4 --falfa 65" would put a vertical bar on the right of the screen). After making changes, choose Root Menu -> Config -> Reload Warlock bar to see them.

CountOrlock Config

rc.xml

This a work in process config, so please be aware that you use it at your own risk. Here is the main bindings:

  • Root Menu: "Pandora Key"
  • Window Listing and Desktop Management Menu: Shift "Pandora Key"
  • Client Menu: Ctrl Space
  • Next Window: Ctrl DPAD-Right
  • Previous Window: Ctrl DPAD-Left
  • Toggle Maximize: Ctrl DPAD-up
  • Toggle FullScreen (No Decoration): Ctrl o
  • Toggle Desktop: Ctrl u
  • Window on left side : Ctrl j
  • Window on right side : Ctrl k
  • Window on half top : Ctrl i
  • Window on half bottom : Ctrl m
  • Quit Application: Ctrl-q
  • Launch urxvt : Ctrl Shift t
  • Launch Thunar : Ctrl Shift f
  • Launch FireFox : Ctrl Shift w
  • Launch mousepad : Ctrl Shift e
  • Launch mplayer : Ctrl Shift m

And this is the content of keyboard section in the rc.xml, make a backup of your config before tying this :

  <keyboard>
    <!-- Pandora keybindings start -->
    <!-- Keybinding for root menu (Pandora button) -->
    <keybind key="C-XF86MenuKB">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>
    <keybind key="S-XF86MenuKB">
      <action name="ShowMenu">
        <menu>client-list-combined-menu</menu>
      </action>
    </keybind>
    <!-- Keybindings for window related stuff -->
    <keybind key="C-Up"> 
      <action name="ToggleMaximizeFull">
      <finalactions>
        <action name="Focus"/>
        <action name="Raise"/>
        <action name="Unshade"/>
      </finalactions>
      </action>
    </keybind>
    <keybind key="C-Down">
      <action name="Iconify">
      </action>
    </keybind>
    <keybind key="C-o">
      <action name="ToggleFullscreen">
      </action>
    </keybind>
    <keybind key="C-u">
      <action name="ToggleShowDesktop"/>
    </keybind>
    <keybind key="C-Left">
        <action name="PreviousWindow">
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="C-Right">
      <action name="NextWindow">
        <finalactions>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="C-q">
      <action name="Close"/>
    </keybind>
    <keybind key="C-space">
      <action name="ShowMenu">
        <menu>client-menu</menu>
      </action>
    </keybind>
    <!-- Keybindings for pseudo tiling windows manager-->
    <keybind key="C-k">
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <width>50%</width>
        <height>460</height>
        <finalactions>
          <action name="Unmaximize"/>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="C-j">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>460</height>
        <finalactions>
          <action name="Unmaximize"/>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="C-i">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>230</height>
        <finalactions>
          <action name="Unmaximize"/>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <keybind key="C-m">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>100%</width>
        <height>230</height>
        <finalactions>
          <action name="Unmaximize"/>
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Unshade"/>
        </finalactions>
      </action>
    </keybind>
    <!-- Keybindings for Quick Launch -->
    <keybind key="C-S-t">
      <action name="Execute">
        <command>urxvt -title "Pandora Term"</command> 
      </action>
    </keybind>
    <keybind key="C-S-e">
      <action name="Execute">
        <command>mousepad</command> 
      </action>
    </keybind>
    <keybind key="C-S-m">
      <action name="Execute">
        <command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/apps/smplayer2_r6.pnd</command> 
      </action>
    </keybind>
    <keybind key="C-S-w">
      <action name="Execute">
        <command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/apps/firefox-17.0.1-1.pnd</command> 
      </action>
    </keybind>
    <keybind key="C-S-f">
      <action name="Execute">
        <command>thunar</command> 
      </action>
    </keybind>
    <!-- Pandora keybindings end -->
  </keyboard>
 

menu.xml

Menu changed to get easy access to config files as I spend a lot of time tuning them. And also some new stuff:

  • "Pandora Setting" menu: Wifi on/off, BT etc.
  • "OpenBox Tools" menu: toggle tint2, warlock Bar.
  • Direct cast a term
  • Direct cast an editor
  • Direct cast a Web Browser
  • Direct cast a FileManager
  • Direct cast a PNDManager
<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/3.4/menu">

<menu id="PNDs-menu"
	label="PNDs"
	execute="openbox-menu /etc/xdg/menus/openbox-pnd.menu" />

<menu id="Config-menu"
	label="Config"
	execute="openbox-functions configmenu" />

<menu id="root-menu" label="Openbox 3">
	<menu id="PNDs-menu" />
	<separator />

	<menu id="Config-menu" />
	<separator />	

        <menu id="PandoraSettings" label="Pandora Settings">	
        <item label="Toggle Bluetooth" icon="/usr/share/icons/hicolor/32x32/apps/bluetooth.png">
    	<action name="Execute">
    		<command>/usr/pandora/scripts/op_bluetooth.sh</command>
    	</action>
  	</item>    

	<item label="Toggle WiFi" icon="/usr/share/icons/openbox/wifi.png">
    	<action name="Execute">
    		<command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_wifi.pnd" -e "op_wifi.sh" -b "op_wifi"</command>
    	</action>
  	</item>

	<item label="Edit Connections" icon="/usr/share/icons/gnome/32x32/status/network-idle.png">
    	<action name="Execute">
    		<command>nm-connection-editor</command>
    	</action>
  	</item>

  	<item label="Auto Connect" icon="/usr/share/icons/gnome/32x32/status/network-transmit.png">
    	<action name="Execute">
    		<command>openbox-functions autoconnect</command>
    	</action>
  	</item>    

	<separator />
   	<item label="Toggle USB Host" icon="/usr/share/icons/openbox/op_usbhost.png">
    	<action name="Execute">
      		<command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_usbhost.pnd" -e "op_usbhost.sh" -b "op_usbhost"</command>
    	</action>
	</item>
   	<item label="SD-Mass Storage" icon="/usr/share/icons/openbox/op_storage.png">
    	<action name="Execute">
      		<command>/usr/pandora/scripts/pnd_run.sh -p "/usr/pandora/apps/op_storage.pnd" -e "op_storage.sh" -b "op_storage"</command>
    	</action>
	</item>
        </menu>

	<separator />

        <menu id="OpenBox-tools" label="OpenBox Tools">
	<item label="Toggle Tint2 Panel" icon="/usr/share/icons/gnome/32x32/actions/remove.png">
    	<action name="Execute">
      		<command>openbox-functions toggletint2</command>
    	</action>
	</item>
	<item label="Toggle Warlock Bar" icon="/usr/share/pixmaps/wbar/wbar.png">
    	<action name="Execute">
      		<command>openbox-functions togglewbar</command>
    	</action>
	</item>      	
        </menu>

	<separator />
	<item label="PND Manager" icon="/usr/share/icons/gnome/32x32/status/software-update-available.png">
	<action name="Execute">
		<command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/menu/pndmanager.pnd </command>
	</action>
  	</item>    

  	<item label="Editor" icon="/usr/share/icons/hicolor/24x24/apps/Mousepad.png">
    	<action name="Execute">
      		<command>mousepad</command>
    	</action>
  	</item>    

  	<item label="File Manager" icon="/usr/share/icons/gnome/32x32/apps/system-file-manager.png">
    	<action name="Execute">
      		<command>Thunar</command>
    	</action>
  	</item>    

  	<item label="Browser" icon="/usr/share/icons/gnome/24x24/apps/web-browser.png">
    	<action name="Execute">
      		<command>pnd_run /media/<YOUR_SD_CARD_NAME_HERE>/pandora/apps/firefox-17.0.1-1.pnd</command>
    	</action>
  	</item>    

  	<item label="Terminal" icon="/usr/share/icons/gnome/32x32/apps/utilities-terminal.png">
    	<action name="Execute">
                <command>urxvt -title "Pandora Term"</command>
    	</action>
  	</item>    
  	<separator />
  
  	<item label="Switch GUI" icon="/usr/share/icons/openbox/switchgui.png">
    	<action name="Execute">
      		<command>/usr/pandora/scripts/op_switchgui.sh</command>
    	</action>
  	</item>

  	<item label="Shutdown">
    	<action name="Execute">
      		<command>sudo shutdown -h now </command>
    	</action>
  	</item>

</menu>

</openbox_menu>