add license notice to all the scripts
This commit is contained in:
parent
d5ca4510a0
commit
945de3988f
|
@ -1,3 +1,6 @@
|
||||||
# spmenu example scripts
|
# spmenu example scripts
|
||||||
|
|
||||||
This folder contains spmenu example scripts which may be used to learn how to do certain things in spmenu. They are not installed automatically, but feel free to copy the scripts somewhere and use them to learn.
|
This folder contains spmenu example scripts which may be used to learn how to
|
||||||
|
do certain things in spmenu. They are not installed automatically, but feel
|
||||||
|
free to copy the scripts somewhere and use them to learn. The `install.sh`
|
||||||
|
script does this for you if you want all of them.
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# install.sh
|
||||||
|
# Install all scripts in the current directory.
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ "$(id -u)" != "0" ] && printf "Run me as root.\n" && exit 1
|
[ "$(id -u)" != "0" ] && printf "Run me as root.\n" && exit 1
|
||||||
cp -f spmenu* /usr/bin
|
cp -f spmenu* /usr/bin
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# spmenu_16cols.sh
|
||||||
|
# Prints 16 foreground and 16 background colors
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
|
|
||||||
printf "\033[0;31mItem 1\n\033[0;32mItem 2\n\033[0;33mItem 3\n\033[0;34mItem 4\n\033[0;35mItem 5\n\033[0;36mItem 6\n\033[0;37mItem 7\n\033[0;38mItem 8\n\033[1;31mItem 9\n\033[1;32mItem 10\n\033[1;33mItem 11\n\033[1;34mItem 12\n\033[1;35mItem 13\n\033[1;36mItem 14\n\033[1;37mItem 15\n\033[1;38mItem 16\n\
|
printf "\033[0;31mItem 1\n\033[0;32mItem 2\n\033[0;33mItem 3\n\033[0;34mItem 4\n\033[0;35mItem 5\n\033[0;36mItem 6\n\033[0;37mItem 7\n\033[0;38mItem 8\n\033[1;31mItem 9\n\033[1;32mItem 10\n\033[1;33mItem 11\n\033[1;34mItem 12\n\033[1;35mItem 13\n\033[1;36mItem 14\n\033[1;37mItem 15\n\033[1;38mItem 16\n\
|
||||||
\033[0;41mItem 1\n\033[0;42mItem 2\n\033[0;43mItem 3\n\033[0;44mItem 4\n\033[0;45mItem 5\n\033[0;46mItem 6\n\033[0;47mItem 7\n\033[0;48mItem 8\n\033[1;41mItem 9\n\033[1;42mItem 10\n\033[1;43mItem 11\n\033[1;44mItem 12\n\033[1;45mItem 13\n\033[1;46mItem 14\n\033[1;47mItem 15\n\033[1;48mItem 16\n" | spmenu "$@"
|
\033[0;41mItem 1\n\033[0;42mItem 2\n\033[0;43mItem 3\n\033[0;44mItem 4\n\033[0;45mItem 5\n\033[0;46mItem 6\n\033[0;47mItem 7\n\033[0;48mItem 8\n\033[1;41mItem 9\n\033[1;42mItem 10\n\033[1;43mItem 11\n\033[1;44mItem 12\n\033[1;45mItem 13\n\033[1;46mItem 14\n\033[1;47mItem 15\n\033[1;48mItem 16\n" | spmenu "$@"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# proof of concept script allowing you to view images in spmenu
|
# spmenu_imageviewer.sh
|
||||||
# usage: spmenu_imageviewer.sh image1 image2 ...
|
# Proof of concept script allowing you to view images in spmenu
|
||||||
|
# Usage: spmenu_imageviewer.sh image1 image2 ...
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ ! -f "$1" ] && printf "You must specify an image to view.\n" && exit 1
|
[ ! -f "$1" ] && printf "You must specify an image to view.\n" && exit 1
|
||||||
|
|
||||||
genlist() {
|
genlist() {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# spmenu_itemcounter.sh
|
||||||
|
# Example script which adds a new entry to spmenu every second.
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
func() {
|
func() {
|
||||||
rm -f /tmp/fl
|
rm -f /tmp/fl
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#
|
#
|
||||||
# This script lists out songs in a path you give to it and also displays the cover art for that song if it can be found.
|
# This script lists out songs in a path you give to it and also displays the cover art for that song if it can be found.
|
||||||
# It serves as an example of how image drawing can be done with spmenu.
|
# It serves as an example of how image drawing can be done with spmenu.
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ -z "$dir" ] && dir="$1"
|
[ -z "$dir" ] && dir="$1"
|
||||||
[ -z "$maxcount" ] && maxcount="$2"
|
[ -z "$maxcount" ] && maxcount="$2"
|
||||||
[ -z "$startline" ] && startline="$3"
|
[ -z "$startline" ] && startline="$3"
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# spmenu_sweden.sh
|
||||||
|
# Just the swedish flag using SGR sequences, serves as a good example on how to do background colors.
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
|
|
||||||
[ -z "$fg_blue" ] && fg_blue='\033[1;34m'
|
[ -z "$fg_blue" ] && fg_blue='\033[1;34m'
|
||||||
[ -z "$fg_yellow" ] && fg_yellow='\033[1;35m'
|
[ -z "$fg_yellow" ] && fg_yellow='\033[1;35m'
|
||||||
[ -z "$bg_blue" ] && bg_blue='\033[1;44m'
|
[ -z "$bg_blue" ] && bg_blue='\033[1;44m'
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# spmenu build script
|
# spmenu build script
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
warn="${warn:-true}"
|
warn="${warn:-true}"
|
||||||
reconfigure="${reconfigure:-true}"
|
reconfigure="${reconfigure:-true}"
|
||||||
version="${version:-1.1}"
|
version="${version:-1.1}"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# clean.sh
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
rm -f \
|
rm -f \
|
||||||
*.zst* \
|
*.zst* \
|
||||||
*.tar* \
|
*.tar* \
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-argument-list.sh
|
||||||
|
# Generates a list of arguments from spmenu -h output.
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
spmenu -h | grep -vE -- "- |spmenu:" | sed "s/<//g; s/>/ /g; /^[[:space:]]*$/d"
|
spmenu -h | grep -vE -- "- |spmenu:" | sed "s/<//g; s/>/ /g; /^[[:space:]]*$/d"
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-code-docs.sh
|
||||||
|
# Generate code documentation from code-docs.md
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
||||||
[ ! -f "$1" ] && printf "You must specify an input file.\n" && exit 1
|
[ ! -f "$1" ] && printf "You must specify an input file.\n" && exit 1
|
||||||
[ -z "$2" ] && printf "You must specify an output file.\n" && exit 1
|
[ -z "$2" ] && printf "You must specify an output file.\n" && exit 1
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-docs.sh
|
||||||
|
# Generate documentation from docs.md
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
||||||
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
||||||
printf "%% spmenu(1) ${version} | fancy dynamic menu\n" > .man.md
|
printf "%% spmenu(1) ${version} | fancy dynamic menu\n" > .man.md
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-headers.h
|
||||||
|
# Generate headers using wayland-scanner
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ ! -x "$(command -v wayland-scanner)" ] && exit 1
|
[ ! -x "$(command -v wayland-scanner)" ] && exit 1
|
||||||
|
|
||||||
wayland-scanner \
|
wayland-scanner \
|
||||||
client-header \
|
client-header \
|
||||||
protocols/wlr-layer-shell-unstable-v1.xml \
|
protocols/wlr-layer-shell-unstable-v1.xml \
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-keybind-list.sh
|
||||||
|
# Generates a keybind list in Markdown column format
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
grep "{ " "$1" | \
|
grep "{ " "$1" | \
|
||||||
grep -v "[*]" | \
|
grep -v "[*]" | \
|
||||||
sed "s/{.i = //g; s/{.c = //g; s/{.f = //g; s/{0} }/0/g; s/ } }//g; s/,//g; s/{ //g; s/^\s*//g; s/XK_//g; s/|/+/g" \
|
sed "s/{.i = //g; s/{.c = //g; s/{.f = //g; s/{0} }/0/g; s/ } }//g; s/,//g; s/{ //g; s/^\s*//g; s/XK_//g; s/|/+/g" \
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-pacman-pkg.sh
|
||||||
|
# Generate spmenu package for Arch and Pacman
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
||||||
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# generate-pkg.sh
|
||||||
|
# Generate a spmenu tarball
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
[ ! -f spmenu.c ] && printf "You're probably in the wrong directory.\n" && exit 1
|
||||||
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
version="$(grep "version : '" meson.build | awk '{ print $3 }' | sed "s/'\"//g; s/\"',//g")"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# generate-theme.sh
|
# generate-theme.sh
|
||||||
# Generate a theme from a list of colors
|
# Generate a theme from a list of colors
|
||||||
|
#
|
||||||
|
# See LICENSE file for copyright and license details.
|
||||||
|
|
||||||
declare -a color
|
declare -a color
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue