commit 6e324add3771798413a23e9dcd09d52e6b0b9376 parent b94610b66736a5f76ddf58fe3d82c0f46b410ef5 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 25 Jul 2019 16:25:46 +0200 Change xlock to posix sh Diffstat:
M | .local/bin/xlock | | | 50 | +++++++++++++++++++++++++------------------------- |
D | .local/bin/xrandr-auto.sh | | | 0 |
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/.local/bin/xlock b/.local/bin/xlock @@ -1,35 +1,35 @@ -#!/bin/bash +#!/bin/sh #mpc stop -function get_short_fortune { - while :; do - text="$(fortune)" - if [[ "$(echo "$text" | wc -l)" -lt 8 ]]; then - echo "$text" - break - fi - done +get_short_fortune() { + while :; do + text="$(fortune)" + if [ "$(echo "$text" | wc -l)" -lt 8 ]; then + echo "$text" + break + fi + done } img="$(mktemp --tmpdir tmp.XXXXXXXXXX.png)" maim "$img" #gm convert $img -blur 0x10 $img convert "$img" \ - -blur 0x10 \ - -fill black \ - -colorize 20% \ - -fill white \ - -gravity Center \ - -font 'PragmataPro' \ - -pointsize 142 \ - -annotate +0-7 '🔒' \ - "$img" + -blur 0x10 \ + -fill black \ + -colorize 20% \ + -fill white \ + -gravity Center \ + -font 'PragmataPro' \ + -pointsize 142 \ + -annotate +0-7 '🔒' \ + "$img" convert "$img" \ - -fill white \ - -gravity Center \ - -font 'PragmataPro' \ - -pointsize 22 \ - -annotate +0+160 \ - "$(get_short_fortune)" \ - "$img" + -fill white \ + -gravity Center \ + -font 'PragmataPro' \ + -pointsize 22 \ + -annotate +0+160 \ + "$(get_short_fortune)" \ + "$img" i3lock -i "$img" diff --git a/.local/bin/xrandr-auto.sh b/.local/bin/xrandr-auto.sh