File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/zsh -i
1+ #! /bin/zsh
22
33# In God We Trust †
44#
55# A.D. MMXXV
66
7- # Note: -i is for interactive terminal, to make `xc` alias available here.
8-
97TMPDIR=${TMPDIR:-/ tmp}
108memo=${DOCS:- ~/ Documents} /memo
119
@@ -34,11 +32,17 @@ join_by() { local IFS="$1"; shift; echo "$*"; }
3432
3533_copy () {
3634 echo
37- read -q ans? " Copy to clipboard? "
35+ read -q ans\ ?" Copy to clipboard? "
3836 _cleanup
3937 [ " $ans " = n ] && return 0
40- command -v xc & > /dev/null || return 1
41- printf " ${1: gs/%/%% } " | xc && echo " Copied!"
38+ printf " ${1: gs/%/%% } " | (
39+ wl-copy & > /dev/null \
40+ || termux-clipboard-set & > /dev/null \
41+ || xclip -selection clipboard & > /dev/null \
42+ || pbcopy & > /dev/null \
43+ || exit 1
44+ ) && echo " Copied!" \
45+ || return 1
4246}
4347
4448show () {
@@ -105,7 +109,7 @@ _memo_edit() {
105109 )
106110
107111 local pass
108- read -s pass? " GPG password: "
112+ read -s pass\ ?" GPG password: "
109113 echo
110114
111115 gpg --batch --passphrase $pass -o $temp --yes -qd $memo
Original file line number Diff line number Diff line change 1- #! /bin/zsh -i
1+ #! /bin/zsh
22
33# In God We Trust †
44#
5- # A.D. MMXXIV
5+ # A.D. MMXXV
66
77ID=" P269"
88NAME=" Rīga, Rīgas pilsēta"
3030echo " $NAME "
3131
3232HOUR_AGO=` date +%Y%m%d%H00 -d ' -1 hour' `
33- curl -s $API /weather_forecast_for_location_hourly? punkts=$ID \
33+ curl -s " $API /weather_forecast_for_location_hourly?punkts=$ID " \
3434| jq -r '
3535 def fmt_temp_with_padding:
3636 .temperatura | tonumber | round
You can’t perform that action at this time.
0 commit comments