|
|
|
|
@ -33,7 +33,11 @@ Each environment has slightly different setups, which will be tangled to differe |
|
|
|
|
# ANDROID_IP=xxx.xxx.xxx.xxx |
|
|
|
|
# ifttt_apikey=xyz |
|
|
|
|
#+end_src |
|
|
|
|
Then, add helper directory to fpath |
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
|
fpath=(~/clones/zshrc/ $fpath) |
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
*** KDE helpers :daily: |
|
|
|
|
|
|
|
|
|
Define a number of KDE helpers. |
|
|
|
|
@ -138,12 +142,33 @@ setup-pi-webcam() |
|
|
|
|
curl -H "Accept-Language: ${LANG%_*}" wttr.in/"${1:-$location}?T$narrow" |
|
|
|
|
} |
|
|
|
|
#+end_src |
|
|
|
|
- ifttt |
|
|
|
|
- ifttt helper |
|
|
|
|
This sends the first argument as a maker event to IFTTT; the |
|
|
|
|
function defines some completions; is there a way to retrieve |
|
|
|
|
them from IFTTT? |
|
|
|
|
#+begin_src sh :tangle "ifttt" |
|
|
|
|
curl -X POST https://maker.ifttt.com/trigger/$1/with/key/$ifttt_apikey |
|
|
|
|
#+end_src |
|
|
|
|
Define the completions (by hand for the time being) |
|
|
|
|
#+begin_src sh :tangle "_ifttt" |
|
|
|
|
#compdef ifttt |
|
|
|
|
|
|
|
|
|
_ifttt() { |
|
|
|
|
integer ret=1 |
|
|
|
|
local -a args |
|
|
|
|
args+=( |
|
|
|
|
'1:event to be sent:(table-light table-light-off wu1 wu2 goodnight wind-down)' |
|
|
|
|
) |
|
|
|
|
_arguments $args[@] && ret=0 |
|
|
|
|
return ret |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_ifttt |
|
|
|
|
#+end_src |
|
|
|
|
Load the function |
|
|
|
|
#+begin_src shell :tangle '(".zshrc" ".zshrc.pi") |
|
|
|
|
ifttt () { |
|
|
|
|
curl -X POST https://maker.ifttt.com/trigger/$1/with/key/$ifttt_apikey |
|
|
|
|
} |
|
|
|
|
#+end_src |
|
|
|
|
autoload ifttt |
|
|
|
|
#+end_src |
|
|
|
|
*** konsole helpers |
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
|
function set-terminal-title() { |
|
|
|
|
@ -281,6 +306,7 @@ setup-pi-webcam() |
|
|
|
|
zstyle ':completion:*:(cd|mv|cp):*' ignore-parents parent pwd |
|
|
|
|
zstyle ':completion:*:(rm|kill|diff):*' ignore-line yes |
|
|
|
|
|
|
|
|
|
autoload -U compinit && compinit |
|
|
|
|
|
|
|
|
|
# User configuration |
|
|
|
|
|
|
|
|
|
@ -432,4 +458,3 @@ setup-pi-webcam() |
|
|
|
|
:PROPERTIES: |
|
|
|
|
:CREATED: [2021-05-01 Sat 13:35] |
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|