mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Compare commits
244 Commits
20200126
...
2023-08-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11ecbdaf04 | ||
|
|
bc9150b592 | ||
|
|
f81410cfc0 | ||
|
|
87239b2034 | ||
|
|
50011b1675 | ||
|
|
eb3392966a | ||
|
|
3188effbd3 | ||
|
|
80b119f6ad | ||
|
|
e87b4cb3d4 | ||
|
|
0c08d4ebe7 | ||
|
|
a7d59e971f | ||
|
|
233b3e7a7b | ||
|
|
691f64a477 | ||
|
|
670875f227 | ||
|
|
e90c014d88 | ||
|
|
d76a278a95 | ||
|
|
8eff002d55 | ||
|
|
3015e7a1c0 | ||
|
|
a286795570 | ||
|
|
99e8ff6f2b | ||
|
|
4a77c0e900 | ||
|
|
35f494c3d4 | ||
|
|
f650d12efb | ||
|
|
2c67b58ba6 | ||
|
|
ba9534577a | ||
|
|
193b22e0d1 | ||
|
|
b7353bd34e | ||
|
|
12b2ed211b | ||
|
|
ee5a78b578 | ||
|
|
25a9194480 | ||
|
|
f4ea05681c | ||
|
|
eb193fe1de | ||
|
|
e02dc0be80 | ||
|
|
6c3dea3721 | ||
|
|
cb3ba03c49 | ||
|
|
d7cc6fd508 | ||
|
|
b628453b10 | ||
|
|
157e6ee20e | ||
|
|
e375d7f472 | ||
|
|
373189f440 | ||
|
|
a719ca9972 | ||
|
|
4937a98ccc | ||
|
|
81093ab3d6 | ||
|
|
ab85cb5ecf | ||
|
|
cbb580fcdf | ||
|
|
aea9e50141 | ||
|
|
10ce6ff7f6 | ||
|
|
cd9bb5d6cc | ||
|
|
5cfbc4e88a | ||
|
|
44d981e3c3 | ||
|
|
3f509e17c1 | ||
|
|
af3365ad8e | ||
|
|
6888e8503f | ||
|
|
e52af2d21a | ||
|
|
a5a5c7d5df | ||
|
|
aca274d7df | ||
|
|
70cdfcdc07 | ||
|
|
9a38b456d7 | ||
|
|
a4196d7bc1 | ||
|
|
cbcc6e6fb6 | ||
|
|
f2ca693f7b | ||
|
|
da43e7533d | ||
|
|
9c9c56b030 | ||
|
|
747bc7becd | ||
|
|
c3c9714b8d | ||
|
|
5865f5130f | ||
|
|
6803ac2ce2 | ||
|
|
c512401acd | ||
|
|
dae254e240 | ||
|
|
2ab9bd3452 | ||
|
|
b68c1e2c65 | ||
|
|
3c8d8ca5e1 | ||
|
|
f6e6c42b26 | ||
|
|
7165e7c93f | ||
|
|
63f401c84b | ||
|
|
dea863ee35 | ||
|
|
d01a320de7 | ||
|
|
0564dbbb3d | ||
|
|
1efa61a9f4 | ||
|
|
77a01d2fda | ||
|
|
71711a5cc0 | ||
|
|
a49474fe60 | ||
|
|
2217cfb47b | ||
|
|
75b0c5db9e | ||
|
|
50174a4f72 | ||
|
|
04470627c6 | ||
|
|
e6318c4cc1 | ||
|
|
15b575c34d | ||
|
|
2db123c772 | ||
|
|
2de511f5f3 | ||
|
|
890a24ec07 | ||
|
|
a3aaed6c0c | ||
|
|
9f4fbfb06a | ||
|
|
273d6b495f | ||
|
|
d41703820d | ||
|
|
5748d014f1 | ||
|
|
2779322b24 | ||
|
|
50948acee4 | ||
|
|
670cf5c8dc | ||
|
|
d213b3b234 | ||
|
|
37d606cc49 | ||
|
|
8f57fad78c | ||
|
|
f8ddb56b02 | ||
|
|
1f59627da9 | ||
|
|
2c88a59188 | ||
|
|
9ec67f4c1c | ||
|
|
db3193e0bc | ||
|
|
9c83b8fc40 | ||
|
|
3da887ffad | ||
|
|
f56b7d0b7b | ||
|
|
e18e66391b | ||
|
|
8b66586fe8 | ||
|
|
ac4109cee6 | ||
|
|
99af2287c5 | ||
|
|
6adaaffabd | ||
|
|
c6f217d47c | ||
|
|
733093ee7a | ||
|
|
441a533e2a | ||
|
|
8d30879224 | ||
|
|
f94a4dc67c | ||
|
|
0bb950b053 | ||
|
|
4ec8f22ab8 | ||
|
|
ba0c734b06 | ||
|
|
f24e3ebb24 | ||
|
|
4af40de24b | ||
|
|
351b136cbc | ||
|
|
a5b0677903 | ||
|
|
ebf5c1cd22 | ||
|
|
94abfa2fe2 | ||
|
|
15f5f91e2a | ||
|
|
2b6229acc3 | ||
|
|
e05a6aa473 | ||
|
|
673fca3c05 | ||
|
|
f6a7b372b7 | ||
|
|
685fb22dd3 | ||
|
|
e788dedf69 | ||
|
|
a482092fdb | ||
|
|
b3eb8a8e44 | ||
|
|
3afee0505b | ||
|
|
50b74fc06e | ||
|
|
74bf253950 | ||
|
|
434120cc90 | ||
|
|
97e23b3669 | ||
|
|
f9f3dd05c8 | ||
|
|
6e095d9fbc | ||
|
|
c25540a398 | ||
|
|
fae178e8ac | ||
|
|
15ea12d54b | ||
|
|
291de7b2c1 | ||
|
|
bbba28e166 | ||
|
|
27dc8fb22c | ||
|
|
a5f55034fa | ||
|
|
062da36145 | ||
|
|
9e3b929a4b | ||
|
|
3170a41c4b | ||
|
|
b37f95383c | ||
|
|
e6e66b0d05 | ||
|
|
6e6b63cb28 | ||
|
|
20bb942ac6 | ||
|
|
d256cdf12b | ||
|
|
c20739472f | ||
|
|
66e6833623 | ||
|
|
bc5f9a2741 | ||
|
|
04d4ab4d25 | ||
|
|
ce1d4780b6 | ||
|
|
8e79910857 | ||
|
|
999ef09790 | ||
|
|
2f9841e2ac | ||
|
|
2879f63aff | ||
|
|
79a3e1f46c | ||
|
|
62392e3712 | ||
|
|
9717fef420 | ||
|
|
3c83cb1761 | ||
|
|
2a71557663 | ||
|
|
b6a2b65704 | ||
|
|
398e39b9eb | ||
|
|
f6b5cd90fc | ||
|
|
1d14f294eb | ||
|
|
f3cb3607db | ||
|
|
d117ee6b2e | ||
|
|
7e249843a6 | ||
|
|
465bfd37f1 | ||
|
|
5ad1ad4616 | ||
|
|
e82cad68e1 | ||
|
|
5e372e2b35 | ||
|
|
9e392af7d1 | ||
|
|
68bcf536cb | ||
|
|
698f2defa9 | ||
|
|
a42128f5c9 | ||
|
|
6559acbf90 | ||
|
|
a654a7747c | ||
|
|
d158a0a373 | ||
|
|
229d5353e3 | ||
|
|
20389cba90 | ||
|
|
aaf56b794d | ||
|
|
827665279a | ||
|
|
8467bfce20 | ||
|
|
116ae13896 | ||
|
|
0f08f9710a | ||
|
|
9c147af8c1 | ||
|
|
5e498f9bcd | ||
|
|
1cab41bfd5 | ||
|
|
3e225ae2ab | ||
|
|
cc15b17e28 | ||
|
|
7aa9e57a59 | ||
|
|
530b205b3d | ||
|
|
0bed0a80a3 | ||
|
|
244c5da0e7 | ||
|
|
e885afbff9 | ||
|
|
8a0e4cd774 | ||
|
|
5cf313140c | ||
|
|
f0c3ab8753 | ||
|
|
8cd3682a23 | ||
|
|
ee83a40686 | ||
|
|
7f9a3774ae | ||
|
|
8d7c76b227 | ||
|
|
0a92dd0ed7 | ||
|
|
eae69fe414 | ||
|
|
dcef7445b2 | ||
|
|
11d1086a68 | ||
|
|
a88d120b3c | ||
|
|
15479f3829 | ||
|
|
9178794de5 | ||
|
|
fc120b66fe | ||
|
|
57b181bd74 | ||
|
|
aa6a2e806d | ||
|
|
eec3c9ba7a | ||
|
|
d67b18f2ea | ||
|
|
72b82ff2e3 | ||
|
|
6492beb726 | ||
|
|
08142409f8 | ||
|
|
8225785dcc | ||
|
|
c7c97b84c5 | ||
|
|
f9ce8b3df8 | ||
|
|
69c1184b58 | ||
|
|
7e432287ac | ||
|
|
50cb109c99 | ||
|
|
c915b20450 | ||
|
|
f3ea935dd5 | ||
|
|
a6414425b7 | ||
|
|
ad73f12103 | ||
|
|
7d35ace5bb | ||
|
|
e4f2cc94b5 | ||
|
|
fcbe2e781b |
Binary file not shown.
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,3 +4,5 @@ installed-prefs
|
||||
*~
|
||||
*.bak
|
||||
local_dotfiles
|
||||
dotfile_overlays
|
||||
!dotfile_overlays/.keep
|
||||
|
||||
7
.gitmodules
vendored
7
.gitmodules
vendored
@@ -18,14 +18,7 @@
|
||||
path = dotfiles/vim/pack/matir/start/ctrlp
|
||||
url = https://github.com/ctrlpvim/ctrlp.vim.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/vim-go"]
|
||||
path = dotfiles/vim/pack/matir/start/vim-go
|
||||
url = https://github.com/fatih/vim-go.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/tmux/tmux-logging"]
|
||||
path = dotfiles/tmux/tmux-logging
|
||||
url = https://github.com/tmux-plugins/tmux-logging.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/syntastic"]
|
||||
path = dotfiles/vim/pack/matir/start/syntastic
|
||||
url = https://github.com/vim-syntastic/syntastic.git
|
||||
|
||||
@@ -26,5 +26,8 @@ function verify_dest {
|
||||
|
||||
verify_dest "$DEST"
|
||||
|
||||
exec nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
|
||||
time nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
|
||||
--delete-excluded "${HOME}/" "$DEST"
|
||||
echo "Backup completed..."
|
||||
time sync
|
||||
echo "Run finished, safe to unmount."
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
CHROME_BINS="google-chrome-beta google-chrome"
|
||||
for bin in ${CHROME_BINS} ; do
|
||||
if command -v ${bin} >/dev/null 2>&1 ; then
|
||||
CHROME=$(command -v ${bin})
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -z "${CHROME}" ; then
|
||||
echo "Chrome not found!" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set alternate HOME to use alternate NSS DB
|
||||
export HOME=${HOME}/.chrome-pentest
|
||||
mkdir -p ${HOME}
|
||||
|
||||
# Launch chrome for burp
|
||||
exec /usr/bin/google-chrome-beta --ignore-certificate-errors --user-data-dir=${HOME}/.config/chrome-pentest --proxy-server=127.0.0.1:8080
|
||||
exec ${CHROME} --user-data-dir=${HOME}/chrome-pentest --proxy-server=127.0.0.1:8080
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
LOCKTIME="${SCREENSAVER_MIN:-5}"
|
||||
LOCKER="i3lock -c 000000"
|
||||
# intentionally want word splitting below
|
||||
/usr/bin/xss-lock -- ${LOCKER} &
|
||||
exec /usr/bin/xautolock \
|
||||
-time 5 \
|
||||
-time "${LOCKTIME}" \
|
||||
-detectsleep \
|
||||
-locker "${LOCKER}" \
|
||||
-notify 30 \
|
||||
|
||||
308
bin/install_tool
308
bin/install_tool
@@ -5,28 +5,44 @@ set -ue
|
||||
REINSTALL=0
|
||||
PACKAGES=1
|
||||
|
||||
export GO111MODULE=on
|
||||
|
||||
while getopts -- "-:" a ; do
|
||||
# shellcheck disable=SC2154
|
||||
case "${a}" in
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
reinstall)
|
||||
REINSTALL=1
|
||||
;;
|
||||
no-packages)
|
||||
PACKAGES=0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown long option ${OPTARG}" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
case "${OPTARG}" in
|
||||
reinstall)
|
||||
REINSTALL=1
|
||||
;;
|
||||
no-packages)
|
||||
PACKAGES=0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown long option ${OPTARG}" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Unknown short option ${OPTARG}" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1))
|
||||
|
||||
function list_tools {
|
||||
echo "Options:" >/dev/stderr
|
||||
awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' "$0" | sort | while read -r opt; do
|
||||
echo -e "\\t${opt}" >/dev/stderr
|
||||
done
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: ${0} <tool>" >/dev/stderr
|
||||
list_tools
|
||||
exit 1
|
||||
fi
|
||||
TOOL=${1}
|
||||
@@ -68,7 +84,7 @@ function check_sudo {
|
||||
function add_bin_symlink {
|
||||
local TARGET NAME BINDIR
|
||||
TARGET="${1}"
|
||||
NAME="${2:-$(basename ${1})}"
|
||||
NAME="${2:-$(basename "${1}")}"
|
||||
BINDIR="${HOME}/bin/tools/"
|
||||
mkdir -p -- "${BINDIR}"
|
||||
ln -sf "${DESTDIR}/${TARGET}" "${BINDIR}/${NAME}"
|
||||
@@ -94,6 +110,18 @@ function makedest_or_die {
|
||||
makedest || die "Aborting."
|
||||
}
|
||||
|
||||
function deb_only {
|
||||
# Error if not on a debian or derivative
|
||||
if ! test -f /etc/debian_version ; then
|
||||
echo "This tool only available for debian." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function require_pipx {
|
||||
command -v pipx >/dev/null 2>&1 || die "Requires pipx"
|
||||
}
|
||||
|
||||
# Begin main tool selection
|
||||
case ${TOOL} in
|
||||
john)
|
||||
@@ -138,7 +166,7 @@ case ${TOOL} in
|
||||
makedest_or_die
|
||||
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
|
||||
# TODO: find a way to make this version independent
|
||||
gsdk="google-cloud-sdk-277.0.0-linux-x86_64.tar.gz"
|
||||
gsdk="google-cloud-sdk-385.0.0-linux-x86_64.tar.gz"
|
||||
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
|
||||
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C "${DESTDIR}"
|
||||
rm /tmp/gcloud.tar.gz
|
||||
@@ -146,7 +174,7 @@ case ${TOOL} in
|
||||
;;
|
||||
android-sdk)
|
||||
# TODO: find a way to make this version independent
|
||||
asdk="https://dl.google.com/android/repository/tools_r25.2.3-linux.zip"
|
||||
asdk="https://dl.google.com/android/repository/platform-tools_r31.0.2-linux.zip"
|
||||
download ${asdk} /tmp/android-tools.zip
|
||||
unzip -d "${DESTDIR}" /tmp/android-tools.zip
|
||||
rm /tmp/android-tools.zip
|
||||
@@ -170,7 +198,7 @@ case ${TOOL} in
|
||||
;;
|
||||
mitmproxy)
|
||||
makedest_or_die
|
||||
ver=$(python -c 'import urllib2; import json; print(json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["name"].replace("v",""))')
|
||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["tag_name"].replace("v",""))')
|
||||
download \
|
||||
"https://snapshots.mitmproxy.org/${ver}/mitmproxy-${ver}-linux.tar.gz" \
|
||||
/tmp/mitmproxy.tar.gz
|
||||
@@ -178,6 +206,7 @@ case ${TOOL} in
|
||||
rm /tmp/mitmproxy.tar.gz
|
||||
add_bin_symlink mitmproxy
|
||||
add_bin_symlink mitmweb
|
||||
add_bin_symlink mitmdump
|
||||
;;
|
||||
esp)
|
||||
makedest_or_die
|
||||
@@ -212,10 +241,27 @@ case ${TOOL} in
|
||||
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
|
||||
udevadm control --reload-rules"
|
||||
;;
|
||||
pm3iceman)
|
||||
install_pkgs git ca-certificates build-essential pkg-config \
|
||||
libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev \
|
||||
libbz2-dev libbluetooth-dev libpython3-dev libssl-dev
|
||||
src="https://github.com/RfidResearchGroup/proxmark3.git"
|
||||
git clone "${src}" "${DESTDIR}"
|
||||
cd "${DESTDIR}"
|
||||
make clean && make -sj2
|
||||
check_sudo && sudo /bin/sh -c \
|
||||
"cp -rf ./driver/77-pm3-usb-device-blacklist.rules \
|
||||
/etc/udev/rules.d/77-pm3-usb-device-blacklist.rules &&
|
||||
udevadm control --reload-rules"
|
||||
add_bin_symlink pm3
|
||||
;;
|
||||
cyberchef)
|
||||
makedest
|
||||
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"]=="cyberchef.htm", json.load(urllib2.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"])[0]["browser_download_url"])')
|
||||
download "${src}" "${DESTDIR}/cyberchef.html"
|
||||
cd "${DESTDIR}"
|
||||
src=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"][0]["browser_download_url"])')
|
||||
download "${src}" "${DESTDIR}/cyberchef.zip"
|
||||
unzip -d "${DESTDIR}" "${DESTDIR}/cyberchef.zip"
|
||||
ln -sf CyberChef*.html "${DESTDIR}/cyberchef.html"
|
||||
;;
|
||||
apktool)
|
||||
makedest_or_die
|
||||
@@ -259,12 +305,230 @@ case ${TOOL} in
|
||||
https://github.com/hugsy/gef/raw/master/gef.py \
|
||||
"${DESTDIR}/gef.py"
|
||||
;;
|
||||
aflplusplus)
|
||||
install_pkgs libtool-bin libglib2.0-dev libpixman-1-dev clang clang-tools \
|
||||
llvm python3-setuptools
|
||||
git clone "https://github.com/vanhauser-thc/AFLplusplus" "${DESTDIR}"
|
||||
make -C "${DESTDIR}" distrib
|
||||
;;
|
||||
exploitdb)
|
||||
if test -d "${DESTDIR}" ; then
|
||||
echo "Already installed, updating instead..." >/dev/stderr
|
||||
"${DESTDIR}/searchsploit" -u
|
||||
else
|
||||
git clone --depth 1 \
|
||||
https://github.com/offensive-security/exploitdb.git \
|
||||
"${DESTDIR}"
|
||||
add_bin_symlink searchsploit
|
||||
cp "${DESTDIR}/.searchsploit_rc" "${HOME}/.searchsploit_rc"
|
||||
sed -i "s|/opt/exploitdb|${DESTDIR}|" "${HOME}/.searchsploit_rc"
|
||||
fi
|
||||
;;
|
||||
cura)
|
||||
makedest
|
||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/Ultimaker/Cura/releases/latest"))["name"].replace("v",""))')
|
||||
echo "Latest Cura is ${ver}"
|
||||
download \
|
||||
"https://github.com/Ultimaker/Cura/releases/download/${ver}/Cura-${ver}.AppImage" \
|
||||
"${DESTDIR}/Cura.AppImage"
|
||||
chmod +x "${DESTDIR}/Cura.AppImage"
|
||||
add_bin_symlink "Cura.AppImage" cura
|
||||
;;
|
||||
rr)
|
||||
deb_only
|
||||
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])')
|
||||
echo "Latest rr is ${ver}"
|
||||
download \
|
||||
"https://github.com/mozilla/rr/releases/download/${ver}/rr-${ver}-Linux-$(uname -m).deb" \
|
||||
"/tmp/rr.deb"
|
||||
sudo dpkg -i /tmp/rr.deb
|
||||
;;
|
||||
nmap-parse-output)
|
||||
git clone --depth 1 \
|
||||
https://github.com/ernw/nmap-parse-output.git \
|
||||
"${DESTDIR}"
|
||||
add_bin_symlink nmap-parse-output
|
||||
cat <<EOF >"${HOME}/.zshrc.d/99-nmap-parse-output.zsh"
|
||||
if test -d ${DESTDIR} ; then
|
||||
autoload bashcompinit
|
||||
bashcompinit
|
||||
source ${DESTDIR}/_nmap-parse-output
|
||||
fi
|
||||
EOF
|
||||
;;
|
||||
logiops)
|
||||
install_pkgs cmake libevdev-dev libudev-dev libconfig++-dev checkinstall
|
||||
git clone "https://github.com/PixlOne/logiops.git" "${DESTDIR}"
|
||||
mkdir -p "${DESTDIR}/build"
|
||||
cd "${DESTDIR}/build"
|
||||
cmake ..
|
||||
make
|
||||
sudo checkinstall --pkgname logiops --maintainer "${USER}" -y
|
||||
;;
|
||||
aws)
|
||||
DN=$(mktemp -d)
|
||||
cd "${DN}"
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "${DN}/awscliv2.zip"
|
||||
unzip "${DN}/awscliv2.zip"
|
||||
mv "${DN}/aws/dist" "${DESTDIR}"
|
||||
add_bin_symlink aws
|
||||
rm -rf ${DN}
|
||||
;;
|
||||
tmpmail)
|
||||
install_pkgs curl w3m jq
|
||||
mkdir -p ${DESTDIR}
|
||||
curl -L "https://git.io/tmpmail" > ${DESTDIR}/tmpmail
|
||||
chmod +x ${DESTDIR}/tmpmail
|
||||
add_bin_symlink tmpmail
|
||||
;;
|
||||
gf)
|
||||
install_pkgs golang-go silversearcher-ag
|
||||
go install github.com/tomnomnom/gf@latest
|
||||
mkdir -p ${HOME}/.config
|
||||
if test -d ${HOME}/.config/gf ; then
|
||||
git -C ${HOME}/.config/gf pull
|
||||
else
|
||||
git clone https://github.com/Matir/gf-patterns.git ${HOME}/.config/gf
|
||||
fi
|
||||
;;
|
||||
gron)
|
||||
go install github.com/tomnomnom/gron@latest
|
||||
;;
|
||||
httprobe)
|
||||
go install github.com/tomnomnom/httprobe@latest
|
||||
;;
|
||||
ffuf)
|
||||
go install github.com/ffuf/ffuf@latest
|
||||
;;
|
||||
gobuster)
|
||||
go install github.com/OJ/gobuster@latest
|
||||
;;
|
||||
amass)
|
||||
go install github.com/OWASP/Amass/v3/...
|
||||
;;
|
||||
cht.sh)
|
||||
install_pkgs rlwrap
|
||||
mkdir -p ${DESTDIR}
|
||||
curl https://cht.sh/:cht.sh > ${DESTDIR}/cht.sh
|
||||
chmod +x ${DESTDIR}/cht.sh
|
||||
add_bin_symlink cht.sh
|
||||
;;
|
||||
age)
|
||||
go install filippo.io/age/cmd/age@latest
|
||||
go install filippo.io/age/cmd/age-keygen@latest
|
||||
;;
|
||||
docker-compose)
|
||||
mkdir -p ${DESTDIR}
|
||||
curl -L \
|
||||
"https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" \
|
||||
-o "${DESTDIR}/docker-compose"
|
||||
chmod +x "${DESTDIR}/docker-compose"
|
||||
add_bin_symlink docker-compose
|
||||
;;
|
||||
tldr)
|
||||
require_pipx
|
||||
pipx install tldr
|
||||
;;
|
||||
blint)
|
||||
require_pipx
|
||||
pipx install blint
|
||||
;;
|
||||
dust)
|
||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
cargo install du-dust
|
||||
;;
|
||||
bottom)
|
||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
cargo install bottom
|
||||
;;
|
||||
delta)
|
||||
deb_only
|
||||
if ! check_sudo ; then
|
||||
echo "Must be able to run as sudo."
|
||||
exit 1
|
||||
fi
|
||||
dpkg_url=$(curl https://api.github.com/repos/dandavison/delta/releases/latest | \
|
||||
jq -r '.assets[] | select(.name|test(".*_amd64.deb")) | select(.name|test(".*musl.*")|not) | .browser_download_url')
|
||||
dpkg_name="/tmp/delta_amd64.deb"
|
||||
download "${dpkg_url}" "${dpkg_name}"
|
||||
sudo dpkg -i "${dpkg_name}"
|
||||
;;
|
||||
ropper)
|
||||
install_pkgs python3-z3
|
||||
pip3 install --user pyvex ropper
|
||||
;;
|
||||
kubeconform)
|
||||
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
|
||||
;;
|
||||
kubectx)
|
||||
git clone https://github.com/ahmetb/kubectx.git "${DESTDIR}"
|
||||
add_bin_symlink kubectx
|
||||
add_bin_symlink kubens
|
||||
COMPDIR="${HOME}/.zshrc.completions"
|
||||
mkdir -p "${COMPDIR}"
|
||||
ln -sf "${DESTDIR}/completion/_kubectx.zsh" "${COMPDIR}"
|
||||
ln -sf "${DESTDIR}/completion/_kubens.zsh" "${COMPDIR}"
|
||||
;;
|
||||
starship)
|
||||
mkdir -p ${DESTDIR}
|
||||
download \
|
||||
"https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-musl.tar.gz" \
|
||||
/tmp/starship.tar.gz
|
||||
tar -C ${DESTDIR} -zxf /tmp/starship.tar.gz starship
|
||||
add_bin_symlink starship
|
||||
;;
|
||||
arduino-cli)
|
||||
mkdir -p "${DESTDIR}"
|
||||
download \
|
||||
"https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz" \
|
||||
/tmp/arduino-cli.tar.gz
|
||||
tar -C "${DESTDIR}" -zxf /tmp/arduino-cli.tar.gz arduino-cli
|
||||
add_bin_symlink arduino-cli
|
||||
;;
|
||||
ghidra)
|
||||
zip_url=$(curl https://api.github.com/repos/NationalSecurityAgency/ghidra/releases/latest | \
|
||||
jq -r '.assets[] | select(.name|test(".*.zip")) | .browser_download_url')
|
||||
download "${zip_url}" /tmp/ghidra.zip
|
||||
unzip -d "${DESTDIR}" /tmp/ghidra.zip
|
||||
mv ${DESTDIR}/*/* ${DESTDIR}
|
||||
add_bin_symlink ghidraRun ghidra
|
||||
;;
|
||||
doctl)
|
||||
# TODO: other architectures
|
||||
tar_url=$(curl https://api.github.com/repos/digitalocean/doctl/releases/latest | \
|
||||
jq -r '.assets[] | select(.name|test(".*linux-amd64\\.tar\\.gz")) | .browser_download_url')
|
||||
download "${tar_url}" /tmp/doctl.tar.gz
|
||||
mkdir -p "${DESTDIR}"
|
||||
tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl"
|
||||
add_bin_symlink doctl
|
||||
;;
|
||||
rustup)
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
|
||||
sh -s -- --no-modify-path -y
|
||||
;;
|
||||
igrep)
|
||||
if ! command -v cargo >/dev/null 2>&1 ; then
|
||||
echo "This needs cargo (for rust)!" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
cargo install igrep
|
||||
;;
|
||||
unblob)
|
||||
require_pipx
|
||||
pipx install unblob
|
||||
;;
|
||||
fq)
|
||||
go install github.com/wader/fq@latest
|
||||
;;
|
||||
*)
|
||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||
echo "Options:" >/dev/stderr
|
||||
awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' "$0" | sort | while read -r opt; do
|
||||
echo -e "\\t${opt}" >/dev/stderr
|
||||
done
|
||||
list_tools
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
22
bin/nvidia_hold.sh
Executable file
22
bin/nvidia_hold.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
function list_nvidia_installed {
|
||||
dpkg-query -l '*nvidia*' | grep '^[hi]i' | awk '{print $2}'
|
||||
}
|
||||
|
||||
function hold_or_unhold {
|
||||
apt-mark "${1:-hold}" $(list_nvidia_installed)
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
hold|h)
|
||||
hold_or_unhold hold
|
||||
;;
|
||||
unhold|u)
|
||||
hold_or_unhold unhold
|
||||
;;
|
||||
*)
|
||||
echo "$0 <hold|unhold>" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
46
bin/pactl_helper
Executable file
46
bin/pactl_helper
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
function get_active_sink {
|
||||
pactl list short sinks | grep RUNNING | awk '{print $2}'
|
||||
}
|
||||
|
||||
function get_active_source {
|
||||
pactl list short sources | grep RUNNING | awk '{print $2}'
|
||||
}
|
||||
|
||||
function get_default_sink {
|
||||
pactl info | grep '^Default Sink:' | awk '{print $NF}'
|
||||
}
|
||||
|
||||
function get_default_source {
|
||||
pactl info | grep '^Default Source:' | awk '{print $NF}'
|
||||
}
|
||||
|
||||
function micmute {
|
||||
MODE=${1:-toggle}
|
||||
pactl set-source-mute $(get_default_source) ${MODE}
|
||||
}
|
||||
|
||||
function mute {
|
||||
MODE=${1:-toggle}
|
||||
pactl set-sink-mute $(get_default_sink) ${MODE}
|
||||
}
|
||||
|
||||
function volume {
|
||||
VOL="${1}"
|
||||
if test -z "${VOL}" ; then
|
||||
echo "Need volume spec!"
|
||||
exit 1
|
||||
fi
|
||||
pactl set-sink-volume $(get_default_sink) "${VOL}"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
mute|micmute|volume)
|
||||
$*
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
48
bin/qdisc_span.sh
Executable file
48
bin/qdisc_span.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ue
|
||||
|
||||
ACTION="add"
|
||||
|
||||
if [ "${1}" == "-d" ] ; then
|
||||
ACTION="del"
|
||||
shift
|
||||
fi
|
||||
|
||||
BRIDGE="${1}"
|
||||
DEST="${2}"
|
||||
|
||||
function setup_span {
|
||||
if tc qdisc show dev "${1}" | grep -q 'qdisc ingress ffff' ; then
|
||||
return 0
|
||||
fi
|
||||
tc qdisc add dev "${1}" ingress
|
||||
tc filter add dev "${1}" parent ffff: protocol all u32 match u8 0 0 action mirred egress mirror dev "${DEST}"
|
||||
}
|
||||
|
||||
function del_span {
|
||||
tc qdisc del dev "${1}" ingress
|
||||
}
|
||||
|
||||
function handle_iface {
|
||||
case "${ACTION}" in
|
||||
add)
|
||||
setup_span "${1}"
|
||||
;;
|
||||
del)
|
||||
del_span "${1}"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown action!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function get_bridge_ifaces {
|
||||
bridge link | grep "master ${1}" | cut -d: -f2 | cut -d@ -f1
|
||||
}
|
||||
|
||||
for iface in $(get_bridge_ifaces "${BRIDGE}") ; do
|
||||
handle_iface "$iface"
|
||||
done
|
||||
62
bin/screenshot.sh
Executable file
62
bin/screenshot.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Screenshot tool to try a few different tools
|
||||
|
||||
set -ue
|
||||
|
||||
TOOLS="flameshot scrot"
|
||||
SCREENDIR=${SCREENDIR:-${HOME}/Pictures/Screenshots}
|
||||
SCROT_FORMAT="%F-%T.png"
|
||||
|
||||
function default_screenshot_command {
|
||||
for tool in ${TOOLS} ; do
|
||||
if which "${tool}" >/dev/null 2>&1 ; then
|
||||
echo "${tool}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
||||
TOOL=${SHOT:-$(default_screenshot_command)}
|
||||
CMD=${1:-region}
|
||||
|
||||
function flameshot_gui_capture {
|
||||
flameshot gui -p "${SCREENDIR}"
|
||||
}
|
||||
|
||||
function flameshot_region_capture {
|
||||
flameshot_gui_capture
|
||||
}
|
||||
|
||||
function flameshot_window_capture {
|
||||
flameshot_gui_capture
|
||||
}
|
||||
|
||||
function flameshot_full_capture {
|
||||
flameshot full -p "${SCREENDIR}"
|
||||
}
|
||||
|
||||
function scrot_region_capture {
|
||||
scrot -s "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
function scrot_window_capture {
|
||||
scrot -u "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
function scrot_full_capture {
|
||||
scrot "${SCREENDIR}/${SCROT_FORMAT}"
|
||||
}
|
||||
|
||||
case "${CMD}" in
|
||||
region|window|full)
|
||||
mkdir -p "${SCREENDIR}"
|
||||
${TOOL}_${CMD}_capture
|
||||
exit $?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [region|window|full]" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
26
bin/setup/nerdfonts.sh
Executable file
26
bin/setup/nerdfonts.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ue
|
||||
|
||||
VER="v2.2.2"
|
||||
|
||||
FONTS=(
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/DejaVuSansMono.zip
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraCode.zip
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraMono.zip
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Hack.zip
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Inconsolata.zip
|
||||
https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/OpenDyslexic.zip
|
||||
)
|
||||
|
||||
FPATH=${HOME}/.fonts/nerdfonts
|
||||
mkdir -p ${FPATH}
|
||||
cd ${FPATH}
|
||||
|
||||
for f in ${FONTS[@]}; do
|
||||
BN=$(basename $f)
|
||||
wget -O ${FPATH}/${BN} ${f}
|
||||
unzip -o -d ${FPATH} ${FPATH}/${BN}
|
||||
done
|
||||
|
||||
fc-cache -v
|
||||
26
clone.sh
26
clone.sh
@@ -4,15 +4,21 @@ set -ue
|
||||
|
||||
# Script to clone and install
|
||||
|
||||
if ! command -v git >/dev/null 2>&1 ; then
|
||||
( if [ "$EUID" != 0 ] ; then
|
||||
sudo apt install -y git
|
||||
else
|
||||
apt install -y git
|
||||
fi ) || ( echo 'Failed to install git!' >/dev/stderr; false)
|
||||
fi
|
||||
# Wrapped in a function to prevent incomplete execution if download is
|
||||
# interrupted
|
||||
function installer_main {
|
||||
if ! command -v git >/dev/null 2>&1 ; then
|
||||
( if [ "$EUID" != 0 ] ; then
|
||||
sudo apt install -y git
|
||||
else
|
||||
apt install -y git
|
||||
fi ) || ( echo 'Failed to install git!' >/dev/stderr; false)
|
||||
fi
|
||||
|
||||
git clone https://github.com/Matir/skel.git ${HOME}/.skel
|
||||
git clone https://github.com/Matir/skel.git ${HOME}/.skel
|
||||
|
||||
${HOME}/.skel/install.sh
|
||||
${HOME}/.skel/install.sh packages minimal
|
||||
${HOME}/.skel/install.sh
|
||||
${HOME}/.skel/install.sh packages minimal
|
||||
}
|
||||
|
||||
installer_main
|
||||
|
||||
10
conf/logid.cfg
Normal file
10
conf/logid.cfg
Normal file
@@ -0,0 +1,10 @@
|
||||
devices: ({
|
||||
name: "Wireless Mouse MX Master 3";
|
||||
|
||||
smartshift: {
|
||||
on: true;
|
||||
threshold: 30;
|
||||
};
|
||||
|
||||
dpi: 1500;
|
||||
});
|
||||
1
dotfiles/Xkbmap
Normal file
1
dotfiles/Xkbmap
Normal file
@@ -0,0 +1 @@
|
||||
-option ctrl:nocaps -option compose:ralt
|
||||
@@ -40,4 +40,28 @@ alias drop_caches="echo 3 | sudo /usr/bin/tee /proc/sys/vm/drop_caches"
|
||||
alias gettemp='printf "%02.2f\n" "$(cat /sys/class/thermal/thermal_zone0/temp)e-3"'
|
||||
|
||||
# get git working directory
|
||||
alias gitroot="git rev-parse --git-toplevel"
|
||||
alias gitroot="git rev-parse --show-toplevel"
|
||||
|
||||
# SSH without host key checking
|
||||
alias sshanon="ssh -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no"
|
||||
|
||||
# Straight to ipython
|
||||
alias ipy="ipython3"
|
||||
|
||||
# Skip the header on bc
|
||||
alias bc="command bc -q"
|
||||
|
||||
# Get a decently readable df
|
||||
alias dfh="df -h -x tmpfs -x devtmpfs"
|
||||
|
||||
# Clear the GPG agent
|
||||
alias clear-gpg-agent="echo RELOADAGENT | gpg-connect-agent"
|
||||
|
||||
# Battery details
|
||||
alias bat-details='upower -i $(upower -e | grep battery)'
|
||||
|
||||
# Nvidia refresh rate
|
||||
alias nvidia-refresh-rate='nvidia-settings --display=:0 -q RefreshRate -t'
|
||||
|
||||
# Earthly ssh
|
||||
alias earthly='earthly --ssh-auth-sock ""'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Load env first
|
||||
if [ -f $HOME/.env ] ; then source $HOME/.env ; fi
|
||||
if [ -f $HOME/.shenv ] ; then source $HOME/.shenv ; fi
|
||||
|
||||
# History settings
|
||||
HISTCONTROL=ignoredups:ignorespace
|
||||
|
||||
34
dotfiles/config/fish/fish_variables
Normal file
34
dotfiles/config/fish/fish_variables
Normal file
@@ -0,0 +1,34 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR EDITOR:vim
|
||||
SETUVAR __fish_initialized:3400
|
||||
SETUVAR fish_color_autosuggestion:586e75
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:93a1a1
|
||||
SETUVAR fish_color_comment:586e75
|
||||
SETUVAR fish_color_cwd:green
|
||||
SETUVAR fish_color_cwd_root:red
|
||||
SETUVAR fish_color_end:268bd2
|
||||
SETUVAR fish_color_error:dc322f
|
||||
SETUVAR fish_color_escape:00a6b2
|
||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||
SETUVAR fish_color_host:normal
|
||||
SETUVAR fish_color_host_remote:yellow
|
||||
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||
SETUVAR fish_color_normal:normal
|
||||
SETUVAR fish_color_operator:00a6b2
|
||||
SETUVAR fish_color_param:839496
|
||||
SETUVAR fish_color_quote:657b83
|
||||
SETUVAR fish_color_redirection:6c71c4
|
||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
|
||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||
SETUVAR fish_color_status:red
|
||||
SETUVAR fish_color_user:brgreen
|
||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||
SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell\x0aType\x20\x60help\x60\x20for\x20instructions\x20on\x20how\x20to\x20use\x20fish
|
||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||
SETUVAR fish_pager_color_completion:B3A06D
|
||||
SETUVAR fish_pager_color_description:B3A06D
|
||||
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
|
||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||
11
dotfiles/config/gh/config.yml
Normal file
11
dotfiles/config/gh/config.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||
git_protocol: https
|
||||
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||
editor: !!null vim
|
||||
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||
prompt: enabled
|
||||
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
|
||||
pager: !!null less -R
|
||||
# Aliases allow you to create nicknames for gh commands
|
||||
aliases:
|
||||
co: pr checkout
|
||||
63
dotfiles/config/htop/htoprc
Normal file
63
dotfiles/config/htop/htoprc
Normal file
@@ -0,0 +1,63 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.2.2
|
||||
config_reader_min_version=3
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
hide_running_in_container=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_deleted_exe=1
|
||||
shadow_distribution_path_prefix=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=0
|
||||
header_margin=1
|
||||
screen_tabs=0
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_one=1
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=6
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
hide_function_bar=0
|
||||
header_layout=two_50_50
|
||||
column_meters_0=AllCPUs Memory Swap
|
||||
column_meter_modes_0=1 1 1
|
||||
column_meters_1=Tasks LoadAverage Uptime
|
||||
column_meter_modes_1=2 2 2
|
||||
tree_view=0
|
||||
sort_key=46
|
||||
tree_sort_key=0
|
||||
sort_direction=-1
|
||||
tree_sort_direction=1
|
||||
tree_view_always_by_pid=0
|
||||
all_branches_collapsed=0
|
||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||
.sort_key=PERCENT_CPU
|
||||
.tree_sort_key=PID
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
||||
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
|
||||
.sort_key=IO_RATE
|
||||
.tree_sort_key=PID
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
||||
@@ -87,6 +87,10 @@ bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# do some scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
# Move workspaces between monitors
|
||||
bindsym $mod+Shift+greater move workspace to output right
|
||||
bindsym $mod+Shift+less move workspace to output left
|
||||
@@ -135,6 +139,8 @@ bindsym $mod+l exec \
|
||||
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
|
||||
bindsym $alt+Control+l exec \
|
||||
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
|
||||
# suspend under systemd
|
||||
bindsym $mod+Control+s exec --no-startup-id systemctl suspend
|
||||
|
||||
# things to start quickly
|
||||
bindsym $mod+g exec /usr/bin/google-chrome-beta --password-store=gnome
|
||||
@@ -146,39 +152,33 @@ bindsym --whole-window $mod+button3 floating toggle
|
||||
|
||||
# media keys
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/bin/pactl_helper volume +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/bin/pactl_helper volume -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/bin/pactl_helper mute toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id ~/bin/pactl_helper micmute toggle
|
||||
bindsym F13 exec --no-startup-id ~/bin/pactl_helper micmute toggle
|
||||
# Screen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
|
||||
|
||||
# screenshots
|
||||
set $scrotformat %F-%T.png
|
||||
set $screendir ~/Pictures/Screenshots
|
||||
# whole screen
|
||||
# region/selection
|
||||
bindsym --release Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot $screendir/$scrotformat
|
||||
# current window
|
||||
~/bin/screenshot.sh region
|
||||
# full screen
|
||||
bindsym --release Shift+Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot -u $screendir/$scrotformat
|
||||
# selection
|
||||
~/bin/screenshot.sh full
|
||||
# single window
|
||||
bindsym --release $alt+Sys_Req exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot -s $screendir/$scrotformat
|
||||
~/bin/screenshot.sh window
|
||||
|
||||
# useful utilities
|
||||
#exec --no-startup-id \
|
||||
# (which xss-lock >/dev/null || /usr/bin/cinnamon-settings-daemon) &
|
||||
exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets
|
||||
# Make GTK fonts look great again
|
||||
#exec --no-startup-id gnome-settings-daemon
|
||||
#exec --no-startup-id (sleep 2; nm-applet) &
|
||||
exec --no-startup-id xset r rate 200 20
|
||||
#exec --no-startup-id ~/bin/autostart.py
|
||||
exec --no-startup-id dex --autostart --environment x-cinnamon
|
||||
# Solaar for mouse
|
||||
exec --no-startup-id sh -c 'command solaar -w hide || true'
|
||||
|
||||
# customize windows
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
|
||||
4
dotfiles/config/nvim/init.vim
Normal file
4
dotfiles/config/nvim/init.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
" nvim config
|
||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||
let &packpath = &runtimepath
|
||||
source ~/.vimrc
|
||||
19
dotfiles/config/starship.toml
Normal file
19
dotfiles/config/starship.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
[directory]
|
||||
fish_style_pwd_dir_length = 1
|
||||
|
||||
[gcloud]
|
||||
# This is just too noisy
|
||||
disabled = true
|
||||
symbol = "️🇬️ "
|
||||
|
||||
[status]
|
||||
disabled = false
|
||||
symbol = "⛌"
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
|
||||
[ruby]
|
||||
detect_variables = []
|
||||
@@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<channel name="xfce4-keyboard-shortcuts" version="1.0">
|
||||
<property name="commands" type="empty">
|
||||
<property name="default" type="empty">
|
||||
<property name="<Alt>F1" type="empty"/>
|
||||
<property name="<Alt>F2" type="empty">
|
||||
<property name="startup-notify" type="empty"/>
|
||||
</property>
|
||||
<property name="<Alt>F3" type="empty">
|
||||
<property name="startup-notify" type="empty"/>
|
||||
</property>
|
||||
<property name="<Primary><Alt>Delete" type="empty"/>
|
||||
<property name="<Primary><Alt>l" type="empty"/>
|
||||
<property name="<Primary><Alt>t" type="empty"/>
|
||||
<property name="XF86Display" type="empty"/>
|
||||
<property name="<Super>p" type="empty"/>
|
||||
<property name="<Primary>Escape" type="empty"/>
|
||||
<property name="XF86WWW" type="empty"/>
|
||||
<property name="HomePage" type="empty"/>
|
||||
<property name="XF86Mail" type="empty"/>
|
||||
<property name="Print" type="empty"/>
|
||||
<property name="<Alt>Print" type="empty"/>
|
||||
<property name="<Shift>Print" type="empty"/>
|
||||
<property name="<Super>e" type="empty"/>
|
||||
<property name="<Primary><Alt>f" type="empty"/>
|
||||
<property name="<Primary><Alt>Escape" type="empty"/>
|
||||
<property name="<Primary><Shift>Escape" type="empty"/>
|
||||
<property name="<Super>r" type="empty">
|
||||
<property name="startup-notify" type="empty"/>
|
||||
</property>
|
||||
<property name="<Alt><Super>s" type="empty"/>
|
||||
</property>
|
||||
<property name="custom" type="empty">
|
||||
<property name="<Alt>F2" type="string" value="xfce4-appfinder --collapsed">
|
||||
<property name="startup-notify" type="bool" value="true"/>
|
||||
</property>
|
||||
<property name="<Super>r" type="string" value="xfce4-appfinder -c">
|
||||
<property name="startup-notify" type="bool" value="true"/>
|
||||
</property>
|
||||
<property name="XF86WWW" type="string" value="exo-open --launch WebBrowser"/>
|
||||
<property name="XF86Mail" type="string" value="exo-open --launch MailReader"/>
|
||||
<property name="<Alt>F3" type="string" value="xfce4-appfinder">
|
||||
<property name="startup-notify" type="bool" value="true"/>
|
||||
</property>
|
||||
<property name="<Primary>Escape" type="string" value="xfdesktop --menu"/>
|
||||
<property name="<Primary><Alt>Delete" type="string" value="xfce4-session-logout"/>
|
||||
<property name="<Primary><Alt>t" type="string" value="exo-open --launch TerminalEmulator"/>
|
||||
<property name="<Primary><Alt>f" type="string" value="thunar"/>
|
||||
<property name="<Primary><Alt>l" type="string" value="xflock4"/>
|
||||
<property name="<Alt>F1" type="string" value="xfce4-popup-applicationsmenu"/>
|
||||
<property name="<Super>p" type="string" value="xfce4-display-settings --minimal"/>
|
||||
<property name="<Primary><Shift>Escape" type="string" value="xfce4-taskmanager"/>
|
||||
<property name="<Super>e" type="string" value="thunar"/>
|
||||
<property name="<Primary><Alt>Escape" type="string" value="xkill"/>
|
||||
<property name="HomePage" type="string" value="exo-open --launch WebBrowser"/>
|
||||
<property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
|
||||
<property name="override" type="bool" value="true"/>
|
||||
<property name="<Super>l" type="string" value="xflock4"/>
|
||||
<property name="Print" type="string" value="flameshot gui"/>
|
||||
<property name="<Shift>Print" type="string" value="flameshot full"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="xfwm4" type="empty">
|
||||
<property name="default" type="empty">
|
||||
<property name="<Alt>Insert" type="empty"/>
|
||||
<property name="Escape" type="empty"/>
|
||||
<property name="Left" type="empty"/>
|
||||
<property name="Right" type="empty"/>
|
||||
<property name="Up" type="empty"/>
|
||||
<property name="Down" type="empty"/>
|
||||
<property name="<Alt>Tab" type="empty"/>
|
||||
<property name="<Alt><Shift>Tab" type="empty"/>
|
||||
<property name="<Alt>Delete" type="empty"/>
|
||||
<property name="<Primary><Alt>Down" type="empty"/>
|
||||
<property name="<Primary><Alt>Left" type="empty"/>
|
||||
<property name="<Shift><Alt>Page_Down" type="empty"/>
|
||||
<property name="<Alt>F4" type="empty"/>
|
||||
<property name="<Alt>F6" type="empty"/>
|
||||
<property name="<Alt>F7" type="empty"/>
|
||||
<property name="<Alt>F8" type="empty"/>
|
||||
<property name="<Alt>F9" type="empty"/>
|
||||
<property name="<Alt>F10" type="empty"/>
|
||||
<property name="<Alt>F11" type="empty"/>
|
||||
<property name="<Alt>F12" type="empty"/>
|
||||
<property name="<Primary><Shift><Alt>Left" type="empty"/>
|
||||
<property name="<Primary><Alt>End" type="empty"/>
|
||||
<property name="<Primary><Alt>Home" type="empty"/>
|
||||
<property name="<Primary><Shift><Alt>Right" type="empty"/>
|
||||
<property name="<Primary><Shift><Alt>Up" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_1" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_2" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_3" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_4" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_5" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_6" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_7" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_8" type="empty"/>
|
||||
<property name="<Primary><Alt>KP_9" type="empty"/>
|
||||
<property name="<Alt>space" type="empty"/>
|
||||
<property name="<Shift><Alt>Page_Up" type="empty"/>
|
||||
<property name="<Primary><Alt>Right" type="empty"/>
|
||||
<property name="<Primary><Alt>d" type="empty"/>
|
||||
<property name="<Primary><Alt>Up" type="empty"/>
|
||||
<property name="<Super>Tab" type="empty"/>
|
||||
<property name="<Primary>F1" type="empty"/>
|
||||
<property name="<Primary>F2" type="empty"/>
|
||||
<property name="<Primary>F3" type="empty"/>
|
||||
<property name="<Primary>F4" type="empty"/>
|
||||
<property name="<Primary>F5" type="empty"/>
|
||||
<property name="<Primary>F6" type="empty"/>
|
||||
<property name="<Primary>F7" type="empty"/>
|
||||
<property name="<Primary>F8" type="empty"/>
|
||||
<property name="<Primary>F9" type="empty"/>
|
||||
<property name="<Primary>F10" type="empty"/>
|
||||
<property name="<Primary>F11" type="empty"/>
|
||||
<property name="<Primary>F12" type="empty"/>
|
||||
<property name="<Super>KP_Left" type="empty"/>
|
||||
<property name="<Super>KP_Right" type="empty"/>
|
||||
<property name="<Super>KP_Down" type="empty"/>
|
||||
<property name="<Super>KP_Up" type="empty"/>
|
||||
<property name="<Super>KP_Page_Up" type="empty"/>
|
||||
<property name="<Super>KP_Home" type="empty"/>
|
||||
<property name="<Super>KP_End" type="empty"/>
|
||||
<property name="<Super>KP_Next" type="empty"/>
|
||||
</property>
|
||||
<property name="custom" type="empty">
|
||||
<property name="<Primary>F12" type="string" value="workspace_12_key"/>
|
||||
<property name="<Alt>F4" type="string" value="close_window_key"/>
|
||||
<property name="<Primary><Alt>KP_3" type="string" value="move_window_workspace_3_key"/>
|
||||
<property name="<Primary><Alt>Down" type="string" value="down_workspace_key"/>
|
||||
<property name="<Primary><Alt>KP_9" type="string" value="move_window_workspace_9_key"/>
|
||||
<property name="<Primary><Alt>End" type="string" value="move_window_next_workspace_key"/>
|
||||
<property name="<Primary><Shift><Alt>Left" type="string" value="move_window_left_key"/>
|
||||
<property name="<Primary><Alt>KP_4" type="string" value="move_window_workspace_4_key"/>
|
||||
<property name="Right" type="string" value="right_key"/>
|
||||
<property name="Down" type="string" value="down_key"/>
|
||||
<property name="<Shift><Alt>Page_Down" type="string" value="lower_window_key"/>
|
||||
<property name="<Alt>Tab" type="string" value="cycle_windows_key"/>
|
||||
<property name="<Primary><Shift><Alt>Right" type="string" value="move_window_right_key"/>
|
||||
<property name="<Primary><Alt>Right" type="string" value="right_workspace_key"/>
|
||||
<property name="<Alt>F6" type="string" value="stick_window_key"/>
|
||||
<property name="<Primary><Alt>KP_5" type="string" value="move_window_workspace_5_key"/>
|
||||
<property name="<Primary>F11" type="string" value="workspace_11_key"/>
|
||||
<property name="<Alt>F10" type="string" value="maximize_window_key"/>
|
||||
<property name="<Alt>Delete" type="string" value="del_workspace_key"/>
|
||||
<property name="<Super>Tab" type="string" value="switch_window_key"/>
|
||||
<property name="<Primary><Alt>d" type="string" value="show_desktop_key"/>
|
||||
<property name="<Super>KP_Page_Up" type="string" value="tile_up_right_key"/>
|
||||
<property name="<Alt>F7" type="string" value="move_window_key"/>
|
||||
<property name="Up" type="string" value="up_key"/>
|
||||
<property name="<Primary><Alt>KP_6" type="string" value="move_window_workspace_6_key"/>
|
||||
<property name="<Alt>F11" type="string" value="fullscreen_key"/>
|
||||
<property name="<Alt>space" type="string" value="popup_menu_key"/>
|
||||
<property name="<Super>KP_Home" type="string" value="tile_up_left_key"/>
|
||||
<property name="Escape" type="string" value="cancel_key"/>
|
||||
<property name="<Primary><Alt>KP_1" type="string" value="move_window_workspace_1_key"/>
|
||||
<property name="<Shift><Alt>Page_Up" type="string" value="raise_window_key"/>
|
||||
<property name="<Primary><Alt>Home" type="string" value="move_window_prev_workspace_key"/>
|
||||
<property name="<Alt><Shift>Tab" type="string" value="cycle_reverse_windows_key"/>
|
||||
<property name="<Primary><Alt>Left" type="string" value="left_workspace_key"/>
|
||||
<property name="<Alt>F12" type="string" value="above_key"/>
|
||||
<property name="<Primary><Shift><Alt>Up" type="string" value="move_window_up_key"/>
|
||||
<property name="<Alt>F8" type="string" value="resize_window_key"/>
|
||||
<property name="<Primary><Alt>KP_7" type="string" value="move_window_workspace_7_key"/>
|
||||
<property name="<Primary><Alt>KP_2" type="string" value="move_window_workspace_2_key"/>
|
||||
<property name="<Super>KP_End" type="string" value="tile_down_left_key"/>
|
||||
<property name="<Primary><Alt>Up" type="string" value="up_workspace_key"/>
|
||||
<property name="<Alt>F9" type="string" value="hide_window_key"/>
|
||||
<property name="Left" type="string" value="left_key"/>
|
||||
<property name="<Primary><Alt>KP_8" type="string" value="move_window_workspace_8_key"/>
|
||||
<property name="<Alt>Insert" type="string" value="add_workspace_key"/>
|
||||
<property name="override" type="bool" value="true"/>
|
||||
<property name="<Super>1" type="string" value="workspace_1_key"/>
|
||||
<property name="<Super>2" type="string" value="workspace_2_key"/>
|
||||
<property name="<Super>3" type="string" value="workspace_3_key"/>
|
||||
<property name="<Super>4" type="string" value="workspace_4_key"/>
|
||||
<property name="<Super>5" type="string" value="workspace_5_key"/>
|
||||
<property name="<Super>6" type="string" value="workspace_6_key"/>
|
||||
<property name="<Super>7" type="string" value="workspace_7_key"/>
|
||||
<property name="<Super>8" type="string" value="workspace_8_key"/>
|
||||
<property name="<Super>9" type="string" value="workspace_9_key"/>
|
||||
<property name="<Super>0" type="string" value="workspace_10_key"/>
|
||||
<property name="<Super>Left" type="string" value="tile_left_key"/>
|
||||
<property name="<Super>Right" type="string" value="tile_right_key"/>
|
||||
<property name="<Super>Up" type="string" value="tile_down_key"/>
|
||||
<property name="<Super>Down" type="string" value="tile_up_key"/>
|
||||
<property name="<Super>Page_Down" type="string" value="tile_down_right_key"/>
|
||||
</property>
|
||||
</property>
|
||||
<property name="providers" type="array">
|
||||
<value type="string" value="xfwm4"/>
|
||||
<value type="string" value="commands"/>
|
||||
</property>
|
||||
</channel>
|
||||
93
dotfiles/config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
Normal file
93
dotfiles/config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<channel name="xfwm4" version="1.0">
|
||||
<property name="general" type="empty">
|
||||
<property name="activate_action" type="string" value="switch"/>
|
||||
<property name="borderless_maximize" type="bool" value="true"/>
|
||||
<property name="box_move" type="bool" value="false"/>
|
||||
<property name="box_resize" type="bool" value="false"/>
|
||||
<property name="button_layout" type="string" value="O|SHMC"/>
|
||||
<property name="button_offset" type="int" value="0"/>
|
||||
<property name="button_spacing" type="int" value="0"/>
|
||||
<property name="click_to_focus" type="bool" value="false"/>
|
||||
<property name="cycle_apps_only" type="bool" value="false"/>
|
||||
<property name="cycle_draw_frame" type="bool" value="true"/>
|
||||
<property name="cycle_raise" type="bool" value="false"/>
|
||||
<property name="cycle_hidden" type="bool" value="true"/>
|
||||
<property name="cycle_minimum" type="bool" value="true"/>
|
||||
<property name="cycle_minimized" type="bool" value="false"/>
|
||||
<property name="cycle_preview" type="bool" value="true"/>
|
||||
<property name="cycle_tabwin_mode" type="int" value="0"/>
|
||||
<property name="cycle_workspaces" type="bool" value="false"/>
|
||||
<property name="double_click_action" type="string" value="maximize"/>
|
||||
<property name="double_click_distance" type="int" value="5"/>
|
||||
<property name="double_click_time" type="int" value="250"/>
|
||||
<property name="easy_click" type="string" value="Alt"/>
|
||||
<property name="focus_delay" type="int" value="316"/>
|
||||
<property name="focus_hint" type="bool" value="true"/>
|
||||
<property name="focus_new" type="bool" value="true"/>
|
||||
<property name="frame_opacity" type="int" value="100"/>
|
||||
<property name="frame_border_top" type="int" value="0"/>
|
||||
<property name="full_width_title" type="bool" value="true"/>
|
||||
<property name="horiz_scroll_opacity" type="bool" value="false"/>
|
||||
<property name="inactive_opacity" type="int" value="100"/>
|
||||
<property name="maximized_offset" type="int" value="0"/>
|
||||
<property name="mousewheel_rollup" type="bool" value="true"/>
|
||||
<property name="move_opacity" type="int" value="100"/>
|
||||
<property name="placement_mode" type="string" value="center"/>
|
||||
<property name="placement_ratio" type="int" value="20"/>
|
||||
<property name="popup_opacity" type="int" value="100"/>
|
||||
<property name="prevent_focus_stealing" type="bool" value="false"/>
|
||||
<property name="raise_delay" type="int" value="250"/>
|
||||
<property name="raise_on_click" type="bool" value="true"/>
|
||||
<property name="raise_on_focus" type="bool" value="false"/>
|
||||
<property name="raise_with_any_button" type="bool" value="true"/>
|
||||
<property name="repeat_urgent_blink" type="bool" value="false"/>
|
||||
<property name="resize_opacity" type="int" value="100"/>
|
||||
<property name="scroll_workspaces" type="bool" value="true"/>
|
||||
<property name="shadow_delta_height" type="int" value="0"/>
|
||||
<property name="shadow_delta_width" type="int" value="0"/>
|
||||
<property name="shadow_delta_x" type="int" value="0"/>
|
||||
<property name="shadow_delta_y" type="int" value="-3"/>
|
||||
<property name="shadow_opacity" type="int" value="50"/>
|
||||
<property name="show_app_icon" type="bool" value="false"/>
|
||||
<property name="show_dock_shadow" type="bool" value="true"/>
|
||||
<property name="show_frame_shadow" type="bool" value="true"/>
|
||||
<property name="show_popup_shadow" type="bool" value="false"/>
|
||||
<property name="snap_resist" type="bool" value="false"/>
|
||||
<property name="snap_to_border" type="bool" value="true"/>
|
||||
<property name="snap_to_windows" type="bool" value="false"/>
|
||||
<property name="snap_width" type="int" value="10"/>
|
||||
<property name="vblank_mode" type="string" value="auto"/>
|
||||
<property name="theme" type="string" value="Default"/>
|
||||
<property name="tile_on_move" type="bool" value="true"/>
|
||||
<property name="title_alignment" type="string" value="center"/>
|
||||
<property name="title_font" type="string" value="Sans Bold 9"/>
|
||||
<property name="title_horizontal_offset" type="int" value="0"/>
|
||||
<property name="titleless_maximize" type="bool" value="false"/>
|
||||
<property name="title_shadow_active" type="string" value="false"/>
|
||||
<property name="title_shadow_inactive" type="string" value="false"/>
|
||||
<property name="title_vertical_offset_active" type="int" value="0"/>
|
||||
<property name="title_vertical_offset_inactive" type="int" value="0"/>
|
||||
<property name="toggle_workspaces" type="bool" value="false"/>
|
||||
<property name="unredirect_overlays" type="bool" value="true"/>
|
||||
<property name="urgent_blink" type="bool" value="false"/>
|
||||
<property name="use_compositing" type="bool" value="true"/>
|
||||
<property name="workspace_count" type="int" value="6"/>
|
||||
<property name="wrap_cycle" type="bool" value="true"/>
|
||||
<property name="wrap_layout" type="bool" value="true"/>
|
||||
<property name="wrap_resistance" type="int" value="10"/>
|
||||
<property name="wrap_windows" type="bool" value="false"/>
|
||||
<property name="wrap_workspaces" type="bool" value="false"/>
|
||||
<property name="zoom_desktop" type="bool" value="true"/>
|
||||
<property name="zoom_pointer" type="bool" value="true"/>
|
||||
<property name="workspace_names" type="array">
|
||||
<value type="string" value="Workspace 1"/>
|
||||
<value type="string" value="Workspace 2"/>
|
||||
<value type="string" value="Workspace 3"/>
|
||||
<value type="string" value="Workspace 4"/>
|
||||
<value type="string" value="Workspace 5"/>
|
||||
<value type="string" value="Workspace 6"/>
|
||||
</property>
|
||||
</property>
|
||||
</channel>
|
||||
@@ -6,6 +6,7 @@
|
||||
excludesfile = ~/.gitignore
|
||||
editor = vim
|
||||
whitespace = trailing-space,space-before-tab
|
||||
pager = command -v delta >/dev/null 2>&1 && delta || less -eFiJM~ -j3
|
||||
|
||||
[color]
|
||||
diff = auto
|
||||
@@ -13,6 +14,7 @@
|
||||
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
colorMoved = default
|
||||
|
||||
[difftool]
|
||||
prompt = false
|
||||
@@ -41,7 +43,7 @@
|
||||
user = matir
|
||||
|
||||
# Site specific config
|
||||
[url "https://github.com./"]
|
||||
[url "https://github.com/"]
|
||||
insteadOf = "github:"
|
||||
insteadOf = "github://"
|
||||
|
||||
@@ -58,12 +60,29 @@
|
||||
|
||||
[credential]
|
||||
helper = cache --timeout=36000
|
||||
|
||||
[receive]
|
||||
denyCurrentBranch = updateInstead
|
||||
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = diff3
|
||||
|
||||
[mergetool]
|
||||
prompt = false
|
||||
|
||||
[include]
|
||||
path = ~/.gitconfig.local
|
||||
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[interactive]
|
||||
diffFilter = command -v delta >/dev/null 2>&1 && delta || cat
|
||||
|
||||
[delta]
|
||||
navigate = true
|
||||
line-numbers = true
|
||||
|
||||
@@ -17,6 +17,13 @@ Thumbs.db
|
||||
# Try to avoid accidentally checking in private keys
|
||||
id_rsa
|
||||
id_ecdsa
|
||||
id_ed25519
|
||||
|
||||
# Kicad backup files
|
||||
*.kicad_pcb-bak
|
||||
|
||||
# Mypy cache path
|
||||
.mypy_cache
|
||||
|
||||
# These files should basically never be committed
|
||||
.env
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use-agent
|
||||
# HKPS requires gnupg-curl for gpg1
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkps://keyserver.ubuntu.com
|
||||
keyserver-options auto-key-retrieve no-honor-keyserver-url
|
||||
auto-key-locate keyserver
|
||||
personal-digest-preferences SHA256
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Should only use POSIX constructs.
|
||||
|
||||
# Always load ENV
|
||||
test -f "$HOME/.env" && . "$HOME/.env"
|
||||
test -f "$HOME/.shenv" && . "$HOME/.shenv"
|
||||
|
||||
# Setup GREP_COLORS
|
||||
export GREP_COLOR='01;31'
|
||||
@@ -26,4 +26,17 @@ if [ "$(uname)" = "Darwin" ] ; then
|
||||
export CLICOLOR
|
||||
fi
|
||||
|
||||
# Setup for libvirt
|
||||
if [ -z "${LIBVIRT_DEFAULT_URI}" ] ; then
|
||||
if [ "$(id -u)" = "0" ] || (id -g -n | grep -q "\blibvirt\b") ; then
|
||||
LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||
export LIBVIRT_DEFAULT_URI
|
||||
fi
|
||||
fi
|
||||
|
||||
# Got rust? (gvim, etc.)
|
||||
if test -d "${HOME}/.cargo/bin" ; then
|
||||
PATH="${PATH}:${HOME}/.cargo/bin"
|
||||
fi
|
||||
|
||||
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
|
||||
|
||||
@@ -1,13 +1,45 @@
|
||||
tmp
|
||||
Downloads
|
||||
.AndroidStudio*
|
||||
.Genymobile
|
||||
.Ticket to Ride*
|
||||
.android*
|
||||
.ansible
|
||||
.arduino*
|
||||
.aws
|
||||
.bundle
|
||||
.cache
|
||||
.local/share/Trash
|
||||
.wine
|
||||
.thumbnails
|
||||
.cargo
|
||||
.config/discord
|
||||
.config/gcloud/logs
|
||||
.config/google-chrome
|
||||
.config/google-chrome-beta
|
||||
.config/unity3d/cache
|
||||
.dropbox-dist
|
||||
.gnupg.bak
|
||||
.gradle
|
||||
.histfile
|
||||
.kube/cache
|
||||
.local/lib
|
||||
.local/share/Steam
|
||||
.local/share/Trash
|
||||
.m2
|
||||
.minikube
|
||||
.npm
|
||||
.p2
|
||||
.platformio
|
||||
.rustup
|
||||
.rvm*
|
||||
.sliver
|
||||
.sqlite_history
|
||||
.thumbnails
|
||||
.virtualenvs
|
||||
.wine
|
||||
.xsession-errors*
|
||||
.zcompdump
|
||||
.zcompdump*
|
||||
.sqlite_history
|
||||
VirtualBox VMs
|
||||
Audits
|
||||
Downloads
|
||||
SpiderOak Hive
|
||||
Unity
|
||||
VirtualBox VMs
|
||||
tmp
|
||||
tools
|
||||
|
||||
@@ -5,8 +5,8 @@ umask 027
|
||||
|
||||
# Paths and preferences
|
||||
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
||||
export GOPATH="$HOME/Projects/Go:/usr/share/gocode"
|
||||
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH:$GOPATH/bin"
|
||||
export GOPATH="$HOME/go:$HOME/Projects/Go:/usr/share/gocode"
|
||||
export PATH="$HOME/bin:$HOME/bin/tools:/sbin:/usr/sbin:$PATH:$HOME/go/bin"
|
||||
export VISUAL=vim
|
||||
export EDITOR=vim
|
||||
export DEBEMAIL="david@systemoverlord.com"
|
||||
@@ -34,20 +34,20 @@ if [ -z "${BROWSER}" ] ; then
|
||||
for t in google-chrome-beta google-chrome firefox ; do
|
||||
if BROWSER=$(command -v ${t}); then
|
||||
export BROWSER
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# For virtualenvwrapper
|
||||
export WORKON_HOME=$HOME/.virtualenvs
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
|
||||
|
||||
# GPG full key id
|
||||
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
|
||||
|
||||
# Setup locale
|
||||
if test -x /usr/bin/locale ; then
|
||||
for l in en_US.utf8 C.UTF-8 C ; do
|
||||
for l in en_US.utf8 en_US.UTF-8 C.UTF-8 C.utf8 C ; do
|
||||
if /usr/bin/locale -a | grep -q "${l}" ; then
|
||||
export LC_CTYPE=${l}
|
||||
export LC_NUMERIC=${l}
|
||||
@@ -78,5 +78,14 @@ else
|
||||
fi
|
||||
export LC_COLLATE=C
|
||||
|
||||
# Opt out of .net telemetry
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
# Suppress lvm warnings
|
||||
export LVM_SUPPRESS_FD_WARNINGS=1
|
||||
|
||||
# Default disable SSH forwarding in EARTHLY
|
||||
export EARTHLY_SSH_AUTH_SOCK=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
test -e "$HOME/.localenv" && . "$HOME/.localenv"
|
||||
@@ -4,6 +4,9 @@ Protocol 2
|
||||
# Permit Local Overrides
|
||||
Include ~/.ssh/config.d/*
|
||||
|
||||
# SSH known host hashing doesn't buy much with shell history, etc.
|
||||
HashKnownHosts no
|
||||
|
||||
# Enable canonicalization, unless overridden
|
||||
CanonicalizeHostname yes
|
||||
CanonicalizeFallbackLocal yes
|
||||
@@ -14,6 +17,10 @@ CanonicalizeMaxDots 0
|
||||
Host *.*
|
||||
CheckHostIP yes
|
||||
|
||||
Host *.cloudshell.dev
|
||||
# Cloudshell hostnames are too long for unix sockets
|
||||
ControlMaster no
|
||||
|
||||
Match canonical all
|
||||
CheckHostIP no
|
||||
ControlMaster auto
|
||||
@@ -22,7 +29,8 @@ Match canonical all
|
||||
ForwardAgent no
|
||||
ForwardX11 no
|
||||
ForwardX11Trusted no
|
||||
ServerAliveInterval 120
|
||||
ServerAliveInterval 30
|
||||
ServerAliveCountMax 3
|
||||
UpdateHostKeys yes
|
||||
User david
|
||||
VerifyHostKeyDNS yes
|
||||
|
||||
7
dotfiles/ssh/config.d/hak5_config
Normal file
7
dotfiles/ssh/config.d/hak5_config
Normal file
@@ -0,0 +1,7 @@
|
||||
Host hak5squirrel
|
||||
Hostname 172.16.32.1
|
||||
User root
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile /dev/null
|
||||
HostKeyAlgorithms +ssh-rsa
|
||||
PubkeyAcceptedAlgorithms +ssh-rsa
|
||||
@@ -1,7 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
REMOTE_LINK="${HOME}/.ssh/remote_agent.sock"
|
||||
# Roughly based on this article:
|
||||
# https://werat.github.io/2017/02/04/tmux-ssh-agent-forwarding.html
|
||||
|
||||
if test \! -L "${REMOTE_LINK}" -a -n "${SSH_AUTH_SOCK}" ; then
|
||||
REMOTE_LINK="${HOME}/.ssh/ssh_auth_sock"
|
||||
|
||||
if [ "${1:-}" = "force" ] && [ -S "${SSH_AUTH_SOCK}" ] ; then
|
||||
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test \! -S "${REMOTE_LINK}" -a -S "${SSH_AUTH_SOCK}" ; then
|
||||
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
|
||||
fi
|
||||
|
||||
# Handle X forwarding, per sshd(8)
|
||||
if read proto cookie && [ -n "$DISPLAY" ]; then
|
||||
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
|
||||
# X11UseLocalhost=yes
|
||||
echo add unix:`echo $DISPLAY |
|
||||
cut -c11-` $proto $cookie
|
||||
else
|
||||
# X11UseLocalhost=no
|
||||
echo add $DISPLAY $proto $cookie
|
||||
fi | xauth -q -
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Update environment on reconnect
|
||||
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||
|
||||
# Use symlink socket
|
||||
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
|
||||
|
||||
# Custom binds
|
||||
bind K confirm kill-server
|
||||
bind X confirm kill-window
|
||||
@@ -66,3 +69,10 @@ bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer"
|
||||
|
||||
# Enable logging module, if available
|
||||
run-shell "~/.tmux/tmux-logging/logging.tmux || true"
|
||||
|
||||
# Enable TMUX Plugin Manager
|
||||
# install with:
|
||||
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
run-shell "~/.tmux/plugins/tpm/tpm || true"
|
||||
|
||||
Submodule dotfiles/tmux/tmux-logging updated: b085ad423b...4717cbd4c8
Submodule dotfiles/vim/pack/matir/opt/solarized8 updated: 9afbe12f68...7b6399093c
Submodule dotfiles/vim/pack/matir/start/ctrlp deleted from 2e773fd8c7
Submodule dotfiles/vim/pack/matir/start/editorconfig updated: c718cefc51...8f6eba5fd6
Submodule dotfiles/vim/pack/matir/start/fugitive updated: 35f1095f9b...2a53d79248
Submodule dotfiles/vim/pack/matir/start/surround updated: fab8621670...f51a26d371
Submodule dotfiles/vim/pack/matir/start/syntastic deleted from 0336c35c0b
Submodule dotfiles/vim/pack/matir/start/vim-go deleted from 13128e5f30
@@ -23,12 +23,33 @@ set expandtab
|
||||
set shiftround
|
||||
set backspace=indent,eol,start
|
||||
" Shift-tab to go backwards in insert mode
|
||||
imap <S-Tab> <Esc><<A
|
||||
" Does not work with YCM
|
||||
inoremap <S-Tab> <C-d>
|
||||
|
||||
" Line numbering, ruler
|
||||
set number
|
||||
set ruler
|
||||
|
||||
" Setup viminfo for recording positions, etc.
|
||||
if !has('nvim')
|
||||
set viminfo='10,\"100,:20,%,n~/.viminfo
|
||||
endif
|
||||
" Jump back when editing a file
|
||||
function! ResCur()
|
||||
" Don't jump in git commits since they're generated.
|
||||
if &ft == 'gitcommit'
|
||||
return
|
||||
endif
|
||||
if line("'\"") <= line("$")
|
||||
normal! g`"
|
||||
return
|
||||
endif
|
||||
endfunction
|
||||
augroup resCur
|
||||
autocmd!
|
||||
autocmd BufWinEnter * call ResCur()
|
||||
augroup END
|
||||
|
||||
" File options
|
||||
set encoding=utf-8
|
||||
" Syntax highlighting, look and feel
|
||||
@@ -72,7 +93,6 @@ imap <silent> <F4> <ESC>:set invpaste<CR>:set paste?<CR>
|
||||
" Mediocre Hex editing in vim
|
||||
" Source: http://vim.wikia.com/wiki/Improved_hex_editing
|
||||
" TODO: move to an include
|
||||
nnoremap <C-H> :Hexmode<CR>
|
||||
command -bar Hexmode call ToggleHex()
|
||||
function ToggleHex()
|
||||
" hex mode should be considered a read-only operation
|
||||
@@ -114,17 +134,60 @@ endfunction
|
||||
" Options for syntastic
|
||||
let g:syntastic_enable_signs = 1
|
||||
let g:syntastic_auto_loc_list = 2
|
||||
let g:syntastic_check_on_wq = 0
|
||||
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
|
||||
let g:syntastic_python_checkers=['flake8']
|
||||
" Because XXE
|
||||
let g:syntastic_xml_checkers=['']
|
||||
let g:syntastic_xslt_checkers=['']
|
||||
autocmd BufReadPost *
|
||||
\ if &readonly
|
||||
\| let b:syntastic_mode = 'passive'
|
||||
\| else
|
||||
\| silent! unlet b:syntastic_mode
|
||||
\| endif
|
||||
|
||||
" Have F5 run the tests and display errors
|
||||
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
|
||||
|
||||
" Load vim-ycm if installed on the system level
|
||||
if isdirectory("/usr/share/vim-youcompleteme")
|
||||
let g:ycm_autoclose_preview_window_after_insertion=1
|
||||
" Currently only works on debian-based systems...
|
||||
" It also does not play nicely with virtual envs, so we skip it then
|
||||
if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV)
|
||||
set runtimepath+=/usr/share/vim-youcompleteme
|
||||
endif
|
||||
let g:ycm_autoclose_preview_window_after_insertion=1
|
||||
" Add rust settings
|
||||
let g:tmp_rust_path=trim(system("rustc --print sysroot"))
|
||||
if isdirectory(g:tmp_rust_path)
|
||||
let g:ycm_rust_toolchain_root=g:tmp_rust_path
|
||||
endif
|
||||
unlet! g:tmp_rust_path
|
||||
|
||||
" Enable vim-bracketed-paste mode
|
||||
" From
|
||||
" https://github.com/ConradIrwin/vim-bracketed-paste/blob/master/plugin/bracketed-paste.vim
|
||||
if exists("g:loaded_bracketed_paste")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_bracketed_paste = 1
|
||||
|
||||
let &t_ti .= "\<Esc>[?2004h"
|
||||
let &t_te = "\e[?2004l" . &t_te
|
||||
|
||||
function! XTermPasteBegin(ret)
|
||||
set pastetoggle=<f29>
|
||||
set paste
|
||||
return a:ret
|
||||
endfunction
|
||||
|
||||
execute "set <f28>=\<Esc>[200~"
|
||||
execute "set <f29>=\<Esc>[201~"
|
||||
map <expr> <f28> XTermPasteBegin("i")
|
||||
imap <expr> <f28> XTermPasteBegin("")
|
||||
vmap <expr> <f28> XTermPasteBegin("c")
|
||||
cmap <f28> <nop>
|
||||
cmap <f29> <nop>
|
||||
|
||||
" Include a .vimrc.local if it exists
|
||||
if filereadable(glob("~/.vimrc.local"))
|
||||
@@ -157,3 +220,6 @@ autocmd BufRead,BufNewFile Makefile* set noexpandtab
|
||||
" Enable filetype support
|
||||
" Needs to be at end of vimrc
|
||||
filetype plugin indent on
|
||||
|
||||
" Disable bell
|
||||
set belloff=all
|
||||
|
||||
@@ -6,7 +6,8 @@ content_disposition = on
|
||||
# Recursive download options
|
||||
no_parent = on
|
||||
follow_ftp = on
|
||||
adjust_extension = on
|
||||
# Good for HTML, not for other things
|
||||
adjust_extension = off
|
||||
robots = off
|
||||
|
||||
# Show responses
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
setxkbmap -option ctrl:nocaps -option compose:ralt
|
||||
test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd &
|
||||
test -f "$HOME/.env" && "$HOME/.env"
|
||||
test -f "$HOME/.shenv" && "$HOME/.shenv"
|
||||
test -f "$HOME/.profile" && . "$HOME/.profile"
|
||||
|
||||
@@ -66,7 +66,8 @@ zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache"
|
||||
|
||||
# .profile is universal
|
||||
. ~/.profile
|
||||
emulate sh -c '. /etc/profile'
|
||||
emulate sh -c '. ~/.profile'
|
||||
# Deduplicate the path
|
||||
typeset -U path
|
||||
|
||||
@@ -83,34 +84,39 @@ bindkey '^h' backward-delete-char
|
||||
# ok, a few emacs convenience bindings
|
||||
bindkey '^w' backward-kill-word
|
||||
bindkey '^r' history-incremental-search-backward
|
||||
# delete really deletes
|
||||
bindkey "^[[3~" delete-char
|
||||
|
||||
# Source extras and aliases if interactive
|
||||
if [[ $- == *i* ]] ; then
|
||||
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
|
||||
if [[ -e $HOME/.aliases.local ]] ; then source $HOME/.aliases.local ; fi
|
||||
# zsh-only-ism to avoid error if glob doesn't expand
|
||||
for file in $HOME/.zshrc.d/[a-zA-Z0-9]*.zsh(N) ; do
|
||||
source "$file"
|
||||
done
|
||||
# extra completions, prompt
|
||||
fpath=(~/.zshrc.completions ~/.zshrc.d/matir_prompt $fpath)
|
||||
fpath=(~/.zshrc.completions ~/.zshrc.d/matir_prompt ~/.zshrc.d/agnoster_prompt $fpath)
|
||||
# Completion
|
||||
zstyle ':compinstall' filename "${HOME}/.zshrc"
|
||||
zstyle ':completion:*' users root ${USER}
|
||||
# Modules after fpath
|
||||
autoload -Uz compinit && compinit -i
|
||||
autoload -Uz promptinit && promptinit
|
||||
# Prompt
|
||||
prompt matir
|
||||
# Virtualenvwrapper
|
||||
if test -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ; then
|
||||
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
|
||||
elif test -f /usr/bin/virtualenvwrapper_lazy.sh ; then
|
||||
source /usr/bin/virtualenvwrapper_lazy.sh
|
||||
fi
|
||||
if command ls --version 2>&1 >/dev/null ; then
|
||||
alias ls="$(whence -p ls) --color -C"
|
||||
if command ls --version >/dev/null 2>&1 ; then
|
||||
alias ls="$(whence -p ls) --color=auto"
|
||||
fi
|
||||
# Syntax highlighting and substring search
|
||||
if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
|
||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
elif test -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
fi
|
||||
if test -f ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh ; then
|
||||
source ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh
|
||||
@@ -119,6 +125,21 @@ if [[ $- == *i* ]] ; then
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
fi
|
||||
# Suggestions
|
||||
for sugg_path in /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ; do
|
||||
if test -f "${sugg_path}"; then
|
||||
# Works well for solarized
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
|
||||
# Strategy -- note that 'completion' is slow AF
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history)
|
||||
source "${sugg_path}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
unset sugg_path
|
||||
# History
|
||||
alias fullhist="history 1"
|
||||
alias longhist="history -1000"
|
||||
fi # End interactive-only block
|
||||
|
||||
# In case ack is named ack-grep
|
||||
@@ -126,13 +147,25 @@ if [ -x /usr/bin/ack-grep ] ; then
|
||||
alias ack='/usr/bin/ack-grep'
|
||||
fi
|
||||
|
||||
# Setup PATH for tools
|
||||
PATH=${PATH}:${HOME}/bin/tools
|
||||
# Got rust?
|
||||
if test -d ${HOME}/.cargo/bin ; then
|
||||
PATH=${PATH}:${HOME}/.cargo/bin
|
||||
fi
|
||||
|
||||
# Most is nice, if we have it
|
||||
if command -v most >/dev/null 2>&1; then
|
||||
export PAGER="most"
|
||||
# Pip packages
|
||||
if test -d ${HOME}/.local/bin ; then
|
||||
PATH=${PATH}:${HOME}/.local/bin
|
||||
fi
|
||||
|
||||
if test -z "${PAGER}" && command -v less >/dev/null 2>&1; then
|
||||
export PAGER="less"
|
||||
fi
|
||||
|
||||
# Load any local settings
|
||||
if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi
|
||||
|
||||
# Set prompt based on local settings
|
||||
if test -f "${HOME}/.zprompt" ; then
|
||||
THEME=${THEME:=$(cat "${HOME}/.zprompt")}
|
||||
fi
|
||||
prompt "${THEME:-matir}" >/dev/null 2>&1
|
||||
|
||||
5
dotfiles/zshrc.completions/_gf
Normal file
5
dotfiles/zshrc.completions/_gf
Normal file
@@ -0,0 +1,5 @@
|
||||
#compdef gf
|
||||
|
||||
function _gf {
|
||||
_arguments "1: :($(gf -list))"
|
||||
}
|
||||
173
dotfiles/zshrc.d/agnoster_prompt/prompt_agnoster_setup
Normal file
173
dotfiles/zshrc.d/agnoster_prompt/prompt_agnoster_setup
Normal file
@@ -0,0 +1,173 @@
|
||||
# vim:ft=zsh ts=2 sw=2 sts=2
|
||||
#
|
||||
# agnoster's Theme - https://gist.github.com/3712874
|
||||
# A Powerline-inspired theme for ZSH
|
||||
#
|
||||
# # README
|
||||
#
|
||||
# In order for this theme to render correctly, you will need a
|
||||
# [Powerline-patched font](https://gist.github.com/1595572).
|
||||
#
|
||||
# In addition, I recommend the
|
||||
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
|
||||
# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
|
||||
# it has significantly better color fidelity.
|
||||
#
|
||||
# # Goals
|
||||
#
|
||||
# The aim of this theme is to only show you *relevant* information. Like most
|
||||
# prompts, it will only show git information when in a git working directory.
|
||||
# However, it goes a step further: everything from the current user and
|
||||
# hostname to whether the last call exited with an error to whether background
|
||||
# jobs are running in this shell will all be displayed automatically when
|
||||
# appropriate.
|
||||
|
||||
### Segments of the prompt, default order declaration
|
||||
|
||||
typeset -aHg AGNOSTER_PROMPT_SEGMENTS=(
|
||||
prompt_status
|
||||
prompt_context
|
||||
prompt_virtualenv
|
||||
prompt_dir
|
||||
prompt_git
|
||||
prompt_end
|
||||
)
|
||||
|
||||
### Segment drawing
|
||||
# A few utility functions to make it easy and re-usable to draw segmented prompts
|
||||
|
||||
CURRENT_BG='NONE'
|
||||
if [[ -z "$PRIMARY_FG" ]]; then
|
||||
PRIMARY_FG=black
|
||||
fi
|
||||
|
||||
# Characters
|
||||
SEGMENT_SEPARATOR="\ue0b0"
|
||||
PLUSMINUS="\u00b1"
|
||||
BRANCH="\ue0a0"
|
||||
DETACHED="\u27a6"
|
||||
CROSS="\u2718"
|
||||
LIGHTNING="\u26a1"
|
||||
GEAR="\u2699"
|
||||
|
||||
# Begin a segment
|
||||
# Takes two arguments, background and foreground. Both can be omitted,
|
||||
# rendering default background/foreground.
|
||||
prompt_segment() {
|
||||
local bg fg
|
||||
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||
print -n "%{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%}"
|
||||
else
|
||||
print -n "%{$bg%}%{$fg%}"
|
||||
fi
|
||||
CURRENT_BG=$1
|
||||
[[ -n $3 ]] && print -n $3
|
||||
}
|
||||
|
||||
# End the prompt, closing any open segments
|
||||
prompt_end() {
|
||||
if [[ -n $CURRENT_BG ]]; then
|
||||
print -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
|
||||
else
|
||||
print -n "%{%k%}"
|
||||
fi
|
||||
print -n "%{%f%}"
|
||||
CURRENT_BG=''
|
||||
}
|
||||
|
||||
### Prompt components
|
||||
# Each component will draw itself, and hide itself if no information needs to be shown
|
||||
|
||||
# Context: user@hostname (who am I and where am I)
|
||||
prompt_context() {
|
||||
local user=`whoami`
|
||||
|
||||
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CONNECTION" ]]; then
|
||||
prompt_segment $PRIMARY_FG default " %(!.%{%F{yellow}%}.)$user@%m "
|
||||
fi
|
||||
}
|
||||
|
||||
# Git: branch/detached head, dirty status
|
||||
prompt_git() {
|
||||
local color ref
|
||||
is_dirty() {
|
||||
test -n "$(git status --porcelain --ignore-submodules)"
|
||||
}
|
||||
ref="$vcs_info_msg_0_"
|
||||
if [[ -n "$ref" ]]; then
|
||||
if is_dirty; then
|
||||
color=yellow
|
||||
ref="${ref} $PLUSMINUS"
|
||||
else
|
||||
color=green
|
||||
ref="${ref} "
|
||||
fi
|
||||
if [[ "${ref/.../}" == "$ref" ]]; then
|
||||
ref="$BRANCH $ref"
|
||||
else
|
||||
ref="$DETACHED ${ref/.../}"
|
||||
fi
|
||||
prompt_segment $color $PRIMARY_FG
|
||||
print -n " $ref"
|
||||
fi
|
||||
}
|
||||
|
||||
# Dir: current working directory
|
||||
prompt_dir() {
|
||||
prompt_segment blue $PRIMARY_FG ' %~ '
|
||||
}
|
||||
|
||||
# Status:
|
||||
# - was there an error
|
||||
# - am I root
|
||||
# - are there background jobs?
|
||||
prompt_status() {
|
||||
local symbols
|
||||
symbols=()
|
||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}$CROSS"
|
||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}$LIGHTNING"
|
||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}$GEAR"
|
||||
|
||||
[[ -n "$symbols" ]] && prompt_segment $PRIMARY_FG default " $symbols "
|
||||
}
|
||||
|
||||
# Display current virtual environment
|
||||
prompt_virtualenv() {
|
||||
if [[ -n $VIRTUAL_ENV ]]; then
|
||||
color=cyan
|
||||
prompt_segment $color $PRIMARY_FG
|
||||
print -Pn " $(basename $VIRTUAL_ENV) "
|
||||
fi
|
||||
}
|
||||
|
||||
## Main prompt
|
||||
prompt_agnoster_main() {
|
||||
RETVAL=$?
|
||||
CURRENT_BG='NONE'
|
||||
for prompt_segment in "${AGNOSTER_PROMPT_SEGMENTS[@]}"; do
|
||||
[[ -n $prompt_segment ]] && $prompt_segment
|
||||
done
|
||||
}
|
||||
|
||||
prompt_agnoster_precmd() {
|
||||
vcs_info
|
||||
PROMPT='%{%f%b%k%}$(prompt_agnoster_main) '
|
||||
}
|
||||
|
||||
prompt_agnoster_setup() {
|
||||
autoload -Uz add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
prompt_opts=(cr subst percent)
|
||||
|
||||
add-zsh-hook precmd prompt_agnoster_precmd
|
||||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' check-for-changes false
|
||||
zstyle ':vcs_info:git*' formats '%b'
|
||||
zstyle ':vcs_info:git*' actionformats '%b (%a)'
|
||||
}
|
||||
|
||||
prompt_agnoster_setup "$@"
|
||||
17
dotfiles/zshrc.d/aliases.zsh
Normal file
17
dotfiles/zshrc.d/aliases.zsh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# On some systems, bat is batcat
|
||||
if ! command -v bat >/dev/null 2>&1 ; then
|
||||
if command -v batcat >/dev/null 2>&1 ; then
|
||||
alias bat=$(command -v batcat)
|
||||
fi
|
||||
fi
|
||||
|
||||
# FFUF aliases
|
||||
if command -v ffuf >/dev/null 2>&1 ; then
|
||||
if test -d $HOME/tools/seclists ; then
|
||||
alias ffuf-files="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/raft-large-files.txt"
|
||||
alias ffuf-dirs="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/raft-large-directories.txt"
|
||||
alias ffuf-quick="ffuf -c -w $HOME/tools/seclists/Discovery/Web-Content/quickhits.txt"
|
||||
fi
|
||||
fi
|
||||
4
dotfiles/zshrc.d/cnf.zsh
Normal file
4
dotfiles/zshrc.d/cnf.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
# TODO: this is horribly unportable. Fix it.
|
||||
if test -r /etc/zsh_command_not_found && test -r /var/lib/command-not-found/commands.db ; then
|
||||
source /etc/zsh_command_not_found
|
||||
fi
|
||||
9
dotfiles/zshrc.d/dmesg.zsh
Normal file
9
dotfiles/zshrc.d/dmesg.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
function dmesg {
|
||||
if [ $(id -u) -eq 0 ] ; then
|
||||
command dmesg "$@"
|
||||
elif id | grep -q '(sudo)' ; then
|
||||
sudo dmesg "$@"
|
||||
else
|
||||
command dmesg "$@"
|
||||
fi
|
||||
}
|
||||
27
dotfiles/zshrc.d/functions.zsh
Normal file
27
dotfiles/zshrc.d/functions.zsh
Normal file
@@ -0,0 +1,27 @@
|
||||
function dumpenv {
|
||||
tr '\0' '\n' < /proc/${1}/environ
|
||||
}
|
||||
|
||||
if test -x "/sbin/starship" ; then
|
||||
_STARSHIP_PATH="/sbin/starship"
|
||||
function starship_prompt {
|
||||
eval $(/sbin/starship init zsh)
|
||||
}
|
||||
elif test -x "${HOME}/tools/starship/starship" ; then
|
||||
_STARSHIP_PATH="${HOME}/tools/starship/starship"
|
||||
function starship_prompt {
|
||||
eval $($HOME/tools/starship/starship init zsh)
|
||||
}
|
||||
fi
|
||||
if test -f ${HOME}/.zprompt ; then
|
||||
if test "$(cat ${HOME}/.zprompt)" = "starship" ; then
|
||||
if test -n "${_STARSHIP_PATH:-}" ; then
|
||||
eval $(${_STARSHIP_PATH} init zsh)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
unset _STARSHIP_PATH
|
||||
|
||||
function hashall {
|
||||
tee >(md5sum) | tee >(sha1sum) | sha256sum
|
||||
}
|
||||
@@ -2,15 +2,16 @@
|
||||
|
||||
GCL=${HOME}/tools/gcloud
|
||||
|
||||
if [ ! -d ${GCL} ] ; then
|
||||
return
|
||||
if [ -d "${GCL}" ] ; then
|
||||
# Add bin to path
|
||||
export PATH="${PATH}:${GCL}/bin"
|
||||
|
||||
# Load completion
|
||||
source "${GCL}/completion.zsh.inc"
|
||||
elif [ -f /usr/share/google-cloud-sdk/completion.zsh.inc ] ; then
|
||||
source /usr/share/google-cloud-sdk/completion.zsh.inc
|
||||
fi
|
||||
|
||||
# Add bin to path
|
||||
export PATH="${PATH}:${GCL}/bin"
|
||||
|
||||
# Load completion
|
||||
source ${GCL}/completion.zsh.inc
|
||||
|
||||
which kubectl 2>/dev/null >&2 && \
|
||||
function kubectl() {
|
||||
|
||||
@@ -2,6 +2,10 @@ if ! which gpg-agent >/dev/null 2>&1 ; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if test -f ${HOME}/.no-gpg-agent ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Set the default paths to gpg-agent files.
|
||||
_gpg_agent_conf="${GNUPGHOME:-$HOME/.gnupg}/gpg-agent.conf"
|
||||
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID"
|
||||
@@ -20,13 +24,19 @@ fi
|
||||
# Inform gpg-agent of the current TTY for user prompts.
|
||||
export GPG_TTY="$(tty)"
|
||||
|
||||
# Integrate with the SSH module.
|
||||
# Setup SSH agent support
|
||||
if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
||||
# Load required functions.
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
# Override the ssh-agent environment file default path.
|
||||
_ssh_agent_env="$_gpg_agent_env"
|
||||
if test -z "$SSH_AUTH_SOCK" ; then
|
||||
SSH_AUTH_SOCK="/run/user/$(id -u)/gnupg/S.gpg-agent.ssh"
|
||||
if test -S "$SSH_AUTH_SOCK" ; then
|
||||
export SSH_AUTH_SOCK
|
||||
else
|
||||
unset SSH_AUTH_SOCK
|
||||
fi
|
||||
fi
|
||||
|
||||
# Updates the GPG-Agent TTY before every command since SSH does not set it.
|
||||
function _gpg-agent-update-tty {
|
||||
|
||||
@@ -24,3 +24,11 @@ histmode() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
histsearch() {
|
||||
fc -l -m "${1}" 1
|
||||
}
|
||||
|
||||
histbrowse() {
|
||||
fc -l 1
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
if which ipython >/dev/null 2>/dev/null ; then
|
||||
if command -v ipython >/dev/null || command -v ipython3 >/dev/null ; then
|
||||
export PYTHONSTARTUP="${HOME}/.ipython.py"
|
||||
fi
|
||||
|
||||
@@ -142,10 +142,10 @@ function jekyll {
|
||||
${EDITOR} "${FILENAME}"
|
||||
;;
|
||||
dev)
|
||||
command jekyll serve -D -I "$@"
|
||||
command bundle exec jekyll serve -D -I "$@"
|
||||
;;
|
||||
*)
|
||||
command jekyll "$@"
|
||||
command bundle exec jekyll "$@"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
8
dotfiles/zshrc.d/lesshighlight.zsh
Normal file
8
dotfiles/zshrc.d/lesshighlight.zsh
Normal file
@@ -0,0 +1,8 @@
|
||||
test -f /usr/share/source-highlight/src-hilite-lesspipe.sh && \
|
||||
function srcless {
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "$0 <what>" > /dev/stderr
|
||||
return 1
|
||||
fi
|
||||
/usr/share/source-highlight/src-hilite-lesspipe.sh $1 | less -R
|
||||
}
|
||||
39
dotfiles/zshrc.d/logging.zsh
Normal file
39
dotfiles/zshrc.d/logging.zsh
Normal file
@@ -0,0 +1,39 @@
|
||||
LOGGER_ENV=""
|
||||
LOGGER_DIR="${LOGGER_DIR:-${HOME}/.zlogs}"
|
||||
|
||||
function _logger_now {
|
||||
print -P "%D{%Y%m%d-%H%M%S}"
|
||||
}
|
||||
|
||||
function logenv {
|
||||
LOGGER_ENV="${1:-}"
|
||||
if test -z "${LOGGER_ENV}" ; then
|
||||
return 0
|
||||
fi
|
||||
mkdir -p "${LOGGER_DIR}/${LOGGER_ENV}"
|
||||
}
|
||||
|
||||
# Executed on prompt
|
||||
function _logger_precmd {
|
||||
_RV="$?"
|
||||
if test -z "${LOGGER_ENV}" ; then
|
||||
return 0
|
||||
fi
|
||||
_LOGGER_STOP="$(_logger_now)"
|
||||
_LOGGER_DATE="$(print -P '%D{%Y%m%d}')"
|
||||
echo "$_LOGGER_START $_LOGGER_STOP $$ $_RV $_LOGGER_CMD" >>| \
|
||||
"${LOGGER_DIR}/${LOGGER_ENV}/${_LOGGER_DATE}.log"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Executed on command entry
|
||||
function _logger_preexec {
|
||||
_LOGGER_CMD="${2}"
|
||||
_LOGGER_START="$(_logger_now)"
|
||||
return 0
|
||||
}
|
||||
|
||||
typeset -a precmd_functions
|
||||
precmd_functions+=_logger_precmd
|
||||
typeset -a preexec_functions
|
||||
preexec_functions+=_logger_preexec
|
||||
@@ -49,7 +49,7 @@ zle -N zle-keymap-select
|
||||
zle -N zle-line-init zle-keymap-select
|
||||
|
||||
function prompt_matir_precmd {
|
||||
vcs_info
|
||||
vcs_info 2>/dev/null
|
||||
if [ $VIRTUAL_ENV ] ; then
|
||||
VIRTUAL_ENV_SHORT=" (py:$(basename $VIRTUAL_ENV))"
|
||||
else
|
||||
|
||||
@@ -12,7 +12,7 @@ prune-broken-symlinks() {
|
||||
ASK=1
|
||||
fi
|
||||
DIR=${1:-.}
|
||||
FINDCMD=(find ${DIR} -type l -xtype l)
|
||||
FINDCMD=(find -L ${DIR} -xdev -type l)
|
||||
if (($ASK)) ; then
|
||||
local FILES
|
||||
FILES=`${FINDCMD} -print`
|
||||
|
||||
@@ -1,14 +1 @@
|
||||
# Enable RVM if available
|
||||
if [[ -s ${HOME}/.rvm/scripts/rvm ]] ; then
|
||||
source ${HOME}/.rvm/scripts/rvm
|
||||
else
|
||||
function install_rvm {
|
||||
export rvm_ignore_dotfiles=yes
|
||||
pushd `mktemp -d`
|
||||
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer
|
||||
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
|
||||
gpg --verify rvm-installer.asc && \
|
||||
bash rvm-installer stable
|
||||
popd
|
||||
}
|
||||
fi
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||
|
||||
@@ -10,8 +10,8 @@ zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns '<->.<->.<->.<-
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns adm bin daemon halt lp named shutdown sync
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}##\|*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
|
||||
3
dotfiles/zshrc.d/usage.zsh
Normal file
3
dotfiles/zshrc.d/usage.zsh
Normal file
@@ -0,0 +1,3 @@
|
||||
function duh {
|
||||
du -sk "$@" | sort -n | while read size fname; do for unit in K M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
|
||||
}
|
||||
7
dotfiles/zshrc.d/vmstat.zsh
Normal file
7
dotfiles/zshrc.d/vmstat.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
function vmstat {
|
||||
local _extra_args
|
||||
if [ "$(tput cols)" -gt 80 ] ; then
|
||||
_extra_args="-w"
|
||||
fi
|
||||
command vmstat ${_extra_args} "$@"
|
||||
}
|
||||
232
install.sh
232
install.sh
@@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2155,SC2223
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
||||
|
||||
USER=${USER:-$(id -un)}
|
||||
HOME=${HOME:-$(cd ~ && pwd)}
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
FINDTYPE="-xtype"
|
||||
@@ -18,7 +23,7 @@ case $(uname) in
|
||||
esac
|
||||
|
||||
is_comment() {
|
||||
if [ $(echo "${1}" | cut -c1-1) = '#' ] ; then
|
||||
if [ "$(echo "${1}" | cut -c1-1)" = '#' ] ; then
|
||||
true
|
||||
else
|
||||
false
|
||||
@@ -26,17 +31,17 @@ is_comment() {
|
||||
}
|
||||
|
||||
prerequisites() {
|
||||
if which zsh > /dev/null 2>&1 ; then
|
||||
if command -v zsh > /dev/null 2>&1 ; then
|
||||
case $- in
|
||||
*i*)
|
||||
case $(getent passwd $USER | cut -d: -f7) in
|
||||
case "$(getent passwd "${USER}" | cut -d: -f7)" in
|
||||
*/zsh)
|
||||
;;
|
||||
*)
|
||||
if [ $(id) -ne 0 ] ; then
|
||||
if [ "$(id)" -ne 0 ] ; then
|
||||
echo 'Enter password to change shell.' >&2
|
||||
fi
|
||||
chsh -s $(which zsh)
|
||||
chsh -s "$(command -v zsh)"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -51,9 +56,10 @@ install_dotfile_dir() {
|
||||
local dotfile
|
||||
local submodule_prune="$(git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||
awk '{print $2}' | \
|
||||
while read submod ; do
|
||||
while read -r submod ; do
|
||||
echo -n " -o -path ${BASEDIR}/${submod}"
|
||||
done)"
|
||||
# shellcheck disable=SC2086
|
||||
find "${SRCDIR}" \( -name .git -o \
|
||||
-path "${SRCDIR}/private_dotfiles" -o \
|
||||
-name install.sh -o \
|
||||
@@ -61,17 +67,17 @@ install_dotfile_dir() {
|
||||
-name .gitignore \
|
||||
${submodule_prune} \) \
|
||||
-prune -o ${FINDTYPE} f -print | \
|
||||
while read dotfile ; do
|
||||
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
|
||||
mkdir -p $(dirname "${TARGET}")
|
||||
while read -r dotfile ; do
|
||||
local TARGET="${HOME}/.${dotfile#"${SRCDIR}"/}"
|
||||
mkdir -p "$(dirname "${TARGET}")"
|
||||
ln -s -f "${dotfile}" "${TARGET}"
|
||||
done
|
||||
git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||
awk '{print $2}' | \
|
||||
while read submodule ; do
|
||||
while read -r submodule ; do
|
||||
local FULLNAME="${BASEDIR}/${submodule}"
|
||||
local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}"
|
||||
mkdir -p $(dirname "${TARGET}")
|
||||
local TARGET="${HOME}/.${FULLNAME#"${SRCDIR}"/}"
|
||||
mkdir -p "$(dirname "${TARGET}")"
|
||||
if test -L "${TARGET}" ; then
|
||||
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
|
||||
echo "${TARGET} points to $(readlink "${TARGET}") not ${FULLNAME}!" >/dev/stderr
|
||||
@@ -89,39 +95,39 @@ install_basic_dir() {
|
||||
local DESTDIR="${2}"
|
||||
local file
|
||||
find "${SRCDIR}" ${FINDTYPE} f -print | \
|
||||
while read file ; do
|
||||
local TARGET="${2}/${file#${SRCDIR}/}"
|
||||
mkdir -p $(dirname "${TARGET}")
|
||||
while read -r file ; do
|
||||
local TARGET="${2}/${file#"${SRCDIR}"/}"
|
||||
mkdir -p "$(dirname "${TARGET}")"
|
||||
ln -s -f "${file}" "${TARGET}"
|
||||
done
|
||||
}
|
||||
|
||||
install_git() {
|
||||
# Install or update a git repository
|
||||
if ! which git > /dev/null ; then
|
||||
if ! command -v git > /dev/null 2>&1 ; then
|
||||
return 1
|
||||
fi
|
||||
local REPO="${*: -2:1}"
|
||||
local DESTDIR="${*: -1:1}"
|
||||
set -- ${@:1:$(($#-2))}
|
||||
if [ -d ${DESTDIR}/.git ] ; then
|
||||
( cd ${DESTDIR} ; git pull -q )
|
||||
set -- "${@:1:$(($#-2))}"
|
||||
if [ -d "${DESTDIR}/.git" ] ; then
|
||||
( cd "${DESTDIR}" ; git pull -q )
|
||||
else
|
||||
if [ ${MINIMAL} -eq 1 ] ; then
|
||||
git clone --depth 1 $* ${REPO} ${DESTDIR}
|
||||
if [ "${MINIMAL}" -eq 1 ] ; then
|
||||
git clone --depth 1 "$@" "${REPO}" "${DESTDIR}"
|
||||
else
|
||||
git clone $* ${REPO} ${DESTDIR}
|
||||
git clone "$@" "${REPO}" "${DESTDIR}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add_bin_symlink() {
|
||||
local LINKNAME=${HOME}/bin/${2:-$(basename $1)}
|
||||
if [ -e ${LINKNAME} -a ! -h ${LINKNAME} ] ; then
|
||||
local LINKNAME="${HOME}/bin/${2:-$(basename "$1")}"
|
||||
if [ -e "${LINKNAME}" ] && ! [ -h "${LINKNAME}" ] ; then
|
||||
echo "Refusing to overwrite ${LINKNAME}" >&2
|
||||
return 1
|
||||
fi
|
||||
ln -sf ${1} ${LINKNAME}
|
||||
ln -sf "${1}" "${LINKNAME}"
|
||||
}
|
||||
|
||||
postinstall() {
|
||||
@@ -131,24 +137,24 @@ postinstall() {
|
||||
ssh_key_already_installed() {
|
||||
# Return 1 if the key isn't already installed, 0 if it is
|
||||
local AK="${HOME}/.ssh/authorized_keys"
|
||||
if [ ! -f $AK ] ; then
|
||||
if [ ! -f "$AK" ] ; then
|
||||
return 1
|
||||
fi
|
||||
local KEYFP=$(ssh-keygen -l -f $1 2>/dev/null | awk '{print $2}')
|
||||
local TMPF=$(mktemp)
|
||||
local KEYFP="$(ssh-keygen -l -f "$1" 2>/dev/null | awk '{print $2}')"
|
||||
local TMPF="$(mktemp)"
|
||||
local key
|
||||
while read key ; do
|
||||
while read -r key ; do
|
||||
if is_comment "${key}" ; then
|
||||
continue
|
||||
fi
|
||||
echo "$key" > $TMPF
|
||||
local EFP=$(ssh-keygen -l -f ${TMPF} 2>/dev/null | awk '{print $2}')
|
||||
echo "$key" > "$TMPF"
|
||||
local EFP="$(ssh-keygen -l -f "${TMPF}" 2>/dev/null | awk '{print $2}')"
|
||||
if [ "$EFP" = "$KEYFP" ] ; then
|
||||
rm $TMPF 2>/dev/null
|
||||
rm "$TMPF" 2>/dev/null
|
||||
return 0
|
||||
fi
|
||||
done < ${AK}
|
||||
rm $TMPF 2>/dev/null
|
||||
done < "${AK}"
|
||||
rm "$TMPF" 2>/dev/null
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -158,30 +164,30 @@ install_ssh_keys() {
|
||||
local AK="${HOME}/.ssh/authorized_keys"
|
||||
local key
|
||||
local keydir
|
||||
if test ${TRUST_ALL_KEYS} = 1 ; then
|
||||
keydir=${BASEDIR}/keys/ssh
|
||||
if test "${TRUST_ALL_KEYS}" = 1 ; then
|
||||
keydir="${BASEDIR}/keys/ssh"
|
||||
else
|
||||
keydir=${BASEDIR}/keys/ssh/trusted
|
||||
keydir="${BASEDIR}/keys/ssh/trusted"
|
||||
fi
|
||||
for key in ${keydir}/* ; do
|
||||
for key in "${keydir}"/* ; do
|
||||
if [ ! -f "${key}" ] ; then
|
||||
continue
|
||||
fi
|
||||
if ssh_key_already_installed "${key}" ; then
|
||||
verbose "Key $(basename ${key}) already installed..."
|
||||
verbose "Key $(basename "${key}") already installed..."
|
||||
continue
|
||||
fi
|
||||
echo "# $(basename ${key}) added from skel on $(date +%Y-%m-%d)" >> ${AK}
|
||||
cat ${key} >> ${AK}
|
||||
echo "# $(basename "${key}") added from skel on $(date +%Y-%m-%d)" >> "${AK}"
|
||||
cat "${key}" >> "${AK}"
|
||||
done
|
||||
}
|
||||
|
||||
install_gpg_keys() {
|
||||
which gpg >/dev/null 2>&1 || \
|
||||
command -v gpg >/dev/null 2>&1 || \
|
||||
return 0
|
||||
local key
|
||||
for key in ${BASEDIR}/keys/gpg/* ; do
|
||||
gpg --import < ${key} >/dev/null
|
||||
for key in "${BASEDIR}"/keys/gpg/* ; do
|
||||
gpg --import < "${key}" >/dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
@@ -190,13 +196,14 @@ install_known_hosts() {
|
||||
if [ ! -f "${BASEDIR}/keys/known_hosts" ] ; then
|
||||
return 0
|
||||
fi
|
||||
mkdir -p ${HOME}/.ssh
|
||||
mkdir -p "${HOME}/.ssh"
|
||||
if [ -f "${HOME}/.ssh/known_hosts" ] ; then
|
||||
local tmpf=$(mktemp)
|
||||
cat ${BASEDIR}/keys/known_hosts ${HOME}/.ssh/known_hosts | sort -u > $tmpf
|
||||
mv $tmpf ${HOME}/.ssh/known_hosts
|
||||
local tmpf="$(mktemp)"
|
||||
cat "${BASEDIR}"/keys/known_hosts "${HOME}"/.ssh/known_hosts \
|
||||
| sort -u > "$tmpf"
|
||||
mv "$tmpf" "${HOME}"/.ssh/known_hosts
|
||||
else
|
||||
cp ${BASEDIR}/keys/known_hosts ${HOME}/.ssh/known_hosts
|
||||
cp "${BASEDIR}"/keys/known_hosts "${HOME}"/.ssh/known_hosts
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -212,10 +219,10 @@ is_deb_system() {
|
||||
|
||||
run_as_root() {
|
||||
# Attempt to run as root
|
||||
if [ ${USER} = "root" ] ; then
|
||||
if [ "${USER}" = "root" ] ; then
|
||||
"$@"
|
||||
return $?
|
||||
elif test -x $(which sudo 2>/dev/null) ; then
|
||||
elif test -x "$(command -v sudo 2>/dev/null)" ; then
|
||||
verbose "Using sudo to run ${1}..."
|
||||
sudo "$@"
|
||||
return $?
|
||||
@@ -227,24 +234,25 @@ install_pkg_set() {
|
||||
local pkg_file=${BASEDIR}/${1}
|
||||
local pkg_list=""
|
||||
if [ ! -f "${pkg_file}" ] ; then
|
||||
echo "Package set $(basename ${pkg_file}) does not exist." 1>&2
|
||||
echo "Package set $(basename "${pkg_file}") does not exist." 1>&2
|
||||
return 1
|
||||
fi
|
||||
while read line ; do
|
||||
while read -r line ; do
|
||||
if is_comment "${line}" ; then
|
||||
continue
|
||||
fi
|
||||
if [ -z "${line}" ] ; then
|
||||
continue
|
||||
fi
|
||||
if [ "$(apt-cache -q show ${line} 2>/dev/null)" != "" ] ; then
|
||||
if [ "$(apt-cache -q show "${line}" 2>/dev/null)" != "" ] ; then
|
||||
pkg_list="${pkg_list} ${line}"
|
||||
else
|
||||
echo "Warning: package ${line} not found." >&2
|
||||
fi
|
||||
done < ${pkg_file}
|
||||
done < "${pkg_file}"
|
||||
if [ -n "${pkg_list}" ] ; then
|
||||
verbose "Installing ${pkg_list}"
|
||||
# shellcheck disable=SC2086
|
||||
run_as_root apt-get install -qqy ${pkg_list}
|
||||
fi
|
||||
}
|
||||
@@ -254,50 +262,70 @@ install_apt_pkgs() {
|
||||
( echo "Can't run apt-get commands" >&2 && \
|
||||
return 1 )
|
||||
install_pkg_set packages.minimal
|
||||
if test $MINIMAL = 1 ; then
|
||||
if test "$MINIMAL" = 1 ; then
|
||||
return 0
|
||||
fi
|
||||
test $HAVE_X = 1 && install_pkg_set packages.X
|
||||
test $IS_KALI = 1 && install_pkg_set packages.kali
|
||||
install_pkg_set packages.${ARCH}
|
||||
test $HAVE_X = 1 && install_chrome
|
||||
test "$HAVE_X" = 1 && install_pkg_set packages.X
|
||||
test "$IS_KALI" = 1 && install_pkg_set packages.kali
|
||||
install_pkg_set "packages.${ARCH}"
|
||||
test "$HAVE_X" = 1 && install_chrome
|
||||
}
|
||||
|
||||
install_chrome() {
|
||||
local TMPD=$(mktemp -d)
|
||||
local CHROME_ARCH=$(echo ${ARCH} | sed 's/x86_64/amd64/')
|
||||
local TMPD="$(mktemp -d)"
|
||||
local CHROME_ARCH="${ARCH/x86_64/amd64}"
|
||||
dpkg-query -l 'google-chrome*' >/dev/null 2>&1 && return 0
|
||||
/usr/bin/wget --quiet -O ${TMPD}/google-chrome.deb \
|
||||
https://dl.google.com/linux/direct/google-chrome-beta_current_${CHROME_ARCH}.deb
|
||||
run_as_root /usr/bin/dpkg -i ${TMPD}/google-chrome.deb || \
|
||||
/usr/bin/wget --quiet -O "${TMPD}/google-chrome.deb" \
|
||||
"https://dl.google.com/linux/direct/google-chrome-beta_current_${CHROME_ARCH}.deb"
|
||||
run_as_root /usr/bin/dpkg -i "${TMPD}/google-chrome.deb" || \
|
||||
run_as_root /usr/bin/apt-get install -qq -f -y || \
|
||||
( echo "Could not install chrome." >&2 && return 1 )
|
||||
rm -rf ${TMPD}
|
||||
rm -rf "${TMPD}"
|
||||
}
|
||||
|
||||
setup_git_email() {
|
||||
local gc_local="${HOME}/.gitconfig.local"
|
||||
if test -f "${gc_local}" ; then
|
||||
return 0
|
||||
fi
|
||||
if [ "${USER:0:5}" != "david" ] ; then
|
||||
return 0
|
||||
fi
|
||||
local domain="$(hostname -f | grep -E -o '[a-z0-9-]+\.[a-z0-9-]+$')"
|
||||
case "$(echo "${domain}" | md5sum | awk '{print $1}')" in
|
||||
b21a24d528346ef7d3932306ed96ede5|a5ed434a3f5089b489576cceab824f25)
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
echo -e "[user]\n email=${USER}@${domain}" > "${gc_local}"
|
||||
}
|
||||
|
||||
read_saved_prefs() {
|
||||
# Can't use basedir here as we don't have it yet
|
||||
local old_pref_file=$(dirname $0)/installed-prefs
|
||||
local pref_file=$(dirname $0)/.installed-prefs
|
||||
if [ -f ${old_pref_file} -a ! -f ${pref_file} ] ; then
|
||||
mv ${old_pref_file} ${pref_file}
|
||||
local old_pref_file="$(dirname "$0")/installed-prefs"
|
||||
local pref_file="$(dirname "$0")/.installed-prefs"
|
||||
if [ -f "${old_pref_file}" ] && ! [ -f "${pref_file}" ] ; then
|
||||
mv "${old_pref_file}" "${pref_file}"
|
||||
fi
|
||||
if [ -f ${pref_file} ] ; then
|
||||
if [ -f "${pref_file}" ] ; then
|
||||
verbose "Loading saved skel preferences from ${pref_file}"
|
||||
# source is a bashism
|
||||
. ${pref_file}
|
||||
# shellcheck disable=SC1090
|
||||
. "${pref_file}"
|
||||
fi
|
||||
}
|
||||
|
||||
save_prefs() {
|
||||
test $SAVE = 1 || return 0
|
||||
test "$SAVE" = 1 || return 0
|
||||
local pref_file=${BASEDIR}/.installed-prefs
|
||||
(echo_pref BASEDIR
|
||||
echo_pref MINIMAL
|
||||
echo_pref INSTALL_KEYS
|
||||
echo_pref TRUST_ALL_KEYS
|
||||
echo_pref INSTALL_PKGS
|
||||
echo_pref VERBOSE) > $pref_file
|
||||
echo_pref VERBOSE) > "$pref_file"
|
||||
}
|
||||
|
||||
echo_pref() {
|
||||
@@ -319,41 +347,51 @@ EOF
|
||||
}
|
||||
|
||||
verbose() {
|
||||
test ${VERBOSE:-0} = 1 && echo "$@" >&2 || return 0
|
||||
test "${VERBOSE:-0}" = 1 && echo "$@" >&2 || return 0
|
||||
}
|
||||
|
||||
# Operations
|
||||
|
||||
install_dotfiles() {
|
||||
install_dotfile_dir "${BASEDIR}/dotfiles"
|
||||
test -d "${BASEDIR}/private_dotfiles" && \
|
||||
test -d "${BASEDIR}/.git/git-crypt" && \
|
||||
install_dotfile_dir "${BASEDIR}/private_dotfiles" || \
|
||||
true
|
||||
test -d "${BASEDIR}/local_dotfiles" && \
|
||||
install_dotfile_dir "${BASEDIR}/local_dotfiles" || \
|
||||
true
|
||||
if test -d "${BASEDIR}/private_dotfiles" && \
|
||||
test -d "${BASEDIR}/.git/git-crypt" ; then
|
||||
install_dotfile_dir "${BASEDIR}/private_dotfiles"
|
||||
fi
|
||||
if test -d "${BASEDIR}/local_dotfiles" ; then
|
||||
install_dotfile_dir "${BASEDIR}/local_dotfiles"
|
||||
fi
|
||||
if test -d "${BASEDIR}/dotfile_overlays" ; then
|
||||
for dotfiledir in "${BASEDIR}/dotfile_overlays/"* ; do
|
||||
if test -d "${dotfiledir}" ; then
|
||||
install_dotfile_dir "${dotfiledir}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
install_main() {
|
||||
test -d ${BASEDIR}/.git && command -v git >/dev/null 2>&1 && \
|
||||
git -C ${BASEDIR} pull
|
||||
test $MINIMAL = 1 || command -v git >/dev/null 2>&1 && \
|
||||
git -C ${BASEDIR} submodule update --init --recursive
|
||||
test $MINIMAL = 1 || prerequisites
|
||||
test $INSTALL_PKGS = 1 && is_deb_system && install_apt_pkgs
|
||||
if test -d "${BASEDIR}/.git" ; then
|
||||
command -v git >/dev/null 2>&1 && \
|
||||
git -C "${BASEDIR}" pull --ff-only
|
||||
test "$MINIMAL" = 1 || ( command -v git >/dev/null 2>&1 && \
|
||||
git -C "${BASEDIR}" submodule update --init --recursive )
|
||||
fi
|
||||
test "$MINIMAL" = 1 || prerequisites
|
||||
test "$INSTALL_PKGS" = 1 && is_deb_system && install_apt_pkgs
|
||||
install_dotfiles
|
||||
install_basic_dir "${BASEDIR}/bin" "${HOME}/bin"
|
||||
test $MINIMAL = 1 || postinstall
|
||||
test $INSTALL_KEYS = 1 && install_keys
|
||||
test "$MINIMAL" = 1 || postinstall
|
||||
test "$INSTALL_KEYS" = 1 && install_keys
|
||||
save_prefs
|
||||
setup_git_email
|
||||
cleanup
|
||||
}
|
||||
|
||||
install_dconf() {
|
||||
which dconf >/dev/null 2>&1 || return 1
|
||||
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read dcpath ; do
|
||||
dconf load ${dcpath}/ < "${BASEDIR}/dconf/${dcpath}"
|
||||
command -v dconf >/dev/null 2>&1 || return 1
|
||||
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read -r dcpath ; do
|
||||
dconf load "${dcpath}/" < "${BASEDIR}/dconf/${dcpath}"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -371,12 +409,12 @@ read_saved_prefs
|
||||
: ${SAVE:=1}
|
||||
|
||||
# Check prerequisites
|
||||
if [ ! -d $BASEDIR ] ; then
|
||||
if [ ! -d "$BASEDIR" ] ; then
|
||||
echo "Please install to $BASEDIR!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if which dpkg-query > /dev/null 2>&1 ; then
|
||||
if command -v dpkg-query > /dev/null 2>&1 ; then
|
||||
HAVE_X=$(dpkg-query -s xserver-xorg 2>/dev/null | \
|
||||
grep -c 'Status.*installed' \
|
||||
|| true)
|
||||
@@ -398,7 +436,7 @@ case $OPERATION in
|
||||
;;
|
||||
package*)
|
||||
PKG_SET=${2:-minimal}
|
||||
install_pkg_set packages.${PKG_SET}
|
||||
install_pkg_set "packages.${PKG_SET}"
|
||||
;;
|
||||
test)
|
||||
# Do nothing, just sourcing
|
||||
@@ -413,3 +451,5 @@ case $OPERATION in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "OK"
|
||||
|
||||
36
keys/sjca_cert.pem
Normal file
36
keys/sjca_cert.pem
Normal file
@@ -0,0 +1,36 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGTDCCBDSgAwIBAgIUBJJdpXynkaMkAKg/4trLTOxqjrwwDQYJKoZIhvcNAQEL
|
||||
BQAwgZUxEzARBgoJkiaJk/IsZAEZFgNjb20xHjAcBgoJkiaJk/IsZAEZFg5zeXN0
|
||||
ZW1vdmVybG9yZDESMBAGCgmSJomT8ixkARkWAnNqMRcwFQYDVQQKDA5TeXN0ZW1P
|
||||
dmVybG9yZDEQMA4GA1UECwwHSG9tZSBDQTEfMB0GA1UEAwwWU3lzdGVtT3Zlcmxv
|
||||
cmQgSG9tZSBDQTAeFw0yMDA1MTUwMzM0NTBaFw0yMjA1MTUwMzM0NTBaMIGVMRMw
|
||||
EQYKCZImiZPyLGQBGRYDY29tMR4wHAYKCZImiZPyLGQBGRYOc3lzdGVtb3Zlcmxv
|
||||
cmQxEjAQBgoJkiaJk/IsZAEZFgJzajEXMBUGA1UECgwOU3lzdGVtT3ZlcmxvcmQx
|
||||
EDAOBgNVBAsMB0hvbWUgQ0ExHzAdBgNVBAMMFlN5c3RlbU92ZXJsb3JkIEhvbWUg
|
||||
Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDc/NBJVtiUvuqvx4Id
|
||||
DAJuHOJCcK4GKVcmHXDVeF/xyV/WjKwxGFQ8cTIbwxPPc6SNrIPLkdqiJZusILHZ
|
||||
AD34xcK0ojuyRohTyBk2YJVyj/XRfVw8W3+ywoJ4dm+XVgyQxm1XRJGpxQZ8QD4s
|
||||
Z4g32gzirCNCvZGxra9xTWqPZF3Q3YD2p2jPw4i9BbC9Ubav9/8d7KHhIvh0AI+h
|
||||
qKJv63dNMAo6CsxB1uzJ8XdKY+doJRvZ5OBoJx5e95iQ0kzPt3HLBpl3qJRkSyDQ
|
||||
8L1A35MhIu6Ua6lJF5aCijL9sbvB+PvdJWSENEZRQYG5+jxiXtXLaFv48cFnTvQP
|
||||
ZGrn3RDX/WDQd9VtmHqa7fYkK50FmwwoTHht9ph+g4jQGxSbnZMgTLXXbDnSSsXs
|
||||
w6AoE/aPsPuPyuHgl5ZYTq4rTU2MwGcwrFcr49I9o5xcmss4oTsjX7hTuRuWxF5e
|
||||
20DqV/xq+tOSusw4jCpBVUvOHmzCEvS2wQE02+vGRQayU9x1cUxoO3ljeObnzVp5
|
||||
8/X628pHydxO+UGw/Y0d70OCwtZPkBLKOYmIgKGYhvV7r+3knxSyPwYL2Or21Pkf
|
||||
hKfEaLdhCOrrYAdT8SE3Y9l5jsrtIIqU0WlG8/43r2tBipERIKUwTGyGcOOtAShh
|
||||
ewLJvqRbmoX91t03So+2lgoRywIDAQABo4GRMIGOMA4GA1UdDwEB/wQEAwIBBjAS
|
||||
BgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBTri98GnxlLYIUxCljntpfw8Rui
|
||||
vzAfBgNVHSMEGDAWgBTri98GnxlLYIUxCljntpfw8RuivzAoBgNVHR4BAf8EHjAc
|
||||
oBowGIIWLnNqLnN5c3RlbW92ZXJsb3JkLmNvbTANBgkqhkiG9w0BAQsFAAOCAgEA
|
||||
YLEfQ6YJucxzxmBt6wrutfJZsvpj5N6qgJ8oLePNmK8KOhRT0scBLS5Oy5thEl9X
|
||||
1Kt1W5/Wk0zegc3IivovbIAGwyYRbhdn7rNVYZJhItRgNaoyfBAHQk5YyNiWjRgQ
|
||||
MuNQUvS6n7nK8rizRINKwtcUozskjcDYnr71A+oyjGfl48a/RbuVL+bydRJ0jX7a
|
||||
5uTPbiAZKf4K150jQSq9Rt6AbBwdRbgsudsh4m/LaNLIEvI2RdBuLqP2O8c5SVAM
|
||||
KrVXwH5MPp/7nlPw2UZrKL/NkM0BJw5ldLndGa1hwKbZPxs7dvLnmaRN7CeYZ+mP
|
||||
kefxBt+Ql2qcBLog9il5+3W3F2oc+Ti68mmI7h1oYRT3jh2YAV+WVM0hvre/kgt0
|
||||
9rTAW3KAyGG0GRiaCfADUd1FwFFTyzwTL4fN6wlYnPRFoex/8QQUo6DNmWibvc0W
|
||||
e4jW/rsc7KCqsAwasuHJYzxJgN1jOMfD7/6jgVQJEz+JZnEBvszgd+QMMlR38P/W
|
||||
cpp8fYPtFs+TNDIG2/aqGcIl8j7ppjPOrEFNLHdS0633+mni34Qb+qD85jqPb24i
|
||||
1vF1pBO5CJjvOcqOFbAS3IT4i74oM1BpuD6LBk5u5PYJa/VM2SKsEbGPqpvarAZe
|
||||
vSgWTzwGJmUEVCnFM/EFbsxyfcoGwcfLMCM2ioyoxmk=
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1 +0,0 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIsFYLEsalNh/l6PtMZhi0f/eZ22uoMw/xYpgPy6vBU6OlpN2FjW7R0pwX29fZjjVQoF0eEG0K/9/CcYcnxtspw= chronos@localhost
|
||||
@@ -1 +0,0 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPee2Rw1yiE9RIrXzslop9dnYgIc3shhXVk5+bPv/BrC8swklnYUSjQOU/lJuAjJJ9X7rx9kvgmL337Taa7dGao= davidtomaschik@gibson
|
||||
@@ -1 +0,0 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKI+CwNBBoC1G9M2rRR0P0lWAU9uvEZpvDg+CpD+I9NQOLuy80YJMRwIYgTZVTWo8OUqsKSMzYywP6NdMKVdVGg= david@human
|
||||
1
keys/ssh/id_ecdsa_kion.pub
Normal file
1
keys/ssh/id_ecdsa_kion.pub
Normal file
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJzWFHQZm6jsh2V+ATJPlEKEQdt3tWNojc2elz3hDs5Q9TPHUolE0/R66osFra5Qr/jonEwqzqwRIduxFYSIATc= david@kion
|
||||
1
keys/ssh/id_ecdsa_zazu.pub
Normal file
1
keys/ssh/id_ecdsa_zazu.pub
Normal file
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOP0EQthckpi83EoFXtbPnn4Ytd7FYW6Nb3W9ZahqOKhNAqv1owot957ihKHtGKFnYr0Jwgp0TNOdpz6nV9wwCo= david@zazu
|
||||
@@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHPlKI3Mt2Hm4YZ0WNOET7SEoXmAABR+eEZ3hnJnA9AJ davidtomaschik@davidtomaschik-glaptop3
|
||||
1
keys/ssh/id_ed25519_glaptop6.pub
Normal file
1
keys/ssh/id_ed25519_glaptop6.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJSM/GRj76roLHo0KV9SgNGNlFmnsiWpRm9r51XqSsnu davidtomaschik@davidtomaschik-glaptop6
|
||||
1
keys/ssh/id_ed25519_wfh_chromebox.pub
Normal file
1
keys/ssh/id_ed25519_wfh_chromebox.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICvHatAcnYEJ2BXWGN+MaE40avyghYeEZDgfQD8WcRti david@wfh_chromebook
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClvMvarQvGaFYhUazA+GN0C2XaU4vHmsvD3G99PJqmd9SGrzSvWw2ZuJwYWQCag4Ft5Zy/A3NZ0/a4ohPbWFF4iX9LnAqSKgMDPv3R3VokW04bFm5uDhXF0lJDOWb8aJuFl56SP2lnbWyP8P8d+3MaFCcuw3F23CS/0ZO5w7CsPsHkvWkmykCB6z/Ju/kqvXK5qYKjAVkZ80LMDNppjN5zZhFZs721zuuMmpFevcfG5c43KujcR/yDfB+t3yfWmaWi21KDapdHXk5lQoxsg6OZe6Wuj7jQq+Zol+ElxD+gn7z2LWXq8a3wyyvGSoKyBfHBjrwzEuUEFbvn5iatPJVX davidtomaschik@davidtomaschik-glaptop2
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDi2AoHzzSd/xidvRKS1OE7Pe+aGgyEY1WmWJGJ3POHuaQSbGrp4g1En4QurhXwonPiLBtQ0w6Nbbi/3vrXxSnAkJJKd9LXQtjyXVN68285lRr3DWuWnyokhO3B5aGOb5/4b6Dn8YDRrTRefezjbVavgrTFarZ19PmPmJxH9h+ZPV/hNQ6rZjBjrvGerxpmB6CjgXbIxRdsUcnao3+gyPueBOkyHbfiy7QjQT+SgPjIqT/rza4Q0OqFBTk4D7Y96biE5yY31eNs8H7uvR3PfX0NN5zvP/EqJECPYr/B3vOzAr7B8BsqYbA5UFexrp6gYn+LDzr6jAILhEUp8SsC8UFn davidtomaschik@davidtomaschik-glaptop3
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXvqt73qAqS8C597u1wjz0Cvfo1IpiQFE4OKxTBR0mUhhi9UsGXkjZd/EYnqfWQRLcKaQSqN9QcXW7zHrfXtdmcjr3dDZrwXGgCiJnvLTeLecLqYwgaIMMNTmgaTQ3OFB74VCeD496pMbnhmlsN2+WaxNjIxoX+Qadsq/iHtBBt+tSOm5E1x0/ynEGmvO1W0L+8FyV/xnZWQIbBHTrJ931Gt8RDKtt7Y24XYMm5REye40adbxeS4kBwexvp2nTKwkr8sC26dmOz/RgJG3Km1194r0RXsH7iCYYlUBT23f4KOcmVxUlxkSu5d0u2viEID++cN6LT/4rHPdgqMZaVhaB root@uber
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDZ5FLvZsfIfNV8NcUK6+wJ8pDapgu8QAZMX5zuz+fYxsf3KeHlDS0nPojmDLCXaAdd4TUO7KlRyo8BhpsWP8yUwpxUeRgvtYjjWfDgSxXCsGpQzbmTABu8eIaSya00Fao/WeIV1k+2p6S80knmllrBVideGW9ws4zrVQnhOcgKVXskuFBEs3IOQczNPMfI+OnO+qca0rjUh1Z6k3tD6tN6pxh//5CZBgqYf4G1DLnCLIep7tDkTuYjgqH237r6v4WHH87sLRy21yFRzfMWUGPesJvuc8X4Ol822BuQWTCDYy+QYZ9qGDWPcLOLCg7MLP9IVKzIJOrAdOYyp6p2brzj davidtomaschik@uber.g
|
||||
@@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3CLK0KLup0y8nb1l5X9LTVsvJG1scc7qbLJZIdGC0TlFeAbzUwXmxxJUY/dl/2JKGj9Ai3h393WzxH//tMY4jYLhMLqV487YvteVF+2yVS+q0YtO4RgM6TVOvdp1b4Fgj4EB5hTaO0hB51PxTqnVAK0ZMAuUxQRygpARnB+xwhLU2l0K07RHgpMirWODzzlgD3Y9I+3WIpmAwzubaoS1/R0Frf81ZWQmgvwac6PKsPwvGLygS1ounOwD2PJScP+sE/t2MEYjtqmmAytqsp5kLVkb82fJSkdj1DuHblgZr4aX9r04bVV1ju19CN57VyhbZtf+fBqQQW1lnjMYm9Kjn matir_pvj
|
||||
@@ -1 +0,0 @@
|
||||
../id_ecdsa_chromebook.pub
|
||||
@@ -1 +0,0 @@
|
||||
../id_ecdsa_human.pub
|
||||
1
keys/ssh/trusted/id_ecdsa_zazu.pub
Symbolic link
1
keys/ssh/trusted/id_ecdsa_zazu.pub
Symbolic link
@@ -0,0 +1 @@
|
||||
../id_ecdsa_zazu.pub
|
||||
@@ -1 +0,0 @@
|
||||
../id_rsa_human.pub
|
||||
1
keys/ssh/trusted/id_rsa_scar.pub
Symbolic link
1
keys/ssh/trusted/id_rsa_scar.pub
Symbolic link
@@ -0,0 +1 @@
|
||||
../id_rsa_scar.pub
|
||||
@@ -1,10 +1,14 @@
|
||||
audacity
|
||||
cinnamon
|
||||
codequery
|
||||
flameshot
|
||||
fonts-inconsolata
|
||||
fonts-powerline
|
||||
gimp
|
||||
keepassx
|
||||
meld
|
||||
network-manager-openvpn-gnome
|
||||
solaar
|
||||
vim-gtk
|
||||
wireshark
|
||||
wkhtmltopdf
|
||||
|
||||
13
packages.cli
13
packages.cli
@@ -1,14 +1,21 @@
|
||||
bat
|
||||
binfmt-support
|
||||
build-essential
|
||||
cryptsetup
|
||||
dsniff
|
||||
duf
|
||||
ecryptfs-utils
|
||||
exa
|
||||
exuberant-ctags
|
||||
fd-find
|
||||
fzf
|
||||
httpie
|
||||
iftop
|
||||
iptraf
|
||||
ipython
|
||||
ipython3
|
||||
jarwrapper
|
||||
jc
|
||||
jq
|
||||
kpartx
|
||||
ldap-utils
|
||||
@@ -16,6 +23,7 @@ lvm2
|
||||
most
|
||||
msitools
|
||||
nasm
|
||||
nvim
|
||||
opensc
|
||||
openvpn
|
||||
p7zip-full
|
||||
@@ -34,9 +42,12 @@ python3-scapy
|
||||
python3-pip
|
||||
python3-virtualenv
|
||||
radare2
|
||||
ripgrep
|
||||
scapy
|
||||
scdaemon
|
||||
socat
|
||||
source-highlight
|
||||
sqlite3
|
||||
ufw
|
||||
ugrep
|
||||
vim-youcompleteme
|
||||
zsh-syntax-highlighting
|
||||
|
||||
@@ -2,6 +2,7 @@ fonts-anonymous-pro
|
||||
fonts-dejavu
|
||||
fonts-dseg
|
||||
fonts-elusive-icons
|
||||
fonts-firacode
|
||||
fonts-font-awesome
|
||||
fonts-freefont-otf
|
||||
fonts-hack
|
||||
@@ -14,6 +15,7 @@ fonts-ocr-a
|
||||
fonts-ocr-b
|
||||
fonts-open-sans
|
||||
fonts-oxygen
|
||||
fonts-powerline
|
||||
fonts-roboto
|
||||
fonts-stix
|
||||
fonts-ubuntu
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
ack
|
||||
bat
|
||||
curl
|
||||
dnsutils
|
||||
exa
|
||||
fzf
|
||||
gdb
|
||||
git
|
||||
git-crypt
|
||||
git-delta
|
||||
glances
|
||||
gnupg2
|
||||
gnupg-agent
|
||||
httpie
|
||||
ltrace
|
||||
mosh
|
||||
ngrep
|
||||
nmap
|
||||
ripgrep
|
||||
strace
|
||||
tcpdump
|
||||
tldr-py
|
||||
tmux
|
||||
traceroute
|
||||
tshark
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
sysctl/userns.conf
Normal file
1
sysctl/userns.conf
Normal file
@@ -0,0 +1 @@
|
||||
kernel.unprivileged_userns_clone=1
|
||||
@@ -1 +1,2 @@
|
||||
BUS=="usb", SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6014", GROUP="plugdev"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="plugdev"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", GROUP="plugdev"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user