OpenBox

From Pandora Wiki
Revision as of 12:17, 11 December 2012 by CountOrlock (talk | contribs) (menu.xml)
Jump to: navigation, search

Default Config

Default Keybindings

  • Root Menu: "Pandora Key" or "Ctrl-M" "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

Customize your environment

  • start-up file: /usr/bin/openbox-session
  • pnd menu: /etc/xdg/menus/openbox-pnd.menu
  • 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

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>