scripts

random scripts
git clone git://parazyd.org/scripts.git
Log | Files | Refs

commit d2b3a52e670803067793864f506ac4a5b351a490
parent eccd9b0a829ccec8acb14c497535933fc870bc6e
Author: parazyd <parazyd@dyne.org>
Date:   Mon,  5 Feb 2018 19:19:17 +0100

More scripts.

Diffstat:
Mautoup | 2+-
Aclrd | 6++++++
Aff | 6++++++
Agopherholes | 5+++++
Dp | 6------
Aquinq-size | 28++++++++++++++++++++++++++++
Mrecord | 2+-
Asacc | 0
8 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/autoup b/autoup @@ -20,7 +20,7 @@ esac test -z "$1" && exit 1 || filename=$(basename $1) case "$filename" in - *_scrot.png) + *_scrot.png|*_scrot.jpg) webdir=tmp/screenshots num=$(echo $(lynx -dump https://pub.parazyd.cf/tmp/screenshots \ | tail -n1 | tr -d '[a-z]./:' | awk '{print $2}') + 1 | bc) diff --git a/clrd b/clrd @@ -0,0 +1,6 @@ +#!/bin/sh +# colorize diffs + +sed -e "s/^-/$(tput setaf 1)-/" \ + -e "s/^+/$(tput setaf 2)+/" \ + -e "s/$/$(tput sgr0)/" diff --git a/ff b/ff @@ -0,0 +1,6 @@ +#!/bin/sh + +ff=/usr/bin/firefox +exec $ff -no-remote -ProfileManager "$@" + +#sudo -u ff firefox -no-remote -ProfileManager diff --git a/gopherholes b/gopherholes @@ -0,0 +1,5 @@ +#!/bin/sh + +hole="$(cat ~/gopherholes | dmenu | awk '{print $1}')" +printf "gopher://%s" "${hole}" | plumb + diff --git a/p b/p @@ -1,6 +0,0 @@ -#!/bin/sh - -ff=/usr/bin/firefox -exec $ff -no-remote -ProfileManager - -#sudo -u ff firefox -no-remote -ProfileManager diff --git a/quinq-size b/quinq-size @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ $# -lt 1 ]; +then + printf "usage: %s -|img [img ...]\n" "$(basename "$0")" >&2 + exit 1 +fi + +function toquinqsize { + filename="$1" + output="${filename%.*}_quinqsize.${filename##*.}" + convert "$filename" -resize 1024 "${output}"; + printf "%s -> %s\n" "${filename}" "${output}"; +} + +if [ "$1" = "-" ]; +then + while read -r file; + do + toquinqsize "$file" + done +else + for i in "$@"; + do + toquinqsize "${i}" + done +fi + diff --git a/record b/record @@ -6,7 +6,7 @@ PIDNAME=recorder FRAMERATE=25 #RES=$(wattr wh `lsw -r` | tr \ x) -RES=1366x768 +RES=1928x1080 usage() { echo "usage: $(basename $0) [-fk] <filename>" >&2 diff --git a/sacc b/sacc Binary files differ.