Skip to content

Instantly share code, notes, and snippets.

@Dobbie03
Created October 3, 2017 07:23
Show Gist options
  • Select an option

  • Save Dobbie03/30d09d3bb68459f8492bd2c4c2595a92 to your computer and use it in GitHub Desktop.

Select an option

Save Dobbie03/30d09d3bb68459f8492bd2c4c2595a92 to your computer and use it in GitHub Desktop.
#!/bin/bash
# al-help-pipemenu - an Openbox pipemenu for displaying help files
# Copyright (C) 2015 damo <damo@bunsenlabs.org>
# Borrowed with love by the ArchLabs Boys.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
HELP=' al-help-pipemenu an Openbox Pipe Menu for displaying help files
It should normally be called from an openbox menu.
Options (usually passed from the menu):
-h --help show this message
If al-help-pipemenu is called with no options (the usual method),
it will output an xml openbox pipemenu displaying various help files,
both online and on the system.
'
# look for a help option somewhere
for i in "$@"
do
case "$i" in
-h|--help)
echo "$HELP"
exit 0
;;
esac
done
AL_COMMON_LIBDIR='/usr/lib/archlabs/common'
if ! . "$AL_COMMON_LIBDIR/al-include.cfg" 2> /dev/null; then
echo $"Error: Failed to source al-include.cfg in $AL_COMMON_LIBDIR" >&2
exit 1
fi
menuStart
menuSeparator 'ArchLabs Linux Online'
menuSeparator
menuItem 'ArchLabs Homepage' 'exo-open "https://archlabsblog.wordpress.com/"'
menuItem 'ArchLabs Medium' 'exo-open "https://medium.com/@archlabslinux"'
menuItem 'ArchLabs Forum' 'exo-open "http://archlabs.prophpbb.com/"'
menuItem 'ArchLabs Google+' 'exo-open "https://plus.google.com/u/0/communities/111177505820810068511"'
menuSeparator 'ArchLabs Linux Help'
menuSeparator
menuItem 'Forum Basic Help & Support' 'exo-open "http://archlabs.prophpbb.com/forum7.html"'
menuItem 'Scripts, Tutorials & Tips' 'exo-open "https://bbs.archlinux.org/viewforum.php?id=33"'
menuSeparator
menuSubmenu 'OpenboxWWW' 'Openbox'
menuItem 'Openbox Homepage' 'exo-open "http://openbox.org/"'
menuItem 'Openbox Getting Started' 'exo-open "http://openbox.org/wiki/Help:Getting_started"'
menuItem 'Openbox Documentation' 'exo-open "http://openbox.org/wiki/Help:Contents"'
menuItem 'Openbox FAQs' 'exo-open "http://openbox.org/wiki/Help:FAQ"'
menuItem 'Arch Wiki Openbox Guide' 'exo-open "http://wiki.archlinux.org/index.php/Openbox"'
menuItem 'Debian Wiki Openbox Guide' 'exo-open "https://wiki.debian.org/Openbox"'
menuItem 'Urukramas Openbox Guide' 'exo-open "https://urukrama.wordpress.com/openbox-faq/"'
menuItem 'Openbox Reddit' 'exo-open "https://www.reddit.com/r/openbox/"'
menuSubmenuEnd
menuSubmenu 'PanelWWW' 'Tint2'
menuItem 'Tint2 Wiki: FAQ' 'exo-open "https://gitlab.com/o9000/tint2/wikis/FAQ"'
menuItem 'Tint2 Wiki: Configuration' 'exo-open "https://gitlab.com/o9000/tint2/blob/master/doc/tint2.md"'
menuItem 'Polybar Wiki' 'exo-open "https://github.com/jaagr/polybar/wiki"'
menuItem 'Polybar Man Pages' 'termite --exec=man polybar'
menuItem 'Tint2 Man Pages' 'termite --exec=man tint2'
menuSubmenuEnd
menuSubmenu 'ConkyWWW' 'Conky'
menuItem 'Conky Wiki' 'exo-open "https://github.com/brndnmtthws/conky/wiki"'
menuItem 'Conky Archive' 'exo-open "http://crunchbang.org/forums/viewtopic.php?pid=371424"'
menuItem 'Conky Reddit' 'exo-open "https://www.reddit.com/r/conky/"'
menuItem 'Conky Man Pages' 'termite --exec=man conky'
menuSubmenuEnd
menuSeparator
menuSubmenu 'ThemesWWW' 'Theme Resources'
menuItem 'Bunsenlabs on DeviantArt' 'exo-open "http://bunsenlabs.deviantart.com/"'
menuItem 'Eye Candy Linux DeviantArt' 'exo-open "http://eye-candy-linux.deviantart.com/"'
menuItem 'Box-Look.org' 'exo-open "http://www.box-look.org"'
menuItem 'Gnome-Look.org' 'exo-open "http://gnome-look.org/"'
menuItem 'Eye Candy Linux Google+' 'exo-open "https://plus.google.com/u/0/communities/104794997718869399105"'
menuItem 'UnixPorn' 'exo-open "https://www.reddit.com/r/unixporn/"'
menuItem 'nixers.net' 'exo-open "http://nixers.net/"'
menuSubmenuEnd
menuSeparator 'Man Pages'
menuItem 'Compositor' 'termite --exec=man compton'
menuItem 'Rofi' 'termite --exec=man rofi'
menuItem 'Xrandr' 'termite --exec=man xrandr'
menuItem 'Zenity' 'termite --exec=man zenity'
menuSeparator 'Wikis'
menuItem 'Arch Wiki' 'exo-open "https://wiki.archlinux.org/index.php/Table_of_contents"'
menuItem 'Termite' 'exo-open "https://wiki.archlinux.org/index.php/termite"'
menuEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment