Cleanup comments and whitespace

master
Jacopo De Simoi 5 years ago
parent b7ce6376c8
commit 2b35693db8
  1. 76
      zshrc.org

@ -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
*** Include
First, include a number of confidential data (such as API keys and
such); for now, this is only relevant on my main box
*** Include :daily:pi:
First, include a script that sets a number of confidential data (e.g. API keys and such)
#+BEGIN_SRC sh :tangle ".zshrc"
source ~/.config/confidential.sh
# 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
# ifttt_apikey=xyz
#+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"
kde-current-activity () {
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+')
}
#+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"
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
}
#+end_src
**** TODO The last bit is really pi material
:PROPERTIES:
:CREATED: [2021-05-01 Sat 10:35]
:END:
*** Misc helpers
- wttr.in
#+begin_src sh :tangle '(".zshrc" ".zshrc.pi" ".zshrc.android")
wttr()
@ -137,9 +167,12 @@ setup-pi-webcam()
set-konsole-title ${previous_title}
}
#+end_src
*** emacs helpers
#+begin_src sh :tangle ".zshrc"
SOLARIZED="true"
export EMACS="/home/jacopods/.emacs.d/emacsclient-activities"
# Emacs stuff
eca()
@ -149,7 +182,7 @@ setup-pi-webcam()
else
EMACS_ARGUMENTS="-n"
fi
/home/jacopods/.emacs.d/emacsclient-activities $EMACS_ARGUMENTS $@
$EMACS $EMACS_ARGUMENTS $@
}
magit() {
@ -251,8 +284,6 @@ setup-pi-webcam()
# 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"
# rationalise-dot; useful for cd ......./whatever
@ -278,12 +309,10 @@ setup-pi-webcam()
#+begin_src sh :tangle ".zshrc"
# editor stuff
#export ALTERNATE_EDITOR="/usr/bin/emacs"
export EMACS="/home/jacopods/.emacs.d/emacsclient-activities -n"
export EDITOR=$EMACS
export VISUAL=$EMACS
export GIT_EDITOR="/home/jacopods/.emacs.d/emacsclient-activities"
export EDITOR="$EMACS -n"
export VISUAL=$EDITOR
export GIT_EDITOR=$EMACS
export SUDO_EDITOR=$EMACS
#+end_src
*** git helpers
@ -304,12 +333,19 @@ setup-pi-webcam()
git status -b | head -n 1 | awk {'print $3'}
}
#+end_src
**** TODO Create a script to add an arbitrary remote
:PROPERTIES:
:CREATED: [2021-05-01 Sat 16:26]
:END:
*** Aliases
#+begin_src sh :tangle ".zshrc"
##############################################################################
## Aliases
##############################################################################
alias emacs="eca"
alias e="eca"
@ -323,7 +359,9 @@ setup-pi-webcam()
alias dock="~/scripts/dock-a3.sh"
alias xou="source /home/jacopods/scripts/setwacom.sh;/home/jacopods/clones/xournalpp/build/src/xournalpp"
#+end_src
*** Pomodoro helpers
#+begin_src sh :tangle ".zshrc"
termdown_bin=/home/jacopods/.local/bin/termdown
@ -389,3 +427,9 @@ setup-pi-webcam()
hash -d kde5="/scratch/kde/src5"
#+END_SRC
**** TODO Rearrange this bit
:PROPERTIES:
:CREATED: [2021-05-01 Sat 13:35]
:END:

Loading…
Cancel
Save