#!/bin/bash # --------------------------------------------------------------------- # An Openbox pipemenu for use with LibreOffice and CrunchBang Linux. # Written for CrunchBang Linux # by Philip Newborough (aka corenominal) # Ported to #!++ # by Ben Young # Ported to Manjaro # by Daniel Napora # --------------------------------------------------------------------- if ! . mabox-include.cfg 2> /dev/null; then echo ' Failed to locate mabox-include.cfg in PATH' >&2 exit 1 fi if [[ $1 = '--install' ]]; then terminator --title='Install LibreOffice' --command='mabox-libreoffice-pipemenu --install-lo' elif [[ $1 = '--install-lo' ]]; then promptInstall 'LIBREOFFICE' 'LibreOffice' 'libreoffice-still' else # Pipemenu menuStart tools=('writer' 'calc' 'impress' 'draw' 'base') for curTool in "${tools[@]}"; do if type "lo$curTool" &> /dev/null; then INSTALLED=true menuItem "${curTool^}" "lo$curTool" fi done [[ ! $INSTALLED ]] && menuItem 'Install LibreOffice' 'mabox-libreoffice-pipemenu --install' menuEnd fi exit 0