dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit aee3ab2ac06defae747125c62e249b99322fe5f3
parent bf2e7ec6f5f42ffdbf11491e7ffbba8856ede8e9
Author: pyratebeard <root@pyratebeard.net>
Date:   Wed, 20 Sep 2017 13:33:33 +0100

hashwall and dependency hsetroot scripts

Diffstat:
Abin/bin/hashwall | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Abin/bin/hsetroot | 0
2 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/bin/bin/hashwall b/bin/bin/hashwall @@ -0,0 +1,82 @@ +#!/bin/sh +# +# ██ ██ ██ ██ +# ░██ ░██ ░██ ░██ +# ░██ ██████ ██████░██ ███ ██ ██████ ░██ ░██ +# ░██████ ░░░░░░██ ██░░░░ ░██████ ░░██ █ ░██ ░░░░░░██ ░██ ░██ +# ░██░░░██ ███████ ░░█████ ░██░░░██ ░██ ███░██ ███████ ░██ ░██ +# ░██ ░██ ██░░░░██ ░░░░░██░██ ░██ ░████░████ ██░░░░██ ░██ ░██ +# ░██ ░██░░████████ ██████ ░██ ░██ ███░ ░░░██░░████████ ███ ███ +# ░░ ░░ ░░░░░░░░ ░░░░░░ ░░ ░░ ░░░ ░░░ ░░░░░░░░ ░░░ ░░░ +# +# ▓▓▓▓▓▓▓▓▓▓ +# ░▓ author ▓ xero <x@xero.nu> +# ░▓ code ▓ http://code.xero.nu/dotfiles +# ░▓ mirror ▓ http://git.io/.files +# ░▓▓▓▓▓▓▓▓▓▓ +# ░░░░░░░░░░ +# +#█▓▒░ requires: imagemagick + hsetroot + +usage() { + echo "usage: `basename $0` [-bfsr] + -b background color (#222222) + -f foreground color (#3e3e3e) + -s step (2) + -r resolution (24)" + exit 1 +} + +#args +res=24 +step=4 +bg="#222222" +fg="#3e3e3e" + +# evaluate +while [ $# -gt 0 ] +do + case "$1" in + -b) + bg="$2" + shift + ;; + -f) + fg="$2" + shift + ;; + -s) + step="$2" + shift + ;; + -r) + res="$2" + shift + ;; + --) + shift + break + ;; + -*) + usage + ;; + *) + break + ;; + esac + shift +done + +# calculate +max=$((res*2+2)) +i=0 +lines="" +while + lines="$lines line $i,-1 -1,$i" + i="$((i+step))" + [ "$i" -lt "$max" ] +do :; done + +# generate +convert -size ${res}x${res} xc:${bg} -stroke ${fg} -draw "${lines}" /tmp/wall.png +hsetroot -tile /tmp/wall.png diff --git a/bin/bin/hsetroot b/bin/bin/hsetroot Binary files differ.