diff options
author | filip <“filip.rabiega@gmail.com”> | 2025-10-10 19:25:25 +0200 |
---|---|---|
committer | filip <“filip.rabiega@gmail.com”> | 2025-10-10 19:25:25 +0200 |
commit | 7f6189dcbed755af34e222237b8cfa8b1f903696 (patch) | |
tree | 142874823cfcf5df3e2b5a54d48b23ea8e2a6c03 | |
parent | 807de46d3a3cbef9a3c3c104f6db87b142e6eed5 (diff) | |
download | chadscripts-7f6189dcbed755af34e222237b8cfa8b1f903696.tar.gz chadscripts-7f6189dcbed755af34e222237b8cfa8b1f903696.tar.bz2 chadscripts-7f6189dcbed755af34e222237b8cfa8b1f903696.zip |
used shfmt -s
-rwxr-xr-x | decperc | 2 | ||||
-rwxr-xr-x | maimpick | 2 | ||||
-rwxr-xr-x | rssadd | 2 | ||||
-rwxr-xr-x | unix | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -27,4 +27,4 @@ perc_into_dec() { echo "$1" | grep -qE '^(-?[0-9]+\.[0-9]+|-?[0-9]|\.[0-9]+|-?[0-9]+\.[0-9]+%|-?[0-9]+%|\.[0-9]+%)$' && len=${#1} && - [[ "${1:len-1:1}" == "%" ]] && perc_into_dec "$1" || dec_into_perc "$1" + [[ ${1:len-1:1} == "%" ]] && perc_into_dec "$1" || dec_into_perc "$1" @@ -8,7 +8,7 @@ output="$(date '+%y%m%d-%H%M-%S').png" xclip_cmd="xclip -sel clip -t image/png" ocr_cmd="xclip -sel clip" -case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\ncopy selected image to text" | dmenu -l 7 -i -p "Screenshot which area?")" in +case "$(printf 'a selected area\ncurrent window\nfull screen\na selected area (copy)\ncurrent window (copy)\nfull screen (copy)\ncopy selected image to text' | dmenu -l 7 -i -p "Screenshot which area?")" in "a selected area") maim -u -s pic-selected-"${output}" ;; "current window") maim -B -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;; "full screen") maim -q -d 0.2 pic-full-"${output}" ;; @@ -4,7 +4,7 @@ if echo "$1" | grep -q "https*://\S\+\.[A-Za-z]\+\S*"; then url="$1" else url="$(grep -Eom1 '<[^>]+(rel="self"|application/[a-z]+\+xml)[^>]+>' "$1" | - grep -o "https?://[^\" ]")" + grep -o 'https?://[^" ]')" echo "$url" | grep -q "https*://\S\+\.[A-Za-z]\+\S*" || notify-send "That doesn't look like a full URL." && exit 1 @@ -3,7 +3,7 @@ #original artwork by http://www.sanderfocus.nl/#/portfolio/tech-heroes #converted to shell by #nixers @ irc.unix.chat -cat << 'eof' +cat <<'eof' [38;5;255m,_ ,_==▄▂[0m [38;5;255m, ▂▃▄▄▅▅[48;5;240m▅[48;5;20m▂[48;5;240m▅¾[0m. [38;5;199m/ [38;5;20m/[0m [38;5;255m[48;5;20m▄[0m[38;5;255m[48;5;199m▆[38;5;16m[48;5;255m<´ [38;5;32m"[38;5;34m»[38;5;255m▓▓[48;5;32m▓[48;5;240m%[0m\ [38;5;199m/ [38;5;20m/ [38;5;45m/ [38;5;118m/[0m |