#! /bin/bash # # SHELL-COLOR-SCRIPTS by Derek Taylor (DistroTube) # A simple script that creates an openbox pipemenu that runs shell-color-scripts # (https://github.com/dwt1/shell-color-scripts) in a terminal window. # # shell-color-scripts was forked from Color-Scripts (https://github.com/stark/Color-Scripts) # # This program is free software: you can redistribute it and/or modify it under the terms of # the GNU General Public License version 3 as published by the Free Software Foundation. # 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 # # Copy this file somewhere on your path and make it executable. # Add the following line somewhere to your /.config/openbox/menu.xml # # Be sure to change the PATH/TO to the correct path to this file. # # Reconfigure openbox. # output the initial menu # NOTE: If you do not use the "termite" terminal program or the "ranger" file manager, edit the below. cat < termite -e 'ranger ~/color-scripts' EOF # seperate the main command from the virtuals echo " " echo " " # each color script listed in the menu for file in $(ls ~/shell-color-scripts/* | head -15); do NAME=$(echo "$file" | rev | cut -d"/" -f1 | rev) echo " " # NOTE: If you do not use the "termite" terminal program, then change "termite" to your preferred terminal (ex. xterm, urxvt, etc.) echo "termite -e '$file' -t '$file'" # NOTE: If you do not use the "vim" text editor, then change "vim" to your preferred editor (ex. nano, geany, etc.) echo "termite -e 'vim $file'" echo " " done echo " " echo " " # each color script listed in the menu for file in $(ls ~/shell-color-scripts/* | tail -37 | head -15); do NAME=$(echo "$file" | rev | cut -d"/" -f1 | rev) echo " " # NOTE: If you do not use the "termite" terminal program, then change "termite" to your preferred terminal (ex. xterm, urxvt, etc.) echo "termite -e '$file' -t '$file'" # NOTE: If you do not use the "vim" text editor, then change "vim" to your preferred editor (ex. nano, geany, etc.) echo "termite -e 'vim $file'" echo " " done echo " " echo " " # each color script listed in the menu for file in $(ls ~/shell-color-scripts/* | tail -22 | head -15); do NAME=$(echo "$file" | rev | cut -d"/" -f1 | rev) echo " " # NOTE: If you do not use the "termite" terminal program, then change "termite" to your preferred terminal (ex. xterm, urxvt, etc.) echo "termite -e '$file' -t '$file'" # NOTE: If you do not use the "vim" text editor, then change "vim" to your preferred editor (ex. nano, geany, etc.) echo "termite -e 'vim $file'" echo " " done echo " " echo " " # each color script listed in the menu for file in $(ls ~/shell-color-scripts/* | tail -7 | head -15); do NAME=$(echo "$file" | rev | cut -d"/" -f1 | rev) echo " " # NOTE: If you do not use the "termite" terminal program, then change "termite" to your preferred terminal (ex. xterm, urxvt, etc.) echo "termite -e '$file' -t '$file'" # NOTE: If you do not use the "vim" text editor, then change "vim" to your preferred editor (ex. nano, geany, etc.) echo "termite -e 'vim $file'" echo " " done echo " " # and finally... echo ""