34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
|
#!/bin/bash
|
||
|
# ---------------------------------------------------------------------
|
||
|
# An Openbox pipemenu for configuring printing under CrunchBang Linux.
|
||
|
# Written for CrunchBang Linux <http://crunchbanglinux.org/>
|
||
|
# by Philip Newborough (aka corenominal) <mail@philipnewborough.co.uk>
|
||
|
# Ported to #!++ <https://crunchbangplusplus.org>
|
||
|
# by Ben Young <computermouth@crunchbangplusplus.org>
|
||
|
# Ported to Manjaro <https://manjaro.github.io/>
|
||
|
# by Daniel Napora <napcok@gmail.com>
|
||
|
# ---------------------------------------------------------------------
|
||
|
|
||
|
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 Printer Support' --command='mabox-printing-pipemenu --install-printing'
|
||
|
|
||
|
elif [[ $1 = '--install-printing' ]]; then
|
||
|
promptInstall 'PRINTING SUPPORT' 'printing support' 'manjaro-printer'
|
||
|
|
||
|
else
|
||
|
# Pipemenu
|
||
|
menuStart
|
||
|
if type 'system-config-printer' &> /dev/null; then
|
||
|
menuItem 'Configure Printers' 'gksudo system-config-printer'
|
||
|
else
|
||
|
menuItem 'Install Printing Support' 'mabox-printing-pipemenu --install'
|
||
|
fi
|
||
|
menuEnd
|
||
|
fi
|
||
|
exit 0
|