mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Compare commits
161 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f40245bb0 | ||
|
|
157fa34915 | ||
|
|
2a359f1a02 | ||
|
|
c3f41435da | ||
|
|
aa3a1e0237 | ||
|
|
68e53c426b | ||
|
|
fcb04c0ae7 | ||
|
|
b096fd2a24 | ||
|
|
cc94650bad | ||
|
|
1b2f75ca47 | ||
|
|
55064a548d | ||
|
|
cb051b8686 | ||
|
|
fae0e69619 | ||
|
|
d21e21ebf6 | ||
|
|
ff14dcaf56 | ||
|
|
83645e39ee | ||
|
|
73f4cdfb20 | ||
|
|
ec06c2fcb2 | ||
|
|
6c49de9512 | ||
|
|
ef16b33fd8 | ||
|
|
ba56fb89b3 | ||
|
|
395297e08b | ||
|
|
a20636347c | ||
|
|
170c3f0e9f | ||
|
|
b45f977de9 | ||
|
|
df4e87fdf2 | ||
|
|
40fa505146 | ||
|
|
9076b9f07e | ||
|
|
ac2b8650b8 | ||
|
|
5353336b9d | ||
|
|
78a9dc5835 | ||
|
|
57fff46dd8 | ||
|
|
59cc1e6ed9 | ||
|
|
748b113fe9 | ||
|
|
b920e94cc5 | ||
|
|
ea63773f4f | ||
|
|
4bea5020b1 | ||
|
|
0c5a5e6fc9 | ||
|
|
6b659ac9a9 | ||
|
|
b30b40f259 | ||
|
|
43680df2e2 | ||
|
|
dc621af59d | ||
|
|
5ea16b8ace | ||
|
|
b800b624ae | ||
|
|
9364e70986 | ||
|
|
4b03c7d9e0 | ||
|
|
937328a833 | ||
|
|
699fc2ac66 | ||
|
|
803712f0db | ||
|
|
2dbc8f33ea | ||
|
|
e2361baa37 | ||
|
|
1ec5aa8056 | ||
|
|
863e985bc6 | ||
|
|
b40cbc1811 | ||
|
|
5913bbb4c7 | ||
|
|
fc621bb31a | ||
|
|
d620566562 | ||
|
|
4d2d8c89f6 | ||
|
|
e325cc3b93 | ||
|
|
a5dc656656 | ||
|
|
b1799197fe | ||
|
|
4b37169735 | ||
|
|
2531595828 | ||
|
|
9394758ff9 | ||
|
|
713e59fb32 | ||
|
|
f0641f4113 | ||
|
|
7739339515 | ||
|
|
af556f0a75 | ||
|
|
90a87e0e93 | ||
|
|
ccb6bcb616 | ||
|
|
460163089b | ||
|
|
448b7a6c4d | ||
|
|
24c7171a73 | ||
|
|
379ab1c375 | ||
|
|
968c9529c8 | ||
|
|
f96ad7773f | ||
|
|
03a12e509e | ||
|
|
19d78117cb | ||
|
|
1a592beaea | ||
|
|
05c2ef7848 | ||
|
|
17c2767de5 | ||
|
|
006188e07d | ||
|
|
322358b0f0 | ||
|
|
3db0742889 | ||
|
|
d2849bfe9e | ||
|
|
ac8fae69c6 | ||
|
|
1881916c8e | ||
|
|
08952e7f22 | ||
|
|
eb0d0ebfc1 | ||
|
|
33d9e53327 | ||
|
|
53fa86ba4a | ||
|
|
b135ee423b | ||
|
|
25fb3cc6a0 | ||
|
|
b073e7d61c | ||
|
|
781142e8f2 | ||
|
|
3e87044901 | ||
|
|
cb01867ba6 | ||
|
|
1fcdb910a2 | ||
|
|
cb5df8e7e6 | ||
|
|
815cf0a6e4 | ||
|
|
72914aa6e1 | ||
|
|
404c9592ec | ||
|
|
c2371d29a6 | ||
|
|
25c03b677a | ||
|
|
b9c2e6afb9 | ||
|
|
3f29a03ba4 | ||
|
|
b4db394761 | ||
|
|
a85a9c52be | ||
|
|
6be3fde55c | ||
|
|
161028537c | ||
|
|
426fdbd7ee | ||
|
|
90060a290e | ||
|
|
b4c462a66c | ||
|
|
18d5697827 | ||
|
|
75d0943548 | ||
|
|
78b9efc04b | ||
|
|
6c2bb3ded8 | ||
|
|
312036587e | ||
|
|
0f97610473 | ||
|
|
c825c6af28 | ||
|
|
394eb7996c | ||
|
|
c7619f93dc | ||
|
|
ee67442965 | ||
|
|
f70488eab7 | ||
|
|
4cb51c3bba | ||
|
|
d77d76f184 | ||
|
|
b3224e9ad3 | ||
|
|
6bd457700e | ||
|
|
4b189b73dd | ||
|
|
c86050bc3b | ||
|
|
10cd949696 | ||
|
|
81d4dbbdba | ||
|
|
14197fe6c0 | ||
|
|
5cda2fc25b | ||
|
|
8b0c4dd29a | ||
|
|
2ab99dd2b4 | ||
|
|
3f69a044d3 | ||
|
|
76d0078497 | ||
|
|
523f272c58 | ||
|
|
475e347fe6 | ||
|
|
2bd6d63fe4 | ||
|
|
db14ac6e06 | ||
|
|
584678d67e | ||
|
|
503bba6516 | ||
|
|
815dc47846 | ||
|
|
e52cf7ae00 | ||
|
|
eb2d6e776f | ||
|
|
af85d6f81f | ||
|
|
d84ee23039 | ||
|
|
ea1d3f669b | ||
|
|
47b4248de2 | ||
|
|
33e9188612 | ||
|
|
2f6c9c8c0a | ||
|
|
7128789d48 | ||
|
|
19068da3f8 | ||
|
|
10851db1a9 | ||
|
|
1b8d6b85db | ||
|
|
653fa39cf7 | ||
|
|
7b0713675c | ||
|
|
52ed3913c8 | ||
|
|
6d23e72bd7 |
31
.gitmodules
vendored
Normal file
31
.gitmodules
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[submodule "dotfiles/vim/pack/matir/opt/solarized8"]
|
||||
path = dotfiles/vim/pack/matir/opt/solarized8
|
||||
url = https://github.com/lifepillar/vim-solarized8.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/surround"]
|
||||
path = dotfiles/vim/pack/matir/start/surround
|
||||
url = https://github.com/tpope/vim-surround.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/editorconfig"]
|
||||
path = dotfiles/vim/pack/matir/start/editorconfig
|
||||
url = https://github.com/editorconfig/editorconfig-vim.git
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/fugitive"]
|
||||
path = dotfiles/vim/pack/matir/start/fugitive
|
||||
url = https://github.com/tpope/vim-fugitive
|
||||
fetchRecurseSubmodules = true
|
||||
[submodule "dotfiles/vim/pack/matir/start/ctrlp"]
|
||||
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
|
||||
@@ -5,6 +5,7 @@ set -o nounset
|
||||
|
||||
if test -f /etc/apt/apt.conf.d/90-proxy ; then
|
||||
echo "Looks already setup."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat >/etc/apt/proxy-detect <<'EOF'
|
||||
@@ -25,7 +26,7 @@ fi
|
||||
echo DIRECT
|
||||
EOF
|
||||
|
||||
chmod +x /etc/apt/proxy-detect
|
||||
chmod 755 /etc/apt/proxy-detect
|
||||
|
||||
cat >/etc/apt/apt.conf.d/90-proxy <<'EOF'
|
||||
Acquire::http::Proxy-Auto-Detect "/etc/apt/proxy-detect";
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
apt-get install -y \
|
||||
i3 i3lock xss-lock rxvt-unicode-256color fonts-inconsolata scrot \
|
||||
xautolock xbacklight i3status dex
|
||||
xautolock xbacklight i3status dex libnotify-bin
|
||||
|
||||
22
bin/disk-benchmark
Executable file
22
bin/disk-benchmark
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ue
|
||||
|
||||
FILENAME=${1}
|
||||
BENCHMARK_SIZE=${BENCHMARK_SIZE:-1000m}
|
||||
|
||||
if [ -f ${FILENAME} ] ; then
|
||||
echo "File ${FILENAME} already exists!" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap "test -f ${FILENAME} && rm -f ${FILENAME}" EXIT
|
||||
|
||||
fio --loops=5 --size=${BENCHMARK_SIZE} --filename=${FILENAME} \
|
||||
--stonewall --ioengine=libaio --direct=1 \
|
||||
--name=Seqread --bs=1m --rw=read \
|
||||
--name=Seqwrite --bs=1m --rw=write \
|
||||
--name=512Kread --bs=512k --rw=randread \
|
||||
--name=512Kwrite --bs=512k --rw=randwrite \
|
||||
--name=4kQD32read --bs=4k --iodepth=32 --rw=randread \
|
||||
--name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
LOCKER="i3lock -c 000000"
|
||||
/usr/bin/xss-lock -- "${LOCKER}" &
|
||||
# intentionally want word splitting below
|
||||
/usr/bin/xss-lock -- ${LOCKER} &
|
||||
exec /usr/bin/xautolock \
|
||||
-time 5 \
|
||||
-detectsleep \
|
||||
|
||||
@@ -65,6 +65,17 @@ function check_sudo {
|
||||
sudo -l >/dev/null
|
||||
}
|
||||
|
||||
function add_bin_symlink {
|
||||
local TARGET NAME BINDIR
|
||||
TARGET=${1}
|
||||
NAME=${2:-$(basename ${1})}
|
||||
BINDIR=${HOME}/bin/tools/
|
||||
mkdir -p -- ${BINDIR}
|
||||
ln -sf ${DESTDIR}/${TARGET} ${BINDIR}/${NAME}
|
||||
}
|
||||
|
||||
mkdir -p "${HOME}/tools"
|
||||
|
||||
DESTDIR="${HOME}/tools/${TOOL}"
|
||||
|
||||
if [ -d ${DESTDIR} ] ; then
|
||||
@@ -76,6 +87,7 @@ if [ -d ${DESTDIR} ] ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Begin main tool selection
|
||||
case ${TOOL} in
|
||||
john)
|
||||
install_pkgs libssl-dev git build-essential yasm libgmp-dev libpcap-dev \
|
||||
@@ -92,6 +104,7 @@ case ${TOOL} in
|
||||
mkdir -p ${HOME}/.john
|
||||
touch ${HOME}/.john/john.pot
|
||||
ln -sf ${HOME}/.john/* ${DESTDIR}
|
||||
add_bin_symlink john
|
||||
;;
|
||||
wordlists)
|
||||
mkdir -p ${DESTDIR}
|
||||
@@ -108,15 +121,19 @@ case ${TOOL} in
|
||||
${DESTDIR}/hak5.txt.bz2
|
||||
bunzip2 ${DESTDIR}/hak5.txt.bz2
|
||||
;;
|
||||
seclists)
|
||||
git clone https://github.com/danielmiessler/SecLists.git ${DESTDIR}
|
||||
;;
|
||||
gcloud)
|
||||
mkdir -p ${DESTDIR}
|
||||
gtemp=`mktemp -d`
|
||||
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
|
||||
# TODO: find a way to make this version independent
|
||||
gsdk="google-cloud-sdk-142.0.0-linux-x86_64.tar.gz"
|
||||
gsdk="google-cloud-sdk-209.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
|
||||
add_bin_symlink bin/gcloud
|
||||
;;
|
||||
android-sdk)
|
||||
# TODO: find a way to make this version independent
|
||||
@@ -144,11 +161,13 @@ case ${TOOL} in
|
||||
fi
|
||||
;;
|
||||
mitmproxy)
|
||||
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"].endswith("-linux.tar.gz"), json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["assets"])[0]["browser_download_url"])')
|
||||
download ${src} /tmp/mitmproxy.tar.gz
|
||||
ver=$(python -c 'import urllib2; import json; print(json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["name"].replace("v",""))')
|
||||
download https://snapshots.mitmproxy.org/${ver}/mitmproxy-${ver}-linux.tar.gz /tmp/mitmproxy.tar.gz
|
||||
mkdir -p ${DESTDIR}
|
||||
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
|
||||
rm /tmp/mitmproxy.tar.gz
|
||||
add_bin_symlink mitmproxy
|
||||
add_bin_symlink mitmweb
|
||||
;;
|
||||
esp)
|
||||
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
|
||||
@@ -187,8 +206,53 @@ case ${TOOL} in
|
||||
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
|
||||
;;
|
||||
apktool)
|
||||
mkdir -p ${DESTDIR}
|
||||
download \
|
||||
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
|
||||
${DESTDIR}/apktool
|
||||
download \
|
||||
https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar \
|
||||
${DESTDIR}/apktool.jar
|
||||
chmod +x ${DESTDIR}/apktool
|
||||
add_bin_symlink apktool
|
||||
;;
|
||||
ptf)
|
||||
src="https://github.com/trustedsec/ptf.git"
|
||||
git clone ${src} ${DESTDIR}
|
||||
;;
|
||||
pwndbg)
|
||||
if ! which gdb > /dev/null 2>&1 ; then
|
||||
echo 'No gdb available!' >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
git clone --depth 1 -b stable https://github.com/pwndbg/pwndbg.git ${DESTDIR}
|
||||
local PY_PACKAGES=${DESTDIR}/vendor
|
||||
mkdir -p ${PY_PACKAGES}
|
||||
local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
|
||||
local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
||||
PYTHON="${PYTHON}${PYVER}"
|
||||
${PYTHON} -m pip install --target ${PY_PACKAGES} -Ur ${DESTDIR}/requirements.txt
|
||||
${PYTHON} -m pip install --target ${PY_PACKAGES} -U capstone unicorn
|
||||
# capstone package is broken
|
||||
cp ${PY_PACKAGES}/usr/lib/*/dist-packages/capstone/libcapstone.so ${PY_PACKAGES}/capstone
|
||||
;;
|
||||
gef)
|
||||
if ! which gdb > /dev/null 2>&1 ; then
|
||||
echo 'No gdb available!' >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p ${DESTDIR}
|
||||
download \
|
||||
https://github.com/hugsy/gef/raw/master/gef.py \
|
||||
${DESTDIR}/gef.py
|
||||
;;
|
||||
*)
|
||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||
echo "Options:" >/dev/stderr
|
||||
for opt in $(awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' $0|sort); do
|
||||
echo -e "\t${opt}" >/dev/stderr
|
||||
done
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,33 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
export NAME=$(basename "$0")
|
||||
export BASE="/opt/metasploit" # TODO: search this path
|
||||
export BASE="/opt/metasploit-framework" # TODO: search this path
|
||||
unset GEM_PATH
|
||||
|
||||
# Autogen'd
|
||||
if [ -f "${BASE}/scripts/setenv.sh" ] ; then
|
||||
. ${BASE}/scripts/setenv.sh
|
||||
if [ -f "${BASE}/bin/${NAME}" ] ; then
|
||||
exec "${BASE}/bin/${NAME}" "$@"
|
||||
fi
|
||||
|
||||
# Use Pro's bundled gems instead of the gemcache
|
||||
export MSF_BUNDLE_GEMS=0
|
||||
export BUNDLE_GEMFILE=${BASE}/apps/pro/Gemfile
|
||||
|
||||
# Set a flag so Gemfile can limit gems
|
||||
export FRAMEWORK_FLAG=true
|
||||
|
||||
export MSF_DATABASE_CONFIG=${BASE}/apps/pro/ui/config/database.yml
|
||||
export TERMINFO=${BASE}/common/share/terminfo/
|
||||
|
||||
# Check for ruby scripts such as msfconsole directly to avoid having to add
|
||||
# msf3 to the path.
|
||||
if [ -f "${BASE}/apps/pro/msf3/${NAME}" ]; then
|
||||
exec ${BASE}/apps/pro/msf3/${NAME} "$@"
|
||||
fi
|
||||
if [ -f "${BASE}/apps/pro/msf3/tools/exploit/${NAME}.rb" ]; then
|
||||
exec ${BASE}/apps/pro/msf3/tools/exploit/${NAME}.rb "$@"
|
||||
fi
|
||||
|
||||
export BASE="/opt/metasploit-framework"
|
||||
if [ -f "${BASE}/embedded/framework/tools/exploit/${NAME}.rb" ]; then
|
||||
exec ${BASE}/embedded/bin/ruby \
|
||||
"${BASE}/embedded/framework/tools/exploit/${NAME}.rb" "$@"
|
||||
|
||||
26
chromeos/hterm.json
Normal file
26
chromeos/hterm.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"background-color": "rgba(0, 43, 54, 1)",
|
||||
"cursor-color": "rgba(238, 232, 213, 0.5)",
|
||||
"color-palette-overrides": {
|
||||
"0": "#073642",
|
||||
"1": "#dc322f",
|
||||
"2": "#859900",
|
||||
"3": "#b58900",
|
||||
"4": "#268bd2",
|
||||
"5": "#d33682",
|
||||
"6": "#2aa198",
|
||||
"7": "#eee8d5",
|
||||
"8": "#002b36",
|
||||
"9": "#cb4b16",
|
||||
"10": "#586e75",
|
||||
"11": "#657b83",
|
||||
"12": "#839496",
|
||||
"13": "#6c71c4",
|
||||
"14": "#93a1a1",
|
||||
"15": "#fdf6e3"
|
||||
},
|
||||
"font-family": "\"Inconsolata\", \"DejaVu Sans Mono\", \"Noto Sans Mono\", \"Everson Mono\", FreeMono, Menlo, Terminal, monospace",
|
||||
"font-size": "15",
|
||||
"foreground-color": "rgba(238, 232, 213, 1)",
|
||||
"user-css": "https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts@ba4426cb0c0b05eb6cb342c7719776a41e1f2114/PowerlineFonts.css"
|
||||
}
|
||||
@@ -4,7 +4,7 @@ Xcursor.size: 16
|
||||
! Xft for fonts
|
||||
!!!
|
||||
!Xft.dpi: 144
|
||||
Xft.antialias: false
|
||||
Xft.antialias: true
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.rgba: rgb
|
||||
Xft.hinting: true
|
||||
@@ -27,21 +27,34 @@ URxvt.lineSpace: 0
|
||||
URxvt.iso14755: false
|
||||
|
||||
! Fonts
|
||||
URxvt*font: xft:inconsolata:pixelsize=16
|
||||
URxvt.font: xft:inconsolata:pixelsize=17,xft:monospace:size=12
|
||||
|
||||
! Fix font space
|
||||
URxvt*letterSpace: -1
|
||||
URxvt.letterSpace: -1
|
||||
|
||||
! Scrollbar
|
||||
! Scrollbar and scrolling
|
||||
URxvt.scrollStyle: rxvt
|
||||
URxvt.scrollBar: false
|
||||
! do not scroll with output
|
||||
URxvt.scrollTtyOutput: false
|
||||
! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
|
||||
URxvt.scrollWithBuffer: true
|
||||
! scroll back to the bottom on keypress
|
||||
URxvt.scrollTtyKeypress: true
|
||||
|
||||
! Allow apps to manage their own secondary screen
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
|
||||
! Perl extensions
|
||||
URxvt.perl-ext-common: default,matcher,resize-font
|
||||
URxvt.perl-ext-common: default,matcher,font-size,eval
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.urlLauncher: /usr/bin/xdg-open
|
||||
URxvt.resize-font.smaller: C-Down
|
||||
URxvt.resize-font.bigger: C-Up
|
||||
URxvt.url-launcher: /usr/bin/xdg-open
|
||||
|
||||
! Copy/Paste Stuff
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
|
||||
! Cursor
|
||||
URxvt.cursorBlink: true
|
||||
@@ -50,12 +63,21 @@ URxvt.cursorUnderline: false
|
||||
! Pointer
|
||||
URxvt.pointerBlank: true
|
||||
|
||||
! Solarized colors begin
|
||||
URxvt.background: #002b36
|
||||
URxvt.foreground: #657b83
|
||||
URxvt.fadeColor: #002b36
|
||||
URxvt.cursorColor: #93a1a1
|
||||
! Disable printing the terminal contents when pressing PrintScreen.
|
||||
URxvt.print-pipe: "cat > /dev/null"
|
||||
|
||||
!!! Solarized colors begin
|
||||
! base03
|
||||
URxvt.background: #002b36
|
||||
! base0
|
||||
URxvt.foreground: #839496
|
||||
! base03
|
||||
URxvt.fadeColor: #002b36
|
||||
! base1
|
||||
URxvt.cursorColor: #93a1a1
|
||||
! base01
|
||||
URxvt.pointerColorBackground: #586e75
|
||||
! base1
|
||||
URxvt.pointerColorForeground: #93a1a1
|
||||
|
||||
!! black dark/light
|
||||
|
||||
@@ -8,9 +8,11 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
||||
alias luksFormat='cryptsetup luksFormat -s 512 -c aes-xts-plain64 -h sha256 -i 15000'
|
||||
|
||||
# Colors
|
||||
if [ `uname` != 'Darwin' -a `uname` != 'NetBSD' ] ; then
|
||||
# Should have a better way to check for GNU versions
|
||||
if ls --version >/dev/null 2>&1 ; then
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
if [ `uname` != 'Darwin' -a `uname` != 'NetBSD' -a `uname` != 'FreeBSD' -a `uname` != 'OpenBSD' ] ; then
|
||||
# Should have a better way to check for GNU versions
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
@@ -33,3 +35,6 @@ alias dircount="for d in * ; do find \$d -type d | wc -l | tr -d '\n' ; echo ' '
|
||||
|
||||
# Drop caches for swap issues
|
||||
alias drop_caches="echo 3 | sudo /usr/bin/tee /proc/sys/vm/drop_caches"
|
||||
|
||||
# dump acpi temperature
|
||||
alias temp='printf "%02.2f\n" "$(cat /sys/class/thermal/thermal_zone0/temp)e-3"'
|
||||
|
||||
@@ -130,10 +130,11 @@ bindsym $alt+Control+Left workspace prev
|
||||
|
||||
# i3 lock
|
||||
exec --no-startup-id ~/bin/i3lock.sh &
|
||||
exec --no-startup-id xset dpms 600
|
||||
bindsym $mod+l exec \
|
||||
bash -c "i3lock -c 000000 -d && (sleep 2 && xset dpms force off) &"
|
||||
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
|
||||
bindsym $alt+Control+l exec \
|
||||
bash -c "i3lock -c 000000 -d && (sleep 2 && xset dpms force off) &"
|
||||
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
|
||||
|
||||
# things to start quickly
|
||||
bindsym $mod+g exec /usr/bin/google-chrome-beta --password-store=gnome
|
||||
@@ -169,14 +170,14 @@ bindsym --release $alt+Sys_Req exec --no-startup-id \
|
||||
/usr/bin/scrot -s $screendir/$scrotformat
|
||||
|
||||
# useful utilities
|
||||
exec --no-startup-id \
|
||||
(which xss-lock >/dev/null || /usr/bin/cinnamon-settings-daemon) &
|
||||
#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 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 ~/bin/autostart.py
|
||||
exec --no-startup-id dex --autostart --environment x-cinnamon
|
||||
|
||||
# customize windows
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
function general {
|
||||
cat <<-EOF
|
||||
cat <<-EOF
|
||||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
@@ -45,6 +45,17 @@ function wireless {
|
||||
}
|
||||
|
||||
function wired {
|
||||
local def_iface="$(ip route get 1.1.1.1 2>&1 | grep -oP 'dev \K\S+')"
|
||||
if test -n "${def_iface}" ; then
|
||||
cat <<-EOF
|
||||
ethernet "${def_iface}" {
|
||||
format_up = "E: %ip"
|
||||
format_down = "E: down"
|
||||
}
|
||||
order += "ethernet ${def_iface}"
|
||||
EOF
|
||||
return 0
|
||||
fi
|
||||
cat <<-EOF
|
||||
ethernet _first_ {
|
||||
format_up = "E: %ip"
|
||||
@@ -107,7 +118,7 @@ function battery {
|
||||
}
|
||||
|
||||
function audio {
|
||||
cat <<-EOF
|
||||
cat <<-EOF
|
||||
volume master {
|
||||
format = "♪: %volume"
|
||||
format_muted = "♪: MUTE"
|
||||
|
||||
1
dotfiles/config/systemd/user/tracker-store.service
Symbolic link
1
dotfiles/config/systemd/user/tracker-store.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/dev/null
|
||||
@@ -1,16 +1,51 @@
|
||||
|
||||
# Dark 256 color solarized theme for the color GNU ls utility.
|
||||
# Used and tested with dircolors (GNU coreutils) 8.5
|
||||
# Exact Solarized Dark color theme for the color GNU ls utility.
|
||||
# Designed for dircolors (GNU coreutils) 5.97
|
||||
#
|
||||
# @author {@link http://sebastian.tramp.name Sebastian Tramp}
|
||||
# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL)
|
||||
# This simple theme was simultaneously designed for these terminal color schemes:
|
||||
# - Solarized dark (best)
|
||||
# - Solarized light
|
||||
# - default dark
|
||||
# - default light
|
||||
# with a slight optimization for Solarized Dark.
|
||||
#
|
||||
# More Information at
|
||||
# https://github.com/seebi/dircolors-solarized
|
||||
# How the colors were selected:
|
||||
# - Terminal emulators often have an option typically enabled by default that makes
|
||||
# bold a different color. It is important to leave this option enabled so that
|
||||
# you can access the entire 16-color Solarized palette, and not just 8 colors.
|
||||
# - We favor universality over a greater number of colors. So we limit the number
|
||||
# of colors so that this theme will work out of the box in all terminals,
|
||||
# Solarized or not, dark or light.
|
||||
# - We choose to have the following category of files:
|
||||
# NORMAL & FILE, DIR, LINK, EXEC and
|
||||
# editable text including source, unimportant text, binary docs & multimedia source
|
||||
# files, viewable multimedia, archived/compressed, and unimportant non-text
|
||||
# - For uniqueness, we stay away from the Solarized foreground colors are -- either
|
||||
# base00 (brightyellow) or base0 (brightblue). However, they can be used if
|
||||
# you know what the bg/fg colors of your terminal are, in order to optimize the display.
|
||||
# - 3 different options are provided: universal, solarized dark, and solarized light.
|
||||
# The only difference between the universal scheme and one that's optimized for
|
||||
# dark/light is the color of "unimportant" files, which should blend more with the
|
||||
# background
|
||||
# - We note that blue is the hardest color to see on dark bg and yellow is the hardest
|
||||
# color to see on light bg (with blue being particularly bad). So we choose yellow
|
||||
# for multimedia files which are usually accessed in a GUI folder browser anyway.
|
||||
# And blue is kept for custom use of this scheme's user.
|
||||
# - See table below to see the assignments.
|
||||
|
||||
# Term Section
|
||||
TERM Eterm
|
||||
|
||||
# Installation instructions:
|
||||
# This file goes in the /etc directory, and must be world readable.
|
||||
# You can copy this file to .dir_colors in your $HOME directory to override
|
||||
# the system defaults.
|
||||
|
||||
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
|
||||
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
|
||||
# off.
|
||||
COLOR tty
|
||||
|
||||
# Below, there should be one TERM entry for each termtype that is colorizable
|
||||
TERM ansi
|
||||
TERM color_xterm
|
||||
TERM color-xterm
|
||||
TERM con132x25
|
||||
TERM con132x30
|
||||
@@ -28,6 +63,7 @@ TERM cygwin
|
||||
TERM dtterm
|
||||
TERM dvtm
|
||||
TERM dvtm-256color
|
||||
TERM Eterm
|
||||
TERM eterm-color
|
||||
TERM fbterm
|
||||
TERM gnome
|
||||
@@ -40,6 +76,7 @@ TERM linux
|
||||
TERM linux-c
|
||||
TERM mach-color
|
||||
TERM mlterm
|
||||
TERM nxterm
|
||||
TERM putty
|
||||
TERM putty-256color
|
||||
TERM rxvt
|
||||
@@ -63,12 +100,16 @@ TERM screen-bce
|
||||
TERM screen-w
|
||||
TERM screen.linux
|
||||
TERM screen.xterm-256color
|
||||
TERM screen.xterm-new
|
||||
TERM st
|
||||
TERM st-meta
|
||||
TERM st-256color
|
||||
TERM st-meta-256color
|
||||
TERM tmux
|
||||
TERM tmux-256color
|
||||
TERM vt100
|
||||
TERM xterm
|
||||
TERM xterm-new
|
||||
TERM xterm-16color
|
||||
TERM xterm-256color
|
||||
TERM xterm-256color-italic
|
||||
@@ -77,219 +118,363 @@ TERM xterm-color
|
||||
TERM xterm-debian
|
||||
TERM xterm-termite
|
||||
|
||||
## Documentation
|
||||
#
|
||||
# standard colors
|
||||
#
|
||||
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
|
||||
EIGHTBIT 1
|
||||
|
||||
#############################################################################
|
||||
# Below are the color init strings for the basic file types. A color init
|
||||
# string consists of one or more of the following numeric codes:
|
||||
#
|
||||
# Attribute codes:
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
|
||||
# Text color codes:
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
|
||||
# Background color codes:
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
|
||||
#
|
||||
#
|
||||
# 256 color support
|
||||
# see here: http://www.mail-archive.com/bug-coreutils@gnu.org/msg11030.html)
|
||||
#
|
||||
# Text 256 color coding:
|
||||
# 38;5;COLOR_NUMBER
|
||||
# Background 256 color coding:
|
||||
# 48;5;COLOR_NUMBER
|
||||
|
||||
## Special files
|
||||
|
||||
NORMAL 00;38;5;244 # no color code at all
|
||||
#FILE 00 # regular file: use no color at all
|
||||
RESET 0 # reset to "normal" color
|
||||
DIR 00;38;5;33 # directory 01;34
|
||||
LINK 00;38;5;37 # symbolic link. (If you set this to 'target' instead of a
|
||||
# numerical value, the color is as for the file pointed to.)
|
||||
MULTIHARDLINK 00 # regular file with more than one link
|
||||
FIFO 48;5;230;38;5;136;01 # pipe
|
||||
SOCK 48;5;230;38;5;136;01 # socket
|
||||
DOOR 48;5;230;38;5;136;01 # door
|
||||
BLK 48;5;230;38;5;244;01 # block device driver
|
||||
CHR 48;5;230;38;5;244;01 # character device driver
|
||||
ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file
|
||||
SETUID 48;5;160;38;5;230 # file that is setuid (u+s)
|
||||
SETGID 48;5;136;38;5;230 # file that is setgid (g+s)
|
||||
CAPABILITY 30;41 # file with capability
|
||||
STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w)
|
||||
OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky
|
||||
STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable
|
||||
# This is for files with execute permission:
|
||||
EXEC 00;38;5;64
|
||||
|
||||
## Archives or compressed (violet + bold for compression)
|
||||
.tar 00;38;5;61
|
||||
.tgz 00;38;5;61
|
||||
.arj 00;38;5;61
|
||||
.taz 00;38;5;61
|
||||
.lzh 00;38;5;61
|
||||
.lzma 00;38;5;61
|
||||
.tlz 00;38;5;61
|
||||
.txz 00;38;5;61
|
||||
.zip 00;38;5;61
|
||||
.z 00;38;5;61
|
||||
.Z 00;38;5;61
|
||||
.dz 00;38;5;61
|
||||
.gz 00;38;5;61
|
||||
.lz 00;38;5;61
|
||||
.xz 00;38;5;61
|
||||
.bz2 00;38;5;61
|
||||
.bz 00;38;5;61
|
||||
.tbz 00;38;5;61
|
||||
.tbz2 00;38;5;61
|
||||
.tz 00;38;5;61
|
||||
.deb 00;38;5;61
|
||||
.rpm 00;38;5;61
|
||||
.jar 00;38;5;61
|
||||
.rar 00;38;5;61
|
||||
.ace 00;38;5;61
|
||||
.zoo 00;38;5;61
|
||||
.cpio 00;38;5;61
|
||||
.7z 00;38;5;61
|
||||
.rz 00;38;5;61
|
||||
.apk 00;38;5;61
|
||||
.gem 00;38;5;61
|
||||
|
||||
# Image formats (yellow)
|
||||
.jpg 00;38;5;136
|
||||
.JPG 00;38;5;136 #stupid but needed
|
||||
.jpeg 00;38;5;136
|
||||
.gif 00;38;5;136
|
||||
.bmp 00;38;5;136
|
||||
.pbm 00;38;5;136
|
||||
.pgm 00;38;5;136
|
||||
.ppm 00;38;5;136
|
||||
.tga 00;38;5;136
|
||||
.xbm 00;38;5;136
|
||||
.xpm 00;38;5;136
|
||||
.tif 00;38;5;136
|
||||
.tiff 00;38;5;136
|
||||
.png 00;38;5;136
|
||||
.PNG 00;38;5;136
|
||||
.svg 00;38;5;136
|
||||
.svgz 00;38;5;136
|
||||
.mng 00;38;5;136
|
||||
.pcx 00;38;5;136
|
||||
.dl 00;38;5;136
|
||||
.xcf 00;38;5;136
|
||||
.xwd 00;38;5;136
|
||||
.yuv 00;38;5;136
|
||||
.cgm 00;38;5;136
|
||||
.emf 00;38;5;136
|
||||
.eps 00;38;5;136
|
||||
.CR2 00;38;5;136
|
||||
.ico 00;38;5;136
|
||||
|
||||
# Files of special interest (base1)
|
||||
.tex 00;38;5;245
|
||||
.rdf 00;38;5;245
|
||||
.owl 00;38;5;245
|
||||
.n3 00;38;5;245
|
||||
.ttl 00;38;5;245
|
||||
.nt 00;38;5;245
|
||||
.torrent 00;38;5;245
|
||||
.xml 00;38;5;245
|
||||
*Makefile 00;38;5;245
|
||||
*Rakefile 00;38;5;245
|
||||
*Dockerfile 00;38;5;245
|
||||
*build.xml 00;38;5;245
|
||||
*rc 00;38;5;245
|
||||
*1 00;38;5;245
|
||||
.nfo 00;38;5;245
|
||||
*README 00;38;5;245
|
||||
*README.txt 00;38;5;245
|
||||
*readme.txt 00;38;5;245
|
||||
.md 00;38;5;245
|
||||
*README.markdown 00;38;5;245
|
||||
.ini 00;38;5;245
|
||||
.yml 00;38;5;245
|
||||
.cfg 00;38;5;245
|
||||
.conf 00;38;5;245
|
||||
.c 00;38;5;245
|
||||
.cpp 00;38;5;245
|
||||
.cc 00;38;5;245
|
||||
.sqlite 00;38;5;245
|
||||
.go 00;38;5;245
|
||||
.sql 00;38;5;245
|
||||
|
||||
# "unimportant" files as logs and backups (base01)
|
||||
.log 00;38;5;240
|
||||
.bak 00;38;5;240
|
||||
.aux 00;38;5;240
|
||||
.lof 00;38;5;240
|
||||
.lol 00;38;5;240
|
||||
.lot 00;38;5;240
|
||||
.out 00;38;5;240
|
||||
.toc 00;38;5;240
|
||||
.bbl 00;38;5;240
|
||||
.blg 00;38;5;240
|
||||
*~ 00;38;5;240
|
||||
*# 00;38;5;240
|
||||
.part 00;38;5;240
|
||||
.incomplete 00;38;5;240
|
||||
.swp 00;38;5;240
|
||||
.tmp 00;38;5;240
|
||||
.temp 00;38;5;240
|
||||
.o 00;38;5;240
|
||||
.pyc 00;38;5;240
|
||||
.class 00;38;5;240
|
||||
.cache 00;38;5;240
|
||||
|
||||
# Audio formats (orange)
|
||||
.aac 00;38;5;166
|
||||
.au 00;38;5;166
|
||||
.flac 00;38;5;166
|
||||
.mid 00;38;5;166
|
||||
.midi 00;38;5;166
|
||||
.mka 00;38;5;166
|
||||
.mp3 00;38;5;166
|
||||
.mpc 00;38;5;166
|
||||
.ogg 00;38;5;166
|
||||
.ra 00;38;5;166
|
||||
.wav 00;38;5;166
|
||||
.m4a 00;38;5;166
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axa 00;38;5;166
|
||||
.oga 00;38;5;166
|
||||
.spx 00;38;5;166
|
||||
.xspf 00;38;5;166
|
||||
|
||||
# Video formats (as audio + bold)
|
||||
.mov 00;38;5;166
|
||||
.MOV 00;38;5;166
|
||||
.mpg 00;38;5;166
|
||||
.mpeg 00;38;5;166
|
||||
.m2v 00;38;5;166
|
||||
.mkv 00;38;5;166
|
||||
.ogm 00;38;5;166
|
||||
.mp4 00;38;5;166
|
||||
.m4v 00;38;5;166
|
||||
.mp4v 00;38;5;166
|
||||
.vob 00;38;5;166
|
||||
.qt 00;38;5;166
|
||||
.nuv 00;38;5;166
|
||||
.wmv 00;38;5;166
|
||||
.asf 00;38;5;166
|
||||
.rm 00;38;5;166
|
||||
.rmvb 00;38;5;166
|
||||
.flc 00;38;5;166
|
||||
.avi 00;38;5;166
|
||||
.fli 00;38;5;166
|
||||
.flv 00;38;5;166
|
||||
.gl 00;38;5;166
|
||||
.m2ts 00;38;5;166
|
||||
.divx 00;38;5;166
|
||||
.webm 00;38;5;166
|
||||
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
|
||||
.axv 00;38;5;166
|
||||
.anx 00;38;5;166
|
||||
.ogv 00;38;5;166
|
||||
.ogx 00;38;5;166
|
||||
# NOTES:
|
||||
# - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html
|
||||
# - Color combinations
|
||||
# ANSI Color code Solarized Notes Universal SolDark SolLight
|
||||
# ~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~ ~~~~~~~~~ ~~~~~~~ ~~~~~~~~
|
||||
# 00 none NORMAL, FILE <SAME> <SAME>
|
||||
# 30 black base02
|
||||
# 01;30 bright black base03 bg of SolDark
|
||||
# 31 red red docs & mm src <SAME> <SAME>
|
||||
# 01;31 bright red orange EXEC <SAME> <SAME>
|
||||
# 32 green green editable text <SAME> <SAME>
|
||||
# 01;32 bright green base01 unimportant text <SAME>
|
||||
# 33 yellow yellow unclear in light bg multimedia <SAME> <SAME>
|
||||
# 01;33 bright yellow base00 fg of SolLight unimportant non-text
|
||||
# 34 blue blue unclear in dark bg user customized <SAME> <SAME>
|
||||
# 01;34 bright blue base0 fg in SolDark unimportant text
|
||||
# 35 magenta magenta LINK <SAME> <SAME>
|
||||
# 01;35 bright magenta violet archive/compressed <SAME> <SAME>
|
||||
# 36 cyan cyan DIR <SAME> <SAME>
|
||||
# 01;36 bright cyan base1 unimportant non-text <SAME>
|
||||
# 37 white base2
|
||||
# 01;37 bright white base3 bg in SolLight
|
||||
# 05;37;41 unclear in Putty dark
|
||||
|
||||
|
||||
### By file type
|
||||
|
||||
# global default
|
||||
NORMAL 00
|
||||
# normal file
|
||||
FILE 00
|
||||
# directory
|
||||
DIR 34
|
||||
# 777 directory
|
||||
OTHER_WRITABLE 34;40
|
||||
# symbolic link
|
||||
LINK 35
|
||||
|
||||
# pipe, socket, block device, character device (blue bg)
|
||||
FIFO 30;44
|
||||
SOCK 35;44
|
||||
DOOR 35;44 # Solaris 2.5 and later
|
||||
BLK 33;44
|
||||
CHR 37;44
|
||||
|
||||
|
||||
#############################################################################
|
||||
### By file attributes
|
||||
|
||||
# Orphaned symlinks (blinking white on red)
|
||||
# Blink may or may not work (works on iTerm dark or light, and Putty dark)
|
||||
ORPHAN 05;37;41
|
||||
# ... and the files that orphaned symlinks point to (blinking white on red)
|
||||
MISSING 05;37;41
|
||||
|
||||
# files with execute permission
|
||||
EXEC 01;31 # Unix
|
||||
.cmd 01;31 # Win
|
||||
.exe 01;31 # Win
|
||||
.com 01;31 # Win
|
||||
.bat 01;31 # Win
|
||||
.reg 01;31 # Win
|
||||
.app 01;31 # OSX
|
||||
|
||||
#############################################################################
|
||||
### By extension
|
||||
|
||||
# List any file extensions like '.gz' or '.tar' that you would like ls
|
||||
# to colorize below. Put the extension, a space, and the color init string.
|
||||
# (and any comments you want to add after a '#')
|
||||
|
||||
### Text formats
|
||||
|
||||
# Text that we can edit with a regular editor
|
||||
.txt 32
|
||||
.org 32
|
||||
.md 32
|
||||
.mkd 32
|
||||
|
||||
# Source text
|
||||
.h 32
|
||||
.hpp 32
|
||||
.c 32
|
||||
.C 32
|
||||
.cc 32
|
||||
.cpp 32
|
||||
.cxx 32
|
||||
.objc 32
|
||||
.cl 32
|
||||
.sh 32
|
||||
.bash 32
|
||||
.csh 32
|
||||
.zsh 32
|
||||
.el 32
|
||||
.vim 32
|
||||
.java 32
|
||||
.pl 32
|
||||
.pm 32
|
||||
.py 32
|
||||
.rb 32
|
||||
.hs 32
|
||||
.php 32
|
||||
.htm 32
|
||||
.html 32
|
||||
.shtml 32
|
||||
.erb 32
|
||||
.haml 32
|
||||
.xml 32
|
||||
.rdf 32
|
||||
.css 32
|
||||
.sass 32
|
||||
.scss 32
|
||||
.less 32
|
||||
.js 32
|
||||
.coffee 32
|
||||
.man 32
|
||||
.0 32
|
||||
.1 32
|
||||
.2 32
|
||||
.3 32
|
||||
.4 32
|
||||
.5 32
|
||||
.6 32
|
||||
.7 32
|
||||
.8 32
|
||||
.9 32
|
||||
.l 32
|
||||
.n 32
|
||||
.p 32
|
||||
.pod 32
|
||||
.tex 32
|
||||
.go 32
|
||||
.sql 32
|
||||
.csv 32
|
||||
.sv 32
|
||||
.svh 32
|
||||
.v 32
|
||||
.vh 32
|
||||
.vhd 32
|
||||
|
||||
### Multimedia formats
|
||||
|
||||
# Image
|
||||
.bmp 33
|
||||
.cgm 33
|
||||
.dl 33
|
||||
.dvi 33
|
||||
.emf 33
|
||||
.eps 33
|
||||
.gif 33
|
||||
.jpeg 33
|
||||
.jpg 33
|
||||
.JPG 33
|
||||
.mng 33
|
||||
.pbm 33
|
||||
.pcx 33
|
||||
.pdf 33
|
||||
.pgm 33
|
||||
.png 33
|
||||
.PNG 33
|
||||
.ppm 33
|
||||
.pps 33
|
||||
.ppsx 33
|
||||
.ps 33
|
||||
.svg 33
|
||||
.svgz 33
|
||||
.tga 33
|
||||
.tif 33
|
||||
.tiff 33
|
||||
.xbm 33
|
||||
.xcf 33
|
||||
.xpm 33
|
||||
.xwd 33
|
||||
.xwd 33
|
||||
.yuv 33
|
||||
|
||||
# Audio
|
||||
.aac 33
|
||||
.au 33
|
||||
.flac 33
|
||||
.m4a 33
|
||||
.mid 33
|
||||
.midi 33
|
||||
.mka 33
|
||||
.mp3 33
|
||||
.mpa 33
|
||||
.mpeg 33
|
||||
.mpg 33
|
||||
.ogg 33
|
||||
.opus 33
|
||||
.ra 33
|
||||
.wav 33
|
||||
|
||||
# Video
|
||||
.anx 33
|
||||
.asf 33
|
||||
.avi 33
|
||||
.axv 33
|
||||
.flc 33
|
||||
.fli 33
|
||||
.flv 33
|
||||
.gl 33
|
||||
.m2v 33
|
||||
.m4v 33
|
||||
.mkv 33
|
||||
.mov 33
|
||||
.MOV 33
|
||||
.mp4 33
|
||||
.mp4v 33
|
||||
.mpeg 33
|
||||
.mpg 33
|
||||
.nuv 33
|
||||
.ogm 33
|
||||
.ogv 33
|
||||
.ogx 33
|
||||
.qt 33
|
||||
.rm 33
|
||||
.rmvb 33
|
||||
.swf 33
|
||||
.vob 33
|
||||
.webm 33
|
||||
.wmv 33
|
||||
|
||||
### Misc
|
||||
|
||||
# Binary document formats and multimedia source
|
||||
.doc 31
|
||||
.docx 31
|
||||
.rtf 31
|
||||
.odt 31
|
||||
.dot 31
|
||||
.dotx 31
|
||||
.ott 31
|
||||
.xls 31
|
||||
.xlsx 31
|
||||
.ods 31
|
||||
.ots 31
|
||||
.ppt 31
|
||||
.pptx 31
|
||||
.odp 31
|
||||
.otp 31
|
||||
.fla 31
|
||||
.psd 31
|
||||
|
||||
# Archives, compressed
|
||||
.7z 1;35
|
||||
.apk 1;35
|
||||
.arj 1;35
|
||||
.bin 1;35
|
||||
.bz 1;35
|
||||
.bz2 1;35
|
||||
.cab 1;35 # Win
|
||||
.deb 1;35
|
||||
.dmg 1;35 # OSX
|
||||
.gem 1;35
|
||||
.gz 1;35
|
||||
.iso 1;35
|
||||
.jar 1;35
|
||||
.msi 1;35 # Win
|
||||
.rar 1;35
|
||||
.rpm 1;35
|
||||
.tar 1;35
|
||||
.tbz 1;35
|
||||
.tbz2 1;35
|
||||
.tgz 1;35
|
||||
.tx 1;35
|
||||
.war 1;35
|
||||
.xpi 1;35
|
||||
.xz 1;35
|
||||
.z 1;35
|
||||
.Z 1;35
|
||||
.zip 1;35
|
||||
|
||||
# For testing
|
||||
.ANSI-30-black 30
|
||||
.ANSI-01;30-brblack 01;30
|
||||
.ANSI-31-red 31
|
||||
.ANSI-01;31-brred 01;31
|
||||
.ANSI-32-green 32
|
||||
.ANSI-01;32-brgreen 01;32
|
||||
.ANSI-33-yellow 33
|
||||
.ANSI-01;33-bryellow 01;33
|
||||
.ANSI-34-blue 34
|
||||
.ANSI-01;34-brblue 01;34
|
||||
.ANSI-35-magenta 35
|
||||
.ANSI-01;35-brmagenta 01;35
|
||||
.ANSI-36-cyan 36
|
||||
.ANSI-01;36-brcyan 01;36
|
||||
.ANSI-37-white 37
|
||||
.ANSI-01;37-brwhite 01;37
|
||||
|
||||
#############################################################################
|
||||
# Your customizations
|
||||
|
||||
# Unimportant text files
|
||||
# For universal scheme, use brightgreen 01;32
|
||||
# For optimal on light bg (but too prominent on dark bg), use white 01;34
|
||||
.log 01;32
|
||||
*~ 01;32
|
||||
*# 01;32
|
||||
#.log 01;34
|
||||
#*~ 01;34
|
||||
#*# 01;34
|
||||
|
||||
# Unimportant non-text files
|
||||
# For universal scheme, use brightcyan 01;36
|
||||
# For optimal on dark bg (but too prominent on light bg), change to 01;33
|
||||
#.bak 01;36
|
||||
#.BAK 01;36
|
||||
#.old 01;36
|
||||
#.OLD 01;36
|
||||
#.org_archive 01;36
|
||||
#.off 01;36
|
||||
#.OFF 01;36
|
||||
#.dist 01;36
|
||||
#.DIST 01;36
|
||||
#.orig 01;36
|
||||
#.ORIG 01;36
|
||||
#.swp 01;36
|
||||
#.swo 01;36
|
||||
#*,v 01;36
|
||||
.bak 01;33
|
||||
.BAK 01;33
|
||||
.old 01;33
|
||||
.OLD 01;33
|
||||
.org_archive 01;33
|
||||
.off 01;33
|
||||
.OFF 01;33
|
||||
.dist 01;33
|
||||
.DIST 01;33
|
||||
.orig 01;33
|
||||
.ORIG 01;33
|
||||
.swp 01;33
|
||||
.swo 01;33
|
||||
*,v 01;33
|
||||
|
||||
# The brightmagenta (Solarized: purple) color is free for you to use for your
|
||||
# custom file type
|
||||
.gpg 34
|
||||
.gpg 34
|
||||
.pgp 34
|
||||
.asc 34
|
||||
.3des 34
|
||||
.aes 34
|
||||
.enc 34
|
||||
.sqlite 34
|
||||
|
||||
30
dotfiles/env
30
dotfiles/env
@@ -1,11 +1,11 @@
|
||||
# Sourced by zshrc as well as bash.
|
||||
# Should only use POSIX shell constructs.
|
||||
|
||||
umask 027
|
||||
ulimit -c unlimited
|
||||
|
||||
# Paths and preferences
|
||||
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
||||
export GOPATH="$HOME/Projects/Go"
|
||||
export GOPATH="$HOME/Projects/Go:/usr/share/gocode"
|
||||
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH:$GOPATH/bin"
|
||||
export VISUAL=vim
|
||||
export EDITOR=vim
|
||||
@@ -15,10 +15,29 @@ export LESS="-MR"
|
||||
export QUOTING_STYLE="literal" # Coreutils quotes
|
||||
|
||||
# Fix gnome-terminal
|
||||
if [ "$TERM" = "xterm" -a "$COLORTERM" = "gnome-terminal" ] ; then
|
||||
if [ "$TERM" = "xterm" ] && [ "$COLORTERM" = "gnome-terminal" ] ; then
|
||||
# Requires `ncurses-base` package for terminfo.
|
||||
export TERM="xterm-256color"
|
||||
fi
|
||||
|
||||
# Terminal preferences for i3
|
||||
if [ -z "${TERMINAL}" ] ; then
|
||||
for t in urxvt gnome-terminal; do
|
||||
if TERMINAL=$(command -v ${t}) ; then
|
||||
export TERMINAL
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Browser preferences
|
||||
if [ -z "${BROWSER}" ] ; then
|
||||
for t in google-chrome-beta google-chrome firefox ; do
|
||||
if BROWSER=$(command -v ${t}); then
|
||||
export BROWSER
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# For virtualenvwrapper
|
||||
export WORKON_HOME=$HOME/.virtualenvs
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
|
||||
@@ -28,7 +47,7 @@ export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
|
||||
|
||||
# Setup locale
|
||||
if test -x /usr/bin/locale ; then
|
||||
for l in en_US.UTF-8 C.UTF-8 C ; do
|
||||
for l in en_US.utf8 C.UTF-8 C ; do
|
||||
if /usr/bin/locale -a | grep -q "${l}" ; then
|
||||
export LC_CTYPE=${l}
|
||||
export LC_NUMERIC=${l}
|
||||
@@ -59,4 +78,5 @@ else
|
||||
fi
|
||||
export LC_COLLATE=C
|
||||
|
||||
if [ -e $HOME/.localenv ] ; then source $HOME/.localenv ; fi
|
||||
# shellcheck source=/dev/null
|
||||
test -e "$HOME/.localenv" && . "$HOME/.localenv"
|
||||
|
||||
@@ -26,10 +26,13 @@ end
|
||||
python
|
||||
import sys
|
||||
import os.path
|
||||
pwndbg = os.path.expanduser('~/.pwndbg/gdbinit.py')
|
||||
gef = os.path.expanduser('~/tools/gef/gef.py')
|
||||
pwndbg = os.path.expanduser('~/tools/pwndbg/gdbinit.py')
|
||||
peda = os.path.expanduser('~/.peda/peda.py')
|
||||
if os.path.isfile(pwndbg):
|
||||
sys.path.insert(0, os.path.expanduser('~/.pwndbg/vendor'))
|
||||
if os.path.isfile(gef):
|
||||
gdb.execute('source {}'.format(gef))
|
||||
elif os.path.isfile(pwndbg):
|
||||
sys.path.insert(0, os.path.expanduser('~/tools/pwndbg/vendor'))
|
||||
gdb.execute('source {}'.format(pwndbg))
|
||||
elif os.path.isfile(peda):
|
||||
gdb.execute('source {}'.format(peda))
|
||||
|
||||
125
dotfiles/gef.rc
Normal file
125
dotfiles/gef.rc
Normal file
@@ -0,0 +1,125 @@
|
||||
[context]
|
||||
clear_screen = False
|
||||
enable = True
|
||||
grow_stack_down = False
|
||||
ignore_registers =
|
||||
layout = legend regs stack code args source memory threads trace extra
|
||||
nb_lines_backtrace = 10
|
||||
nb_lines_code = 6
|
||||
nb_lines_code_prev = 3
|
||||
nb_lines_stack = 8
|
||||
nb_lines_threads = -1
|
||||
peek_calls = True
|
||||
peek_ret = True
|
||||
redirect =
|
||||
show_registers_raw = False
|
||||
show_stack_raw = False
|
||||
|
||||
[dereference]
|
||||
max_recursion = 7
|
||||
|
||||
[entry-break]
|
||||
entrypoint_symbols = main _main __libc_start_main __uClibc_main start _start
|
||||
|
||||
[gef-remote]
|
||||
clean_on_exit = False
|
||||
|
||||
[gef]
|
||||
autosave_breakpoints_file =
|
||||
debug = False
|
||||
disable_color = False
|
||||
extra_plugins_dir =
|
||||
follow_child = True
|
||||
readline_compat = False
|
||||
|
||||
[got]
|
||||
function_not_resolved = yellow
|
||||
function_resolved = green
|
||||
|
||||
[heap-analysis-helper]
|
||||
check_double_free = True
|
||||
check_free_null = False
|
||||
check_heap_overlap = True
|
||||
check_uaf = True
|
||||
check_weird_free = True
|
||||
|
||||
[heap-chunks]
|
||||
peek_nb_byte = 16
|
||||
|
||||
[hexdump]
|
||||
always_show_ascii = False
|
||||
|
||||
[highlight]
|
||||
regex = False
|
||||
|
||||
[ida-interact]
|
||||
host = 127.0.0.1
|
||||
port = 1337
|
||||
sync_cursor = False
|
||||
|
||||
[pattern]
|
||||
length = 1024
|
||||
|
||||
[pcustom]
|
||||
struct_path = /tmp/gef/structs
|
||||
|
||||
[process-search]
|
||||
ps_command = /bin/ps auxww
|
||||
|
||||
[syscall-args]
|
||||
path = /tmp/gef/syscall-tables
|
||||
|
||||
[theme]
|
||||
address_code = red
|
||||
address_heap = green
|
||||
address_stack = pink
|
||||
context_title_line = gray
|
||||
context_title_message = cyan
|
||||
default_title_line = gray
|
||||
default_title_message = cyan
|
||||
dereference_base_address = cyan
|
||||
dereference_code = gray
|
||||
dereference_register_value = bold blue
|
||||
dereference_string = yellow
|
||||
disassemble_current_instruction = green
|
||||
registers_register_name = blue
|
||||
registers_value_changed = bold red
|
||||
source_current_line = green
|
||||
table_heading = blue
|
||||
|
||||
[trace-run]
|
||||
max_tracing_recursion = 1
|
||||
tracefile_prefix = ./gef-trace-
|
||||
|
||||
[aliases]
|
||||
pf = print-format
|
||||
status = process-status
|
||||
binaryninja-interact = ida-interact
|
||||
bn = ida-interact
|
||||
binja = ida-interact
|
||||
lookup = scan
|
||||
grep = search-pattern
|
||||
xref = search-pattern
|
||||
flags = edit-flags
|
||||
sc-search = shellcode search
|
||||
sc-get = shellcode get
|
||||
ps = process-search
|
||||
start = entry-break
|
||||
nb = name-break
|
||||
ctx = context
|
||||
telescope = dereference
|
||||
pattern offset = pattern search
|
||||
hl = highlight
|
||||
highlight ls = highlight list
|
||||
hll = highlight list
|
||||
hlc = highlight clear
|
||||
highlight set = highlight add
|
||||
hla = highlight add
|
||||
highlight delete = highlight remove
|
||||
highlight del = highlight remove
|
||||
highlight unset = highlight remove
|
||||
highlight rm = highlight remove
|
||||
hlr = highlight remove
|
||||
fmtstr-helper = format-string-helper
|
||||
screen-setup = tmux-setup
|
||||
|
||||
@@ -58,3 +58,8 @@
|
||||
helper = cache --timeout=36000
|
||||
[receive]
|
||||
denyCurrentBranch = updateInstead
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = diff3
|
||||
[mergetool]
|
||||
prompt = false
|
||||
|
||||
@@ -17,3 +17,6 @@ Thumbs.db
|
||||
# Try to avoid accidentally checking in private keys
|
||||
id_rsa
|
||||
id_ecdsa
|
||||
|
||||
# Kicad backup files
|
||||
*.kicad_pcb-bak
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
keyserver hkps://hkps.pool.sks-keyservers.net
|
||||
hkp-cacert ~/.gnupg/sks-keyservers.pem
|
||||
keyserver hkps://keys.openpgp.org
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use-agent
|
||||
# HKPS requires gnupg-curl for gpg1
|
||||
keyserver hkps://hkps.pool.sks-keyservers.net
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver-options auto-key-retrieve no-honor-keyserver-url
|
||||
auto-key-locate keyserver
|
||||
personal-digest-preferences SHA256
|
||||
cert-digest-algo SHA256
|
||||
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
|
||||
cipher-algo AES256
|
||||
default-key 7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
|
||||
|
||||
7
dotfiles/ipython.py
Normal file
7
dotfiles/ipython.py
Normal file
@@ -0,0 +1,7 @@
|
||||
try:
|
||||
import os, IPython
|
||||
os.environ['PYTHONSTARTUP'] = '' # Prevent running this again
|
||||
IPython.start_ipython()
|
||||
raise SystemExit
|
||||
except ImportError:
|
||||
pass
|
||||
611
dotfiles/ipython/profile_default/ipython_config.py
Normal file
611
dotfiles/ipython/profile_default/ipython_config.py
Normal file
@@ -0,0 +1,611 @@
|
||||
# Configuration file for ipython.
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# InteractiveShellApp(Configurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## A Mixin for applications that start InteractiveShell instances.
|
||||
#
|
||||
# Provides configurables for loading extensions and executing files as part of
|
||||
# configuring a Shell environment.
|
||||
#
|
||||
# The following methods should be called by the :meth:`initialize` method of the
|
||||
# subclass:
|
||||
#
|
||||
# - :meth:`init_path`
|
||||
# - :meth:`init_shell` (to be implemented by the subclass)
|
||||
# - :meth:`init_gui_pylab`
|
||||
# - :meth:`init_extensions`
|
||||
# - :meth:`init_code`
|
||||
|
||||
## Execute the given command string.
|
||||
#c.InteractiveShellApp.code_to_run = ''
|
||||
|
||||
## Run the file referenced by the PYTHONSTARTUP environment variable at IPython
|
||||
# startup.
|
||||
c.InteractiveShellApp.exec_PYTHONSTARTUP = False
|
||||
|
||||
## List of files to run at IPython startup.
|
||||
#c.InteractiveShellApp.exec_files = []
|
||||
|
||||
## lines of code to run at IPython startup.
|
||||
#c.InteractiveShellApp.exec_lines = []
|
||||
|
||||
## A list of dotted module names of IPython extensions to load.
|
||||
#c.InteractiveShellApp.extensions = []
|
||||
|
||||
## dotted module name of an IPython extension to load.
|
||||
#c.InteractiveShellApp.extra_extension = ''
|
||||
|
||||
## A file to be run
|
||||
#c.InteractiveShellApp.file_to_run = ''
|
||||
|
||||
## Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk2', 'gtk3',
|
||||
# 'osx', 'pyglet', 'qt', 'qt4', 'qt5', 'tk', 'wx', 'gtk2', 'qt4').
|
||||
#c.InteractiveShellApp.gui = None
|
||||
|
||||
## Should variables loaded at startup (by startup files, exec_lines, etc.) be
|
||||
# hidden from tools like %who?
|
||||
#c.InteractiveShellApp.hide_initial_ns = True
|
||||
|
||||
## Configure matplotlib for interactive use with the default matplotlib backend.
|
||||
#c.InteractiveShellApp.matplotlib = None
|
||||
|
||||
## Run the module as a script.
|
||||
#c.InteractiveShellApp.module_to_run = ''
|
||||
|
||||
## Pre-load matplotlib and numpy for interactive use, selecting a particular
|
||||
# matplotlib backend and loop integration.
|
||||
#c.InteractiveShellApp.pylab = None
|
||||
|
||||
## If true, IPython will populate the user namespace with numpy, pylab, etc. and
|
||||
# an ``import *`` is done from numpy and pylab, when using pylab mode.
|
||||
#
|
||||
# When False, pylab mode should not import any names into the user namespace.
|
||||
#c.InteractiveShellApp.pylab_import_all = True
|
||||
|
||||
## Reraise exceptions encountered loading IPython extensions?
|
||||
#c.InteractiveShellApp.reraise_ipython_extension_failures = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Application(SingletonConfigurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## This is an application.
|
||||
|
||||
## The date format used by logging formatters for %(asctime)s
|
||||
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
|
||||
|
||||
## The Logging format template
|
||||
#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'
|
||||
|
||||
## Set the log level by value or name.
|
||||
#c.Application.log_level = 30
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# BaseIPythonApplication(Application) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## IPython: an enhanced interactive Python shell.
|
||||
|
||||
## Whether to create profile dir if it doesn't exist
|
||||
#c.BaseIPythonApplication.auto_create = False
|
||||
|
||||
## Whether to install the default config files into the profile dir. If a new
|
||||
# profile is being created, and IPython contains config files for that profile,
|
||||
# then they will be staged into the new directory. Otherwise, default config
|
||||
# files will be automatically generated.
|
||||
#c.BaseIPythonApplication.copy_config_files = False
|
||||
|
||||
## Path to an extra config file to load.
|
||||
#
|
||||
# If specified, load this config file in addition to any other IPython config.
|
||||
#c.BaseIPythonApplication.extra_config_file = ''
|
||||
|
||||
## The name of the IPython directory. This directory is used for logging
|
||||
# configuration (through profiles), history storage, etc. The default is usually
|
||||
# $HOME/.ipython. This option can also be specified through the environment
|
||||
# variable IPYTHONDIR.
|
||||
#c.BaseIPythonApplication.ipython_dir = ''
|
||||
|
||||
## Whether to overwrite existing config files when copying
|
||||
#c.BaseIPythonApplication.overwrite = False
|
||||
|
||||
## The IPython profile to use.
|
||||
#c.BaseIPythonApplication.profile = 'default'
|
||||
|
||||
## Create a massive crash report when IPython encounters what may be an internal
|
||||
# error. The default is to append a short message to the usual traceback
|
||||
#c.BaseIPythonApplication.verbose_crash = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# TerminalIPythonApp(BaseIPythonApplication,InteractiveShellApp) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Whether to display a banner upon starting IPython.
|
||||
#c.TerminalIPythonApp.display_banner = True
|
||||
|
||||
## If a command or file is given via the command-line, e.g. 'ipython foo.py',
|
||||
# start an interactive shell after executing the file or command.
|
||||
#c.TerminalIPythonApp.force_interact = False
|
||||
|
||||
## Class to use to instantiate the TerminalInteractiveShell object. Useful for
|
||||
# custom Frontends
|
||||
#c.TerminalIPythonApp.interactive_shell_class = 'IPython.terminal.interactiveshell.TerminalInteractiveShell'
|
||||
|
||||
## Start IPython quickly by skipping the loading of config files.
|
||||
#c.TerminalIPythonApp.quick = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# InteractiveShell(SingletonConfigurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## An enhanced, interactive shell for Python.
|
||||
|
||||
## 'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which
|
||||
# nodes should be run interactively (displaying output from expressions).
|
||||
#c.InteractiveShell.ast_node_interactivity = 'last_expr'
|
||||
|
||||
## A list of ast.NodeTransformer subclass instances, which will be applied to
|
||||
# user input before code is run.
|
||||
#c.InteractiveShell.ast_transformers = []
|
||||
|
||||
## Automatically run await statement in the top level repl.
|
||||
#c.InteractiveShell.autoawait = True
|
||||
|
||||
## Make IPython automatically call any callable object even if you didn't type
|
||||
# explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
|
||||
# The value can be '0' to disable the feature, '1' for 'smart' autocall, where
|
||||
# it is not applied if there are no more arguments on the line, and '2' for
|
||||
# 'full' autocall, where all callable objects are automatically called (even if
|
||||
# no arguments are present).
|
||||
#c.InteractiveShell.autocall = 0
|
||||
|
||||
## Autoindent IPython code entered interactively.
|
||||
#c.InteractiveShell.autoindent = True
|
||||
|
||||
## Enable magic commands to be called without the leading %.
|
||||
#c.InteractiveShell.automagic = True
|
||||
|
||||
## The part of the banner to be printed before the profile
|
||||
#c.InteractiveShell.banner1 = "Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) \nType 'copyright', 'credits' or 'license' for more information\nIPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.\n"
|
||||
|
||||
## The part of the banner to be printed after the profile
|
||||
#c.InteractiveShell.banner2 = ''
|
||||
|
||||
## Set the size of the output cache. The default is 1000, you can change it
|
||||
# permanently in your config file. Setting it to 0 completely disables the
|
||||
# caching system, and the minimum value accepted is 3 (if you provide a value
|
||||
# less than 3, it is reset to 0 and a warning is issued). This limit is defined
|
||||
# because otherwise you'll spend more time re-flushing a too small cache than
|
||||
# working
|
||||
#c.InteractiveShell.cache_size = 1000
|
||||
|
||||
## Use colors for displaying information about objects. Because this information
|
||||
# is passed through a pager (like 'less'), and some pagers get confused with
|
||||
# color codes, this capability can be turned off.
|
||||
#c.InteractiveShell.color_info = True
|
||||
|
||||
## Set the color scheme (NoColor, Neutral, Linux, or LightBG).
|
||||
#c.InteractiveShell.colors = 'Neutral'
|
||||
|
||||
##
|
||||
#c.InteractiveShell.debug = False
|
||||
|
||||
## Don't call post-execute functions that have failed in the past.
|
||||
#c.InteractiveShell.disable_failing_post_execute = False
|
||||
|
||||
## If True, anything that would be passed to the pager will be displayed as
|
||||
# regular output instead.
|
||||
#c.InteractiveShell.display_page = False
|
||||
|
||||
## (Provisional API) enables html representation in mime bundles sent to pagers.
|
||||
#c.InteractiveShell.enable_html_pager = False
|
||||
|
||||
## Total length of command history
|
||||
#c.InteractiveShell.history_length = 10000
|
||||
|
||||
## The number of saved history entries to be loaded into the history buffer at
|
||||
# startup.
|
||||
#c.InteractiveShell.history_load_length = 1000
|
||||
|
||||
##
|
||||
#c.InteractiveShell.ipython_dir = ''
|
||||
|
||||
## Start logging to the given file in append mode. Use `logfile` to specify a log
|
||||
# file to **overwrite** logs to.
|
||||
#c.InteractiveShell.logappend = ''
|
||||
|
||||
## The name of the logfile to use.
|
||||
#c.InteractiveShell.logfile = ''
|
||||
|
||||
## Start logging to the default log file in overwrite mode. Use `logappend` to
|
||||
# specify a log file to **append** logs to.
|
||||
#c.InteractiveShell.logstart = False
|
||||
|
||||
## Select the loop runner that will be used to execute top-level asynchronous
|
||||
# code
|
||||
#c.InteractiveShell.loop_runner = 'IPython.core.interactiveshell._asyncio_runner'
|
||||
|
||||
##
|
||||
#c.InteractiveShell.object_info_string_level = 0
|
||||
|
||||
## Automatically call the pdb debugger after every exception.
|
||||
#c.InteractiveShell.pdb = False
|
||||
|
||||
## Deprecated since IPython 4.0 and ignored since 5.0, set
|
||||
# TerminalInteractiveShell.prompts object directly.
|
||||
#c.InteractiveShell.prompt_in1 = 'In [\\#]: '
|
||||
|
||||
## Deprecated since IPython 4.0 and ignored since 5.0, set
|
||||
# TerminalInteractiveShell.prompts object directly.
|
||||
#c.InteractiveShell.prompt_in2 = ' .\\D.: '
|
||||
|
||||
## Deprecated since IPython 4.0 and ignored since 5.0, set
|
||||
# TerminalInteractiveShell.prompts object directly.
|
||||
#c.InteractiveShell.prompt_out = 'Out[\\#]: '
|
||||
|
||||
## Deprecated since IPython 4.0 and ignored since 5.0, set
|
||||
# TerminalInteractiveShell.prompts object directly.
|
||||
#c.InteractiveShell.prompts_pad_left = True
|
||||
|
||||
##
|
||||
#c.InteractiveShell.quiet = False
|
||||
|
||||
##
|
||||
#c.InteractiveShell.separate_in = '\n'
|
||||
|
||||
##
|
||||
#c.InteractiveShell.separate_out = ''
|
||||
|
||||
##
|
||||
#c.InteractiveShell.separate_out2 = ''
|
||||
|
||||
## Show rewritten input, e.g. for autocall.
|
||||
#c.InteractiveShell.show_rewritten_input = True
|
||||
|
||||
## Enables rich html representation of docstrings. (This requires the docrepr
|
||||
# module).
|
||||
#c.InteractiveShell.sphinxify_docstring = False
|
||||
|
||||
##
|
||||
#c.InteractiveShell.wildcards_case_sensitive = True
|
||||
|
||||
## Switch modes for the IPython exception handlers.
|
||||
#c.InteractiveShell.xmode = 'Context'
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# TerminalInteractiveShell(InteractiveShell) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Set to confirm when you try to exit IPython with an EOF (Control-D in Unix,
|
||||
# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a
|
||||
# direct exit without any confirmation.
|
||||
#c.TerminalInteractiveShell.confirm_exit = True
|
||||
|
||||
## Options for displaying tab completions, 'column', 'multicolumn', and
|
||||
# 'readlinelike'. These options are for `prompt_toolkit`, see `prompt_toolkit`
|
||||
# documentation for more information.
|
||||
#c.TerminalInteractiveShell.display_completions = 'multicolumn'
|
||||
|
||||
## Shortcut style to use at the prompt. 'vi' or 'emacs'.
|
||||
c.TerminalInteractiveShell.editing_mode = 'vi'
|
||||
|
||||
## Set the editor used by IPython (default to $EDITOR/vi/notepad).
|
||||
#c.TerminalInteractiveShell.editor = 'vim'
|
||||
|
||||
## Allows to enable/disable the prompt toolkit history search
|
||||
#c.TerminalInteractiveShell.enable_history_search = True
|
||||
|
||||
## Enable vi (v) or Emacs (C-X C-E) shortcuts to open an external editor. This is
|
||||
# in addition to the F2 binding, which is always enabled.
|
||||
#c.TerminalInteractiveShell.extra_open_editor_shortcuts = False
|
||||
|
||||
## Provide an alternative handler to be called when the user presses Return. This
|
||||
# is an advanced option intended for debugging, which may be changed or removed
|
||||
# in later releases.
|
||||
#c.TerminalInteractiveShell.handle_return = None
|
||||
|
||||
## Highlight matching brackets.
|
||||
#c.TerminalInteractiveShell.highlight_matching_brackets = True
|
||||
|
||||
## The name or class of a Pygments style to use for syntax highlighting. To see
|
||||
# available styles, run `pygmentize -L styles`.
|
||||
#c.TerminalInteractiveShell.highlighting_style = traitlets.Undefined
|
||||
|
||||
## Override highlighting format for specific tokens
|
||||
#c.TerminalInteractiveShell.highlighting_style_overrides = {}
|
||||
|
||||
## Enable mouse support in the prompt (Note: prevents selecting text with the
|
||||
# mouse)
|
||||
#c.TerminalInteractiveShell.mouse_support = False
|
||||
|
||||
## Display the current vi mode (when using vi editing mode).
|
||||
#c.TerminalInteractiveShell.prompt_includes_vi_mode = True
|
||||
|
||||
## Class used to generate Prompt token for prompt_toolkit
|
||||
#c.TerminalInteractiveShell.prompts_class = 'IPython.terminal.prompts.Prompts'
|
||||
|
||||
## Use `raw_input` for the REPL, without completion and prompt colors.
|
||||
#
|
||||
# Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR.
|
||||
# Known usage are: IPython own testing machinery, and emacs inferior-shell
|
||||
# integration through elpy.
|
||||
#
|
||||
# This mode default to `True` if the `IPY_TEST_SIMPLE_PROMPT` environment
|
||||
# variable is set, or the current terminal is not a tty.
|
||||
#c.TerminalInteractiveShell.simple_prompt = False
|
||||
|
||||
## Number of line at the bottom of the screen to reserve for the completion menu
|
||||
#c.TerminalInteractiveShell.space_for_menu = 6
|
||||
|
||||
## Automatically set the terminal title
|
||||
#c.TerminalInteractiveShell.term_title = True
|
||||
|
||||
## Customize the terminal title format. This is a python format string.
|
||||
# Available substitutions are: {cwd}.
|
||||
#c.TerminalInteractiveShell.term_title_format = 'IPython: {cwd}'
|
||||
|
||||
## Use 24bit colors instead of 256 colors in prompt highlighting. If your
|
||||
# terminal supports true color, the following command should print 'TRUECOLOR'
|
||||
# in orange: printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
|
||||
#c.TerminalInteractiveShell.true_color = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# HistoryAccessor(HistoryAccessorBase) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Access the history database without adding to it.
|
||||
#
|
||||
# This is intended for use by standalone history tools. IPython shells use
|
||||
# HistoryManager, below, which is a subclass of this.
|
||||
|
||||
## Options for configuring the SQLite connection
|
||||
#
|
||||
# These options are passed as keyword args to sqlite3.connect when establishing
|
||||
# database connections.
|
||||
#c.HistoryAccessor.connection_options = {}
|
||||
|
||||
## enable the SQLite history
|
||||
#
|
||||
# set enabled=False to disable the SQLite history, in which case there will be
|
||||
# no stored history, no SQLite connection, and no background saving thread.
|
||||
# This may be necessary in some threaded environments where IPython is embedded.
|
||||
#c.HistoryAccessor.enabled = True
|
||||
|
||||
## Path to file to use for SQLite history database.
|
||||
#
|
||||
# By default, IPython will put the history database in the IPython profile
|
||||
# directory. If you would rather share one history among profiles, you can set
|
||||
# this value in each, so that they are consistent.
|
||||
#
|
||||
# Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
|
||||
# If you see IPython hanging, try setting this to something on a local disk,
|
||||
# e.g::
|
||||
#
|
||||
# ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
|
||||
#
|
||||
# you can also use the specific value `:memory:` (including the colon at both
|
||||
# end but not the back ticks), to avoid creating an history file.
|
||||
#c.HistoryAccessor.hist_file = ''
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# HistoryManager(HistoryAccessor) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## A class to organize all history-related functionality in one place.
|
||||
|
||||
## Write to database every x commands (higher values save disk access & power).
|
||||
# Values of 1 or less effectively disable caching.
|
||||
#c.HistoryManager.db_cache_size = 0
|
||||
|
||||
## Should the history database include output? (default: no)
|
||||
#c.HistoryManager.db_log_output = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# ProfileDir(LoggingConfigurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## An object to manage the profile directory and its resources.
|
||||
#
|
||||
# The profile directory is used by all IPython applications, to manage
|
||||
# configuration, logging and security.
|
||||
#
|
||||
# This object knows how to find, create and manage these directories. This
|
||||
# should be used by any code that wants to handle profiles.
|
||||
|
||||
## Set the profile location directly. This overrides the logic used by the
|
||||
# `profile` option.
|
||||
#c.ProfileDir.location = ''
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# BaseFormatter(Configurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## A base formatter class that is configurable.
|
||||
#
|
||||
# This formatter should usually be used as the base class of all formatters. It
|
||||
# is a traited :class:`Configurable` class and includes an extensible API for
|
||||
# users to determine how their objects are formatted. The following logic is
|
||||
# used to find a function to format an given object.
|
||||
#
|
||||
# 1. The object is introspected to see if it has a method with the name
|
||||
# :attr:`print_method`. If is does, that object is passed to that method
|
||||
# for formatting.
|
||||
# 2. If no print method is found, three internal dictionaries are consulted
|
||||
# to find print method: :attr:`singleton_printers`, :attr:`type_printers`
|
||||
# and :attr:`deferred_printers`.
|
||||
#
|
||||
# Users should use these dictionaries to register functions that will be used to
|
||||
# compute the format data for their objects (if those objects don't have the
|
||||
# special print methods). The easiest way of using these dictionaries is through
|
||||
# the :meth:`for_type` and :meth:`for_type_by_name` methods.
|
||||
#
|
||||
# If no function/callable is found to compute the format data, ``None`` is
|
||||
# returned and this format type is not used.
|
||||
|
||||
##
|
||||
#c.BaseFormatter.deferred_printers = {}
|
||||
|
||||
##
|
||||
#c.BaseFormatter.enabled = True
|
||||
|
||||
##
|
||||
#c.BaseFormatter.singleton_printers = {}
|
||||
|
||||
##
|
||||
#c.BaseFormatter.type_printers = {}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# PlainTextFormatter(BaseFormatter) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## The default pretty-printer.
|
||||
#
|
||||
# This uses :mod:`IPython.lib.pretty` to compute the format data of the object.
|
||||
# If the object cannot be pretty printed, :func:`repr` is used. See the
|
||||
# documentation of :mod:`IPython.lib.pretty` for details on how to write pretty
|
||||
# printers. Here is a simple example::
|
||||
#
|
||||
# def dtype_pprinter(obj, p, cycle):
|
||||
# if cycle:
|
||||
# return p.text('dtype(...)')
|
||||
# if hasattr(obj, 'fields'):
|
||||
# if obj.fields is None:
|
||||
# p.text(repr(obj))
|
||||
# else:
|
||||
# p.begin_group(7, 'dtype([')
|
||||
# for i, field in enumerate(obj.descr):
|
||||
# if i > 0:
|
||||
# p.text(',')
|
||||
# p.breakable()
|
||||
# p.pretty(field)
|
||||
# p.end_group(7, '])')
|
||||
|
||||
##
|
||||
#c.PlainTextFormatter.float_precision = ''
|
||||
|
||||
## Truncate large collections (lists, dicts, tuples, sets) to this size.
|
||||
#
|
||||
# Set to 0 to disable truncation.
|
||||
#c.PlainTextFormatter.max_seq_length = 1000
|
||||
|
||||
##
|
||||
#c.PlainTextFormatter.max_width = 79
|
||||
|
||||
##
|
||||
#c.PlainTextFormatter.newline = '\n'
|
||||
|
||||
##
|
||||
#c.PlainTextFormatter.pprint = True
|
||||
|
||||
##
|
||||
#c.PlainTextFormatter.verbose = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Completer(Configurable) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Enable unicode completions, e.g. \alpha<tab> . Includes completion of latex
|
||||
# commands, unicode names, and expanding unicode characters back to latex
|
||||
# commands.
|
||||
#c.Completer.backslash_combining_completions = True
|
||||
|
||||
## Enable debug for the Completer. Mostly print extra information for
|
||||
# experimental jedi integration.
|
||||
#c.Completer.debug = False
|
||||
|
||||
## Activate greedy completion PENDING DEPRECTION. this is now mostly taken care
|
||||
# of with Jedi.
|
||||
#
|
||||
# This will enable completion on elements of lists, results of function calls,
|
||||
# etc., but can be unsafe because the code is actually evaluated on TAB.
|
||||
#c.Completer.greedy = False
|
||||
|
||||
## Experimental: restrict time (in milliseconds) during which Jedi can compute
|
||||
# types. Set to 0 to stop computing types. Non-zero value lower than 100ms may
|
||||
# hurt performance by preventing jedi to build its cache.
|
||||
#c.Completer.jedi_compute_type_timeout = 400
|
||||
|
||||
## Experimental: Use Jedi to generate autocompletions. Default to True if jedi is
|
||||
# installed.
|
||||
#c.Completer.use_jedi = True
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# IPCompleter(Completer) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Extension of the completer class with IPython-specific features
|
||||
|
||||
## DEPRECATED as of version 5.0.
|
||||
#
|
||||
# Instruct the completer to use __all__ for the completion
|
||||
#
|
||||
# Specifically, when completing on ``object.<tab>``.
|
||||
#
|
||||
# When True: only those names in obj.__all__ will be included.
|
||||
#
|
||||
# When False [default]: the __all__ attribute is ignored
|
||||
#c.IPCompleter.limit_to__all__ = False
|
||||
|
||||
## Whether to merge completion results into a single list
|
||||
#
|
||||
# If False, only the completion results from the first non-empty completer will
|
||||
# be returned.
|
||||
#c.IPCompleter.merge_completions = True
|
||||
|
||||
## Instruct the completer to omit private method names
|
||||
#
|
||||
# Specifically, when completing on ``object.<tab>``.
|
||||
#
|
||||
# When 2 [default]: all names that start with '_' will be excluded.
|
||||
#
|
||||
# When 1: all 'magic' names (``__foo__``) will be excluded.
|
||||
#
|
||||
# When 0: nothing will be excluded.
|
||||
#c.IPCompleter.omit__names = 2
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# ScriptMagics(Magics) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Magics for talking to scripts
|
||||
#
|
||||
# This defines a base `%%script` cell magic for running a cell with a program in
|
||||
# a subprocess, and registers a few top-level magics that call %%script with
|
||||
# common interpreters.
|
||||
|
||||
## Extra script cell magics to define
|
||||
#
|
||||
# This generates simple wrappers of `%%script foo` as `%%foo`.
|
||||
#
|
||||
# If you want to add script magics that aren't on your path, specify them in
|
||||
# script_paths
|
||||
#c.ScriptMagics.script_magics = []
|
||||
|
||||
## Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby'
|
||||
#
|
||||
# Only necessary for items in script_magics where the default path will not find
|
||||
# the right interpreter.
|
||||
#c.ScriptMagics.script_paths = {}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# LoggingMagics(Magics) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Magics related to all logging machinery.
|
||||
|
||||
## Suppress output of log state when logging is enabled
|
||||
#c.LoggingMagics.quiet = False
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# StoreMagics(Magics) configuration
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
## Lightweight persistence for python variables.
|
||||
#
|
||||
# Provides the %store magic.
|
||||
|
||||
## If True, any %store-d variables will be automatically restored when IPython
|
||||
# starts.
|
||||
#c.StoreMagics.autorestore = False
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Also sourced by zsh, etc.
|
||||
# Interactive shells only.
|
||||
# Should only use POSIX constructs.
|
||||
|
||||
# Always load ENV
|
||||
test -f "$HOME/.env" && . "$HOME/.env"
|
||||
|
||||
@@ -5,4 +10,20 @@ test -f "$HOME/.env" && . "$HOME/.env"
|
||||
export GREP_COLOR='01;31'
|
||||
export GREP_COLORS='mt=01;31:mc=01;31:ms=01;31'
|
||||
|
||||
# Setup LS_COLORS
|
||||
if whence dircolors >/dev/null 2>&1 ; then
|
||||
test -f "${HOME}/.dircolors" && \
|
||||
eval "$(dircolors "${HOME}/.dircolors")"
|
||||
else
|
||||
# Static solarized LS_COLORS
|
||||
LS_COLORS='no=00:fi=00:di=34:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.hpp=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.cl=32:*.sh=32:*.bash=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.go=32:*.sql=32:*.csv=32:*.sv=32:*.svh=32:*.v=32:*.vh=32:*.vhd=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.PNG=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.m4a=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.opus=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.MOV=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.webm=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.odt=31:*.dot=31:*.dotx=31:*.ott=31:*.xls=31:*.xlsx=31:*.ods=31:*.ots=31:*.ppt=31:*.pptx=31:*.odp=31:*.otp=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*,v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:*.sqlite=34:';
|
||||
export LS_COLORS
|
||||
fi
|
||||
if [ "$(uname)" = "Darwin" ] ; then
|
||||
LSCOLORS="gxfxbEaEBxxEhEhBaDaCaD"
|
||||
export LSCOLORS
|
||||
CLICOLOR=1
|
||||
export CLICOLOR
|
||||
fi
|
||||
|
||||
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
|
||||
|
||||
1
dotfiles/rvmrc
Normal file
1
dotfiles/rvmrc
Normal file
@@ -0,0 +1 @@
|
||||
rvm_silence_path_mismatch_check_flag=1
|
||||
2
dotfiles/sqliterc
Normal file
2
dotfiles/sqliterc
Normal file
@@ -0,0 +1,2 @@
|
||||
.header on
|
||||
.mode column
|
||||
@@ -1,12 +1,14 @@
|
||||
# Universal Settings
|
||||
Protocol 2
|
||||
CanonicalizeHostname yes
|
||||
CanonicalizeMaxDots 0
|
||||
CanonicalizeFallbackLocal yes
|
||||
|
||||
# Permit Local Overrides
|
||||
Include ~/.ssh/config.d/*
|
||||
|
||||
# Enable canonicalization, unless overridden
|
||||
CanonicalizeHostname yes
|
||||
CanonicalizeFallbackLocal yes
|
||||
CanonicalDomains systemoverlord.com
|
||||
CanonicalizeMaxDots 0
|
||||
|
||||
# Defaults (May be Overridden)
|
||||
Host *.*
|
||||
|
||||
7
dotfiles/ssh/rc
Executable file
7
dotfiles/ssh/rc
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
REMOTE_LINK="${HOME}/.ssh/remote_agent.sock"
|
||||
|
||||
if test \! -L "${REMOTE_LINK}" -a -n "${SSH_AUTH_SOCK}" ; then
|
||||
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
|
||||
fi
|
||||
@@ -18,6 +18,10 @@ set -g pane-base-index 1
|
||||
set -g set-titles on
|
||||
set -g set-titles-string '#h:#S:#I.#P #W'
|
||||
|
||||
# Set keybindings
|
||||
set -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
|
||||
# Set a 256color $TERM variable so programs inside tmux know they can use 256
|
||||
# colors
|
||||
set -g default-terminal screen-256color
|
||||
@@ -33,9 +37,7 @@ setw -g automatic-rename on
|
||||
source-file ~/.tmux/tmux-solarized-256.conf
|
||||
|
||||
# Provide a statusbar
|
||||
set -g window-status-current-bg colour33
|
||||
set -g window-status-current-fg colour235
|
||||
set -g window-status-current-attr bold
|
||||
set -g window-status-current-style fg=colour235,bg=colour33,bold
|
||||
set -g status-interval 60
|
||||
set -g status-left-length 30
|
||||
set -g status-left '/#S/ '
|
||||
@@ -61,3 +63,6 @@ bind M \
|
||||
# tmux X clipboard integration
|
||||
bind C-c run "tmux show-buffer | xsel -i -b"
|
||||
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"
|
||||
|
||||
1
dotfiles/tmux/tmux-logging
Submodule
1
dotfiles/tmux/tmux-logging
Submodule
Submodule dotfiles/tmux/tmux-logging added at b085ad423b
@@ -1,27 +1,22 @@
|
||||
#### COLOUR (Solarized 256)
|
||||
|
||||
# default statusbar colors
|
||||
set-option -g status-bg colour235 #base02
|
||||
set-option -g status-fg colour136 #yellow
|
||||
set-option -g status-attr default
|
||||
set-option -g status-style fg=colour136,bg=colour235 #yellow and base02
|
||||
|
||||
# default window title colors
|
||||
set-window-option -g window-status-fg colour244 #base0
|
||||
set-window-option -g window-status-bg default
|
||||
#set-window-option -g window-status-attr dim
|
||||
set-window-option -g window-status-style fg=colour244,bg=default #base0 and default
|
||||
#set-window-option -g window-status-style dim
|
||||
|
||||
# active window title colors
|
||||
set-window-option -g window-status-current-fg colour166 #orange
|
||||
set-window-option -g window-status-current-bg default
|
||||
#set-window-option -g window-status-current-attr bright
|
||||
set-window-option -g window-status-current-style fg=colour166,bg=default #orange and default
|
||||
#set-window-option -g window-status-current-style bright
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-fg colour235 #base02
|
||||
set-option -g pane-active-border-fg colour240 #base01
|
||||
set-option -g pane-border-style fg=colour235 #base02
|
||||
set-option -g pane-active-border-style fg=colour240 #base01
|
||||
|
||||
# message text
|
||||
set-option -g message-bg colour235 #base02
|
||||
set-option -g message-fg colour166 #orange
|
||||
set-option -g message-style fg=colour166,bg=colour235 #orange and base02
|
||||
|
||||
# pane number display
|
||||
set-option -g display-panes-active-colour colour33 #blue
|
||||
@@ -29,3 +24,6 @@ set-option -g display-panes-colour colour166 #orange
|
||||
|
||||
# clock
|
||||
set-window-option -g clock-mode-colour colour64 #green
|
||||
|
||||
# bell
|
||||
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
|
||||
|
||||
1
dotfiles/vim/pack/matir/opt/solarized8
Submodule
1
dotfiles/vim/pack/matir/opt/solarized8
Submodule
Submodule dotfiles/vim/pack/matir/opt/solarized8 added at 9afbe12f68
0
dotfiles/vim/pack/matir/start/.keep
Normal file
0
dotfiles/vim/pack/matir/start/.keep
Normal file
1
dotfiles/vim/pack/matir/start/ctrlp
Submodule
1
dotfiles/vim/pack/matir/start/ctrlp
Submodule
Submodule dotfiles/vim/pack/matir/start/ctrlp added at 2e773fd8c7
1
dotfiles/vim/pack/matir/start/editorconfig
Submodule
1
dotfiles/vim/pack/matir/start/editorconfig
Submodule
Submodule dotfiles/vim/pack/matir/start/editorconfig added at c718cefc51
1
dotfiles/vim/pack/matir/start/fugitive
Submodule
1
dotfiles/vim/pack/matir/start/fugitive
Submodule
Submodule dotfiles/vim/pack/matir/start/fugitive added at 35f1095f9b
1
dotfiles/vim/pack/matir/start/surround
Submodule
1
dotfiles/vim/pack/matir/start/surround
Submodule
Submodule dotfiles/vim/pack/matir/start/surround added at fab8621670
1
dotfiles/vim/pack/matir/start/syntastic
Submodule
1
dotfiles/vim/pack/matir/start/syntastic
Submodule
Submodule dotfiles/vim/pack/matir/start/syntastic added at 0336c35c0b
1
dotfiles/vim/pack/matir/start/vim-go
Submodule
1
dotfiles/vim/pack/matir/start/vim-go
Submodule
Submodule dotfiles/vim/pack/matir/start/vim-go added at 13128e5f30
@@ -1,29 +1,6 @@
|
||||
" Allow full use of vim options
|
||||
set nocompatible
|
||||
|
||||
" Enable Vundle if installed
|
||||
if filereadable(glob("~/.vim/bundle/Vundle.vim/README.md"))
|
||||
filetype off
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
Plugin 'gmarik/Vundle.vim'
|
||||
Plugin 'nvie/vim-flake8'
|
||||
Plugin 'tell-k/vim-autopep8'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plugin 'mileszs/ack.vim'
|
||||
Plugin 'tpope/vim-unimpaired'
|
||||
Plugin 'scrooloose/syntastic'
|
||||
Plugin 'mattn/webapi-vim'
|
||||
Plugin 'mattn/gist-vim'
|
||||
Plugin 'altercation/vim-colors-solarized'
|
||||
Plugin 'vimoutliner/vimoutliner'
|
||||
Plugin 'PotatoesMaster/i3-vim-syntax'
|
||||
Plugin 'Matt-Deacalion/vim-systemd-syntax'
|
||||
Plugin 'fatih/vim-go'
|
||||
Plugin 'vhda/verilog_systemverilog.vim'
|
||||
call vundle#end()
|
||||
endif
|
||||
|
||||
" Setup paths
|
||||
set backupdir=~/.cache/vim/backup//
|
||||
set directory=~/.cache/vim/swap//
|
||||
@@ -51,7 +28,6 @@ imap <S-Tab> <Esc><<A
|
||||
" Line numbering, ruler
|
||||
set number
|
||||
set ruler
|
||||
set cursorline
|
||||
|
||||
" File options
|
||||
set encoding=utf-8
|
||||
@@ -64,13 +40,15 @@ else
|
||||
let g:solarized_termcolors=256
|
||||
let g:solarized_termtrans=1
|
||||
endif
|
||||
silent! colorscheme solarized
|
||||
" Enable filetype support
|
||||
filetype plugin indent on
|
||||
if $TERM ==? 'rxvt-unicode-256color'
|
||||
" I have .Xresources setup for solarized
|
||||
let g:solarized_use16=1
|
||||
endif
|
||||
silent! colorscheme solarized8
|
||||
" Default ASM syntax for ft support
|
||||
let asmsyntax="nasm"
|
||||
" Allow file modelines
|
||||
set modeline
|
||||
" Too risky to allow file modelines
|
||||
set nomodeline
|
||||
" Automatically re-read changed files
|
||||
set autoread
|
||||
" fsync() after writing files
|
||||
@@ -137,10 +115,17 @@ endfunction
|
||||
let g:syntastic_enable_signs = 1
|
||||
let g:syntastic_auto_loc_list = 2
|
||||
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
|
||||
let g:syntastic_python_checkers=['flake8']
|
||||
|
||||
" 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
|
||||
set runtimepath+=/usr/share/vim-youcompleteme
|
||||
endif
|
||||
|
||||
" Include a .vimrc.local if it exists
|
||||
if filereadable(glob("~/.vimrc.local"))
|
||||
source ~/.vimrc.local
|
||||
@@ -162,3 +147,13 @@ command Unsmartquote %s/“\|”/"/g
|
||||
|
||||
" Markdown options
|
||||
autocmd Filetype markdown set expandtab shiftwidth=4
|
||||
|
||||
" Python options
|
||||
autocmd Filetype python set expandtab shiftwidth=4
|
||||
|
||||
" Makefile options
|
||||
autocmd BufRead,BufNewFile Makefile* set noexpandtab
|
||||
|
||||
" Enable filetype support
|
||||
" Needs to be at end of vimrc
|
||||
filetype plugin indent on
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
#
|
||||
# Sets Prezto options.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# General
|
||||
#
|
||||
|
||||
# Set case-sensitivity for completion, history lookup, etc.
|
||||
# zstyle ':prezto:*:*' case-sensitive 'yes'
|
||||
|
||||
# Color output (auto set to 'no' on dumb terminals).
|
||||
zstyle ':prezto:*:*' color 'yes'
|
||||
|
||||
# Add additional directories to load prezto modules from
|
||||
zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto_custom
|
||||
|
||||
# Set the Zsh modules to load (man zshmodules).
|
||||
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||
|
||||
# Set the Zsh functions to load (man zshcontrib).
|
||||
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
|
||||
|
||||
# Set the Prezto modules to load (browse modules).
|
||||
# The order matters.
|
||||
zstyle ':prezto:load' pmodule \
|
||||
'environment' \
|
||||
'terminal' \
|
||||
'editor' \
|
||||
'history' \
|
||||
'directory' \
|
||||
'spectrum' \
|
||||
'utility' \
|
||||
'completion' \
|
||||
'matir' \
|
||||
'tmux' \
|
||||
'git' \
|
||||
'gpg' \
|
||||
'python' \
|
||||
'ruby' \
|
||||
'syntax-highlighting' \
|
||||
'history-substring-search' \
|
||||
'jekyll' \
|
||||
'prompt' \
|
||||
'xtra_completions'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:autosuggestions:color' found ''
|
||||
|
||||
#
|
||||
# Completions
|
||||
#
|
||||
# No groups of completions.
|
||||
zstyle ':completion:*' format ''
|
||||
|
||||
# Set the entries to ignore in static */etc/hosts* for host completion.
|
||||
# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
|
||||
# '0.0.0.0' '127.0.0.1'
|
||||
|
||||
#
|
||||
# Editor
|
||||
#
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
zstyle ':prezto:module:editor' key-bindings 'vi'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
# zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||
|
||||
#
|
||||
# Git
|
||||
#
|
||||
|
||||
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
|
||||
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
||||
|
||||
#
|
||||
# GNU Utility
|
||||
#
|
||||
|
||||
# Set the command prefix on non-GNU systems.
|
||||
zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||
|
||||
#
|
||||
# History Substring Search
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' found ''
|
||||
|
||||
# Set the query not found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' not-found ''
|
||||
|
||||
# Set the search globbing flags.
|
||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
|
||||
#
|
||||
# OS X
|
||||
#
|
||||
|
||||
# Set the keyword used by `mand` to open man pages in Dash.app
|
||||
# zstyle ':prezto:module:osx:man' dash-keyword 'manpages'
|
||||
|
||||
#
|
||||
# Pacman
|
||||
#
|
||||
|
||||
# Set the Pacman frontend.
|
||||
# zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||
|
||||
#
|
||||
# Prompt
|
||||
#
|
||||
|
||||
# Set the prompt theme to load.
|
||||
# Setting it to 'random' loads a random theme.
|
||||
# Auto set to 'off' on dumb terminals.
|
||||
zstyle ':prezto:module:prompt' theme 'matir'
|
||||
|
||||
# Set the working directory prompt display length.
|
||||
# By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
|
||||
# for longer or 'full' (with '~' expansion) for even longer prompt display.
|
||||
# zstyle ':prezto:module:prompt' pwd-length 'short'
|
||||
|
||||
# Set the prompt to display the return code along with an indicator for non-zero
|
||||
# return codes. This is not supported by all prompts.
|
||||
# zstyle ':prezto:module:prompt' show-return-val 'yes'
|
||||
|
||||
#
|
||||
# Ruby
|
||||
#
|
||||
|
||||
# Auto switch the Ruby version on directory change.
|
||||
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Python
|
||||
#
|
||||
|
||||
# Auto switch the Python virtualenv on directory change.
|
||||
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
|
||||
|
||||
# Automatically initialize virtualenvwrapper if pre-requisites are met.
|
||||
zstyle ':prezto:module:python:virtualenv' initialize 'yes'
|
||||
|
||||
#
|
||||
# Screen
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:screen:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||
|
||||
#
|
||||
# SSH
|
||||
#
|
||||
|
||||
# Set the SSH identities to load into the agent.
|
||||
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
|
||||
#
|
||||
# Syntax Highlighting
|
||||
#
|
||||
|
||||
# Set syntax highlighters.
|
||||
# By default, only the main highlighter is enabled.
|
||||
zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||
'main' \
|
||||
'brackets' \
|
||||
'pattern' \
|
||||
'line' \
|
||||
'root'
|
||||
|
||||
# Set syntax highlighting styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' styles \
|
||||
# 'builtin' 'bg=blue' \
|
||||
# 'command' 'bg=blue' \
|
||||
# 'function' 'bg=blue'
|
||||
#
|
||||
# Set syntax pattern styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' pattern \
|
||||
# 'rm*-rf*' 'fg=white,bold,bg=red'
|
||||
|
||||
#
|
||||
# Terminal
|
||||
#
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the window title format.
|
||||
zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
||||
|
||||
# Set the tab title format.
|
||||
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||
|
||||
# Set the terminal multiplexer title format.
|
||||
zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
||||
|
||||
#
|
||||
# Tmux
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
zstyle ':prezto:module:tmux:auto-start' local 'no'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
zstyle ':prezto:module:tmux:auto-start' remote 'no'
|
||||
|
||||
# Integrate with iTerm2.
|
||||
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
||||
|
||||
# Set the default session name:
|
||||
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
|
||||
|
||||
#
|
||||
# Utility
|
||||
#
|
||||
|
||||
# Enabled safe options. This aliases cp, ln, mv and rm so that they prompt
|
||||
# before deleting or overwriting files. Set to 'no' to disable this safer
|
||||
# behavior.
|
||||
zstyle ':prezto:module:utility' safe-ops 'no'
|
||||
118
dotfiles/zshrc
118
dotfiles/zshrc
@@ -2,15 +2,56 @@
|
||||
HISTFILE=~/.zhistory
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases
|
||||
unsetopt beep histbeep listbeep flowcontrol
|
||||
setopt \
|
||||
ALWAYS_TO_END \
|
||||
APPEND_HISTORY \
|
||||
AUTO_CD \
|
||||
AUTO_LIST \
|
||||
AUTO_MENU \
|
||||
AUTO_PARAM_SLASH \
|
||||
AUTO_PUSHD \
|
||||
BANG_HIST \
|
||||
C_BASES \
|
||||
COMPLETE_IN_WORD \
|
||||
EXTENDED_GLOB \
|
||||
EXTENDED_HISTORY \
|
||||
HIST_EXPIRE_DUPS_FIRST \
|
||||
HIST_FIND_NO_DUPS \
|
||||
HIST_IGNORE_DUPS \
|
||||
HIST_IGNORE_SPACE \
|
||||
HIST_LEX_WORDS \
|
||||
HIST_SAVE_NO_DUPS \
|
||||
HIST_VERIFY \
|
||||
INTERACTIVE_COMMENTS \
|
||||
LONG_LIST_JOBS \
|
||||
MULTIOS \
|
||||
NO_CLOBBER \
|
||||
NO_HUP \
|
||||
NOMATCH \
|
||||
NOTIFY \
|
||||
PUSHD_IGNORE_DUPS \
|
||||
PUSHD_SILENT \
|
||||
PUSHD_TO_HOME \
|
||||
RC_QUOTES \
|
||||
SHARE_HISTORY
|
||||
unsetopt \
|
||||
BEEP \
|
||||
CDABLE_VARS \
|
||||
HIST_BEEP \
|
||||
LIST_BEEP \
|
||||
FLOW_CONTROL \
|
||||
MAIL_WARNING \
|
||||
HUP \
|
||||
BG_NICE \
|
||||
CHECK_JOBS
|
||||
# vi keybindings
|
||||
bindkey -v
|
||||
|
||||
# Completion
|
||||
zstyle :compinstall filename "${HOME}/.zshrc"
|
||||
autoload -Uz compinit && compinit
|
||||
# Allow core files
|
||||
ulimit -c unlimited
|
||||
|
||||
DIRSTACKSIZE=16
|
||||
# Set terminal title
|
||||
case $TERM in
|
||||
xterm*)
|
||||
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
|
||||
@@ -20,32 +61,16 @@ esac
|
||||
autoload -U colors && colors
|
||||
PS1="%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} "
|
||||
|
||||
if [ `uname` != 'Darwin' ] ; then
|
||||
# ls Colors
|
||||
alias ls='ls --color'
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
else
|
||||
alias ls='ls -G'
|
||||
fi
|
||||
|
||||
# Load prezto
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
fi
|
||||
# noglob scp is so annoying
|
||||
unalias scp
|
||||
|
||||
# Overrides to prezto
|
||||
unsetopt cdablevars
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache"
|
||||
|
||||
# .profile is universal
|
||||
# but after zprezto to use/override anything setup there
|
||||
. ~/.profile
|
||||
# Deduplicate the path
|
||||
typeset -U path
|
||||
|
||||
|
||||
# Keybindings
|
||||
# Additional Keybindings
|
||||
bindkey '^[[A' history-search-backward
|
||||
bindkey '^[[B' history-search-forward
|
||||
# ctrl-arrow keys
|
||||
@@ -55,22 +80,57 @@ bindkey '^P' up-history
|
||||
bindkey '^N' down-history
|
||||
bindkey '^?' backward-delete-char
|
||||
bindkey '^h' backward-delete-char
|
||||
# ok, a few convenience bindings
|
||||
# ok, a few emacs convenience bindings
|
||||
bindkey '^w' backward-kill-word
|
||||
bindkey '^r' history-incremental-search-backward
|
||||
|
||||
|
||||
# Source extras and aliases if interactive
|
||||
if [[ $- == *i* ]] ; then
|
||||
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
|
||||
for file in $HOME/.zshrc.d/* ; do source "$file" ; done
|
||||
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)
|
||||
# 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
|
||||
fi
|
||||
# Enable grc if we have it
|
||||
if ls --version 2>&1 >/dev/null ; then
|
||||
alias ls='ls --color -C'
|
||||
fi
|
||||
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
|
||||
# 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
|
||||
fi
|
||||
if test -f ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh ; then
|
||||
source ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
fi
|
||||
fi # End interactive-only block
|
||||
|
||||
# In case ack is named ack-grep
|
||||
if [ -x /usr/bin/ack-grep ] ; then
|
||||
alias ack='/usr/bin/ack-grep'
|
||||
fi
|
||||
|
||||
# Setup PATH for tools
|
||||
PATH=${PATH}:${HOME}/bin/tools
|
||||
|
||||
# Most is nice, if we have it
|
||||
if command -v most >/dev/null 2>&1; then
|
||||
export PAGER="most"
|
||||
|
||||
759
dotfiles/zshrc.d/_zsh-history-substring-search.zsh
Normal file
759
dotfiles/zshrc.d/_zsh-history-substring-search.zsh
Normal file
@@ -0,0 +1,759 @@
|
||||
#!/usr/bin/env zsh
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2009 Peter Stephenson
|
||||
# Copyright (c) 2011 Guido van Steen
|
||||
# Copyright (c) 2011 Suraj N. Kurapati
|
||||
# Copyright (c) 2011 Sorin Ionescu
|
||||
# Copyright (c) 2011 Vincent Guerci
|
||||
# Copyright (c) 2016 Geza Lore
|
||||
# Copyright (c) 2017 Bengt Brodersen
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# * Neither the name of the FIZSH nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# declare global configuration variables
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
|
||||
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
|
||||
typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
|
||||
typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''
|
||||
typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY=''
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# declare internal global variables
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
typeset -g BUFFER MATCH MBEGIN MEND CURSOR
|
||||
typeset -g _history_substring_search_refresh_display
|
||||
typeset -g _history_substring_search_query_highlight
|
||||
typeset -g _history_substring_search_result
|
||||
typeset -g _history_substring_search_query
|
||||
typeset -g -a _history_substring_search_query_parts
|
||||
typeset -g -a _history_substring_search_raw_matches
|
||||
typeset -g -i _history_substring_search_raw_match_index
|
||||
typeset -g -a _history_substring_search_matches
|
||||
typeset -g -i _history_substring_search_match_index
|
||||
typeset -g -A _history_substring_search_unique_filter
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# the main ZLE widgets
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
history-substring-search-up() {
|
||||
_history-substring-search-begin
|
||||
|
||||
_history-substring-search-up-history ||
|
||||
_history-substring-search-up-buffer ||
|
||||
_history-substring-search-up-search
|
||||
|
||||
_history-substring-search-end
|
||||
}
|
||||
|
||||
history-substring-search-down() {
|
||||
_history-substring-search-begin
|
||||
|
||||
_history-substring-search-down-history ||
|
||||
_history-substring-search-down-buffer ||
|
||||
_history-substring-search-down-search
|
||||
|
||||
_history-substring-search-end
|
||||
}
|
||||
|
||||
zle -N history-substring-search-up
|
||||
zle -N history-substring-search-down
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# implementation details
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
zmodload -F zsh/parameter
|
||||
|
||||
#
|
||||
# We have to "override" some keys and widgets if the
|
||||
# zsh-syntax-highlighting plugin has not been loaded:
|
||||
#
|
||||
# https://github.com/nicoulaj/zsh-syntax-highlighting
|
||||
#
|
||||
if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
|
||||
#
|
||||
# Dummy implementation of _zsh_highlight() that
|
||||
# simply removes any existing highlights when the
|
||||
# user inserts printable characters into $BUFFER.
|
||||
#
|
||||
_zsh_highlight() {
|
||||
if [[ $KEYS == [[:print:]] ]]; then
|
||||
region_highlight=()
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# The following snippet was taken from the zsh-syntax-highlighting project:
|
||||
#
|
||||
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/56b134f5d62ae3d4e66c7f52bd0cc2595f9b305b/zsh-syntax-highlighting.zsh#L126-161
|
||||
#
|
||||
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of the zsh-syntax-highlighting contributors nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
#--------------8<-------------------8<-------------------8<-----------------
|
||||
# Rebind all ZLE widgets to make them invoke _zsh_highlights.
|
||||
_zsh_highlight_bind_widgets()
|
||||
{
|
||||
# Load ZSH module zsh/zleparameter, needed to override user defined widgets.
|
||||
zmodload zsh/zleparameter 2>/dev/null || {
|
||||
echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter.' >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
# Override ZLE widgets to make them invoke _zsh_highlight.
|
||||
local cur_widget
|
||||
for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do
|
||||
case $widgets[$cur_widget] in
|
||||
|
||||
# Already rebound event: do nothing.
|
||||
user:$cur_widget|user:_zsh_highlight_widget_*);;
|
||||
|
||||
# User defined widget: override and rebind old one with prefix "orig-".
|
||||
user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
|
||||
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
|
||||
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||
|
||||
# Completion widget: override and rebind old one with prefix "orig-".
|
||||
completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
|
||||
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
|
||||
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||
|
||||
# Builtin widget: override and make it call the builtin ".widget".
|
||||
builtin) eval "_zsh_highlight_widget_$cur_widget() { builtin zle .$cur_widget -- \"\$@\" && _zsh_highlight }; \
|
||||
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
|
||||
|
||||
# Default: unhandled case.
|
||||
*) echo "zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget'" >&2 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
#-------------->8------------------->8------------------->8-----------------
|
||||
|
||||
_zsh_highlight_bind_widgets
|
||||
fi
|
||||
|
||||
_history-substring-search-begin() {
|
||||
setopt localoptions extendedglob
|
||||
|
||||
_history_substring_search_refresh_display=
|
||||
_history_substring_search_query_highlight=
|
||||
|
||||
#
|
||||
# If the buffer is the same as the previously displayed history substring
|
||||
# search result, then just keep stepping through the match list. Otherwise
|
||||
# start a new search.
|
||||
#
|
||||
if [[ -n $BUFFER && $BUFFER == ${_history_substring_search_result:-} ]]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
#
|
||||
# Clear the previous result.
|
||||
#
|
||||
_history_substring_search_result=''
|
||||
|
||||
if [[ -z $BUFFER ]]; then
|
||||
#
|
||||
# If the buffer is empty, we will just act like up-history/down-history
|
||||
# in ZSH, so we do not need to actually search the history. This should
|
||||
# speed things up a little.
|
||||
#
|
||||
_history_substring_search_query=
|
||||
_history_substring_search_query_parts=()
|
||||
_history_substring_search_raw_matches=()
|
||||
|
||||
else
|
||||
#
|
||||
# For the purpose of highlighting we keep a copy of the original
|
||||
# query string.
|
||||
#
|
||||
_history_substring_search_query=$BUFFER
|
||||
|
||||
#
|
||||
# compose search pattern
|
||||
#
|
||||
if [[ -n $HISTORY_SUBSTRING_SEARCH_FUZZY ]]; then
|
||||
#
|
||||
# `=` split string in arguments
|
||||
#
|
||||
_history_substring_search_query_parts=(${=_history_substring_search_query})
|
||||
else
|
||||
_history_substring_search_query_parts=(${==_history_substring_search_query})
|
||||
fi
|
||||
|
||||
#
|
||||
# Escape and join query parts with wildcard character '*' as seperator
|
||||
# `(j:CHAR:)` join array to string with CHAR as seperator
|
||||
#
|
||||
local search_pattern="*${(j:*:)_history_substring_search_query_parts[@]//(#m)[\][()|\\*?#<>~^]/\\$MATCH}*"
|
||||
|
||||
#
|
||||
# Find all occurrences of the search pattern in the history file.
|
||||
#
|
||||
# (k) returns the "keys" (history index numbers) instead of the values
|
||||
# (R) returns values in reverse older, so the index of the youngest
|
||||
# matching history entry is at the head of the list.
|
||||
#
|
||||
_history_substring_search_raw_matches=(${(k)history[(R)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${search_pattern}]})
|
||||
fi
|
||||
|
||||
#
|
||||
# In order to stay as responsive as possible, we will process the raw
|
||||
# matches lazily (when the user requests the next match) to choose items
|
||||
# that need to be displayed to the user.
|
||||
# _history_substring_search_raw_match_index holds the index of the last
|
||||
# unprocessed entry in _history_substring_search_raw_matches. Any items
|
||||
# that need to be displayed will be added to
|
||||
# _history_substring_search_matches.
|
||||
#
|
||||
# We use an associative array (_history_substring_search_unique_filter) as
|
||||
# a 'set' data structure to ensure uniqueness of the results if desired.
|
||||
# If an entry (key) is in the set (non-empty value), then we have already
|
||||
# added that entry to _history_substring_search_matches.
|
||||
#
|
||||
_history_substring_search_raw_match_index=0
|
||||
_history_substring_search_matches=()
|
||||
_history_substring_search_unique_filter=()
|
||||
|
||||
#
|
||||
# If $_history_substring_search_match_index is equal to
|
||||
# $#_history_substring_search_matches + 1, this indicates that we
|
||||
# are beyond the end of $_history_substring_search_matches and that we
|
||||
# have also processed all entries in
|
||||
# _history_substring_search_raw_matches.
|
||||
#
|
||||
# If $#_history_substring_search_match_index is equal to 0, this indicates
|
||||
# that we are beyond the beginning of $_history_substring_search_matches.
|
||||
#
|
||||
# If we have initially pressed "up" we have to initialize
|
||||
# $_history_substring_search_match_index to 0 so that it will be
|
||||
# incremented to 1.
|
||||
#
|
||||
# If we have initially pressed "down" we have to initialize
|
||||
# $_history_substring_search_match_index to 1 so that it will be
|
||||
# decremented to 0.
|
||||
#
|
||||
if [[ $WIDGET == history-substring-search-down ]]; then
|
||||
_history_substring_search_match_index=1
|
||||
else
|
||||
_history_substring_search_match_index=0
|
||||
fi
|
||||
}
|
||||
|
||||
_history-substring-search-end() {
|
||||
setopt localoptions extendedglob
|
||||
|
||||
_history_substring_search_result=$BUFFER
|
||||
|
||||
# the search was successful so display the result properly by clearing away
|
||||
# existing highlights and moving the cursor to the end of the result buffer
|
||||
if [[ $_history_substring_search_refresh_display -eq 1 ]]; then
|
||||
region_highlight=()
|
||||
CURSOR=${#BUFFER}
|
||||
fi
|
||||
|
||||
# highlight command line using zsh-syntax-highlighting
|
||||
_zsh_highlight
|
||||
|
||||
# highlight the search query inside the command line
|
||||
if [[ -n $_history_substring_search_query_highlight ]]; then
|
||||
# highlight first matching query parts
|
||||
local highlight_start_index=0
|
||||
local highlight_end_index=0
|
||||
local query_part
|
||||
for query_part in $_history_substring_search_query_parts; do
|
||||
local escaped_query_part=${query_part//(#m)[\][()|\\*?#<>~^]/\\$MATCH}
|
||||
# (i) get index of pattern
|
||||
local query_part_match_index="${${BUFFER:$highlight_start_index}[(i)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${escaped_query_part}]}"
|
||||
if [[ $query_part_match_index -le ${#BUFFER:$highlight_start_index} ]]; then
|
||||
highlight_start_index=$(( $highlight_start_index + $query_part_match_index ))
|
||||
highlight_end_index=$(( $highlight_start_index + ${#query_part} ))
|
||||
region_highlight+=("$(($highlight_start_index - 1)) $(($highlight_end_index - 1)) $_history_substring_search_query_highlight")
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# For debugging purposes:
|
||||
# zle -R "mn: "$_history_substring_search_match_index" m#: "${#_history_substring_search_matches}
|
||||
# read -k -t 200 && zle -U $REPLY
|
||||
|
||||
# Exit successfully from the history-substring-search-* widgets.
|
||||
return 0
|
||||
}
|
||||
|
||||
_history-substring-search-up-buffer() {
|
||||
#
|
||||
# Check if the UP arrow was pressed to move the cursor within a multi-line
|
||||
# buffer. This amounts to three tests:
|
||||
#
|
||||
# 1. $#buflines -gt 1.
|
||||
#
|
||||
# 2. $CURSOR -ne $#BUFFER.
|
||||
#
|
||||
# 3. Check if we are on the first line of the current multi-line buffer.
|
||||
# If so, pressing UP would amount to leaving the multi-line buffer.
|
||||
#
|
||||
# We check this by adding an extra "x" to $LBUFFER, which makes
|
||||
# sure that xlbuflines is always equal to the number of lines
|
||||
# until $CURSOR (including the line with the cursor on it).
|
||||
#
|
||||
local buflines XLBUFFER xlbuflines
|
||||
buflines=(${(f)BUFFER})
|
||||
XLBUFFER=$LBUFFER"x"
|
||||
xlbuflines=(${(f)XLBUFFER})
|
||||
|
||||
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xlbuflines -ne 1 ]]; then
|
||||
zle up-line-or-history
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_history-substring-search-down-buffer() {
|
||||
#
|
||||
# Check if the DOWN arrow was pressed to move the cursor within a multi-line
|
||||
# buffer. This amounts to three tests:
|
||||
#
|
||||
# 1. $#buflines -gt 1.
|
||||
#
|
||||
# 2. $CURSOR -ne $#BUFFER.
|
||||
#
|
||||
# 3. Check if we are on the last line of the current multi-line buffer.
|
||||
# If so, pressing DOWN would amount to leaving the multi-line buffer.
|
||||
#
|
||||
# We check this by adding an extra "x" to $RBUFFER, which makes
|
||||
# sure that xrbuflines is always equal to the number of lines
|
||||
# from $CURSOR (including the line with the cursor on it).
|
||||
#
|
||||
local buflines XRBUFFER xrbuflines
|
||||
buflines=(${(f)BUFFER})
|
||||
XRBUFFER="x"$RBUFFER
|
||||
xrbuflines=(${(f)XRBUFFER})
|
||||
|
||||
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xrbuflines -ne 1 ]]; then
|
||||
zle down-line-or-history
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_history-substring-search-up-history() {
|
||||
#
|
||||
# Behave like up in ZSH, except clear the $BUFFER
|
||||
# when beginning of history is reached like in Fish.
|
||||
#
|
||||
if [[ -z $_history_substring_search_query ]]; then
|
||||
|
||||
# we have reached the absolute top of history
|
||||
if [[ $HISTNO -eq 1 ]]; then
|
||||
BUFFER=
|
||||
|
||||
# going up from somewhere below the top of history
|
||||
else
|
||||
zle up-line-or-history
|
||||
fi
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_history-substring-search-down-history() {
|
||||
#
|
||||
# Behave like down-history in ZSH, except clear the
|
||||
# $BUFFER when end of history is reached like in Fish.
|
||||
#
|
||||
if [[ -z $_history_substring_search_query ]]; then
|
||||
|
||||
# going down from the absolute top of history
|
||||
if [[ $HISTNO -eq 1 && -z $BUFFER ]]; then
|
||||
BUFFER=${history[1]}
|
||||
_history_substring_search_refresh_display=1
|
||||
|
||||
# going down from somewhere above the bottom of history
|
||||
else
|
||||
zle down-line-or-history
|
||||
fi
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
_history_substring_search_process_raw_matches() {
|
||||
#
|
||||
# Process more outstanding raw matches and append any matches that need to
|
||||
# be displayed to the user to _history_substring_search_matches.
|
||||
# Return whether there were any more results appended.
|
||||
#
|
||||
|
||||
#
|
||||
# While we have more raw matches. Process them to see if there are any more
|
||||
# matches that need to be displayed to the user.
|
||||
#
|
||||
while [[ $_history_substring_search_raw_match_index -lt $#_history_substring_search_raw_matches ]]; do
|
||||
#
|
||||
# Move on to the next raw entry and get its history index.
|
||||
#
|
||||
_history_substring_search_raw_match_index+=1
|
||||
local index=${_history_substring_search_raw_matches[$_history_substring_search_raw_match_index]}
|
||||
|
||||
#
|
||||
# If HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set to a non-empty value,
|
||||
# then ensure that only unique matches are presented to the user.
|
||||
# When HIST_IGNORE_ALL_DUPS is set, ZSH already ensures a unique history,
|
||||
# so in this case we do not need to do anything.
|
||||
#
|
||||
if [[ ! -o HIST_IGNORE_ALL_DUPS && -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
|
||||
#
|
||||
# Get the actual history entry at the new index, and check if we have
|
||||
# already added it to _history_substring_search_matches.
|
||||
#
|
||||
local entry=${history[$index]}
|
||||
|
||||
if [[ -z ${_history_substring_search_unique_filter[$entry]} ]]; then
|
||||
#
|
||||
# This is a new unique entry. Add it to the filter and append the
|
||||
# index to _history_substring_search_matches.
|
||||
#
|
||||
_history_substring_search_unique_filter[$entry]=1
|
||||
_history_substring_search_matches+=($index)
|
||||
|
||||
#
|
||||
# Indicate that we did find a match.
|
||||
#
|
||||
return 0
|
||||
fi
|
||||
|
||||
else
|
||||
#
|
||||
# Just append the new history index to the processed matches.
|
||||
#
|
||||
_history_substring_search_matches+=($index)
|
||||
|
||||
#
|
||||
# Indicate that we did find a match.
|
||||
#
|
||||
return 0
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
#
|
||||
# We are beyond the end of the list of raw matches. Indicate that no
|
||||
# more matches are available.
|
||||
#
|
||||
return 1
|
||||
}
|
||||
|
||||
_history-substring-search-has-next() {
|
||||
#
|
||||
# Predicate function that returns whether any more older matches are
|
||||
# available.
|
||||
#
|
||||
|
||||
if [[ $_history_substring_search_match_index -lt $#_history_substring_search_matches ]]; then
|
||||
#
|
||||
# We did not reach the end of the processed list, so we do have further
|
||||
# matches.
|
||||
#
|
||||
return 0
|
||||
|
||||
else
|
||||
#
|
||||
# We are at the end of the processed list. Try to process further
|
||||
# unprocessed matches. _history_substring_search_process_raw_matches
|
||||
# returns whether any more matches were available, so just return
|
||||
# that result.
|
||||
#
|
||||
_history_substring_search_process_raw_matches
|
||||
return $?
|
||||
fi
|
||||
}
|
||||
|
||||
_history-substring-search-has-prev() {
|
||||
#
|
||||
# Predicate function that returns whether any more younger matches are
|
||||
# available.
|
||||
#
|
||||
|
||||
if [[ $_history_substring_search_match_index -gt 1 ]]; then
|
||||
#
|
||||
# We did not reach the beginning of the processed list, so we do have
|
||||
# further matches.
|
||||
#
|
||||
return 0
|
||||
|
||||
else
|
||||
#
|
||||
# We are at the beginning of the processed list. We do not have any more
|
||||
# matches.
|
||||
#
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
_history-substring-search-found() {
|
||||
#
|
||||
# A match is available. The index of the match is held in
|
||||
# $_history_substring_search_match_index
|
||||
#
|
||||
# 1. Make $BUFFER equal to the matching history entry.
|
||||
#
|
||||
# 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
|
||||
# to highlight the current buffer.
|
||||
#
|
||||
BUFFER=$history[$_history_substring_search_matches[$_history_substring_search_match_index]]
|
||||
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
|
||||
}
|
||||
|
||||
_history-substring-search-not-found() {
|
||||
#
|
||||
# No more matches are available.
|
||||
#
|
||||
# 1. Make $BUFFER equal to $_history_substring_search_query so the user can
|
||||
# revise it and search again.
|
||||
#
|
||||
# 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
|
||||
# to highlight the current buffer.
|
||||
#
|
||||
BUFFER=$_history_substring_search_query
|
||||
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
|
||||
}
|
||||
|
||||
_history-substring-search-up-search() {
|
||||
_history_substring_search_refresh_display=1
|
||||
|
||||
#
|
||||
# Select history entry during history-substring-down-search:
|
||||
#
|
||||
# The following variables have been initialized in
|
||||
# _history-substring-search-up/down-search():
|
||||
#
|
||||
# $_history_substring_search_matches is the current list of matches that
|
||||
# need to be displayed to the user.
|
||||
# $_history_substring_search_match_index is the index of the current match
|
||||
# that is being displayed to the user.
|
||||
#
|
||||
# The range of values that $_history_substring_search_match_index can take
|
||||
# is: [0, $#_history_substring_search_matches + 1]. A value of 0
|
||||
# indicates that we are beyond the beginning of
|
||||
# $_history_substring_search_matches. A value of
|
||||
# $#_history_substring_search_matches + 1 indicates that we are beyond
|
||||
# the end of $_history_substring_search_matches and that we have also
|
||||
# processed all entries in _history_substring_search_raw_matches.
|
||||
#
|
||||
# If $_history_substring_search_match_index equals
|
||||
# $#_history_substring_search_matches and
|
||||
# $_history_substring_search_raw_match_index is not greater than
|
||||
# $#_history_substring_search_raw_matches, then we need to further process
|
||||
# $_history_substring_search_raw_matches to see if there are any more
|
||||
# entries that need to be displayed to the user.
|
||||
#
|
||||
# In _history-substring-search-up-search() the initial value of
|
||||
# $_history_substring_search_match_index is 0. This value is set in
|
||||
# _history-substring-search-begin(). _history-substring-search-up-search()
|
||||
# will initially increment it to 1.
|
||||
#
|
||||
|
||||
if [[ $_history_substring_search_match_index -gt $#_history_substring_search_matches ]]; then
|
||||
#
|
||||
# We are beyond the end of $_history_substring_search_matches. This
|
||||
# can only happen if we have also exhausted the unprocessed matches in
|
||||
# _history_substring_search_raw_matches.
|
||||
#
|
||||
# 1. Update display to indicate search not found.
|
||||
#
|
||||
_history-substring-search-not-found
|
||||
return
|
||||
fi
|
||||
|
||||
if _history-substring-search-has-next; then
|
||||
#
|
||||
# We do have older matches.
|
||||
#
|
||||
# 1. Move index to point to the next match.
|
||||
# 2. Update display to indicate search found.
|
||||
#
|
||||
_history_substring_search_match_index+=1
|
||||
_history-substring-search-found
|
||||
|
||||
else
|
||||
#
|
||||
# We do not have older matches.
|
||||
#
|
||||
# 1. Move the index beyond the end of
|
||||
# _history_substring_search_matches.
|
||||
# 2. Update display to indicate search not found.
|
||||
#
|
||||
_history_substring_search_match_index+=1
|
||||
_history-substring-search-not-found
|
||||
fi
|
||||
|
||||
#
|
||||
# When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
|
||||
# history should be matched, make sure the new and old results are different.
|
||||
#
|
||||
# However, if the HIST_IGNORE_ALL_DUPS shell option, or
|
||||
# HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a
|
||||
# unique history, so in this case we do not need to do anything.
|
||||
#
|
||||
if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
|
||||
#
|
||||
# Repeat the current search so that a different (unique) match is found.
|
||||
#
|
||||
_history-substring-search-up-search
|
||||
fi
|
||||
}
|
||||
|
||||
_history-substring-search-down-search() {
|
||||
_history_substring_search_refresh_display=1
|
||||
|
||||
#
|
||||
# Select history entry during history-substring-down-search:
|
||||
#
|
||||
# The following variables have been initialized in
|
||||
# _history-substring-search-up/down-search():
|
||||
#
|
||||
# $_history_substring_search_matches is the current list of matches that
|
||||
# need to be displayed to the user.
|
||||
# $_history_substring_search_match_index is the index of the current match
|
||||
# that is being displayed to the user.
|
||||
#
|
||||
# The range of values that $_history_substring_search_match_index can take
|
||||
# is: [0, $#_history_substring_search_matches + 1]. A value of 0
|
||||
# indicates that we are beyond the beginning of
|
||||
# $_history_substring_search_matches. A value of
|
||||
# $#_history_substring_search_matches + 1 indicates that we are beyond
|
||||
# the end of $_history_substring_search_matches and that we have also
|
||||
# processed all entries in _history_substring_search_raw_matches.
|
||||
#
|
||||
# In _history-substring-search-down-search() the initial value of
|
||||
# $_history_substring_search_match_index is 1. This value is set in
|
||||
# _history-substring-search-begin(). _history-substring-search-down-search()
|
||||
# will initially decrement it to 0.
|
||||
#
|
||||
|
||||
if [[ $_history_substring_search_match_index -lt 1 ]]; then
|
||||
#
|
||||
# We are beyond the beginning of $_history_substring_search_matches.
|
||||
#
|
||||
# 1. Update display to indicate search not found.
|
||||
#
|
||||
_history-substring-search-not-found
|
||||
return
|
||||
fi
|
||||
|
||||
if _history-substring-search-has-prev; then
|
||||
#
|
||||
# We do have younger matches.
|
||||
#
|
||||
# 1. Move index to point to the previous match.
|
||||
# 2. Update display to indicate search found.
|
||||
#
|
||||
_history_substring_search_match_index+=-1
|
||||
_history-substring-search-found
|
||||
|
||||
else
|
||||
#
|
||||
# We do not have younger matches.
|
||||
#
|
||||
# 1. Move the index beyond the beginning of
|
||||
# _history_substring_search_matches.
|
||||
# 2. Update display to indicate search not found.
|
||||
#
|
||||
_history_substring_search_match_index+=-1
|
||||
_history-substring-search-not-found
|
||||
fi
|
||||
|
||||
#
|
||||
# When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
|
||||
# history should be matched, make sure the new and old results are different.
|
||||
#
|
||||
# However, if the HIST_IGNORE_ALL_DUPS shell option, or
|
||||
# HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a
|
||||
# unique history, so in this case we do not need to do anything.
|
||||
#
|
||||
if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
|
||||
#
|
||||
# Repeat the current search so that a different (unique) match is found.
|
||||
#
|
||||
_history-substring-search-down-search
|
||||
fi
|
||||
}
|
||||
|
||||
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
7
dotfiles/zshrc.d/crouton.zsh
Normal file
7
dotfiles/zshrc.d/crouton.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
if command -v xiwi >/dev/null 2>&1; then
|
||||
function xiwibg {
|
||||
local tmpf=$(mktemp)
|
||||
echo Logging to ${tmpf}
|
||||
nohup xiwi "$@" >!${tmpf} 2>&1 &
|
||||
}
|
||||
fi
|
||||
44
dotfiles/zshrc.d/gpg.zsh
Normal file
44
dotfiles/zshrc.d/gpg.zsh
Normal file
@@ -0,0 +1,44 @@
|
||||
if ! which gpg-agent >/dev/null 2>&1 ; then
|
||||
return 1
|
||||
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"
|
||||
|
||||
# Load environment variables from previous run
|
||||
source "$_gpg_agent_env" 2> /dev/null
|
||||
|
||||
# Start gpg-agent if not started.
|
||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${GNUPGHOME:-$HOME/.gnupg}/S.gpg-agent" ]]; then
|
||||
# Start gpg-agent if not started.
|
||||
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
|
||||
eval "$(gpg-agent --daemon 2>/dev/null | tee "$_gpg_agent_env")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Inform gpg-agent of the current TTY for user prompts.
|
||||
export GPG_TTY="$(tty)"
|
||||
|
||||
# Integrate with the SSH module.
|
||||
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"
|
||||
|
||||
# Updates the GPG-Agent TTY before every command since SSH does not set it.
|
||||
function _gpg-agent-update-tty {
|
||||
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
|
||||
}
|
||||
add-zsh-hook preexec _gpg-agent-update-tty
|
||||
fi
|
||||
|
||||
# Clean up.
|
||||
unset _gpg_agent_{conf,env}
|
||||
|
||||
# Disable GUI prompts inside SSH.
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
export PINENTRY_USER_DATA='USE_CURSES=1'
|
||||
fi
|
||||
26
dotfiles/zshrc.d/history.zsh
Normal file
26
dotfiles/zshrc.d/history.zsh
Normal file
@@ -0,0 +1,26 @@
|
||||
histmode() {
|
||||
# This is very brittle as it assumes we're the only user of fc
|
||||
case "$1" in
|
||||
on)
|
||||
if [ "$HISTDISABLED" -ne 1 ] ; then
|
||||
echo "History is not disabled." >&2
|
||||
return 1
|
||||
fi
|
||||
fc -P
|
||||
HISTDISABLED=0
|
||||
echo "History enabled."
|
||||
;;
|
||||
off)
|
||||
if [ "$HISTDISABLED" -eq 1 ] ; then
|
||||
echo "History is already disabled." >&2
|
||||
return 1
|
||||
fi
|
||||
HISTDISABLED=1
|
||||
fc -p /dev/null $HISTSIZE 0
|
||||
echo "History disabled."
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command." >&2
|
||||
;;
|
||||
esac
|
||||
}
|
||||
3
dotfiles/zshrc.d/ipython.zsh
Normal file
3
dotfiles/zshrc.d/ipython.zsh
Normal file
@@ -0,0 +1,3 @@
|
||||
if which ipython >/dev/null 2>/dev/null ; then
|
||||
export PYTHONSTARTUP="${HOME}/.ipython.py"
|
||||
fi
|
||||
@@ -19,40 +19,38 @@ function prompt_matir_setup {
|
||||
zstyle ':vcs_info:*' unstagedstr '*'
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
|
||||
|
||||
# Virtualenv formatting
|
||||
zstyle ':prezto:module:python:info:virtualenv' format ' (py:%v)'
|
||||
|
||||
PROMPT='%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] ' # History #
|
||||
PROMPT+='%{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@' # username@
|
||||
PROMPT+='%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:' # hostname
|
||||
PROMPT+='%{$fg[green]%}%32<...<%~%<<' # path
|
||||
PROMPT+='%{$fg[magenta]%}${python_info[virtualenv]}' # virtualenv
|
||||
PROMPT+='%{$fg[magenta]%}${VIRTUAL_ENV_SHORT}' # virtualenv
|
||||
PROMPT+='%{$fg[blue]%}${vcs_info_msg_0_}' # VCS info
|
||||
PROMPT+='%{$fg[white]%}%#%{$reset_color%} ' # prompt symbol
|
||||
|
||||
# Editor options
|
||||
zstyle ':prezto:module:editor:info:keymap:primary' format ''
|
||||
zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
|
||||
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
|
||||
zstyle ':prezto:module:editor:info:keymap:alternate' format ' [VICMD]'
|
||||
zstyle ':prezto:module:editor:info:completing' format '...'
|
||||
|
||||
# Rprompt setup
|
||||
local show_return="✘ "
|
||||
# Default is to show the return value
|
||||
if zstyle -T ':prezto:module:prompt' show-return-val; then
|
||||
show_return+='%? '
|
||||
fi
|
||||
local show_return='✘ '
|
||||
RPROMPT='%(?:: %{$fg[red]%}'
|
||||
RPROMPT+=${show_return}
|
||||
RPROMPT+='%? '
|
||||
RPROMPT+='%{$reset_color%})'
|
||||
RPROMPT+='${editor_info[keymap]}'
|
||||
RPROMPT+='${PROMPT_VIMODE}'
|
||||
}
|
||||
|
||||
function zle-keymap-select {
|
||||
# Add prompt info
|
||||
PROMPT_VIMODE="${${KEYMAP/vicmd/ [VICMD]}/(main|viins)/}"
|
||||
zle reset-prompt
|
||||
}
|
||||
|
||||
zle -N zle-keymap-select
|
||||
zle -N zle-line-init zle-keymap-select
|
||||
|
||||
function prompt_matir_precmd {
|
||||
vcs_info
|
||||
if (( $+functions[python-info] )); then
|
||||
python-info
|
||||
if [ $VIRTUAL_ENV ] ; then
|
||||
VIRTUAL_ENV_SHORT=" (py:$(basename $VIRTUAL_ENV))"
|
||||
else
|
||||
VIRTUAL_ENV_SHORT=""
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
function source_gnupg {
|
||||
GPG_ENV=${HOME}/.gnupg/gpg-agent.env
|
||||
if test -f ${GPG_ENV} ; then
|
||||
eval $(sed 's/^/export /' ${GPG_ENV})
|
||||
fi
|
||||
}
|
||||
79
install.sh
79
install.sh
@@ -2,6 +2,7 @@
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
||||
|
||||
case $(uname) in
|
||||
Linux)
|
||||
@@ -40,31 +41,47 @@ prerequisites() {
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
install_git --recursive https://github.com/sorin-ionescu/prezto.git $HOME/.zprezto
|
||||
else
|
||||
echo "ZSH not found!" >&2
|
||||
fi
|
||||
if which vim > /dev/null 2>&1 ; then
|
||||
mkdir -p $HOME/.vim/bundle
|
||||
install_git https://github.com/VundleVim/Vundle.vim.git \
|
||||
$HOME/.vim/bundle/Vundle.vim
|
||||
fi
|
||||
}
|
||||
|
||||
install_dotfile_dir() {
|
||||
local SRCDIR="${1}"
|
||||
local dotfile
|
||||
local submodule_prune="$(git -C "${BASEDIR}" submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||
awk '{print $2}' | \
|
||||
while read submod ; do
|
||||
echo -n " -o -path ${BASEDIR}/${submod}"
|
||||
done)"
|
||||
find "${SRCDIR}" \( -name .git -o \
|
||||
-path "${SRCDIR}/private_dotfiles" -o \
|
||||
-name install.sh -o \
|
||||
-name README.md -o \
|
||||
-name .gitignore \) \
|
||||
-name .gitignore \
|
||||
${submodule_prune} \) \
|
||||
-prune -o ${FINDTYPE} f -print | \
|
||||
while read dotfile ; do
|
||||
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
|
||||
mkdir -p `dirname "${TARGET}"`
|
||||
mkdir -p $(dirname "${TARGET}")
|
||||
ln -s -f "${dotfile}" "${TARGET}"
|
||||
done
|
||||
git submodule status -- "${SRCDIR}" 2>/dev/null | \
|
||||
awk '{print $2}' | \
|
||||
while read submodule ; do
|
||||
local FULLNAME="${BASEDIR}/${submodule}"
|
||||
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
|
||||
fi
|
||||
elif test -d "${TARGET}" ; then
|
||||
echo "rm -rf ${TARGET}" >/dev/stderr
|
||||
else
|
||||
ln -s -f "${FULLNAME}" "${TARGET}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
install_basic_dir() {
|
||||
@@ -107,31 +124,8 @@ add_bin_symlink() {
|
||||
ln -sf ${1} ${LINKNAME}
|
||||
}
|
||||
|
||||
# Custom version of pwndbg's installer
|
||||
install_pwndbg() {
|
||||
if ! which gdb > /dev/null 2>&1 ; then
|
||||
return 1
|
||||
fi
|
||||
install_git -b stable https://github.com/pwndbg/pwndbg.git $HOME/.pwndbg
|
||||
mkdir -p $HOME/.pwndbg/vendor
|
||||
local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
|
||||
local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
||||
PYTHON="${PYTHON}${PYVER}"
|
||||
local PY_PACKAGES=$HOME/.pwndbg/vendor
|
||||
${PYTHON} -m pip install --target ${PY_PACKAGES} -Ur $HOME/.pwndbg/requirements.txt
|
||||
${PYTHON} -m pip install --target ${PY_PACKAGES} -U capstone unicorn
|
||||
# capstone package is broken
|
||||
cp ${PY_PACKAGES}/usr/lib/*/dist-packages/capstone/libcapstone.so ${PY_PACKAGES}/capstone
|
||||
}
|
||||
|
||||
postinstall() {
|
||||
# Install Vundle plugins
|
||||
if [ -d $HOME/.vim/bundle/Vundle.vim ] ; then
|
||||
vim +VundleInstall +qall
|
||||
fi
|
||||
# Install other useful tools
|
||||
install_git https://github.com/trustedsec/ptf.git ${HOME}/bin/ptframework && \
|
||||
add_bin_symlink ${HOME}/bin/ptframework/ptf
|
||||
true
|
||||
}
|
||||
|
||||
ssh_key_already_installed() {
|
||||
@@ -199,7 +193,7 @@ install_known_hosts() {
|
||||
mkdir -p ${HOME}/.ssh
|
||||
if [ -f "${HOME}/.ssh/known_hosts" ] ; then
|
||||
local tmpf=`mktemp`
|
||||
cat ${BASEDIR}/keys/known_hosts ${HOME}/.ssh/known_hosts | sort | uniq > $tmpf
|
||||
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
|
||||
@@ -232,7 +226,10 @@ run_as_root() {
|
||||
install_pkg_set() {
|
||||
local pkg_file=${BASEDIR}/${1}
|
||||
local pkg_list=""
|
||||
if [ ! -f "${pkg_file}" ] ; then return 0 ; fi
|
||||
if [ ! -f "${pkg_file}" ] ; then
|
||||
echo "Package set $(basename ${pkg_file}) does not exist." 1>&2
|
||||
return 1
|
||||
fi
|
||||
while read line ; do
|
||||
if is_comment "${line}" ; then
|
||||
continue
|
||||
@@ -240,7 +237,7 @@ install_pkg_set() {
|
||||
if [ -z "${line}" ] ; then
|
||||
continue
|
||||
fi
|
||||
if apt-cache show ${line} >/dev/null 2>&1 ; then
|
||||
if [ "$(apt-cache -q show ${line} 2>/dev/null)" != "" ] ; then
|
||||
pkg_list="${pkg_list} ${line}"
|
||||
else
|
||||
echo "Warning: package ${line} not found." >&2
|
||||
@@ -338,6 +335,8 @@ install_dotfiles() {
|
||||
}
|
||||
|
||||
install_main() {
|
||||
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
|
||||
install_dotfiles
|
||||
@@ -395,14 +394,8 @@ case $OPERATION in
|
||||
install_dotfiles
|
||||
;;
|
||||
package*)
|
||||
if [ ${2:-default} != default ] ; then
|
||||
install_pkg_set packages.${2}
|
||||
else
|
||||
install_pkg_set packages
|
||||
fi
|
||||
;;
|
||||
pwndbg)
|
||||
install_pwndbg
|
||||
PKG_SET=${2:-minimal}
|
||||
install_pkg_set packages.${PKG_SET}
|
||||
;;
|
||||
test)
|
||||
# Do nothing, just sourcing
|
||||
|
||||
52
keys/gpg/dwt-google.pub
Normal file
52
keys/gpg/dwt-google.pub
Normal file
@@ -0,0 +1,52 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFiKQqoBEACbgIl6+Y6mAKXs+laurZGuiVc65ZBjPW0Lx5ucBDNdJuxc9u1M
|
||||
ChIhzJA06ziPi1I85mjbMqcyWvo/qZkW7zs1xrh44AHwqkX6pgQdSU2prUzm1v+R
|
||||
WaML/D0R7ftyPDYPhzI5fSrSkufoz0dFwRpNqKK4/KQviZPLULaR4Z0xeVatEDJg
|
||||
mFsmn4PIM+nr1eVUJhw13PdPB8JF6qHtOuBFv0IqzFSNx3ZaaVPIdMKZFl2xRGb9
|
||||
Dvk3gbTIVVQ8u3IX/IawHTJjSd/Ae+fl9rAmxYljUrEf7DBED0syRUHaIsPciUru
|
||||
OOqf/lsoRJ2zQ3JWlf3XQnw9vNSIbRCpzBnJ0Y2HjW5KCIpLTrzys8tMw7tO1Fy+
|
||||
4vkQt7oNAE7QRcSezx/Wf5ObIF8el7pC6QZI/EM59Szm+G53sfBnxCSYExBEUMin
|
||||
64RgR4YSKaeBR+rwpeuw+0usjWzEsABAz68HYDazTwIzQxz2ZrUwk31269c2AE+v
|
||||
iY20bxhlZx9CWb8VmnFSD9x3e2D+DKctToMPNr9mbFYd0V2lMNFVIxPNTaDUSWTe
|
||||
zZn0jzK23oqzwKB56npxer7FxfjhMB7eB5jk320/dkhiihDZWGxDeoic0ngXLEE1
|
||||
Q2yWxZoMLE7llnEIKBYXN+f178tiiORWh/uoc2jB8G3BOrBj/i8ID9jh1QARAQAB
|
||||
tCtEYXZpZCBUb21hc2NoaWsgPGRhdmlkdG9tYXNjaGlrQGdvb2dsZS5jb20+iQJU
|
||||
BBMBCAA+AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAFiEEvu4JR7VGzxq8znG3
|
||||
yK/yn5YTqwsFAlzDSncFCQYaO00ACgkQyK/yn5YTqwvloA/9FCY0qshiXwqmPXrK
|
||||
I4zKat9mI6zpBTGM4LRnLLfc7nGm45vl/cLJCOH80glMDsO8HYoFjsLG3MEJCJoO
|
||||
xoiiVGqUQ9sBUrBLATqPMl+XGrPIz2q2mdo3qvVETCizCWi4LdS6VTxgBvEXSL8s
|
||||
as8HNEyLO+DR1zk3h/HFXvhcPZC4Yes06XgQGiAyD3Ut/W8Z4V5mKHXjhCf5qVi0
|
||||
XTiCIs5RM8O4yXEUncSrhgz7EH/is7m+rcti1fm0jZNLjPgyK+NPXV2kfYv5BI0S
|
||||
mvR42TjM8JQTkjyQ+fzog5AJJ0a90+fnEQUQRvo9dmEi4j7ZLsF00CxcBVwfFONP
|
||||
j3wqHAbWLo8fzNO5DarHj1/bboxmyHOynSQ7OmGGzRSOkfnnISJmtExaWnjqLAde
|
||||
ULTRwUf5D+ov6fnupulaCpIee3+oH1Ov0Tu+SC9pQEOE5kFKUMQz6d7ztL/cTYN0
|
||||
pNNXIPkP06FVYsbryTBMVz40o1tgA0568Jr+pSjv9A/J49paE4c1dRRMMUMFHXIk
|
||||
tDrfiAc6xf7EcvPRq+2bCmzRnjtwOHDOY02dGND3Fec3vlpzSuENc9k/Sez4GVyG
|
||||
9VE0wDjR6VbZSnG5GVMvA3ngwR5kyRN2AgDRWuFidHab3o8g+/u20JLsOd7MGGzH
|
||||
GfGrHvi4gVUslaFUGW+ron5jl8a5Ag0EWIpCqgEQAKuEFsv3bqW/tkSrkyO1m9xI
|
||||
G5nx/fkuWgqNHR0eaC5fGmhAh9C3R2auzc/ayIiMWdzAkzg4s3aBuxUluK6gIIBQ
|
||||
1SayjarVqM5dh5m32w1WxqFX1W5LrChivROiy0TjCgXb12VHGN7mCWe0Yo3RfjOM
|
||||
sBVi+jf3m6TPE/VB0pVmPI7KZIqaHuGuR/t4X6zhGXcH+dDRhI0UwXmUVhHnqQkA
|
||||
ZbQrxsOkDbERNhTpQn6VzCWPzK/gMfa8VWpGFL2t0gUrk7UHQtBPneYbLwKhen5B
|
||||
HJvc7OaGs14Q9pRHqhvmCUF27vw8/PcbIGgWWZ5fgVWyXgYWYA8KOeM7C4gFFEEz
|
||||
uyJigFUulM4WlSy89MSHi5oVsTVfy0Z8VpcbUTmwyPiiJlH18rexmqNq9ik+vPTp
|
||||
oaLRwFj0VzRyeu9YKRNsGKqVevovCDntMJsGMssqe3x3ctbn+5vXu9op9wZUuAsO
|
||||
DKdFIfbOrG4jsNiWhWt1SKQFGqHODJ1pG2bufijtg+nKtrKlEAXQiBYJygeUXoZu
|
||||
NKWpnMmh3R3AQaFmz0tAmao1/KEoh/lxBLehI7c/As3vbsXD6AFIJlgVGG0bdjy2
|
||||
2FZ6skGwWhXycOjkDQbnF4HXlfz0o6IaK3Do2Zg0zWtTo1WF6UOuR00Jt435454H
|
||||
SKx66NVFOdbTH4W2tfyBABEBAAGJAjwEGAEIACYCGwwWIQS+7glHtUbPGrzOcbfI
|
||||
r/KflhOrCwUCXMNKjgUJBho7ZAAKCRDIr/KflhOrC/QaD/40b87j5Fh21pXAnjHG
|
||||
7lyJpMGlj2yDbXrAkjoJVnShRzh9JVqHMai81Swt50h1nQd0gn5JI8skF7xKBY7y
|
||||
0TP2c2eVNmf8WmeKhOdX2Dtv0Q1/apS3EV+ykDzv4QmJ3QcFUZIa7swmd2KYCVeG
|
||||
CekD3tX8s49v60KvtulkSgLd3FywzBMN34NKUzLpBWc+BqoSN4emuzypZMiU4BHP
|
||||
Tk5a8ZD4cg061P1Y0aJjwgmivj2SSdOULKC9lLDkZ2ptZ0jd/AshcQSN0KGozz8O
|
||||
2Wdz/sT0392a/RqNdv6YJe5Osr/VlS1jTQUty45l4cGp9SJxRviF5eyOC2KFI3Hq
|
||||
LYIuntkI5spMTAkaQmb1zEpBMvNMwjgZmVqzwoEQKAAbH3zV4W+T+e+CPBQ9+rpj
|
||||
lVg4m6IHG0aZmWwKvjcDvKeGgwVCRT0/JQJeH2L1dPUnXXTejBcA2CsinB2G4bbE
|
||||
yIb06/jmyzHuK4eDPXr2hAexNhBwEqHa4mxuzPnE5oJ92d6X5sQn41XENpZf0WN7
|
||||
4lSNJZIrWTcfkpQgB1uAbqil7jBakDNE6U7lYOwOP4gADhRz9xdooB0ZxGRfOEdC
|
||||
bxFVB95aXa5tTRDpIMbRgjcnL2wfzgDbg/G4Fy7DKraYp2bWQAe3Ra3ataNJ3+RZ
|
||||
ZognKA5LFIgbx3K/arjml2poMg==
|
||||
=amL+
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
1
keys/ssh/id_ecdsa_gibson.pub
Normal file
1
keys/ssh/id_ecdsa_gibson.pub
Normal file
@@ -0,0 +1 @@
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPee2Rw1yiE9RIrXzslop9dnYgIc3shhXVk5+bPv/BrC8swklnYUSjQOU/lJuAjJJ9X7rx9kvgmL337Taa7dGao= davidtomaschik@gibson
|
||||
1
keys/ssh/id_ed25519_scar.pub
Normal file
1
keys/ssh/id_ed25519_scar.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBeDzE5KLJh2a9p0u702H9+rvaB1HoLLBU1I2Lx6NUbC david@scar
|
||||
1
keys/ssh/trusted/id_ecdsa_chromebook.pub
Symbolic link
1
keys/ssh/trusted/id_ecdsa_chromebook.pub
Symbolic link
@@ -0,0 +1 @@
|
||||
../id_ecdsa_chromebook.pub
|
||||
1
keys/ssh/trusted/id_ed25519_scar.pub
Symbolic link
1
keys/ssh/trusted/id_ed25519_scar.pub
Symbolic link
@@ -0,0 +1 @@
|
||||
../id_ed25519_scar.pub
|
||||
@@ -1,5 +1,6 @@
|
||||
audacity
|
||||
cinnamon
|
||||
codequery
|
||||
fonts-inconsolata
|
||||
gimp
|
||||
keepassx
|
||||
|
||||
18
packages.cli
18
packages.cli
@@ -1,37 +1,43 @@
|
||||
binfmt-support
|
||||
build-essential
|
||||
cryptsetup
|
||||
dsniff
|
||||
ecryptfs-utils
|
||||
gnupg-curl
|
||||
exuberant-ctags
|
||||
grc
|
||||
iftop
|
||||
iptraf
|
||||
ipython
|
||||
ipython3
|
||||
jarwrapper
|
||||
jq
|
||||
kpartx
|
||||
ldap-utils
|
||||
lvm2
|
||||
most
|
||||
msitools
|
||||
nasm
|
||||
opensc
|
||||
openvpn
|
||||
p7zip-full
|
||||
python3
|
||||
python3-pip
|
||||
python3-virtualenv
|
||||
psmisc
|
||||
pwgen
|
||||
python-crypto
|
||||
python-dev
|
||||
python-hachoir-urwid
|
||||
python-html5lib
|
||||
python-imaging
|
||||
python-nwdiag
|
||||
python-pip
|
||||
python-scapy
|
||||
python-virtualenv
|
||||
python-yara
|
||||
python3
|
||||
python3-scapy
|
||||
python3-pip
|
||||
python3-virtualenv
|
||||
radare2
|
||||
scapy
|
||||
scdaemon
|
||||
socat
|
||||
sqlite3
|
||||
ufw
|
||||
zsh-syntax-highlighting
|
||||
|
||||
21
packages.fonts
Normal file
21
packages.fonts
Normal file
@@ -0,0 +1,21 @@
|
||||
fonts-anonymous-pro
|
||||
fonts-dejavu
|
||||
fonts-dseg
|
||||
fonts-elusive-icons
|
||||
fonts-font-awesome
|
||||
fonts-freefont-otf
|
||||
fonts-hack
|
||||
fonts-inconsolata
|
||||
fonts-larabie-deco
|
||||
fonts-larabie-straight
|
||||
fonts-larabie-uncommon
|
||||
fonts-noto
|
||||
fonts-ocr-a
|
||||
fonts-ocr-b
|
||||
fonts-open-sans
|
||||
fonts-oxygen
|
||||
fonts-roboto
|
||||
fonts-stix
|
||||
fonts-ubuntu
|
||||
ttf-mscorefonts-installer
|
||||
ttf-xfree86-nonfree
|
||||
@@ -1,4 +1,4 @@
|
||||
ack-grep
|
||||
ack
|
||||
curl
|
||||
dnsutils
|
||||
gdb
|
||||
|
||||
5
python3.pip
Normal file
5
python3.pip
Normal file
@@ -0,0 +1,5 @@
|
||||
ipython
|
||||
keystone-engine
|
||||
unicorn
|
||||
capstone
|
||||
ropper
|
||||
Reference in New Issue
Block a user