|
|
|
@ -22,9 +22,9 @@ This is my ~.zshrc~; it will be used in many environments: |
|
|
|
|
|
|
|
|
|
|
|
Each environment has slightly different setups, which will be tangled to different files |
|
|
|
Each environment has slightly different setups, which will be tangled to different files |
|
|
|
|
|
|
|
|
|
|
|
*** Include |
|
|
|
*** Include :daily:pi: |
|
|
|
First, include a number of confidential data (such as API keys and |
|
|
|
|
|
|
|
such); for now, this is only relevant on my main box |
|
|
|
First, include a script that sets a number of confidential data (e.g. API keys and such) |
|
|
|
#+BEGIN_SRC sh :tangle ".zshrc" |
|
|
|
#+BEGIN_SRC sh :tangle ".zshrc" |
|
|
|
source ~/.config/confidential.sh |
|
|
|
source ~/.config/confidential.sh |
|
|
|
# This defines a number of env variables: |
|
|
|
# This defines a number of env variables: |
|
|
|
@ -33,8 +33,15 @@ Each environment has slightly different setups, which will be tangled to differe |
|
|
|
# ANDROID_IP=xxx.xxx.xxx.xxx |
|
|
|
# ANDROID_IP=xxx.xxx.xxx.xxx |
|
|
|
# ifttt_apikey=xyz |
|
|
|
# ifttt_apikey=xyz |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
*** KDE helpers |
|
|
|
|
|
|
|
This is also only relevant on the KDE box |
|
|
|
*** KDE helpers :daily: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Define a number of KDE helpers. |
|
|
|
|
|
|
|
- ~kde-current-activity~ returns the id of the current activity |
|
|
|
|
|
|
|
- ~kde-current-activity-name~ returns the name of the current activity |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The other two swap between build and src dirs on my local git checkout |
|
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh :tangle ".zshrc" |
|
|
|
#+BEGIN_SRC sh :tangle ".zshrc" |
|
|
|
kde-current-activity () { |
|
|
|
kde-current-activity () { |
|
|
|
qdbus org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.CurrentActivity |
|
|
|
qdbus org.kde.ActivityManager /ActivityManager/Activities org.kde.ActivityManager.Activities.CurrentActivity |
|
|
|
@ -52,7 +59,23 @@ Each environment has slightly different setups, which will be tangled to differe |
|
|
|
cd $(pwd | sed -e 's+scratch/src/kde/build+scratch/src/kde+') |
|
|
|
cd $(pwd | sed -e 's+scratch/src/kde/build+scratch/src/kde+') |
|
|
|
} |
|
|
|
} |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
*** Android helpers |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** TODO Factor the KDE tree dir |
|
|
|
|
|
|
|
:PROPERTIES: |
|
|
|
|
|
|
|
:CREATED: [2021-05-01 Sat 10:24] |
|
|
|
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** TODO See if we can use zsh expansion instead of sed |
|
|
|
|
|
|
|
:PROPERTIES: |
|
|
|
|
|
|
|
:CREATED: [2021-05-01 Sat 10:24] |
|
|
|
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** Android helpers :daily: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are various helpers to drive my current Android phone when connected to the box. |
|
|
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
|
|
|
|
|
|
|
|
run-task () { |
|
|
|
run-task () { |
|
|
|
@ -98,7 +121,14 @@ setup-pi-webcam() |
|
|
|
ffmpeg -i http://192.168.0.41:8080/stream/video.mjpeg -map 0:v -pix_fmt yuv420p -f v4l2 /dev/video2 |
|
|
|
ffmpeg -i http://192.168.0.41:8080/stream/video.mjpeg -map 0:v -pix_fmt yuv420p -f v4l2 /dev/video2 |
|
|
|
} |
|
|
|
} |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** TODO The last bit is really pi material |
|
|
|
|
|
|
|
:PROPERTIES: |
|
|
|
|
|
|
|
:CREATED: [2021-05-01 Sat 10:35] |
|
|
|
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|
|
*** Misc helpers |
|
|
|
*** Misc helpers |
|
|
|
|
|
|
|
|
|
|
|
- wttr.in |
|
|
|
- wttr.in |
|
|
|
#+begin_src sh :tangle '(".zshrc" ".zshrc.pi" ".zshrc.android") |
|
|
|
#+begin_src sh :tangle '(".zshrc" ".zshrc.pi" ".zshrc.android") |
|
|
|
wttr() |
|
|
|
wttr() |
|
|
|
@ -137,9 +167,12 @@ setup-pi-webcam() |
|
|
|
set-konsole-title ${previous_title} |
|
|
|
set-konsole-title ${previous_title} |
|
|
|
} |
|
|
|
} |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
*** emacs helpers |
|
|
|
*** emacs helpers |
|
|
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
SOLARIZED="true" |
|
|
|
SOLARIZED="true" |
|
|
|
|
|
|
|
export EMACS="/home/jacopods/.emacs.d/emacsclient-activities" |
|
|
|
|
|
|
|
|
|
|
|
# Emacs stuff |
|
|
|
# Emacs stuff |
|
|
|
eca() |
|
|
|
eca() |
|
|
|
@ -149,7 +182,7 @@ setup-pi-webcam() |
|
|
|
else |
|
|
|
else |
|
|
|
EMACS_ARGUMENTS="-n" |
|
|
|
EMACS_ARGUMENTS="-n" |
|
|
|
fi |
|
|
|
fi |
|
|
|
/home/jacopods/.emacs.d/emacsclient-activities $EMACS_ARGUMENTS $@ |
|
|
|
$EMACS $EMACS_ARGUMENTS $@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
magit() { |
|
|
|
magit() { |
|
|
|
@ -251,8 +284,6 @@ setup-pi-webcam() |
|
|
|
|
|
|
|
|
|
|
|
# User configuration |
|
|
|
# User configuration |
|
|
|
|
|
|
|
|
|
|
|
#export PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3:/usr/x86_64-pc-linux-gnu/gnat-gcc-bin/4.3:/usr/libexec/gnat-gcc/x86_64-pc-linux-gnu/4.3:/usr/games/bin:/usr/games/bin:/usr/games/bin:/usr/games/bin" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/games/bin" |
|
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/games/bin" |
|
|
|
|
|
|
|
|
|
|
|
# rationalise-dot; useful for cd ......./whatever |
|
|
|
# rationalise-dot; useful for cd ......./whatever |
|
|
|
@ -278,12 +309,10 @@ setup-pi-webcam() |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
|
|
|
|
|
|
|
|
# editor stuff |
|
|
|
# editor stuff |
|
|
|
#export ALTERNATE_EDITOR="/usr/bin/emacs" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export EMACS="/home/jacopods/.emacs.d/emacsclient-activities -n" |
|
|
|
export EDITOR="$EMACS -n" |
|
|
|
export EDITOR=$EMACS |
|
|
|
export VISUAL=$EDITOR |
|
|
|
export VISUAL=$EMACS |
|
|
|
export GIT_EDITOR=$EMACS |
|
|
|
export GIT_EDITOR="/home/jacopods/.emacs.d/emacsclient-activities" |
|
|
|
|
|
|
|
export SUDO_EDITOR=$EMACS |
|
|
|
export SUDO_EDITOR=$EMACS |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
*** git helpers |
|
|
|
*** git helpers |
|
|
|
@ -304,12 +333,19 @@ setup-pi-webcam() |
|
|
|
git status -b | head -n 1 | awk {'print $3'} |
|
|
|
git status -b | head -n 1 | awk {'print $3'} |
|
|
|
} |
|
|
|
} |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** TODO Create a script to add an arbitrary remote |
|
|
|
|
|
|
|
:PROPERTIES: |
|
|
|
|
|
|
|
:CREATED: [2021-05-01 Sat 16:26] |
|
|
|
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|
|
*** Aliases |
|
|
|
*** Aliases |
|
|
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
|
|
|
|
|
|
|
|
############################################################################## |
|
|
|
|
|
|
|
## Aliases |
|
|
|
## Aliases |
|
|
|
############################################################################## |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alias emacs="eca" |
|
|
|
alias emacs="eca" |
|
|
|
alias e="eca" |
|
|
|
alias e="eca" |
|
|
|
@ -323,7 +359,9 @@ setup-pi-webcam() |
|
|
|
alias dock="~/scripts/dock-a3.sh" |
|
|
|
alias dock="~/scripts/dock-a3.sh" |
|
|
|
alias xou="source /home/jacopods/scripts/setwacom.sh;/home/jacopods/clones/xournalpp/build/src/xournalpp" |
|
|
|
alias xou="source /home/jacopods/scripts/setwacom.sh;/home/jacopods/clones/xournalpp/build/src/xournalpp" |
|
|
|
#+end_src |
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
*** Pomodoro helpers |
|
|
|
*** Pomodoro helpers |
|
|
|
|
|
|
|
|
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
#+begin_src sh :tangle ".zshrc" |
|
|
|
termdown_bin=/home/jacopods/.local/bin/termdown |
|
|
|
termdown_bin=/home/jacopods/.local/bin/termdown |
|
|
|
|
|
|
|
|
|
|
|
@ -389,3 +427,9 @@ setup-pi-webcam() |
|
|
|
hash -d kde5="/scratch/kde/src5" |
|
|
|
hash -d kde5="/scratch/kde/src5" |
|
|
|
|
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**** TODO Rearrange this bit |
|
|
|
|
|
|
|
:PROPERTIES: |
|
|
|
|
|
|
|
:CREATED: [2021-05-01 Sat 13:35] |
|
|
|
|
|
|
|
:END: |
|
|
|
|
|
|
|
|
|
|
|
|