rework the misc helpers section

master
Jacopo De Simoi 5 years ago
parent 4e522c96e6
commit f4ed838662
  1. 9
      zshrc.org

@ -94,21 +94,22 @@ Each environment has slightly different setups, which will be tangled to differe
#+end_src #+end_src
*** Misc helpers *** Misc helpers
- wttr.in
#+begin_src sh :tangle ".zshrc" #+begin_src sh :tangle ".zshrc"
wttr() wttr()
{ {
local location=Toronto local location=Toronto
[[ $(tput cols) -le 124 ]] && local narrow=n; [[ $(tput cols) -le 124 ]] && local narrow=n;
curl -H "Accept-Language: ${LANG%_*}" wttr.in/"${1:-$location}?T$narrow" curl -H "Accept-Language: ${LANG%_*}" wttr.in/"${1:-$location}?T$narrow"
} }
#+end_src
#ifttt - ifttt
#+begin_src shell
ifttt () { ifttt () {
curl -X POST https://maker.ifttt.com/trigger/$1/with/key/$ifttt_apikey curl -X POST https://maker.ifttt.com/trigger/$1/with/key/$ifttt_apikey
} }
#+end_src #+end_src
*** konsole helpers
*** emacs helpers *** emacs helpers
#+begin_src sh :tangle ".zshrc" #+begin_src sh :tangle ".zshrc"

Loading…
Cancel
Save