aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-03-23 20:38:44 -0300
committerEuAndreh <eu@euandre.org>2018-03-23 20:49:09 -0300
commit4e734232c611890f616194ed5cfade2549e4491b (patch)
tree38e74c5f28aaa8ecc8c6cbff7836d919c8fa7a1b
parentInitial commit: add git-crypt .gitattributes file (diff)
downloaddotfiles-4e734232c611890f616194ed5cfade2549e4491b.tar.gz
dotfiles-4e734232c611890f616194ed5cfade2549e4491b.tar.xz
Initial commit: now public (again)
-rw-r--r--.gitignore2
-rw-r--r--README.org53
-rw-r--r--TODOs.org52
-rw-r--r--Xmodmap.conf1
-rw-r--r--attachments/dotfiles-avatar.pngbin0 -> 22675 bytes
-rw-r--r--bash/Positive.oggbin0 -> 99826 bytes
-rw-r--r--bash/agents.sh10
-rw-r--r--bash/aliases.sh24
-rw-r--r--bash/bash_profile.sh1
-rw-r--r--bash/bashrc.sh28
-rw-r--r--bash/colors.sh228
-rw-r--r--bash/config.sh32
-rw-r--r--bash/env.sh58
-rw-r--r--bash/facepalm/Positive.mp3bin0 -> 59008 bytes
-rw-r--r--bash/facepalm/rotten-apple.sh19
-rw-r--r--bash/fake-symlinks.sh9
-rw-r--r--bash/init.sh7
-rw-r--r--bash/npm.sh13
-rw-r--r--bash/platform.sh9
-rw-r--r--bash/symlinks.sh34
-rwxr-xr-xbash/tmuxinator-templates.sh9
-rw-r--r--bash/util.sh23
-rw-r--r--bash/x.sh6
-rw-r--r--bash/youtube.sh31
-rw-r--r--encrypted/Clojure/credentials.clj.gpgbin0 -> 1427 bytes
-rw-r--r--encrypted/IMAP/EuAndreh.txtbin0 -> 51 bytes
-rw-r--r--encrypted/IMAP/Gmail.txtbin0 -> 38 bytes
-rw-r--r--encrypted/IMAP/Pires.txtbin0 -> 32 bytes
-rw-r--r--encrypted/IMAP/nu.txtbin0 -> 42 bytes
-rw-r--r--encrypted/SMTP/authinfo.txtbin0 -> 114 bytes
-rw-r--r--encrypted/SSH/id_rsa.pub.txtbin0 -> 762 bytes
-rw-r--r--encrypted/SSH/id_rsa.txtbin0 -> 3348 bytes
-rw-r--r--encrypted/SSH/known_hosts.txtbin0 -> 2742 bytes
-rw-r--r--encrypted/SSH/known_hosts_sources.txtbin0 -> 246 bytes
-rw-r--r--encrypted/borg/exported-key.txtbin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkpbin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkp.2bin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkp.3bin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkp.4bin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkp.5bin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkp.6bin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/borgbkpfoibin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/home_andreh_borgbackupbin0 -> 575 bytes
-rw-r--r--encrypted/borg/keys/home_andreh_borgbkpbin0 -> 575 bytes
-rw-r--r--encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/locationbin0 -> 42 bytes
-rw-r--r--encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/noncebin0 -> 38 bytes
-rw-r--r--encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/locationbin0 -> 45 bytes
-rw-r--r--encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/noncebin0 -> 38 bytes
-rw-r--r--encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/locationbin0 -> 42 bytes
-rw-r--r--encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/noncebin0 -> 38 bytes
-rw-r--r--encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/locationbin0 -> 42 bytes
-rw-r--r--encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/noncebin0 -> 38 bytes
-rw-r--r--encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/locationbin0 -> 45 bytes
-rw-r--r--encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/noncebin0 -> 38 bytes
-rw-r--r--encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/key-typebin0 -> 23 bytes
-rw-r--r--encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/locationbin0 -> 42 bytes
-rw-r--r--encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/manifest-timestampbin0 -> 48 bytes
-rw-r--r--encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/noncebin0 -> 38 bytes
-rw-r--r--encrypted/env.shbin0 -> 2670 bytes
-rw-r--r--encrypted/nu/nurc.shbin0 -> 3047 bytes
-rw-r--r--encrypted/nu/scripts/piv-recover-input.csvbin0 -> 461 bytes
-rwxr-xr-xencrypted/nu/scripts/piv-recover.shbin0 -> 572 bytes
-rw-r--r--encrypted/nu/tmux/projects/delivery-templates.ymlbin0 -> 199 bytes
-rw-r--r--encrypted/nu/tmux/projects/facade.ymlbin0 -> 460 bytes
-rw-r--r--encrypted/nu/tmux/projects/ghostflame.ymlbin0 -> 258 bytes
-rw-r--r--encrypted/nu/tmux/projects/shuffle.ymlbin0 -> 249 bytes
-rw-r--r--encrypted/nu/tmux/projects/tristram.ymlbin0 -> 251 bytes
-rw-r--r--encrypted/nu/tmux/templates/nu-service.ymlbin0 -> 363 bytes
-rw-r--r--encrypted/nu/vpn/auth.txtbin0 -> 62 bytes
-rw-r--r--encrypted/nu/vpn/config.zipbin0 -> 6295 bytes
-rw-r--r--encrypted/nu/vpn/patched.txtbin0 -> 11547 bytes
-rw-r--r--encrypted/password-hash.txtbin0 -> 129 bytes
-rwxr-xr-xencrypted/update-feed.shbin0 -> 2411 bytes
-rw-r--r--git/gitattributes3
-rw-r--r--git/gitconfig.ini47
-rw-r--r--git/gitignore2
-rw-r--r--git/mrconfig.inibin0 -> 7428 bytes
-rw-r--r--gitlab-ci.yml30
-rw-r--r--inputrc.conf2
-rw-r--r--lein/profiles.cljbin0 -> 530 bytes
-rw-r--r--mail/mbsyncrc.inibin0 -> 1757 bytes
-rw-r--r--mail/offlineimap.pybin0 -> 348 bytes
-rw-r--r--mail/offlineimaprc.inibin0 -> 1314 bytes
-rw-r--r--nixos/configuration.nix297
-rw-r--r--nixos/npmrc.sh1
-rw-r--r--nixos/os-installation.sh83
-rw-r--r--sbclrc.lisp0
-rwxr-xr-xscripts/backup.sh57
-rwxr-xr-xscripts/once-only-nextcloud.sh9
-rwxr-xr-xscripts/single-monitor.sh2
-rwxr-xr-xscripts/sleepsort20
-rwxr-xr-xscripts/three-monitors.sh2
-rw-r--r--spacemacs.el750
-rw-r--r--tmux/projects/annex.yml11
-rw-r--r--tmux/projects/monero.yml10
-rw-r--r--tmux/projects/pires.yml48
-rw-r--r--tmux/projects/songbooks.yml24
-rw-r--r--tmux/projects/sosps.yml10
-rw-r--r--tmux/tmux.conf64
-rw-r--r--xmonad/xmobar.hs47
-rw-r--r--xmonad/xmonad.hs106
-rw-r--r--xmonad/xsession.sh1
112 files changed, 2275 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01e9f4e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+mail/offlineimap.pyc
+tam_required
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..081b492
--- /dev/null
+++ b/README.org
@@ -0,0 +1,53 @@
+* dotfiles
+** Instructions - setting up a new installation (NixOS)
+*** 1. Download NixOS image from [[https://nixos.org/][the website]].
+*** 2. Follow USB ISO installation steps in =nixos/os-installation.sh=
+*** 3. Put =private.gpg= and =public.gpg= files in UTCLOUD (the actual HD drive)
+#+BEGIN_SRC shell
+gpg --export -a EuAndreh > public.gpg
+gpg --export-secret-keys -a EuAndreh > private
+gpg --cipher-algo AES256 -c private
+rm private
+mv public.gpg ~/UTCLOUD/public.gpg
+mv private.gpg ~/UTCLOUD/private.gpg
+#+END_SRC
+*** 4. Import GPG keys in new OS
+#+BEGIN_SRC shell
+gpg -o private -d private.gpg
+gpg --import public.gpg
+gpg --import private
+gpg --edit-key EuAndreh
+
+# Inside GPG prompt
+trust
+5
+quit
+
+# end of GPG prompt
+rm private
+rm private.gpg
+rm public.gpg
+#+END_SRC
+*** 5. Clone annex repo from HD and setup remotes
+#+BEGIN_SRC shell
+git clone gcrypt::/media/andreh/UTCLOUD/annex.git
+cd annex
+git annex describe here "repo description"
+git annex enableremote hd
+git annex enableremote gitlab
+git annex enableremote rsyncnet
+git annex enableremote s3
+#+END_SRC
+** Paperkey
+Paperkey generate using:
+#+BEGIN_SRC shell
+cat <<EOF
+# Paper key
+gpg --export-secret-keys eu@euandre.org | paperkey > paperket.txt
+
+# QR codes of paper key
+gpg --export-secret-keys eu@euandre.org | paperkey | qrencode -o out.png -S -v 16
+montage *.png -tile 1x2 -geometry +0+0 concatenate-out.png
+rm out*
+EOF
+#+END_SRC
diff --git a/TODOs.org b/TODOs.org
new file mode 100644
index 0000000..15f6f9a
--- /dev/null
+++ b/TODOs.org
@@ -0,0 +1,52 @@
+* Tasks
+* COMMENT DONE
+** CANCELLED Put README steps in script?
+** CANCELLED Add CI tests?
+Instead of adding limited tests to CI (too many files would be encrypted), I'd rather run tests on every load.
+Like in https://gitlab.com/EuAndreh/dotfiles/blob/6e83efca9550cce39375710863ef5acb495f6236/encrypted/nu/nurc.sh#L49-54.
+** DONE Fix git sync
+CLOSED: [2018-02-25 Sun 09:24]
+Kind of fixed: made an alias for =git=.
+** CANCELLED Implement proper =yt=
+Not really relevant, =update-feed.sh= works.
+** DONE Finish repo backup flow
+CLOSED: [2018-02-25 Sun 09:23]
+** DONE Add Haskell Stack to =$PATH=?
+CLOSED: [2017-10-16 Mon 08:27]
+#+BEGIN_SRC
+Using generic bindist...
+
+ % Total % Received % Xferd Average Speed Time Time Time Current
+ Dload Upload Total Spent Left Speed
+ 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
+100 619 0 619 0 0 334 0 --:--:-- 0:00:01 --:--:-- 1406
+100 12.8M 100 12.8M 0 0 1428k 0 0:00:09 0:00:09 --:--:-- 2599k
+Installing Stack to: /usr/local/bin/stack...
+
+-------------------------------------------------------------------------------
+
+Stack has been installed to: /usr/local/bin/stack
+
+NOTE: You may need to run 'xcode-select --install' to set
+ up the Xcode command-line tools, which Stack uses.
+
+WARNING: '/Users/andreh/.local/bin' is not on your PATH.
+ For best results, please add it to the beginning of PATH in your profile.
+#+END_SRC
+** DONE Put ~/.ssh/know_hosts in annex
+CLOSED: [2017-10-16 Mon 08:22]
+** DONE Cleanup =bash/util.sh=
+CLOSED: [2017-10-16 Mon 08:34]
+** DONE Copy things properly in Tmux
+CLOSED: [2017-10-16 Mon 08:27]
+** DONE Improve podcast flow
+CLOSED: [2017-10-16 Mon 08:59]
+#+BEGIN_SRC shell
+,git-annex-podcast-awesomeness() {
+ cd ~/annex/Banshee/podcasts
+ yellow "Checking for updates in registered podcasts..."
+ xargs git-annex importfeed < feeds.conf
+ end
+ cd - > /dev/null
+}
+#+END_SRC
diff --git a/Xmodmap.conf b/Xmodmap.conf
new file mode 100644
index 0000000..2807e71
--- /dev/null
+++ b/Xmodmap.conf
@@ -0,0 +1 @@
+keycode 118 = bar Greek_lamda
diff --git a/attachments/dotfiles-avatar.png b/attachments/dotfiles-avatar.png
new file mode 100644
index 0000000..5583849
--- /dev/null
+++ b/attachments/dotfiles-avatar.png
Binary files differ
diff --git a/bash/Positive.ogg b/bash/Positive.ogg
new file mode 100644
index 0000000..22cb563
--- /dev/null
+++ b/bash/Positive.ogg
Binary files differ
diff --git a/bash/agents.sh b/bash/agents.sh
new file mode 100644
index 0000000..8b33b6a
--- /dev/null
+++ b/bash/agents.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+eval "$(thefuck --alias f)"
+
+export GPG_TTY=$(tty)
+
+if [ -n "$DESKTOP_SESSION" ];then
+ eval $(gnome-keyring-daemon --start)
+ export SSH_AUTH_SOCK
+fi
diff --git a/bash/aliases.sh b/bash/aliases.sh
new file mode 100644
index 0000000..dfa5c21
--- /dev/null
+++ b/bash/aliases.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+unalias -a
+
+alias open="xdg-open"
+alias ros="rlwrap ros -l ~/.sbclrc"
+alias l="ls -lahF"
+alias ll="ls -lhF"
+alias yt-dl="youtube-dl -o '$YT_TEMPLATE'"
+alias copy="xclip -sel clip"
+alias pia-vpn="sudo openvpn --config $DOTFILES/VPN/euandreh.ovpn"
+alias git="AWS_ACCESS_KEY_ID=$ANNEX_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$ANNEX_AWS_SECRET_ACCESS_KEY git"
+
+alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
+alias fim="play $DOTFILES/bash/Positive.ogg &> /dev/null"
+
+alias mux="tmuxinator"
+
+# git
+alias ,s="git status"
+alias ,d="git diff"
+alias ,ds="git diff --staged"
+
+alias ,r="source ~/.bashrc"
diff --git a/bash/bash_profile.sh b/bash/bash_profile.sh
new file mode 100644
index 0000000..12ce7f9
--- /dev/null
+++ b/bash/bash_profile.sh
@@ -0,0 +1 @@
+source ~/annex/dev/code/dotfiles/bash/bashrc.sh
diff --git a/bash/bashrc.sh b/bash/bashrc.sh
new file mode 100644
index 0000000..4a7f189
--- /dev/null
+++ b/bash/bashrc.sh
@@ -0,0 +1,28 @@
+export DOTFILES=~/annex/dev/code/dotfiles
+
+source $DOTFILES/bash/platform.sh
+source $DOTFILES/bash/config.sh
+source $DOTFILES/bash/env.sh
+source $DOTFILES/bash/colors.sh
+source $DOTFILES/bash/aliases.sh
+source $DOTFILES/bash/util.sh
+source $DOTFILES/bash/agents.sh
+source $DOTFILES/bash/symlinks.sh
+source $DOTFILES/bash/youtube.sh
+source $DOTFILES/bash/tmuxinator-templates.sh
+source $DOTFILES/bash/fake-symlinks.sh
+source $DOTFILES/bash/init.sh
+source $DOTFILES/bash/npm.sh
+source $DOTFILES/bash/x.sh
+source $DOTFILES/bash/facepalm/rotten-apple.sh
+source $DOTFILES/encrypted/env.sh
+
+set -h
+source ~/dev/nu/nucli/nu.bashcompletion
+
+# Here's the place to do custom nix-shell config
+if [[ -z $IN_NIX_SHELL ]]; then
+ printf ""
+else
+ printf ""
+fi
diff --git a/bash/colors.sh b/bash/colors.sh
new file mode 100644
index 0000000..7548803
--- /dev/null
+++ b/bash/colors.sh
@@ -0,0 +1,228 @@
+#!/usr/bin/env bash
+
+# Customize BASH PS1 prompt to show current GIT repository and branch.
+# by Mike Stewart - http://MediaDoneRight.com
+
+# SETUP CONSTANTS
+# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
+# I don't remember where I found this. o_O
+
+# Reset
+Color_Off="\[\033[0m\]" # Text Reset
+
+# Regular Colors
+Black="\[\033[0;30m\]" # Black
+Red="\[\033[0;31m\]" # Red
+Green="\[\033[0;32m\]" # Green
+Yellow="\[\033[0;33m\]" # Yellow
+Blue="\[\033[0;34m\]" # Blue
+Purple="\[\033[0;35m\]" # Purple
+Cyan="\[\033[0;36m\]" # Cyan
+White="\[\033[0;37m\]" # White
+
+# Bold
+BBlack="\[\033[1;30m\]" # Black
+BRed="\[\033[1;31m\]" # Red
+BGreen="\[\033[1;32m\]" # Green
+BYellow="\[\033[1;33m\]" # Yellow
+BBlue="\[\033[1;34m\]" # Blue
+BPurple="\[\033[1;35m\]" # Purple
+BCyan="\[\033[1;36m\]" # Cyan
+BWhite="\[\033[1;37m\]" # White
+
+# Underline
+UBlack="\[\033[4;30m\]" # Black
+URed="\[\033[4;31m\]" # Red
+UGreen="\[\033[4;32m\]" # Green
+UYellow="\[\033[4;33m\]" # Yellow
+UBlue="\[\033[4;34m\]" # Blue
+UPurple="\[\033[4;35m\]" # Purple
+UCyan="\[\033[4;36m\]" # Cyan
+UWhite="\[\033[4;37m\]" # White
+
+# Background
+On_Black="\[\033[40m\]" # Black
+On_Red="\[\033[41m\]" # Red
+On_Green="\[\033[42m\]" # Green
+On_Yellow="\[\033[43m\]" # Yellow
+On_Blue="\[\033[44m\]" # Blue
+On_Purple="\[\033[45m\]" # Purple
+On_Cyan="\[\033[46m\]" # Cyan
+On_White="\[\033[47m\]" # White
+
+# High Intensty
+IBlack="\[\033[0;90m\]" # Black
+IRed="\[\033[0;91m\]" # Red
+IGreen="\[\033[0;92m\]" # Green
+IYellow="\[\033[0;93m\]" # Yellow
+IBlue="\[\033[0;94m\]" # Blue
+IPurple="\[\033[0;95m\]" # Purple
+ICyan="\[\033[0;96m\]" # Cyan
+IWhite="\[\033[0;97m\]" # White
+
+# Bold High Intensty
+BIBlack="\[\033[1;90m\]" # Black
+BIRed="\[\033[1;91m\]" # Red
+BIGreen="\[\033[1;92m\]" # Green
+BIYellow="\[\033[1;93m\]" # Yellow
+BIBlue="\[\033[1;94m\]" # Blue
+BIPurple="\[\033[1;95m\]" # Purple
+BICyan="\[\033[1;96m\]" # Cyan
+BIWhite="\[\033[1;97m\]" # White
+
+# High Intensty backgrounds
+On_IBlack="\[\033[0;100m\]" # Black
+On_IRed="\[\033[0;101m\]" # Red
+On_IGreen="\[\033[0;102m\]" # Green
+On_IYellow="\[\033[0;103m\]" # Yellow
+On_IBlue="\[\033[0;104m\]" # Blue
+On_IPurple="\[\033[10;95m\]" # Purple
+On_ICyan="\[\033[0;106m\]" # Cyan
+On_IWhite="\[\033[0;107m\]" # White
+
+# Various variables you might want for your PS1 prompt instead
+Time12h="\T"
+Time12a="\@"
+PathShort="\w"
+PathFull="\W"
+NewLine="\n"
+Jobs="\j"
+
+
+# This PS1 snippet was adopted from code for MAC/BSD I saw from: http://allancraig.net/index.php?option=com_content&view=article&id=108:ps1-export-command-for-git&catid=45:general&Itemid=96
+# I tweaked it to work on UBUNTU 11.04 & 11.10 plus made it mo' better
+
+export PS1='$(if [ $? != 0 ]; then \
+ echo "'$BIRed' (!!) '$Color_Off'"; \
+fi)'$IBlack$Time12h$Color_Off' '$BYellow$PathShort/$Color_Off'\
+$(git branch &>/dev/null;\
+if [ $? -eq 0 ]; then \
+ echo "$(echo `git status` | grep "Changes" > /dev/null 2>&1; \
+ if [ "$?" != "0" ]; then \
+ # @4 - Clean repository - nothing to commit
+ echo "'$Green'"$(__git_ps1 " (%s)")"'$Color_Off'"; \
+ else \
+ # @5 - Changes to working tree
+ echo "'$IRed'"$(__git_ps1 " {%s}")"'$Color_Off'"; \
+ fi)" - $(echo "'$IBlack'"`git sha | head -c 7`"'$Color_Off'"); \
+fi)$(if [[ $IN_NIX_SHELL == 1 ]]; then\
+ echo "\n'$IBlack'~>'$Color_Off' '$Purple'nix-shell'$Color_Off' ('$BIBlue'$name'$Color_Off')'$Color_Off'" ;\
+fi)$(echo "\n'$BIPurple'\$'$Color_Off' ";)'
+
+
+export end="\033[0m"
+export black="\033[0;30m"
+export blackb="\033[1;30m"
+export white="\033[0;37m"
+export whiteb="\033[1;37m"
+export red="\033[0;31m"
+export redb="\033[1;31m"
+export green="\033[0;32m"
+export greenb="\033[1;32m"
+export yellow="\033[0;33m"
+export yellowb="\033[1;33m"
+export blue="\033[0;34m"
+export blueb="\033[1;34m"
+export purple="\033[0;35m"
+export purpleb="\033[1;35m"
+export lightblue="\033[0;36m"
+export lightblueb="\033[1;36m"
+
+function black {
+ echo -e "${black}${1}${end}"
+}
+export -f black
+
+function blackb {
+ echo -e "${blackb}${1}${end}"
+}
+export -f blackb
+
+function white {
+ echo -e "${white}${1}${end}"
+}
+export -f white
+
+function whiteb {
+ echo -e "${whiteb}${1}${end}"
+}
+export -f whiteb
+
+function red {
+ echo -e "${red}${1}${end}"
+}
+export -f red
+
+function redb {
+ echo -e "${redb}${1}${end}"
+}
+export -f redb
+
+function green {
+ echo -e "${green}${1}${end}"
+}
+export -f green
+
+function greenb {
+ echo -e "${greenb}${1}${end}"
+}
+export -f greenb
+
+function yellow {
+ echo -e "${yellow}${1}${end}"
+}
+export -f yellow
+
+function yellowb {
+ echo -e "${yellowb}${1}${end}"
+}
+export -f yellowb
+
+function blue {
+ echo -e "${blue}${1}${end}"
+}
+export -f blue
+
+function blueb {
+ echo -e "${blueb}${1}${end}"
+}
+export -f blueb
+
+function purple {
+ echo -e "${purple}${1}${end}"
+}
+export -f purple
+
+function purpleb {
+ echo -e "${purpleb}${1}${end}"
+}
+export -f purpleb
+
+function lightblue {
+ echo -e "${lightblue}${1}${end}"
+}
+export -f lightblue
+
+function lightblueb {
+ echo -e "${lightblueb}${1}${end}"
+}
+export -f lightblueb
+
+function ,colors {
+ black "black"
+ blackb "blackb"
+ white "white"
+ whiteb "whiteb"
+ red "red"
+ redb "redb"
+ green "green"
+ greenb "greenb"
+ yellow "yellow"
+ yellowb "yellowb"
+ blue "blue"
+ blueb "blueb"
+ purple "purple"
+ purpleb "purpleb"
+ lightblue "lightblue"
+ lightblueb "lightblueb"
+}
diff --git a/bash/config.sh b/bash/config.sh
new file mode 100644
index 0000000..26ef085
--- /dev/null
+++ b/bash/config.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# ~/.bashrc: executed by bash(1) for non-login shells.
+
+# derived from Ubuntu's default .bashrc
+
+
+# If not running interactively, don't do anything
+case $- in
+ *i*) ;;
+ *) return;;
+esac
+
+# don't put duplicate linesin the history. # See bash(1) for more options
+HISTCONTROL=ignoredups
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000000
+HISTFILESIZE=2000000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# If set, the pattern "**" used in a pathname expansion context will
+# match all files and zero or more directories and subdirectories.
+isLinux && {
+ shopt -s globstar
+}
diff --git a/bash/env.sh b/bash/env.sh
new file mode 100644
index 0000000..ad930f7
--- /dev/null
+++ b/bash/env.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+
+export PATH="$HOME/annex/bin/:$PATH"
+
+#
+# Git Annex
+#
+
+export RSYNC_NET_URL=16686@ch-s010.rsync.net
+export R=$RSYNC_NET_URL
+
+
+#
+# Perl6
+#
+
+export PATH=~/.rakudobrew/bin:$PATH
+
+
+#
+# Haskel Stack
+#
+
+export PATH=~/.local/bin:$PATH
+
+
+
+#
+# Misc
+#
+
+export EDITOR=vi
+export PATH="$HOME/dev/code/dotfiles/scripts/:$PATH"
+export YT_TEMPLATE="~/Downloads/yt-dl/%(uploader)s/%(upload_date)s %(title)s.%(ext)s"
+export INPUTRC=~/.inputrc
+
+
+
+#
+# Global (not NixOS) NPM
+#
+
+export PATH="$HOME/.npm-packages/bin/:$PATH"
+
+
+
+#
+# NixOS
+#
+
+export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
+
+#
+# Leiningen
+#
+
+export LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS=1
diff --git a/bash/facepalm/Positive.mp3 b/bash/facepalm/Positive.mp3
new file mode 100644
index 0000000..a560be1
--- /dev/null
+++ b/bash/facepalm/Positive.mp3
Binary files differ
diff --git a/bash/facepalm/rotten-apple.sh b/bash/facepalm/rotten-apple.sh
new file mode 100644
index 0000000..0cdf329
--- /dev/null
+++ b/bash/facepalm/rotten-apple.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+isMac && {
+ unalias open
+
+ alias limpar-derived-data="rm -rf ~/Library/Developer/Xcode/DerivedData/"
+ alias fim="afplay $DOTFILES/bash/facepalm/Positive.mp3"
+
+ if [ -f $(brew --prefix)/etc/bash_completion ]; then
+ . $(brew --prefix)/etc/bash_completion
+ fi
+
+ [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
+
+ [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
+
+
+ alias ast="open -a \"Android Studio\""
+}
diff --git a/bash/fake-symlinks.sh b/bash/fake-symlinks.sh
new file mode 100644
index 0000000..cd9dc6a
--- /dev/null
+++ b/bash/fake-symlinks.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+if [[ -n "$EMACS_GITHUB_TOKEN" ]]; then
+ cat $DOTFILES/git/gitconfig.ini | envsubst > ~/.gitconfig
+fi
+
+cp $DOTFILES/gitlab-ci.yml $DOTFILES/../org.euandre.misc/.gitlab-ci.yml
+cp $DOTFILES/gitlab-ci.yml $DOTFILES/../org.euandre.http/.gitlab-ci.yml
+cp $DOTFILES/gitlab-ci.yml $DOTFILES/../org.euandre.om-auth/.gitlab-ci.yml
diff --git a/bash/init.sh b/bash/init.sh
new file mode 100644
index 0000000..2239015
--- /dev/null
+++ b/bash/init.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+pushd ~/ > /dev/null
+
+mr checkout > /dev/null
+
+popd > /dev/null
diff --git a/bash/npm.sh b/bash/npm.sh
new file mode 100644
index 0000000..f0a5d30
--- /dev/null
+++ b/bash/npm.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+npm_i() {
+ (which $1 &> /dev/null) || {
+ yellow "Installing $2"
+ npm i -g $2
+ }
+}
+
+npm_i eq edn-eq
+npm_i react-native react-native-cli
+npm_i detox detox-cli
+npm_i xml2json xml2json-command
diff --git a/bash/platform.sh b/bash/platform.sh
new file mode 100644
index 0000000..4929341
--- /dev/null
+++ b/bash/platform.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+isMac () {
+ [[ `uname` == 'Darwin' ]]
+}
+
+isLinux () {
+ [[ `uname` == 'Linux' ]]
+}
diff --git a/bash/symlinks.sh b/bash/symlinks.sh
new file mode 100644
index 0000000..ccdf4a6
--- /dev/null
+++ b/bash/symlinks.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+ln -fs $DOTFILES/encrypted/borg ~/.config/
+
+ln -fs $DOTFILES/bash/bashrc.sh ~/.bashrc
+ln -fs $DOTFILES/bash/bash_profile.sh ~/.bash_profile
+ln -fs $DOTFILES/spacemacs.el ~/.spacemacs
+ln -fs $DOTFILES/git/gitattributes ~/.gitattributes
+ln -fs $DOTFILES/git/gitignore ~/.gitignore_global
+ln -fs $DOTFILES/git/bash_git.sh ~/.bash_git
+ln -fs $DOTFILES/sbclrc.lisp ~/.sbclrc
+ln -fs $DOTFILES/inputrc.conf ~/.inputrc
+ln -fs $DOTFILES/nixos/npmrc.sh ~/.npmrc
+
+ln -fs $DOTFILES/git/mrconfig.ini ~/.mrconfig
+
+ln -fs /run/media/andreh/UTCLOUD ~/UTCLOUD
+
+mkdir -p ~/.lein
+ln -fs $DOTFILES/lein/profiles.clj ~/.lein/profiles.clj
+
+ln -fs $DOTFILES/Xmodmap.conf ~/.Xmodmap
+
+ln -fs $DOTFILES/tmux/tmux.conf ~/.tmux.conf
+
+## xmonad
+mkdir -p ~/.xmonad
+ln -fs $DOTFILES/xmonad/xsession.sh ~/.xsession
+ln -fs $DOTFILES/xmonad/xmonad.hs ~/.xmonad/xmonad.hs
+ln -fs $DOTFILES/xmonad/xmobar.hs ~/.xmobarrc
+
+## OfflineIMAP
+# ln -fs $DOTFILES/mail/offlineimaprc.ini ~/.offlineimaprc
+# ln -fs $DOTFILES/mail/mbsyncrc.ini ~/.mbsyncrc
diff --git a/bash/tmuxinator-templates.sh b/bash/tmuxinator-templates.sh
new file mode 100755
index 0000000..77cf461
--- /dev/null
+++ b/bash/tmuxinator-templates.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+mkdir -p ~/.tmuxinator
+
+templates=(annex pires songbooks sosps)
+
+for template in ${templates[@]}; do
+ cp $DOTFILES/tmux/projects/$template.yml ~/.tmuxinator/$template.yml
+done
diff --git a/bash/util.sh b/bash/util.sh
new file mode 100644
index 0000000..b0db4ad
--- /dev/null
+++ b/bash/util.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+extract () {
+ if [ -f $1 ] ; then
+ case $1 in
+ *.tar.bz2) tar xvjf $1 ;;
+ *.tar.gz) tar xvzf $1 ;;
+ *.bz2) bunzip2 $1 ;;
+ *.rar) unrar x $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar xvf $1 ;;
+ *.tbz2) tar xvjf $1 ;;
+ *.tgz) tar xvzf $1 ;;
+ *.zip) unzip $1 ;;
+ *.Z) uncompress $1 ;;
+ *.7z) 7z x $1 ;;
+ *.xz) unxz $1 ;;
+ *) echo "don't know how to extract '$1'..." ;;
+ esac
+ else
+ echo "'$1' is not a valid file!"
+ fi
+}
diff --git a/bash/x.sh b/bash/x.sh
new file mode 100644
index 0000000..5858d1f
--- /dev/null
+++ b/bash/x.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+isLinux && {
+ xmodmap ~/.Xmodmap
+ xset r rate 250 50
+}
diff --git a/bash/youtube.sh b/bash/youtube.sh
new file mode 100644
index 0000000..b64300d
--- /dev/null
+++ b/bash/youtube.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+export DEFAULT_PLAYLIST_END=15
+
+download() {
+ youtube-dl "$1" \
+ --download-archive ~/annex/txt/youtube-dl-seen.conf \
+ --prefer-free-formats \
+ --playlist-end $2 \
+ --output "~/Downloads/yt-dl/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
+}
+
+export -f download
+
+download_user() {
+ download "https://www.youtube.com/user/$1" ${2-$DEFAULT_PLAYLIST_END}
+}
+
+export -f download_user
+
+download_channel() {
+ download "https://www.youtube.com/channel/$1" ${2-$DEFAULT_PLAYLIST_END}
+}
+
+export -f download_channel
+
+download_playlist() {
+ download "https://www.youtube.com/playlist?list=$1" ${2-$DEFAULT_PLAYLIST_END}
+}
+
+export -f download_playlist
diff --git a/encrypted/Clojure/credentials.clj.gpg b/encrypted/Clojure/credentials.clj.gpg
new file mode 100644
index 0000000..addba3c
--- /dev/null
+++ b/encrypted/Clojure/credentials.clj.gpg
Binary files differ
diff --git a/encrypted/IMAP/EuAndreh.txt b/encrypted/IMAP/EuAndreh.txt
new file mode 100644
index 0000000..573b075
--- /dev/null
+++ b/encrypted/IMAP/EuAndreh.txt
Binary files differ
diff --git a/encrypted/IMAP/Gmail.txt b/encrypted/IMAP/Gmail.txt
new file mode 100644
index 0000000..6172698
--- /dev/null
+++ b/encrypted/IMAP/Gmail.txt
Binary files differ
diff --git a/encrypted/IMAP/Pires.txt b/encrypted/IMAP/Pires.txt
new file mode 100644
index 0000000..d2cc9d6
--- /dev/null
+++ b/encrypted/IMAP/Pires.txt
Binary files differ
diff --git a/encrypted/IMAP/nu.txt b/encrypted/IMAP/nu.txt
new file mode 100644
index 0000000..3de94f7
--- /dev/null
+++ b/encrypted/IMAP/nu.txt
Binary files differ
diff --git a/encrypted/SMTP/authinfo.txt b/encrypted/SMTP/authinfo.txt
new file mode 100644
index 0000000..6b5a37a
--- /dev/null
+++ b/encrypted/SMTP/authinfo.txt
Binary files differ
diff --git a/encrypted/SSH/id_rsa.pub.txt b/encrypted/SSH/id_rsa.pub.txt
new file mode 100644
index 0000000..c1fcf97
--- /dev/null
+++ b/encrypted/SSH/id_rsa.pub.txt
Binary files differ
diff --git a/encrypted/SSH/id_rsa.txt b/encrypted/SSH/id_rsa.txt
new file mode 100644
index 0000000..acc287b
--- /dev/null
+++ b/encrypted/SSH/id_rsa.txt
Binary files differ
diff --git a/encrypted/SSH/known_hosts.txt b/encrypted/SSH/known_hosts.txt
new file mode 100644
index 0000000..9065805
--- /dev/null
+++ b/encrypted/SSH/known_hosts.txt
Binary files differ
diff --git a/encrypted/SSH/known_hosts_sources.txt b/encrypted/SSH/known_hosts_sources.txt
new file mode 100644
index 0000000..fbf4b8e
--- /dev/null
+++ b/encrypted/SSH/known_hosts_sources.txt
Binary files differ
diff --git a/encrypted/borg/exported-key.txt b/encrypted/borg/exported-key.txt
new file mode 100644
index 0000000..61d1597
--- /dev/null
+++ b/encrypted/borg/exported-key.txt
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp b/encrypted/borg/keys/borgbkp
new file mode 100644
index 0000000..61d1597
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp.2 b/encrypted/borg/keys/borgbkp.2
new file mode 100644
index 0000000..9c914c0
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp.2
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp.3 b/encrypted/borg/keys/borgbkp.3
new file mode 100644
index 0000000..16c7148
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp.3
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp.4 b/encrypted/borg/keys/borgbkp.4
new file mode 100644
index 0000000..3a916f3
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp.4
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp.5 b/encrypted/borg/keys/borgbkp.5
new file mode 100644
index 0000000..c15bf1f
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp.5
Binary files differ
diff --git a/encrypted/borg/keys/borgbkp.6 b/encrypted/borg/keys/borgbkp.6
new file mode 100644
index 0000000..92b3c2a
--- /dev/null
+++ b/encrypted/borg/keys/borgbkp.6
Binary files differ
diff --git a/encrypted/borg/keys/borgbkpfoi b/encrypted/borg/keys/borgbkpfoi
new file mode 100644
index 0000000..38795b0
--- /dev/null
+++ b/encrypted/borg/keys/borgbkpfoi
Binary files differ
diff --git a/encrypted/borg/keys/home_andreh_borgbackup b/encrypted/borg/keys/home_andreh_borgbackup
new file mode 100644
index 0000000..cd901f1
--- /dev/null
+++ b/encrypted/borg/keys/home_andreh_borgbackup
Binary files differ
diff --git a/encrypted/borg/keys/home_andreh_borgbkp b/encrypted/borg/keys/home_andreh_borgbkp
new file mode 100644
index 0000000..b13eef9
--- /dev/null
+++ b/encrypted/borg/keys/home_andreh_borgbkp
Binary files differ
diff --git a/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/key-type b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/key-type
Binary files differ
diff --git a/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/location b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/location
new file mode 100644
index 0000000..eaafc18
--- /dev/null
+++ b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/location
Binary files differ
diff --git a/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/manifest-timestamp b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/manifest-timestamp
new file mode 100644
index 0000000..581c6b1
--- /dev/null
+++ b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/nonce b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/nonce
new file mode 100644
index 0000000..255e2aa
--- /dev/null
+++ b/encrypted/borg/security/132e7d3e5915c0c2f08fc817e48f928bd74465a26ec6bad52965cb87703ac487/nonce
Binary files differ
diff --git a/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/key-type b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/key-type
Binary files differ
diff --git a/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/location b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/location
new file mode 100644
index 0000000..d77e0a2
--- /dev/null
+++ b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/location
Binary files differ
diff --git a/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/manifest-timestamp b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/manifest-timestamp
new file mode 100644
index 0000000..2f7c4ac
--- /dev/null
+++ b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/nonce b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/nonce
new file mode 100644
index 0000000..a538999
--- /dev/null
+++ b/encrypted/borg/security/2239e4b7f29c5f9a1bb7506987dade2ee677b3bed629ba310f338296c5b605ff/nonce
Binary files differ
diff --git a/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/key-type b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/key-type
Binary files differ
diff --git a/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/location b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/location
new file mode 100644
index 0000000..eaafc18
--- /dev/null
+++ b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/location
Binary files differ
diff --git a/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/manifest-timestamp b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/manifest-timestamp
new file mode 100644
index 0000000..b2ab182
--- /dev/null
+++ b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/nonce b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/nonce
new file mode 100644
index 0000000..1d577b5
--- /dev/null
+++ b/encrypted/borg/security/d5e34230f45420e848a38b53f8f8afef99d2cb94e3ae2cc7baff31e87a8d017d/nonce
Binary files differ
diff --git a/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/key-type b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/key-type
Binary files differ
diff --git a/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/location b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/location
new file mode 100644
index 0000000..eaafc18
--- /dev/null
+++ b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/location
Binary files differ
diff --git a/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/manifest-timestamp b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/manifest-timestamp
new file mode 100644
index 0000000..6609466
--- /dev/null
+++ b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/nonce b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/nonce
new file mode 100644
index 0000000..1d577b5
--- /dev/null
+++ b/encrypted/borg/security/d729a6dbed5b93d086d210620269fda9d4dbb0533021e368b4f4c226aebe75f5/nonce
Binary files differ
diff --git a/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/key-type b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/key-type
Binary files differ
diff --git a/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/location b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/location
new file mode 100644
index 0000000..451f778
--- /dev/null
+++ b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/location
Binary files differ
diff --git a/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/manifest-timestamp b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/manifest-timestamp
new file mode 100644
index 0000000..fd41e70
--- /dev/null
+++ b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/nonce b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/nonce
new file mode 100644
index 0000000..56cda17
--- /dev/null
+++ b/encrypted/borg/security/f0b5b410eb9a0b57eb3d304cb8856945c2ef72412cdfd3c89319bcc9ca5ed74a/nonce
Binary files differ
diff --git a/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/key-type b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/key-type
new file mode 100644
index 0000000..6cdb8a2
--- /dev/null
+++ b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/key-type
Binary files differ
diff --git a/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/location b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/location
new file mode 100644
index 0000000..eaafc18
--- /dev/null
+++ b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/location
Binary files differ
diff --git a/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/manifest-timestamp b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/manifest-timestamp
new file mode 100644
index 0000000..9c2eb04
--- /dev/null
+++ b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/manifest-timestamp
Binary files differ
diff --git a/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/nonce b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/nonce
new file mode 100644
index 0000000..e5cda27
--- /dev/null
+++ b/encrypted/borg/security/f742b4cea9ed19e0d6e7c79de77ba6186f5454dbed6c3a96e0848c4238548d25/nonce
Binary files differ
diff --git a/encrypted/env.sh b/encrypted/env.sh
new file mode 100644
index 0000000..805c7ee
--- /dev/null
+++ b/encrypted/env.sh
Binary files differ
diff --git a/encrypted/nu/nurc.sh b/encrypted/nu/nurc.sh
new file mode 100644
index 0000000..18e3de4
--- /dev/null
+++ b/encrypted/nu/nurc.sh
Binary files differ
diff --git a/encrypted/nu/scripts/piv-recover-input.csv b/encrypted/nu/scripts/piv-recover-input.csv
new file mode 100644
index 0000000..6d6884e
--- /dev/null
+++ b/encrypted/nu/scripts/piv-recover-input.csv
Binary files differ
diff --git a/encrypted/nu/scripts/piv-recover.sh b/encrypted/nu/scripts/piv-recover.sh
new file mode 100755
index 0000000..09bd073
--- /dev/null
+++ b/encrypted/nu/scripts/piv-recover.sh
Binary files differ
diff --git a/encrypted/nu/tmux/projects/delivery-templates.yml b/encrypted/nu/tmux/projects/delivery-templates.yml
new file mode 100644
index 0000000..7408393
--- /dev/null
+++ b/encrypted/nu/tmux/projects/delivery-templates.yml
Binary files differ
diff --git a/encrypted/nu/tmux/projects/facade.yml b/encrypted/nu/tmux/projects/facade.yml
new file mode 100644
index 0000000..1b74a18
--- /dev/null
+++ b/encrypted/nu/tmux/projects/facade.yml
Binary files differ
diff --git a/encrypted/nu/tmux/projects/ghostflame.yml b/encrypted/nu/tmux/projects/ghostflame.yml
new file mode 100644
index 0000000..9d9e9d8
--- /dev/null
+++ b/encrypted/nu/tmux/projects/ghostflame.yml
Binary files differ
diff --git a/encrypted/nu/tmux/projects/shuffle.yml b/encrypted/nu/tmux/projects/shuffle.yml
new file mode 100644
index 0000000..b10f64f
--- /dev/null
+++ b/encrypted/nu/tmux/projects/shuffle.yml
Binary files differ
diff --git a/encrypted/nu/tmux/projects/tristram.yml b/encrypted/nu/tmux/projects/tristram.yml
new file mode 100644
index 0000000..08281e7
--- /dev/null
+++ b/encrypted/nu/tmux/projects/tristram.yml
Binary files differ
diff --git a/encrypted/nu/tmux/templates/nu-service.yml b/encrypted/nu/tmux/templates/nu-service.yml
new file mode 100644
index 0000000..78798d8
--- /dev/null
+++ b/encrypted/nu/tmux/templates/nu-service.yml
Binary files differ
diff --git a/encrypted/nu/vpn/auth.txt b/encrypted/nu/vpn/auth.txt
new file mode 100644
index 0000000..3284272
--- /dev/null
+++ b/encrypted/nu/vpn/auth.txt
Binary files differ
diff --git a/encrypted/nu/vpn/config.zip b/encrypted/nu/vpn/config.zip
new file mode 100644
index 0000000..77a1638
--- /dev/null
+++ b/encrypted/nu/vpn/config.zip
Binary files differ
diff --git a/encrypted/nu/vpn/patched.txt b/encrypted/nu/vpn/patched.txt
new file mode 100644
index 0000000..52ae899
--- /dev/null
+++ b/encrypted/nu/vpn/patched.txt
Binary files differ
diff --git a/encrypted/password-hash.txt b/encrypted/password-hash.txt
new file mode 100644
index 0000000..a71014d
--- /dev/null
+++ b/encrypted/password-hash.txt
Binary files differ
diff --git a/encrypted/update-feed.sh b/encrypted/update-feed.sh
new file mode 100755
index 0000000..e8f623a
--- /dev/null
+++ b/encrypted/update-feed.sh
Binary files differ
diff --git a/git/gitattributes b/git/gitattributes
new file mode 100644
index 0000000..ab91280
--- /dev/null
+++ b/git/gitattributes
@@ -0,0 +1,3 @@
+*.gif diff=image
+*.jpg diff=image
+*.png diff=image \ No newline at end of file
diff --git a/git/gitconfig.ini b/git/gitconfig.ini
new file mode 100644
index 0000000..1fcf7f8
--- /dev/null
+++ b/git/gitconfig.ini
@@ -0,0 +1,47 @@
+[user]
+ email = eu@euandre.org
+ name = EuAndreh
+ signingkey = 81F90EC3CD356060
+[diff "odf"]
+ # https://medium.com/@mbrehin/git-advanced-diff-odt-pdf-doc-xls-ppt-25afbf4f1105
+ # http://blog.riemann.cc/2013/04/23/versioning-of-openoffice-libreoffice-documents-using-git/
+ # https://illidiumq36.wordpress.com/2013/10/06/diff-odp_files_using_git/
+ textconv = odt2txt
+[core]
+ editor = vi
+ pager = diff-so-fancy | less --tabs=4 -RFX
+ excludesfile = ~/.gitignore_global
+
+ # https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important#5834094
+ # https://help.github.com/articles/dealing-with-line-endings/
+ autocrlf = input
+[push]
+ default = simple
+[filter "lfs"]
+ clean = git-lfs clean -- %f
+ smudge = git-lfs smudge -- %f
+ process = git-lfs filter-process
+ required = true
+ fetchrecentalways = true
+ fetchrecentrefsdays = 15
+ fetchrecentcommitsdays = 7
+ fetchrecentremoterefs = true
+[alias]
+ graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
+ co = checkout
+ sha = rev-parse HEAD
+ prune-branches = !git branch --merged | grep -v master | xargs git branch -d
+ lfs-pull = !git fetch && git lfs fetch --recent && git merge origin
+ podcasts = !xargs git-annex importfeed < feeds.conf
+ sync = !AWS_ACCESS_KEY_ID=$ANNEX_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$ANNEX_AWS_SECRET_ACCESS_KEY git annex sync
+[annex]
+ gnupg-options = --no-tty
+ gnupg-decrypt-options = --no-tty
+ autocommit = false
+ synccontent = true
+ genmetadata = true
+[commit]
+ gpgsign = true
+[github]
+ oauth-token = $EMACS_GITHUB_TOKEN
+ user = EuAndreh
diff --git a/git/gitignore b/git/gitignore
new file mode 100644
index 0000000..c75c109
--- /dev/null
+++ b/git/gitignore
@@ -0,0 +1,2 @@
+playground.clj
+req.http \ No newline at end of file
diff --git a/git/mrconfig.ini b/git/mrconfig.ini
new file mode 100644
index 0000000..34b7aec
--- /dev/null
+++ b/git/mrconfig.ini
Binary files differ
diff --git a/gitlab-ci.yml b/gitlab-ci.yml
new file mode 100644
index 0000000..b94460c
--- /dev/null
+++ b/gitlab-ci.yml
@@ -0,0 +1,30 @@
+image: clojure:lein-2.7.0
+stages:
+ - test
+ - pages
+
+before_script:
+ - lein deps
+
+lint:
+ stage: test
+ script:
+ - lein lint
+
+test:
+ stage: test
+ script:
+ - lein deps
+ - lein test
+
+pages:
+ stage: pages
+ coverage: '/ALL FILES.*?(\d+\.\d+)/'
+ script:
+ - lein doc # outputs to public/api/
+ - lein cloverage -o public/coverage/
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
diff --git a/inputrc.conf b/inputrc.conf
new file mode 100644
index 0000000..9d84fe2
--- /dev/null
+++ b/inputrc.conf
@@ -0,0 +1,2 @@
+"\e[B": history-search-forward
+"\e[A": history-search-backward \ No newline at end of file
diff --git a/lein/profiles.clj b/lein/profiles.clj
new file mode 100644
index 0000000..f53b8c0
--- /dev/null
+++ b/lein/profiles.clj
Binary files differ
diff --git a/mail/mbsyncrc.ini b/mail/mbsyncrc.ini
new file mode 100644
index 0000000..2ff5666
--- /dev/null
+++ b/mail/mbsyncrc.ini
Binary files differ
diff --git a/mail/offlineimap.py b/mail/offlineimap.py
new file mode 100644
index 0000000..2372b5f
--- /dev/null
+++ b/mail/offlineimap.py
Binary files differ
diff --git a/mail/offlineimaprc.ini b/mail/offlineimaprc.ini
new file mode 100644
index 0000000..94699c4
--- /dev/null
+++ b/mail/offlineimaprc.ini
Binary files differ
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
new file mode 100644
index 0000000..793d77f
--- /dev/null
+++ b/nixos/configuration.nix
@@ -0,0 +1,297 @@
+{ config, pkgs, ... }:
+
+{
+ imports =
+ [ # Include the results of the hardware scan.
+ /etc/nixos/hardware-configuration.nix
+ ];
+
+ # Use the systemd-boot EFI boot loader.
+ boot = {
+ loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ grub.device = "/dev/sda";
+ };
+ initrd = {
+ luks.devices = [
+ {
+ name = "root";
+ device = "/dev/sda2";
+ preLVM = true;
+ }
+ ];
+ };
+ };
+
+ hardware = {
+ bluetooth.enable = true;
+ pulseaudio = {
+ package = pkgs.pulseaudioFull;
+ enable = true;
+ };
+ };
+
+ networking.hostName = "nixos"; # Define your hostname.
+ networking.networkmanager.enable = true;
+
+ # Auto-upgrade channel
+ # https://nixos.org/nixos/manual/index.html#idm140737316795120
+ system.autoUpgrade.enable = true;
+
+ nix.gc = {
+ automatic = true;
+ dates = "03:15";
+ };
+
+ # Select internationalisation properties.
+ i18n = {
+ consoleFont = "Lat2-Terminus16";
+ consoleKeyMap = "br-abnt2";
+ defaultLocale = "en_US.UTF-8";
+ };
+
+ # Set your time zone.
+ time.timeZone = "America/Sao_Paulo";
+
+ virtualisation.docker.enable = true;
+ virtualisation.virtualbox.host.enable = true;
+
+ # $ nix-env -qaP | grep wget
+ environment.systemPackages = with pkgs; [
+
+
+ ## Personal data tools
+
+ gitAndTools.git-open
+ gitAndTools.gitFull
+ gitAndTools.diff-so-fancy
+ gitAndTools.git-annex
+ gitAndTools.gitRemoteGcrypt
+ gitAndTools.git-dit
+ git-crypt
+ git-lfs
+ gnupg
+ mr
+ nextcloud-client
+ borgbackup
+
+
+ ## CLI tools
+
+ bash
+ bash-completion
+ nix-bash-completions
+ youtube-dl
+ wget
+ vim
+ thefuck
+ tmux
+ tmuxinator
+ sox # =play=
+ gettext # =envsubst=
+ ag
+ gnugrep
+ ack
+ htop
+ rlwrap
+ awscli
+ jq
+ openvpn
+ xclip
+ bc # binary calculator used in nucli
+ sassc
+ watchman
+ ipfs
+ gnumake
+ gcc
+ psmisc # =killall=
+ xorg.xkill
+ autojump
+ bfg-repo-cleaner
+ pwgen
+ gksu # =gksudo=
+ gnome3.gconf # https://github.com/NixOS/nixpkgs/issues/15978
+ lsof
+ pciutils
+ libffi # FIXME: Ruby depends on it for FFI
+ python27Packages.pywatchman # =watchman-wait=
+ libressl
+ tree
+ i2p
+ libxml2 # =xmllint=
+ unzip # used by extract bash function and Clojure go-to-source
+ odt2txt # used to diff odf files
+ feh # simplistic image viewer
+ nixUnstable # =nix=
+ zip
+ kubernetes
+ zlib
+ vagrant
+ docker_compose
+ docker-machine
+ redis
+ alsaUtils # for xmonad volume commands
+
+ ## NixOS
+
+ pypi2nix
+ bundix
+ nix-repl
+
+
+ ## Music
+
+ texlive.combined.scheme-full
+ lilypond
+ # frescobaldi FIXME
+
+
+ ## Programming tools
+
+ stack
+ leiningen
+ python3
+ python
+ nodejs-8_x
+ elixir
+ openjdk
+ solc
+ bundler
+ rustc
+ rustfmt
+ cargo
+ clojure # =clj=
+ visualvm # JVM profiling tool
+ maven
+
+
+ ## xmonad
+
+ xorg.xmodmap
+ trayer
+ dmenu
+ escrotum
+ xorg.xbacklight
+ networkmanagerapplet
+ playerctl
+ lightdm
+ fvwm # =xpmroot=
+ haskellPackages.xmobar
+ arandr
+
+
+
+ ## GUI programs
+
+ # calibre # FIXME
+ quodlibet
+ firefox
+ emacs
+ tdesktop
+ riot-web
+ vlc
+ gnome3.evolution
+ keepassx2-http
+ yubioath-desktop
+ tor-browser-bundle-bin
+ transmission_gtk
+ libreoffice
+ android-studio
+ androidsdk_extras
+ androidndk
+
+ ## Cryptocururencies
+
+ electrum
+ zbar # for on-screen QR Code scanning
+ monero
+
+ ## nu specific packages
+ slack
+ chromium
+ ];
+
+ nixpkgs.config.allowUnfree = true; # Require for slack (unfree) derivation
+
+ # Look at
+ # https://www.vivaolinux.com.br/topico/Off-Code-Cafe/Me-apresente-sua-distro
+
+ programs = {
+ bash.enableCompletion = true;
+ };
+
+ services = {
+ xserver = {
+ enable = true;
+ layout = "br";
+ xkbOptions = "caps:swapescape";
+
+ windowManager.default = "xmonad";
+ windowManager.xmonad = {
+ enable = true;
+ enableContribAndExtras = true;
+ };
+ desktopManager = {
+ default = "none";
+ xterm.enable = false;
+ gnome3.enable = true;
+ };
+ displayManager = {
+ lightdm.enable = true;
+
+ # The config inception was inspired by:
+ # http://ubuntuforum-br.org/index.php?topic=13784.0
+ # Lambda symbol name taken from:
+ # http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap
+ # To test a keycode:
+ # xmodmap -e 'keycode 118 = bar Greek_lamda'
+ sessionCommands = ''
+ ${pkgs.haskellPackages.xmobar}/bin/xmobar ~/.xmobarrc &
+ ${pkgs.fvwm}/bin/xpmroot ~/Nextcloud/Images/emotion.png &
+ '';
+ };
+ };
+
+ gnome3 = {
+ gnome-keyring.enable = true;
+ seahorse.enable = true;
+ gnome-terminal-server.enable = true;
+ gpaste.enable = true; # clipboard manager
+ tracker.enable = true;
+ sushi.enable = true; # nautilus previewer
+ gnome-online-accounts.enable = true;
+ gnome-documents.enable = true;
+ evolution-data-server.enable = true;
+ gvfs.enable = true;
+ };
+
+ pcscd.enable = true; # required by yubioath
+ };
+
+ users = {
+ mutableUsers = false;
+ extraUsers.andreh = {
+ isNormalUser = true;
+ uid = 1000;
+ description = "EuAndreh";
+ extraGroups = [ "wheel" "networkmanager" "docker" ];
+ passwordFile = "/home/andreh/annex/dev/code/dotfiles/encrypted/password-hash.txt";
+ };
+ };
+
+ security.sudo = {
+ enable = true;
+ ## FIXME: this shouldn't be necessary, since wheels group already has sudo
+ extraConfig =
+ ''
+ andreh ALL=(ALL) ALL
+ '';
+ };
+
+ # This value determines the NixOS release with which your system is to be
+ # compatible, in order to avoid breaking some software such as database
+ # servers. You should change this only after NixOS release notes say you
+ # should.
+ system.stateVersion = "17.09"; # Did you read the comment?
+}
diff --git a/nixos/npmrc.sh b/nixos/npmrc.sh
new file mode 100644
index 0000000..2bc28dc
--- /dev/null
+++ b/nixos/npmrc.sh
@@ -0,0 +1 @@
+prefix="~/.npm-packages"
diff --git a/nixos/os-installation.sh b/nixos/os-installation.sh
new file mode 100644
index 0000000..827b820
--- /dev/null
+++ b/nixos/os-installation.sh
@@ -0,0 +1,83 @@
+sudo umount /dev/sdc1
+sudo dd if=os.iso of=/dev/sdc #
+
+# Derived from https://www.maketecheasier.com/nixos-review/
+
+# First, connect an ethernet cable
+
+loadkeys br-abnt2
+fdisk /dev/sda
+
+# START Steps within fdisk
+# First, delete all partitions with `d`
+o
+
+n
+p
+1
+ENTER
++2G
+t
+82
+
+n
+p
+2
+ENTER
+ENTER
+
+a
+2
+
+w
+# END Steps within fdisk
+
+mkswap -L swap /dev/sda1
+swapon /dev/sda1
+mkfs.ext4 -L nixos /dev/sda2
+mount /dev/disk/by-label/nixos /mnt
+nixos-generate-config --root /mnt
+
+# START Edit NixOS configuration file
+vi /mnt/etc/nixos/configuration.nix
+
+# Uncomment:
+boot.loader.grub.device = “/dev/sda”
+enviroment.systemPackages = with pkgs; [
+ wget
+ vim
+ firefox
+ gitAndTools.gitFull
+ gitAndTools.git-annex
+ gitAndTools.gitRemoteGcrypt
+ lsof
+ gnupg
+ gnupg1
+]
+
+# Add:
+services = {
+ xserver = {
+ enable = true;
+ desktopManager.gnome3.enable = true;
+ displayManager.gdm.enable = true;
+ };
+};
+# END
+
+nixos-install
+
+# OS will prompt for root UNIX password
+
+reboot
+
+
+C-M-<F1>
+ useradd -m andreh
+ passwd andreh
+ # Setup UNIX password (for andreh)
+
+ sudo vi /etc/sudoers
+ # START Add the following line below the `root` line
+ andreh ALL=(ALL) ALL
+ # END
diff --git a/sbclrc.lisp b/sbclrc.lisp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sbclrc.lisp
diff --git a/scripts/backup.sh b/scripts/backup.sh
new file mode 100755
index 0000000..ce186d8
--- /dev/null
+++ b/scripts/backup.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+
+
+#
+# BorgBackup
+#
+
+if [ ! -d ~/UTCLOUD/ ]; then
+ red "~/UTCLOUD not attached. Backup not started."
+ exit 1
+fi
+
+if [ ! -d ~/borgbkp/ ]; then
+ yellow "~/borgbkp/ repository doesn't exist. Downloading latest version from $R:borgbkp/ into ~/borgbkp"
+ # The initial borg repo was created with:
+ # $ borg init --append-only --encryption=keyfile ~/borgbkp
+ # See also: https://borgbackup.readthedocs.io/en/stable/usage/notes.html#append-only-mode
+ rsync --verbose --progress --stats --update --recursive "$R:borgbkp/" ~/borgbkp
+fi
+
+yellow "Creating new borg archive entry"
+borg create \
+ --verbose \
+ --stats \
+ --progress \
+ --compression lzma,9 \
+ ~/borgbkp::'{hostname}-{now}' \
+ ~/Nextcloud/
+ # add folders to be backed up here
+green "Done"
+
+yellow "Syncing ~/borgbkp to ~/UTCLOUD/borgbkp/"
+rsync --verbose --progress --stats --update --recursive ~/borgbkp/ ~/UTCLOUD/borgbkp/
+green "Done"
+
+yellow "Syncing ~/borgbkp to $R:borgbkp/"
+rsync --verbose --progress --stats --update --recursive ~/borgbkp/ "$R:borgbkp/"
+green "Done"
+
+
+#
+# mr
+#
+
+yellow "Backing up git repos"
+
+pushd ~/
+
+mr master
+mr status
+mr -j16 update
+mr hd
+mr -j4 rsyncnet
+
+popd
+
+green "Done"
diff --git a/scripts/once-only-nextcloud.sh b/scripts/once-only-nextcloud.sh
new file mode 100755
index 0000000..8400080
--- /dev/null
+++ b/scripts/once-only-nextcloud.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$(pidof nextcloud)" ]
+then
+ echo "Nextcloud already running."
+else
+ echo "Nextcloud not running yet. Starting it."
+ nextcloud & disown
+fi
diff --git a/scripts/single-monitor.sh b/scripts/single-monitor.sh
new file mode 100755
index 0000000..ec6c5e2
--- /dev/null
+++ b/scripts/single-monitor.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 640x1440 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP2 --off
diff --git a/scripts/sleepsort b/scripts/sleepsort
new file mode 100755
index 0000000..ea20fcb
--- /dev/null
+++ b/scripts/sleepsort
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Taken from:
+# https://www.quora.com/What-is-the-strangest-sorting-algorithm/answer/Nipun-Ramakrishnan
+
+function f() {
+ sleep "$1"
+ echo "$1"
+}
+
+while [ -n "$1" ]
+do
+ f "$1" &
+ shift
+done
+
+wait
+
+# example usage:
+# sleepsort 5 3 6 3 6 3 1 4 7
diff --git a/scripts/three-monitors.sh b/scripts/three-monitors.sh
new file mode 100755
index 0000000..d1ef7c6
--- /dev/null
+++ b/scripts/three-monitors.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 640x1440 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --mode 2560x1440 --pos 0x0 --rotate normal --output DP2 --mode 2560x1440 --pos 2560x0 --rotate left
diff --git a/spacemacs.el b/spacemacs.el
new file mode 100644
index 0000000..14ba802
--- /dev/null
+++ b/spacemacs.el
@@ -0,0 +1,750 @@
+;; -*- mode: emacs-lisp -*-
+;; This file is loaded by Spacemacs at startup.
+;; It must be stored in your home directory.
+
+(defun dotspacemacs/layers ()
+ "Layer configuration:
+This function should only modify configuration layer settings."
+ (setq-default
+ ;; Base distribution to use. This is a layer contained in the directory
+ ;; `+distribution'. For now available distributions are `spacemacs-base'
+ ;; or `spacemacs'. (default 'spacemacs)
+ dotspacemacs-distribution 'spacemacs
+
+ ;; Lazy installation of layers (i.e. layers are installed only when a file
+ ;; with a supported type is opened). Possible values are `all', `unused'
+ ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
+ ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
+ ;; lazy install any layer that support lazy installation even the layers
+ ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
+ ;; installation feature and you have to explicitly list a layer in the
+ ;; variable `dotspacemacs-configuration-layers' to install it.
+ ;; (default 'unused)
+ dotspacemacs-enable-lazy-installation 'unused
+
+ ;; If non-nil then Spacemacs will ask for confirmation before installing
+ ;; a layer lazily. (default t)
+ dotspacemacs-ask-for-lazy-installation t
+
+ ;; If non-nil layers with lazy install support are lazy installed.
+ ;; List of additional paths where to look for configuration layers.
+ ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
+ dotspacemacs-configuration-layer-path '()
+
+ ;; List of configuration layers to load.
+ dotspacemacs-configuration-layers
+ '(csv
+ rust
+ react
+ sql
+ perl5
+ perl6
+ purescript
+ windows-scripts
+ lua
+ erlang
+ elixir
+ python
+ ansible
+ yaml
+ ruby
+ swift
+ typescript
+ clojure
+ haskell
+ javascript
+ finance
+ helm
+ auto-completion
+ better-defaults
+ emacs-lisp
+ git
+ markdown
+ org
+ (shell :variables
+ shell-default-height 30
+ shell-default-position 'bottom)
+ (spell-checking :variables
+ spell-checking-enable-by-default nil)
+ syntax-checking
+ version-control
+ elm
+ html
+ common-lisp
+ restclient
+ latex
+ docker
+ pdf-tools
+ ;; media
+ github
+ nixos
+ ;; tabbar
+ selectric)
+
+ ;; List of additional packages that will be installed without being
+ ;; wrapped in a layer. If you need some configuration for these
+ ;; packages, then consider creating a layer. You can also put the
+ ;; configuration in `dotspacemacs/user-config'.
+ ;; To use a local version of a package, use the `:location' property:
+ ;; '(your-package :location "~/path/to/your-package/")
+ ;; Also include the dependencies as they will not be resolved automatically.
+ ;; To use a local version of a package, use the `:location' property:
+ ;; '(your-package :location "~/path/to/your-package/")
+ ;; Also include the dependencies as they will not be resolved automatically.
+ dotspacemacs-additional-packages '(paredit
+ interleave)
+ ;; A list of packages that cannot be updated.
+ dotspacemacs-frozen-packages '()
+
+ ;; A list of packages that will not be installed and loaded.
+ dotspacemacs-excluded-packages '()
+
+ ;; Defines the behaviour of Spacemacs when installing packages.
+ ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
+ ;; `used-only' installs only explicitly used packages and deletes any unused
+ ;; packages as well as their unused dependencies. `used-but-keep-unused'
+ ;; installs only the used packages but won't delete unused ones. `all'
+ ;; installs *all* packages supported by Spacemacs and never uninstalls them.
+ ;; (default is `used-only')
+ dotspacemacs-install-packages 'used-only))
+
+(defun dotspacemacs/init ()
+ "Initialization:
+This function is called at the very beginning of Spacemacs startup,
+before layer configuration.
+It should only modify the values of Spacemacs settings."
+ ;; This setq-default sexp is an exhaustive list of all the supported
+ ;; spacemacs settings.
+ (setq-default
+ ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
+ ;; possible. Set it to nil if you have no way to use HTTPS in your
+ ;; environment, otherwise it is strongly recommended to let it set to t.
+ ;; This variable has no effect if Emacs is launched with the parameter
+ ;; `--insecure' which forces the value of this variable to nil.
+ ;; (default t)
+ dotspacemacs-elpa-https t
+
+ ;; Maximum allowed time in seconds to contact an ELPA repository.
+ ;; (default 5)
+ dotspacemacs-elpa-timeout 5
+
+ ;; If non-nil then Spacelpa repository is the primary source to install
+ ;; a locked version of packages. If nil then Spacemacs will install the lastest
+ ;; version of packages from MELPA. (default nil)
+ dotspacemacs-use-spacelpa nil
+
+ ;; If non-nil then verify the signature for downloaded Spacelpa archives.
+ ;; (default nil)
+ dotspacemacs-verify-spacelpa-archives nil
+
+ ;; If non-nil then spacemacs will check for updates at startup
+ ;; when the current branch is not `develop'. Note that checking for
+ ;; new versions works via git commands, thus it calls GitHub services
+ ;; whenever you start Emacs. (default nil)
+ dotspacemacs-check-for-update t
+ ;; If non-nil, a form that evaluates to a package directory. For example, to
+ ;; use different package directories for different Emacs versions, set this
+ ;; to `emacs-version'. (default 'emacs-version)
+ dotspacemacs-elpa-subdirectory 'emacs-version
+
+ ;; One of `vim', `emacs' or `hybrid'.
+ ;; `hybrid' is like `vim' except that `insert state' is replaced by the
+ ;; `hybrid state' with `emacs' key bindings. The value can also be a list
+ ;; with `:variables' keyword (similar to layers). Check the editing styles
+ ;; section of the documentation for details on available variables.
+ ;; (default 'vim)
+ dotspacemacs-editing-style 'hybrid
+ ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
+ dotspacemacs-verbose-loading t
+ ;; Specify the startup banner. Default value is `official', it displays
+ ;; the official spacemacs logo. An integer value is the index of text
+ ;; banner, `random' chooses a random text banner in `core/banners'
+ ;; directory. A string value must be a path to an image format supported
+ ;; by your Emacs build.
+ ;; If the value is nil then no banner is displayed. (default 'official)
+ dotspacemacs-startup-banner 'official
+
+ ;; List of items to show in startup buffer or an association list of
+ ;; the form `(list-type . list-size)`. If nil then it is disabled.
+ ;; Possible values for list-type are:
+ ;; `recents' `bookmarks' `projects' `agenda' `todos'.
+ ;; List sizes may be nil, in which case
+ ;; `spacemacs-buffer-startup-lists-length' takes effect.
+ dotspacemacs-startup-lists '((recents . 5)
+ (projects . 7))
+
+ ;; True if the home buffer should respond to resize events. (default t)
+ dotspacemacs-startup-buffer-responsive t
+
+ ;; Default major mode of the scratch buffer (default `text-mode')
+ dotspacemacs-scratch-mode 'text-mode
+
+ ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
+ ;; (default nil)
+ dotspacemacs-initial-scratch-message nil
+
+ ;; List of themes, the first of the list is loaded when spacemacs starts.
+ ;; Press `SPC T n' to cycle to the next theme in the list (works great
+ ;; with 2 themes variants, one dark and one light)
+ dotspacemacs-themes '(spacemacs-dark
+ spacemacs-light)
+
+ ;; Set the theme for the Spaceline. Supported themes are `spacemacs',
+ ;; `all-the-icons', `custom', `vim-powerline' and `vanilla'. The first three
+ ;; are spaceline themes. `vanilla' is default Emacs mode-line. `custom' is a
+ ;; user defined themes, refer to the DOCUMENTATION.org for more info on how
+ ;; to create your own spaceline theme. Value can be a symbol or list with\
+ ;; additional properties.
+ ;; (default '(spacemacs :separator wave :separator-scale 1.5))
+ dotspacemacs-mode-line-theme 'spacemacs ;;'(spacemacs :separator wave :separator-scale 1.5)
+
+ ;; If non-nil the cursor color matches the state color in GUI Emacs.
+ ;; (default t)
+ dotspacemacs-colorize-cursor-according-to-state t
+
+ ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
+ ;; quickly tweak the mode-line size to make separators look not too crappy.
+ dotspacemacs-default-font '("Source Code Pro"
+ :size 13
+ :weight normal
+ :width normal)
+
+ ;; The leader key (default "SPC")
+ dotspacemacs-leader-key "SPC"
+
+ ;; The key used for Emacs commands `M-x' (after pressing on the leader key).
+ ;; (default "SPC")
+ dotspacemacs-emacs-command-key "SPC"
+
+ ;; The key used for Vim Ex commands (default ":")
+ dotspacemacs-ex-command-key ":"
+
+ ;; The leader key accessible in `emacs state' and `insert state'
+ ;; (default "M-m")
+ dotspacemacs-emacs-leader-key "M-m"
+
+ ;; Major mode leader key is a shortcut key which is the equivalent of
+ ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
+ dotspacemacs-major-mode-leader-key ","
+
+ ;; Major mode leader key accessible in `emacs state' and `insert state'.
+ ;; (default "C-M-m")
+ dotspacemacs-major-mode-emacs-leader-key "C-M-m"
+
+ ;; These variables control whether separate commands are bound in the GUI to
+ ;; the key pairs `C-i', `TAB' and `C-m', `RET'.
+ ;; Setting it to a non-nil value, allows for separate commands under `C-i'
+ ;; and TAB or `C-m' and `RET'.
+ ;; In the terminal, these pairs are generally indistinguishable, so this only
+ ;; works in the GUI. (default nil)
+ dotspacemacs-distinguish-gui-tab nil
+
+ ;; If non-nil `Y' is remapped to `y$' in Evil states. (default nil)
+ dotspacemacs-remap-Y-to-y$ nil
+
+ ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
+ ;; there. (default t)
+ dotspacemacs-retain-visual-state-on-shift t
+
+ ;; If non-nil, `J' and `K' move lines up and down when in visual mode.
+ ;; (default nil)
+ dotspacemacs-visual-line-move-text t
+ ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
+ ;; (default nil)
+ dotspacemacs-ex-substitute-global nil
+
+ ;; Name of the default layout (default "Default")
+ dotspacemacs-default-layout-name "annex+TODOs/dotfiles/global-config"
+ ;; If non nil the default layout name is displayed in the mode-line.
+ ;; (default nil)
+ dotspacemacs-display-default-layout nil
+
+ ;; If non-nil then the last auto saved layouts are resumed automatically upon
+ ;; start. (default nil)
+ dotspacemacs-auto-resume-layouts nil ;; t
+ ;; Size (in MB) above which spacemacs will prompt to open the large file
+ ;; literally to avoid performance issues. Opening a file literally means that
+ ;; no major mode or minor modes are active. (default is 1)
+ dotspacemacs-large-file-size 5
+ ;; Location where to auto-save files. Possible values are `original' to
+ ;; auto-save the file in-place, `cache' to auto-save the file to another
+ ;; file stored in the cache directory and `nil' to disable auto-saving.
+ ;; (default 'cache)
+ dotspacemacs-auto-save-file-location 'cache
+
+ ;; Maximum number of rollback slots to keep in the cache. (default 5)
+ dotspacemacs-max-rollback-slots 5
+
+ ;; If non-nil, `helm' will try to minimize the space it uses. (default nil)
+ dotspacemacs-helm-resize nil
+
+ ;; if non-nil, the helm header is hidden when there is only one source.
+ ;; (default nil)
+ dotspacemacs-helm-no-header t
+ ;; define the position to display `helm', options are `bottom', `top',
+ ;; `left', or `right'. (default 'bottom)
+ dotspacemacs-helm-position 'bottom
+
+ ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
+ ;; in all non-asynchronous sources. If set to `source', preserve individual
+ ;; source settings. Else, disable fuzzy matching in all sources.
+ ;; (default 'always)
+ dotspacemacs-helm-use-fuzzy 'source
+ ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
+ ;; several times cycle between the kill ring content. (default nil)
+ dotspacemacs-enable-paste-transient-state t
+ ;; Which-key delay in seconds. The which-key buffer is the popup listing
+ ;; the commands bound to the current keystroke sequence. (default 0.4)
+ dotspacemacs-which-key-delay 0.4
+
+ ;; Which-key frame position. Possible values are `right', `bottom' and
+ ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
+ ;; right; if there is insufficient space it displays it at the bottom.
+ ;; (default 'bottom)
+ dotspacemacs-which-key-position 'bottom
+
+ ;; Control where `switch-to-buffer' displays the buffer. If nil,
+ ;; `switch-to-buffer' displays the buffer in the current window even if
+ ;; another same-purpose window is available. If non-nil, `switch-to-buffer'
+ ;; displays the buffer in a same-purpose window even if the buffer can be
+ ;; displayed in the current window. (default nil)
+ dotspacemacs-switch-to-buffer-prefers-purpose nil
+
+ ;; If non-nil a progress bar is displayed when spacemacs is loading. This
+ ;; may increase the boot time on some systems and emacs builds, set it to
+ ;; nil to boost the loading time. (default t)
+ dotspacemacs-loading-progress-bar t
+
+ ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
+ ;; (Emacs 24.4+ only)
+ dotspacemacs-fullscreen-at-startup t
+ ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
+ ;; Use to disable fullscreen animations in OSX. (default nil)
+ dotspacemacs-fullscreen-use-non-native nil
+
+ ;; If non-nil the frame is maximized when Emacs starts up.
+ ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
+ ;; (default nil) (Emacs 24.4+ only)
+ dotspacemacs-maximized-at-startup nil
+
+ ;; A value from the range (0..100), in increasing opacity, which describes
+ ;; the transparency level of a frame when it's active or selected.
+ ;; Transparency can be toggled through `toggle-transparency'. (default 90)
+ dotspacemacs-active-transparency 90
+
+ ;; A value from the range (0..100), in increasing opacity, which describes
+ ;; the transparency level of a frame when it's inactive or deselected.
+ ;; Transparency can be toggled through `toggle-transparency'. (default 90)
+ dotspacemacs-inactive-transparency 90
+
+ ;; If non-nil show the titles of transient states. (default t)
+ dotspacemacs-show-transient-state-title t
+
+ ;; If non-nil show the color guide hint for transient state keys. (default t)
+ dotspacemacs-show-transient-state-color-guide t
+
+ ;; If non-nil unicode symbols are displayed in the mode line. (default t)
+ dotspacemacs-mode-line-unicode-symbols t
+
+ ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
+ ;; scrolling overrides the default behavior of Emacs which recenters point
+ ;; when it reaches the top or bottom of the screen. (default t)
+ dotspacemacs-smooth-scrolling t
+
+ ;; Control line numbers activation.
+ ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
+ ;; `text-mode' derivatives. If set to `relative', line numbers are relative.
+ ;; This variable can also be set to a property list for finer control:
+ ;; '(:relative nil
+ ;; :disabled-for-modes dired-mode
+ ;; doc-view-mode
+ ;; markdown-mode
+ ;; org-mode
+ ;; pdf-view-mode
+ ;; text-mode
+ ;; :size-limit-kb 1000)
+ ;; (default nil)
+ dotspacemacs-line-numbers '(:relative t :disabled-for-modes org-mode pdf-view-mode)
+ ;; Code folding method. Possible values are `evil' and `origami'.
+ ;; (default 'evil)
+ dotspacemacs-folding-method 'evil
+
+ ;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
+ ;; (default nil)
+ dotspacemacs-smartparens-strict-mode nil
+
+ ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
+ ;; over any automatically added closing parenthesis, bracket, quote, etc…
+ ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
+ dotspacemacs-smart-closing-parenthesis nil
+
+ ;; Select a scope to highlight delimiters. Possible values are `any',
+ ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
+ ;; emphasis the current one). (default 'all)
+ dotspacemacs-highlight-delimiters nil
+ ;; If non nil, advise quit functions to keep server open when quitting.
+ ;; (default nil)
+ dotspacemacs-persistent-server nil
+
+ ;; List of search tool executable names. Spacemacs uses the first installed
+ ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
+ ;; (default '("ag" "pt" "ack" "grep"))
+ dotspacemacs-search-tools '("ag")
+ ;; The default package repository used if no explicit repository has been
+ ;; specified with an installed package.
+ ;; Not used for now. (default nil)
+ dotspacemacs-default-package-repository nil
+
+ ;; Format specification for setting the frame title.
+ ;; %a - the `abbreviated-file-name', or `buffer-name'
+ ;; %t - `projectile-project-name'
+ ;; %I - `invocation-name'
+ ;; %S - `system-name'
+ ;; %U - contents of $USER
+ ;; %b - buffer name
+ ;; %f - visited file name
+ ;; %F - frame name
+ ;; %s - process status
+ ;; %p - percent of buffer above top of window, or Top, Bot or All
+ ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
+ ;; %m - mode name
+ ;; %n - Narrow if appropriate
+ ;; %z - mnemonics of buffer, terminal, and keyboard coding systems
+ ;; %Z - like %z, but including the end-of-line format
+ ;; (default "%I@%S")
+ dotspacemacs-frame-title-format "%I@%S"
+
+ ;; Format specification for setting the icon title format
+ ;; (default nil - same as frame-title-format)
+ dotspacemacs-icon-title-format nil
+
+ ;; Delete whitespace while saving buffer. Possible values are `all'
+ ;; to aggressively delete empty line and long sequences of whitespace,
+ ;; `trailing' to delete only the whitespace at end of lines, `changed' to
+ ;; delete only whitespace for changed lines or `nil' to disable cleanup.
+ ;; (default nil)
+ dotspacemacs-whitespace-cleanup 'trailing))
+
+(defun dotspacemacs/user-init ()
+ "Initialization function for user code.
+It is called immediately after `dotspacemacs/init', before layer configuration executes.
+ This function is mostly useful for variables that need to be set before packages are loaded. If you are unsure, you should try in setting them in `dotspacemacs/user-config' first.")
+
+
+(defun git-link-pull-requests (remote)
+ (interactive (list (git-link--select-remote)))
+ (let ((remote-host (git-link--remote-host remote)))
+ (if remote-host
+ (git-link--new (format "https://%s/%s/%s"
+ remote-host
+ (git-link--remote-dir remote)
+ (pcase remote-host
+ ("gitlab.com" "merge_requests")
+ ("github.com" "pulls"))))
+ (error "Remote `%s' is unknown or contains an unsupported URL" remote))))
+
+(defun set-custom-nu-clj-indent ()
+ "Reset midje indent to default."
+ (define-clojure-indent
+ (fact 1)
+ (facts 1)
+ (against-background 1)
+ (provided 0)
+ (let-entities 3)
+ (flow 1)
+ (as-customer 1)
+ (for-all 1)
+ (confirmation-button 1)
+ (query 1)
+ (render 1)
+ (view 1)
+ (text 1)
+ (touchable-highlight 1)
+ (image 1)
+ (scroll-view 1)
+ (camera 1)
+ (initial-state 1)
+ (ident 1)
+ (query 1)
+ (li 1)
+ (ul 1)
+ (div 1)
+ (button 1)
+ (span 1)
+ (options 1)
+ (for-all 1)
+ (fdef 1)
+ (as-user 3)
+ (constraint-fn 1)))
+
+(defun midje-load-facts ()
+ "Load current namespace (or their test namespace) facts"
+ (interactive)
+ (cider-ensure-connected)
+ (when (buffer-file-name)
+ (let* ((ns (cider-current-ns))
+ (test-ns (if (or (projectile-test-file-p (buffer-file-name)) (string-prefix-p "postman." ns)) ns (format "%s-test" ns)))
+ (cmd (format "(do (midje.repl/forget-facts *ns* '%s) (midje.repl/load-facts '%s))" test-ns test-ns)))
+ (cider-interactive-eval cmd))))
+
+(defun helm-multi-swoop-projectile-all-files (&optional $query)
+ "Apply all opened buffers of the current project to helm-multi-swoop"
+ (interactive)
+ (setq helm-multi-swoop-query (helm-multi-swoop--get-query $query))
+ (if (require 'projectile nil 'noerror)
+ ;; set filter function that is used in projectile-project-buffers
+ (let ((projectile-buffers-filter-function #'identity))
+ (helm-multi-swoop--exec nil
+ :$query helm-multi-swoop-query
+ :$buflist (mapcar #'buffer-name
+ (projectile-project-buffers))))
+ (error "Package 'projectile' is not available")))
+
+(defun save-and-eval-clojure-buffer (&optional buffer)
+ (interactive)
+ (save-buffer buffer)
+ (cider-eval-buffer buffer))
+
+(defun euandreh/cider-test-run-focused-test (&optional buffer)
+ (interactive)
+ (save-buffer buffer)
+ (spacemacs/cider-test-run-focused-test))
+
+(defun save-and-test-elixir-buffer (&optional buffer)
+ (interactive)
+ (save-buffer buffer)
+ (alchemist-mix-test-this-buffer))
+
+(defun save-and-rerun-last-test (&optional buffer)
+ (interactive)
+ (save-buffer buffer)
+ (alchemist-mix-rerun-last-test))
+
+(defun save-all-buffers-without-always-asking-me-for-confirmation-damn-it ()
+ (interactive)
+ (save-some-buffers t))
+
+(defun euandreh/clear-repl-and-eval ()
+ (interactive)
+ (cider-find-and-clear-repl-output)
+ (cider-eval-defun-at-point))
+
+;; Taken from
+;; https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
+(defun cider-figwheel-repl ()
+ (interactive)
+ (save-some-buffers)
+ (with-current-buffer (cider-current-repl-buffer)
+ (goto-char (point-max))
+ (insert "(require 'figwheel-sidecar.repl-api)
+ (figwheel-sidecar.repl-api/start-figwheel!) ; idempotent
+ (figwheel-sidecar.repl-api/cljs-repl)")
+ (cider-repl-return)))
+
+(defvar mode-pairs '(("\\.sbclrc$" . lisp-mode)
+ ("\\.tsx$" . typescript-mode)
+ ("\\.json\\.base$" . json-mode)
+ ("\\.lytex$" . latex-mode)
+ ("\\.ly$" . latex-mode)
+ ("rc$" . shell-script-mode)))
+
+(defvar paredit-modes '(lisp-mode
+ lisp-interaction-mode
+ emacs-lisp-mode
+ ;; scheme-mode
+ ielm-mode
+ clojure-mode
+ cider-mode
+ cider-repl-mode
+ clojurec-mode
+ clojurescript-mode
+ clojurex-mode
+ cider-clojure-interaction-mode))
+
+(defvar custom-el-files '("~/dev/nu/nudev/ides/emacs/nu.el"))
+
+(defvar custom-keybindings '(("C-x M-b" . ibuffer)
+ ("M-SPC" . (lambda () (interactive) (just-one-space -1)))
+ ("M-ç" . (lambda () (interactive) (find-file "~/annex/txt/TODOs.org")))
+ ("M-[" . (lambda () (interactive) (find-file "~/tmp/scratch.org")))
+ ("M-p" . interleave-mode)
+ ("C-i" . evil-jump-forward)
+
+ ;; tabbar-mode
+ ("C-<tab>" . tabbar-forward)
+ ("C-<iso-lefttab>" . tabbar-backward)
+
+ ;; Ctrl-Super-*
+ ("C-H-e" . (lambda () (interactive) (insert "∋")))
+ ("C-H-S-e" . (lambda () (interactive) (insert "∌")))
+ ("C-H-3" . (lambda () (interactive) (insert "♯")))
+ ("C-H-b" . (lambda () (interactive) (insert "♭")))
+
+ ;; Ctrl-Super-Alt-*
+ ("C-H-M-a" . (lambda () (interactive) (insert "α")))
+ ("C-H-M-b" . (lambda () (interactive) (insert "β")))
+ ("C-H-M-c" . (lambda () (interactive) (insert "γ")))
+ ("C-H-M-d" . (lambda () (interactive) (insert "δ")))
+ ("C-H-M-f" . (lambda () (interactive) (insert "ε")))))
+
+
+(defun dotspacemacs/user-config ()
+ "Configuration function for user code.
+This function is called at the very end of Spacemacs initialization after layers configuration.
+This is the place where most of your configurations should be done. Unless it is explicitly specified that a variable should be set before a package is loaded, you should place your code here."
+ (require 'git-link) ;; for git-link-*
+ (require 'clojure-mode) ;; for set-nu-clj-indent
+ (require 'org-indent) ;; for org-indent-mode
+ (require 'helm-swoop) ;; for custom helm-multi-swoop-projectile-all-files
+
+ (projectile-cleanup-known-projects)
+
+ (spacemacs/set-leader-keys
+ "fS" 'save-all-buffers-without-always-asking-me-for-confirmation-damn-it ;; 'save-some-buffers
+ "w/" 'split-window-right-and-focus
+ "w-" 'split-window-below-and-focus
+ "d" 'spacemacs/delete-window
+ "sS" 'helm-multi-swoop-projectile-all-files
+ "glh" 'git-link-homepage
+ "glp" 'git-link-pull-requests
+ "W" 'spacemacs/workspaces-transient-state/body)
+
+ (spacemacs/set-leader-keys-for-major-mode 'elixir-mode
+ "tb" 'save-and-test-elixir-buffer
+ "tr" 'save-and-rerun-last-test)
+
+ (spacemacs/set-leader-keys-for-major-mode 'typescript-mode
+ "." 'spacemacs/jump-to-definition
+ "," 'tide-jump-back)
+
+ ;; https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password
+ (exec-path-from-shell-initialize)
+ (exec-path-from-shell-copy-env "SSH_AGENT_PID")
+ (exec-path-from-shell-copy-env "SSH_AUTH_SOCK")
+
+ ;; github layer
+ (exec-path-from-shell-copy-env "EMACS_GITHUB_TOKEN")
+
+ ;; https://github.com/syl20bnr/spacemacs/issues/774
+ (unless (file-exists-p (concat spacemacs-cache-directory "undo"))
+ (make-directory (concat spacemacs-cache-directory "undo")))
+
+ (add-hook 'org-mode-hook (lambda ()
+ (org-indent-mode 1)))
+
+ ;; https://emacs.stackexchange.com/questions/3747/how-to-disable-line-wrapping-in-spacemacs
+ (add-hook 'hack-local-variables-hook (lambda ()
+ (spacemacs/toggle-truncate-lines-off)))
+
+ (dolist (mode-pair mode-pairs)
+ (setq auto-mode-alist (cons mode-pair auto-mode-alist)))
+
+ (dolist (path custom-el-files)
+ (when (file-exists-p path)
+ (load path)))
+
+
+ (dolist (mode paredit-modes :done)
+ (let ((mode-hook (intern (concat (symbol-name mode) "-hook")))
+ (mode-map (intern (concat (symbol-name mode) "-map"))))
+ (eval-after-load mode '(set-custom-nu-clj-indent))
+ (eval-after-load mode '(sayid-setup-package))
+ (add-hook mode-hook 'paredit-mode)
+ (add-hook mode-hook (lambda ()
+ (rainbow-delimiters-mode 1)))
+ (spacemacs/set-leader-keys-for-major-mode mode
+ "E" 'euandreh/clear-repl-and-eval
+ "k" 'paredit-copy-as-kill
+ "K" 'paredit-copy-sexps-as-kill
+ "tm" 'midje-load-facts
+ "eb" 'save-and-eval-clojure-buffer
+ "tt" 'euandreh/cider-test-run-focused-test
+ "." 'spacemacs/jump-to-definition
+ "," 'cider-pop-back)))
+
+ ;; From the documentation:
+ ;; https://cider.readthedocs.io/en/latest/code_completion/
+ (global-set-key (kbd "TAB") #'company-indent-or-complete-common)
+ (add-hook 'cider-repl-mode-hook #'cider-company-enable-fuzzy-completion)
+ (add-hook 'cider-mode-hook #'cider-company-enable-fuzzy-completion)
+
+ (dolist (keybinding custom-keybindings)
+ (global-set-key (kbd (car keybinding)) (cdr keybinding)))
+
+ (setq standard-indent 2
+ git-link-use-commit t
+ vc-follow-symlinks t
+ org-todo-keywords '((sequence "TODO" "NEXT" "WAITING" "INACTIVE" "CANCELLED" "MEETING" "DOING" "|" "DONE"))
+ default-truncate-lines nil
+ magit-diff-refine-hunk t
+
+ ;; Indentation
+ typescript-indent-level 2
+ js2-basic-offset 2
+ js-indent-level 2
+ css-indent-offset 2
+ web-mode-markup-indent-offset 2
+ web-mode-css-indent-offset 2
+ web-mode-code-indent-offset 2
+ web-mode-attr-indent-offset 2
+ perl6-indent-offset 2
+
+ ;; Clojure
+ cljr-warn-on-eval nil
+
+ ;; Common Lisp
+ inferior-lisp-program "ros -L sbcl -Q -l ~/.sbclrc run"
+ common-lisp-hyperspec-root (concat "file:" (expand-file-name "~/annex/docs/programming/hyperspec/HyperSpec/"))
+
+ ;; Persistent undo
+ undo-tree-auto-save-history t
+ undo-tree-history-directory-alist `(("." . ,(concat spacemacs-cache-directory "undo")))
+
+ ;; EMMS
+ emms-source-file-default-directory "~/annex/Banshee/queue/"
+ emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find
+ emms-browser-get-track-field-function #'emms-browser-get-track-field-use-directory-name
+
+ ;; org-mode
+ ;; Taken from:
+ ;; - http://cachestocaches.com/2016/9/my-workflow-org-agenda
+ ;; - http://doc.norang.ca/org-mode.html
+ org-agenda-files '("~/annex/txt/TODOs.org")
+ org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA"
+ org-default-notes-file "~/annex/txt/TODOs.org"
+ org-diary-notes-file "~/annex/txt/Diary.org"
+ org-capture-templates '(("t" "TODO" entry (file org-default-notes-file)
+ "* TODO %?\n%u\n%a\n" :clock-in t :clock-resume t)
+ ("s" "Scratch" entry (file org-default-notes-file)
+ "* Scratch" :clock-in t :clock-resume t)
+ ("m" "Meeting" entry (file org-default-notes-file)
+ "* MEETING with %? :MEETING:\n%t" :clock-in t :clock-resume t)
+ ("d" "Diary" entry (file+datetree org-diary-notes-file)
+ "* %?\n%U\n" :clock-in t :clock-resume t)
+ ("i" "Idea" entry (file org-default-notes-file)
+ "* %? :IDEA: \n%t" :clock-in t :clock-resume t)
+ ("n" "Next Task" entry (file+headline org-default-notes-file "Tasks")
+ "** NEXT %? \nDEADLINE: %t")))
+
+ t)
+
+(defun dotspacemacs/emacs-custom-settings ()
+ "Emacs custom settings.
+This is an auto-generated function, do not modify its content directly, use
+Emacs customize menu instead.
+This function is called at the very end of Spacemacs initialization."
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(package-selected-packages
+ (quote
+ (pipenv yasnippet-snippets yapfify yaml-mode xterm-color ws-butler winum which-key web-mode web-beautify volatile-highlights vi-tilde-fringe uuidgen use-package unfill toml-mode toc-org tide tagedit symon swift-mode string-inflection sql-indent spaceline-all-the-icons smeargle slime-company slim-mode shell-pop selectric-mode scss-mode sayid sass-mode rvm ruby-tools ruby-test-mode ruby-refactor ruby-hash-syntax rubocop rspec-mode robe restclient-helm restart-emacs rbenv rake rainbow-delimiters racer pyvenv pytest pyenv-mode py-isort pug-mode psci psc-ide powershell pippel pip-requirements persp-mode perl6-mode pdf-tools password-generator paradox overseer orgit org-projectile org-present org-pomodoro org-mime org-download org-bullets org-brain open-junk-file ob-restclient ob-http ob-elixir nix-mode neotree nameless mwim multi-term mu4e-maildirs-extension mu4e-alert move-text mmm-mode minitest markdown-toc magit-gitflow magit-gh-pulls lorem-ipsum livid-mode live-py-mode linum-relative link-hint less-css-mode ledger-mode js2-refactor js-doc jinja2-mode intero interleave indent-guide importmagic impatient-mode hy-mode hungry-delete hlint-refactor hl-todo hindent highlight-parentheses highlight-numbers highlight-indentation helm-xref helm-themes helm-swoop helm-pydoc helm-purpose helm-projectile helm-nixos-options helm-mu helm-mode-manager helm-make helm-hoogle helm-gitignore helm-flx helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-ag haskell-snippets google-translate golden-ratio gnuplot github-search github-clone gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe git-gutter-fringe+ gist gh-md fuzzy font-lock+ flyspell-correct-helm flycheck-rust flycheck-pos-tip flycheck-perl6 flycheck-mix flycheck-ledger flycheck-haskell flycheck-elm flycheck-credo flx-ido fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-org evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-cleverparens evil-args evil-anzu eshell-z eshell-prompt-extras esh-help erlang emmet-mode elm-mode elisp-slime-nav elfeed-web elfeed-org elfeed-goodies editorconfig dumb-jump dockerfile-mode docker diminish diff-hl define-word dante cython-mode csv-mode counsel-projectile company-web company-tern company-statistics company-restclient company-plsense company-nixos-options company-lua company-ghci company-ghc company-cabal company-auctex company-ansible company-anaconda common-lisp-snippets column-enforce-mode coffee-mode cmm-mode clojure-snippets clojure-cheatsheet clj-refactor clean-aindent-mode cider-eval-sexp-fu chruby centered-cursor-mode cargo bundler browse-at-remote auto-yasnippet auto-highlight-symbol auto-dictionary auto-compile auctex-latexmk ansible-doc ansible alchemist aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line ac-ispell))))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
+)
diff --git a/tmux/projects/annex.yml b/tmux/projects/annex.yml
new file mode 100644
index 0000000..b60ffbc
--- /dev/null
+++ b/tmux/projects/annex.yml
@@ -0,0 +1,11 @@
+name: annex
+root: ~/annex/
+
+windows:
+ - annex+dotfiles:
+ layout: main-vertical
+ panes:
+ - cd
+ - j dotfiles && git status
+ - git status
+ - htop: htop
diff --git a/tmux/projects/monero.yml b/tmux/projects/monero.yml
new file mode 100644
index 0000000..6f3af8c
--- /dev/null
+++ b/tmux/projects/monero.yml
@@ -0,0 +1,10 @@
+name: annex
+root: ~/
+
+windows:
+ - monero:
+ layout: main-horizontal
+ panes:
+ - monerod --data-dir ~/UTCLOUD/Monero/
+ - watch -n 30 du -hd 1 ~/UTCLOUD/Monero/
+ - monero-wallet-cli --wallet-file ~/annex/Crypto/Monero/EuAndrehMoneroCLIWallet
diff --git a/tmux/projects/pires.yml b/tmux/projects/pires.yml
new file mode 100644
index 0000000..7f693f2
--- /dev/null
+++ b/tmux/projects/pires.yml
@@ -0,0 +1,48 @@
+name: pires
+root: ~/annex/dev/code/pires/
+
+windows:
+ # - client:
+ # layout: main-vertical
+ # panes:
+ # - git:
+ # - git status
+ # - figwheel:
+ # - re-natal use-android-device real
+ # - re-natal use-figwheel
+ # - yellow 'In Emacs, connect, (start-figwheel! "android") and (cljs-repl)'
+ # - lein repl
+ # - packager:
+ # - yellow "Waiting for figwheel to be set up..." && sleep 20
+ # - npm start
+ # - log-android:
+ # panes:
+ # - react-native log-android
+ # - logcat:
+ # panes:
+ # - adb logcat
+ - server:
+ root: ~/annex/dev/code/pires/server/
+ layout: main-vertical
+ panes:
+ - git:
+ - git status
+ - repl:
+ - lein repl
+ - (require 'pires.service)
+ - test:
+ - sleep 10
+ - lein test
+ - transactor:
+ - cd ~/bin/datomic-pro/
+ - bin/run -m datomic.peer-server -h localhost -p 8998 -a pireskey,piressecret -d pires,datomic:mem://pires
+ - libs:
+ root: ~/annex/dev/code/
+ layout: main-vertical
+ panes:
+ - misc:
+ - cd org.euandre.misc
+ - git status
+ - om-auth:
+ - cd org.euandre.om-auth
+ - git status
diff --git a/tmux/projects/songbooks.yml b/tmux/projects/songbooks.yml
new file mode 100644
index 0000000..7d385c2
--- /dev/null
+++ b/tmux/projects/songbooks.yml
@@ -0,0 +1,24 @@
+name: songbooks
+root: ~/annex/dev/code/songbooks/
+
+windows:
+ - server:
+ layout: main-vertical
+ root: ~/annex/dev/code/songbooks/server/
+ panes:
+ - git:
+ - git status
+ - server-repl:
+ - lein repl
+ - server-tests:
+ - lein test
+ - client:
+ layout: main-vertical
+ root: ~/annex/dev/code/songbooks/client/
+ panes:
+ - git:
+ - git status
+ - figwheel:
+ - lein repl
+ - something:
+ - lein test
diff --git a/tmux/projects/sosps.yml b/tmux/projects/sosps.yml
new file mode 100644
index 0000000..ff8f1e0
--- /dev/null
+++ b/tmux/projects/sosps.yml
@@ -0,0 +1,10 @@
+name: sosps
+root: ~/annex/dev/mouselabs/
+
+windows:
+ - git:
+ layout: main-vertical
+ panes:
+ - git status
+ - ionic serve
+ - git status
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
new file mode 100644
index 0000000..9b38cbf
--- /dev/null
+++ b/tmux/tmux.conf
@@ -0,0 +1,64 @@
+# Instead of using "C-b" as a prefix, use "C-x"
+unbind C-b
+set -g prefix C-x
+
+# Turn on mouse mode
+# https://groups.google.com/forum/#!msg/tmux-users/TRwPgEOVqho/Ck_oth_SDgAJ
+# https://github.com/tmux/tmux/blob/310f0a960ca64fa3809545badc629c0c166c6cd2/CHANGES#L12
+set -g mouse on
+
+# Bind "C-x r" to reload the configuration file
+bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
+
+# Holy answer that properly implements copying from tmux!
+# https://unix.stackexchange.com/a/349020/276661
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "xclip -selection clipboard -i" \; display-message "Copied! Long-live tmux!"
+
+# Copy to clipboard after making selection with keyboard. Usefull for text that spans over a full pane and can't be selected with the mouse.
+bind-key y send-keys -X copy-pipe "xclip -selection clipboard -i" \; display-message "Copied system clipboard! Hooray! Long-live tmux!"
+
+# Moving around panes
+bind-key h select-pane -L
+bind-key j select-pane -D
+bind-key k select-pane -U
+bind-key l select-pane -R
+
+# Resizing panes
+bind-key -n C-h resize-pane -L 5
+bind-key -n C-j resize-pane -D 5
+bind-key -n C-k resize-pane -U 5
+bind-key -n C-l resize-pane -R 5
+
+# "C-x m" to actually clear the pane history
+bind-key m send-keys -R \; clear-history
+
+# Keybinding to activate pane typing sync
+# https://stackoverflow.com/questions/25909964/tmux-how-to-toggle-on-and-off-options-with-the-same-key
+bind-key b setw synchronize-panes \; display-message "synchronize-panes toggle"
+
+setw -g mode-keys vi # Move around with vi keys
+set-option -g status-key "vi" # Use vi mode for status bar command (like after typing "C-x [" one can search with "/")
+set-option -g status-bg "#666666" # Status bar background color
+set-option -g status-fg "#aaaaaa" # Status bar foreground color
+set-option -g status-left-length 50 # session name in status bar length =[annex]= part
+set-option -g history-limit 150000 # How many lines of history to keep
+
+# Set the panes initial index value to 1 instead of 0
+# 0 is too far from ` ;)
+set -g base-index 1
+set-window-option -g pane-base-index 1
+
+# Automatically set window title
+set-window-option -g automatic-rename on
+set-option -g set-titles on
+
+# Set "correct term"
+# https://wiki.archlinux.org/index.php/Tmux
+set -g default-terminal screen-256color
+
+# No delay for escape key press
+# https://mutelight.org/practical-tmux#faster-command-sequences
+set -sg escape-time 0
+
+# Enable arrow key navigation
+set-option -gw xterm-keys on \ No newline at end of file
diff --git a/xmonad/xmobar.hs b/xmonad/xmobar.hs
new file mode 100644
index 0000000..4bba66b
--- /dev/null
+++ b/xmonad/xmobar.hs
@@ -0,0 +1,47 @@
+Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
+ , bgColor = "black"
+ , fgColor = "grey"
+ , position = TopW L 90
+ , additionalFonts = []
+ , borderColor = "black"
+ , border = TopB
+ , alpha = 255
+ , textOffset = -1
+ , iconOffset = -1
+ , lowerOnStart = True
+ , pickBroadest = False
+ , persistent = False
+ , hideOnStart = False
+ , iconRoot = "."
+ , allDesktops = True
+ , overrideRedirect = True
+ , commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C",
+ "-L","18","-H","25",
+ "--normal","green",
+ "--high","red",
+ "--low","lightblue"] 36000
+ , Run Network "wlp2s0" ["-L","0","-H","32","--normal","green","--high","red"] 10
+
+ , Run Cpu ["-L","3","-H","50",
+ "--normal","green","--high","red"] 10
+ , Run Memory ["-t","Mem: <usedratio>%"] 10
+ , Run Swap [] 10
+ , Run Com "uname" ["-s","-r"] "" 36000
+ , Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
+
+ , Run Battery [
+ "-t", "<acstatus>: <left>% - <timeleft>",
+ "--",
+ --"-c", "charge_full",
+ "-O", "AC",
+ "-o", "Bat",
+ "-h", "green",
+ "-l", "red"
+ ] 10
+ , Run StdinReader
+ , Run CommandReader "/usr/bin/ledmon" "LED"
+ ]
+ , sepChar = "%"
+ , alignSep = "}{"
+ , template = " <fc=#ee9a00>%date%</fc> | %battery% } { %memory% * %swap% | %cpu% | %wlp2s0% "
+ }
diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs
new file mode 100644
index 0000000..299053f
--- /dev/null
+++ b/xmonad/xmonad.hs
@@ -0,0 +1,106 @@
+import XMonad
+import XMonad.Actions.SpawnOn
+import XMonad.Hooks.DynamicLog()
+import XMonad.Hooks.ManageDocks
+import XMonad.Util.EZConfig(additionalKeys)
+import System.IO()
+import XMonad.Layout.NoBorders
+import XMonad.Hooks.SetWMName
+import XMonad.Hooks.ManageHelpers
+import XMonad.Util.Scratchpad
+import qualified XMonad.StackSet as W
+
+main :: IO ()
+main =
+ xmonad $ def
+ -- Fullscreen handling:
+ -- https://stackoverflow.com/questions/20446348/xmonad-toggle-fullscreen-xmobar
+ { manageHook = manageDocks <+> (isFullscreen --> doFullFloat) <+> manageHook def <+> manageScratchPad
+ , handleEventHook = handleEventHook def <+> docksEventHook
+ , layoutHook = smartBorders $ lessBorders OnlyFloat $ avoidStruts $ layoutHook def
+ , modMask = mod4Mask -- User Super instead of Alt
+ , terminal = myTerminal
+ , startupHook = startup
+ } `additionalKeys` myKeyBindings
+
+myTerminal = "gnome-terminal"
+
+manageScratchPad :: ManageHook
+manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
+ where
+ h = 0.1 -- terminal height, 10%
+ w = 1 -- terminal width, 100%
+ t = 1 - h -- distance from top edge, 90%
+ l = 1 - w -- distance from left edge, 0%
+
+myKeyBindings :: [((ButtonMask, KeySym), X())]
+myKeyBindings =
+ [ -- XF86MonBrightnessUp
+ ((0, 0x1008ff02),
+ spawn "xbacklight +10")
+
+ -- XF86MonBrightnessDown
+ , ((0, 0x1008ff03),
+ spawn "xbacklight -10")
+
+ -- XF86AudioMute
+ , ((0, 0x1008ff12),
+ spawn "amixer -q sset Master toggle")
+
+ -- XF86AudioLowerVolume
+ , ((0, 0x1008ff11),
+ spawn "amixer -q sset Master 5%- unmute")
+
+ -- XF86AudioRaiseVolume
+ , ((0, 0x1008ff13),
+ spawn "amixer -q sset Master 5%+ unmute")
+
+ -- XF86AudioPrev
+ , ((0, 0x1008ff16),
+ spawn "playerctl previous")
+
+ -- XF86AudioPlay
+ , ((0, 0x1008ff14),
+ spawn "playerctl play-pause")
+
+ -- XF86AudioNext
+ , ((0, 0x1008ff17),
+ spawn "playerctl next")
+
+ -- yeganesh launcher
+ , ((mod4Mask, xK_p),
+ spawnHere "exe=$(~/.local/bin/yeganesh -x) && exec $exe")
+
+ -- Lock screen
+ , ((mod4Mask .|. controlMask, xK_l),
+ spawn "dm-tool lock & systemctl suspend")
+
+ -- print screen of clicked window
+ , ((mod4Mask .|. controlMask, xK_Print),
+ spawn "escrotum ~/Desktop/%Y-%m-%d-%T-screenshot.png -s")
+
+ -- print whole screen
+ , ((mod4Mask, xK_Print),
+ spawn "escrotum ~/Desktop/%Y-%m-%d-%T-screenshot.png")
+
+ -- xrandr single monitor setup
+ , ((mod4Mask .|. controlMask, xK_1),
+ spawn "~/annex/dev/code/dotfiles/scripts/single-monitor.sh")
+
+ -- xrandr three monitor setup
+ , ((mod4Mask .|. controlMask, xK_3),
+ spawn "~/annex/dev/code/dotfiles/scripts/three-monitors.sh")
+
+ -- restart network
+ , ((mod4Mask, xK_x),
+ spawn "gksudo -S systemctl restart network-manager")
+ ]
+
+startup :: X()
+startup = do
+ spawn "xbacklight =100"
+ spawn "xmobar ~/.xmobarrc"
+ spawn "killall trayer; trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --transparent true --tint 0x191970 --height 17 --monitor 1"
+ spawn "nm-applet"
+ spawn "~/annex/dev/code/dotfiles/scripts/once-only-nextcloud.sh"
+ setWMName "LG3D" -- https://stackoverflow.com/questions/30742662/java-swing-gui-not-displaying-in-xmonad
diff --git a/xmonad/xsession.sh b/xmonad/xsession.sh
new file mode 100644
index 0000000..b25a9a1
--- /dev/null
+++ b/xmonad/xsession.sh
@@ -0,0 +1 @@
+xmonad