Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # ---------------------------------------------------------------------
- # An Openbox pipemenu for use with Apache OpenOffice and CrunchBang Linux.
- # Written for CrunchBang Linux <http://crunchbang.org/>
- # by Philip Newborough (aka corenominal) <mail@philipnewborough.co.uk>
- # ---------------------------------------------------------------------
- pathto=$(readlink -f "$0" | sed 's%/*[^/]\+/*$%%')
- if [[ -f $pathto/cb-include.cfg ]]
- then
- source "$pathto/cb-include.cfg"
- else
- echo " Failed to locate cb-include.cfg"
- exit 1
- fi
- # Set flag
- INSTALLED=false
- # Start pipemenu
- echo " <openbox_pipe_menu>"
- # Writer
- if [ -x "/opt/openoffice4/program/swriter" ];then
- I=$((I+1))
- cat << _menu_
- <item label="Writer">
- <action name="Execute">
- <command>
- /opt/openoffice4/program/swriter
- </command>
- </action>
- </item>
- _menu_
- fi
- # Calc
- if [ -x "/opt/openoffice4/program/scalc" ];then
- I=$((I+1))
- cat << _menu_
- <item label="Calc">
- <action name="Execute">
- <command>
- /opt/openoffice4/program/scalc
- </command>
- </action>
- </item>
- _menu_
- fi
- # Impress
- if [ -x "/opt/openoffice4/program/simpress" ];then
- I=$((I+1))
- cat << _menu_
- <item label="Impress">
- <action name="Execute">
- <command>
- /opt/openoffice4/program/simpress
- </command>
- </action>
- </item>
- _menu_
- fi
- # Draw
- if [ -x "/opt/openoffice4/program/sdraw" ];then
- I=$((I+1))
- cat << _menu_
- <item label="Draw">
- <action name="Execute">
- <command>
- /opt/openoffice4/program/sdraw
- </command>
- </action>
- </item>
- _menu_
- fi
- # Base
- if [ -x "/opt/openoffice4/program/sbase" ];then
- I=$((I+1))
- cat << _menu_
- <item label="Base">
- <action name="Execute">
- <command>
- /opt/openoffice4/program/sbase
- </command>
- </action>
- </item>
- _menu_
- fi
- # End pipemenu
- echo " </openbox_pipe_menu>"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement