diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-12-06 20:58:18 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-12-06 20:58:47 +0100 |
commit | db7321af115a79b63267cb18889cbd334e8ca6e2 (patch) | |
tree | ec388295051ebc1f3d79bd3baf79b7f12f076cda /.local/bin/lps | |
parent | f2fde1570a04a654e2ed0c165d56feb29ddb25bf (diff) |
scripts: Move many a script from sh to andy
Diffstat (limited to '.local/bin/lps')
-rwxr-xr-x | .local/bin/lps | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.local/bin/lps b/.local/bin/lps index 135848d..8e49fa5 100755 --- a/.local/bin/lps +++ b/.local/bin/lps @@ -1,9 +1,9 @@ -#!/bin/sh +#!/usr/local/bin/andy -set -e +set flags -m color -r 300 +if test $#args -ge 2 { + set flags $flags --area=0,0,$args[1],$args[1] +} -flags='-m color -r 300' -[ $# -eq 1 ] && flags="$flags --area=0,0,$1,$1" - -uri="$(lpoptions | sed -E 's/.*device-uri=hp:([^ ]+).*/hpaio:\1/')" -chronic hp-scan -d "$uri" $flags +set uri `lpoptions | sed -E 's/.*device-uri=hp:([^ ]+).*/hpaio:\1/' +chronic hp-scan -d $uri $flags |