#!/bin/bash # noise (lite) # give me some noise for wallpaper # required: imagemagick, nitrogen # usage: noise --help # checks command -v convert >/dev/null 2>&1 || { echo "I need imagemagick convert, exiting." >&2; exit 1; } command -v nitrogen >/dev/null 2>&1 || { echo "I need nitrogen, exiting." >&2; exit 1; } # store for single image file="$HOME/.noise.png" touch "$file" || exit # resolution mx=1920; my=1200 # help if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then cat < /dev/null then (echo "$1 running, restarting" killall -w "$1" "${1}" &) & else echo "$1 wasn't running" fi } # action set -x noise setwall restart wbar > /dev/null 2>&1