mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Compare commits
442 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
769989127b | ||
|
|
4091cc3f03 | ||
|
|
82c2833490 | ||
|
|
634f031c56 | ||
|
|
7564acc939 | ||
|
|
bfaabd18d0 | ||
|
|
286eb02f4b | ||
|
|
5a9e0b6578 | ||
|
|
f77ed125de | ||
|
|
24676d6a87 | ||
|
|
d08af13a1c | ||
|
|
8c9627caa1 | ||
|
|
40485f10f0 | ||
|
|
b5ef3c37e4 | ||
|
|
874750f22b | ||
|
|
89f555cdcb | ||
|
|
4a7b263a9e | ||
|
|
753035cc57 | ||
|
|
32275ca788 | ||
|
|
58f63a17dc | ||
|
|
f355fe84d2 | ||
|
|
f3125f7cd7 | ||
|
|
6894dc9214 | ||
|
|
a59cbf1e41 | ||
|
|
d43bbcfae9 | ||
|
|
00cf4d1577 | ||
|
|
143e6e1e74 | ||
|
|
8f6127d19d | ||
|
|
7c5a617897 | ||
|
|
696cc9c6cd | ||
|
|
2c2ac626e5 | ||
|
|
0431c83423 | ||
|
|
d9ae2ca974 | ||
|
|
db007ad604 | ||
|
|
89ee4ce390 | ||
|
|
48fb9289b4 | ||
|
|
430bb6e7b9 | ||
|
|
bf81c13d47 | ||
|
|
bda75033a0 | ||
|
|
53f7bc9fe3 | ||
|
|
a2acbeb8b5 | ||
|
|
de89e88c90 | ||
|
|
d8d7e94aed | ||
|
|
a2bd17e935 | ||
|
|
abc42681af | ||
|
|
05a3905eb0 | ||
|
|
0c38ad65f7 | ||
|
|
a24b6ef51e | ||
|
|
13c42ab008 | ||
|
|
9db6ad55aa | ||
|
|
5d1eaccbbc | ||
|
|
0859908724 | ||
|
|
805998921a | ||
|
|
89aa4c1be2 | ||
|
|
b7c5a28fe0 | ||
|
|
8ffc255e93 | ||
|
|
87fd3193e0 | ||
|
|
d96a41aeaf | ||
|
|
43659b27a8 | ||
|
|
ec0fb88453 | ||
|
|
fcda32a417 | ||
|
|
d33ee9fa4d | ||
|
|
0dc5950334 | ||
|
|
4d3c2ea0b1 | ||
|
|
157ff8a451 | ||
|
|
a6df743476 | ||
|
|
4edf1e6b01 | ||
|
|
953d592561 | ||
|
|
fdf1ec9790 | ||
|
|
99670fd834 | ||
|
|
28d45d20da | ||
|
|
42f93dc9d2 | ||
|
|
f7ae1cb9f9 | ||
|
|
21ece50f73 | ||
|
|
08d284efad | ||
|
|
b23d196994 | ||
|
|
6b23295be9 | ||
|
|
7f7e2e21bf | ||
|
|
12a4202709 | ||
|
|
585f1f4101 | ||
|
|
8d533e4cd3 | ||
|
|
0c5dc52926 | ||
|
|
62276e4843 | ||
|
|
a8d205d8f6 | ||
|
|
7c1bb5c6f9 | ||
|
|
bdedb651d4 | ||
|
|
e62edc3fee | ||
|
|
1dce4d6ece | ||
|
|
4eb5ae9087 | ||
|
|
b945bb69da | ||
|
|
44b2f55b1f | ||
|
|
9c1bbdd1ae | ||
|
|
e68a194066 | ||
|
|
8f4a5397c7 | ||
|
|
ec42e83d03 | ||
|
|
0505bc90c4 | ||
|
|
5e62177da5 | ||
|
|
2394887cda | ||
|
|
cd6f1ccca7 | ||
|
|
f528cb3991 | ||
|
|
493fec9ced | ||
|
|
c7166479a9 | ||
|
|
21f8d645be | ||
|
|
aafc352dd0 | ||
|
|
c1df470815 | ||
|
|
de2a159024 | ||
|
|
4f332566aa | ||
|
|
be3d3196ae | ||
|
|
7efc19fec7 | ||
|
|
209778db2f | ||
|
|
fa86c01eab | ||
|
|
26af37422d | ||
|
|
b29e600842 | ||
|
|
2035518278 | ||
|
|
63806dec01 | ||
|
|
63e845904e | ||
|
|
702b8547d9 | ||
|
|
f928309043 | ||
|
|
9cffb92ef5 | ||
|
|
044bd1dffc | ||
|
|
c7194cb349 | ||
|
|
12dd58dc01 | ||
|
|
9018536732 | ||
|
|
7e8687ffa8 | ||
|
|
7f6114fb5d | ||
|
|
c144bc1bcc | ||
|
|
576a6f227b | ||
|
|
173230dd06 | ||
|
|
955fdb59f8 | ||
|
|
8c366f69f7 | ||
|
|
6ed5979c8f | ||
|
|
a5f8e973fa | ||
|
|
aa6f4213ff | ||
|
|
3c2b06a81b | ||
|
|
607204a85c | ||
|
|
dbe4c21ca1 | ||
|
|
13d389360d | ||
|
|
aa690c0985 | ||
|
|
6075ecf89b | ||
|
|
cabdaac7a6 | ||
|
|
8066f71ef5 | ||
|
|
aee7cacaf4 | ||
|
|
70cc5c5218 | ||
|
|
c8c954617e | ||
|
|
f3b6be53e0 | ||
|
|
59b0bca33c | ||
|
|
e94f1caab3 | ||
|
|
2701a9e8f0 | ||
|
|
4d196a0b75 | ||
|
|
e7c797e195 | ||
|
|
58ae338ece | ||
|
|
5eaabf4716 | ||
|
|
de1758b847 | ||
|
|
aabc40e4c0 | ||
|
|
3175b2bcd7 | ||
|
|
ab73763b4f | ||
|
|
dc9fbe1cd9 | ||
|
|
d79dbd890f | ||
|
|
3e78cde55e | ||
|
|
a6c2421ddc | ||
|
|
e6fa446b19 | ||
|
|
59cb3a01fb | ||
|
|
9203299eb2 | ||
|
|
8f30b94c97 | ||
|
|
db1c72a86f | ||
|
|
78df984b55 | ||
|
|
68dcadd52b | ||
|
|
0b5ceae185 | ||
|
|
525697a4ea | ||
|
|
4bedb5496b | ||
|
|
ee4b273710 | ||
|
|
3586722774 | ||
|
|
afa200905c | ||
|
|
751f39f854 | ||
|
|
d4d0005811 | ||
|
|
cf360f0eb1 | ||
|
|
52991d097a | ||
|
|
aeb2e89755 | ||
|
|
2baead04ef | ||
|
|
8ea9f8c10f | ||
|
|
4320edaee6 | ||
|
|
acc7085c66 | ||
|
|
4e427cf208 | ||
|
|
072e6e6405 | ||
|
|
930b11b821 | ||
|
|
8e01e9a0ab | ||
|
|
b076afb811 | ||
|
|
33223e5af0 | ||
|
|
e514149340 | ||
|
|
e752074886 | ||
|
|
4cb6be69e0 | ||
|
|
997b27dd19 | ||
|
|
3071ecd7f7 | ||
|
|
9c1f09c563 | ||
|
|
5c23070292 | ||
|
|
31f04428ca | ||
|
|
0b16c79274 | ||
|
|
c29e859c4a | ||
|
|
1e2c131cc8 | ||
|
|
80795ffb33 | ||
|
|
5900f47829 | ||
|
|
56ca5cc721 | ||
|
|
58db233697 | ||
|
|
46255e9ab7 | ||
|
|
6a6216a720 | ||
|
|
28348ca08e | ||
|
|
6347759506 | ||
|
|
0949c61bc3 | ||
|
|
87a42121f9 | ||
|
|
6914922a3e | ||
|
|
26f7f78569 | ||
|
|
1e00c7212a | ||
|
|
96ab83949a | ||
|
|
d24862dc84 | ||
|
|
d48f5a3681 | ||
|
|
1baf32f6bf | ||
|
|
664e310323 | ||
|
|
1c4e2fb7dd | ||
|
|
d56db56d2b | ||
|
|
fd974a153c | ||
|
|
0259497329 | ||
|
|
a43c80639d | ||
|
|
bf6e7bd315 | ||
|
|
089261264f | ||
|
|
87dc698f31 | ||
|
|
20581f766f | ||
|
|
dfc1021cba | ||
|
|
424febea00 | ||
|
|
7ccc6ec6c0 | ||
|
|
ab6b1784bd | ||
|
|
7bdcfdf18a | ||
|
|
fe8e33eb92 | ||
|
|
8786ca65b9 | ||
|
|
4615724282 | ||
|
|
aa41a0e1ee | ||
|
|
552a3bdd1d | ||
|
|
97b5a694d3 | ||
|
|
d35dd23019 | ||
|
|
9a26c713d7 | ||
|
|
dc64160e83 | ||
|
|
ec8b2379e5 | ||
|
|
baa267e4e7 | ||
|
|
31e19d6f90 | ||
|
|
736e24468b | ||
|
|
727981e760 | ||
|
|
ac2c605a5e | ||
|
|
7c2964b6d8 | ||
|
|
73873a9316 | ||
|
|
452dfa1ec2 | ||
|
|
37099ff94d | ||
|
|
1df1d1f244 | ||
|
|
1ac4c6e0b1 | ||
|
|
358c5d48a5 | ||
|
|
b8c290965b | ||
|
|
ecfbce96c0 | ||
|
|
c9a4277724 | ||
|
|
ec69fed5d2 | ||
|
|
138f9ef3c3 | ||
|
|
1442824e64 | ||
|
|
934dfe32df | ||
|
|
79f96d0ed3 | ||
|
|
b9cf6bae01 | ||
|
|
056f0087e7 | ||
|
|
0ce708d0ec | ||
|
|
fc3903003e | ||
|
|
dd4beff725 | ||
|
|
4858e33ff1 | ||
|
|
9520a9b484 | ||
|
|
54481260b8 | ||
|
|
59e5f5ad79 | ||
|
|
4c044264d8 | ||
|
|
129e7088f3 | ||
|
|
5c57186807 | ||
|
|
97d0f2f1d0 | ||
|
|
742e2c10c3 | ||
|
|
a0ce33ddb1 | ||
|
|
6a0c55ac73 | ||
|
|
dfdf1b8588 | ||
|
|
7955b24be6 | ||
|
|
bfdd2f4d6a | ||
|
|
a234f2934f | ||
|
|
71df11db58 | ||
|
|
a61efc0fb1 | ||
|
|
850ab7090a | ||
|
|
90410ca322 | ||
|
|
e42a8472f6 | ||
|
|
81e25dc192 | ||
|
|
6bc3a67fb0 | ||
|
|
cb6ca10f6f | ||
|
|
ef887ed209 | ||
|
|
d9fcc5b1e6 | ||
|
|
95f68cd822 | ||
|
|
2291c85db5 | ||
|
|
a55243a867 | ||
|
|
c4154d8ca9 | ||
|
|
c1350c83d2 | ||
|
|
f4232608f6 | ||
|
|
4f64e41232 | ||
|
|
98455d4917 | ||
|
|
0da6ca2c47 | ||
|
|
fc25cfd8d3 | ||
|
|
4c1639535b | ||
|
|
4cd1306393 | ||
|
|
a33d352cf9 | ||
|
|
79b352d091 | ||
|
|
7b3750a768 | ||
|
|
f7f8baad03 | ||
|
|
fc4ab371f5 | ||
|
|
2546279b92 | ||
|
|
b1de895300 | ||
|
|
9846031492 | ||
|
|
1b0cec9ce2 | ||
|
|
3ebb6a65a7 | ||
|
|
59c51ca93e | ||
|
|
9cb9d60fe6 | ||
|
|
52fcdfea60 | ||
|
|
1cf72204a2 | ||
|
|
b16daa5da6 | ||
|
|
8e55e1dbe9 | ||
|
|
8a84e547e1 | ||
|
|
d1696d88f1 | ||
|
|
4bf05842ec | ||
|
|
1456c91f99 | ||
|
|
a2a308c7d3 | ||
|
|
2432245885 | ||
|
|
f828e32917 | ||
|
|
d809341953 | ||
|
|
a05dd1ee07 | ||
|
|
2af2fe3e71 | ||
|
|
d4ad0603e3 | ||
|
|
93b33f668f | ||
|
|
1730ce9994 | ||
|
|
00771b2031 | ||
|
|
343c9f6e30 | ||
|
|
9b1bed0810 | ||
|
|
873354b9c0 | ||
|
|
a9ba0f73fe | ||
|
|
269426f11d | ||
|
|
2fba9d3bf5 | ||
|
|
bbf444460e | ||
|
|
4edcafe55b | ||
|
|
5661e286d2 | ||
|
|
891fe54140 | ||
|
|
e65a1e0793 | ||
|
|
74a02287f8 | ||
|
|
6fd91c6742 | ||
|
|
dc3598fa31 | ||
|
|
746f65e2a1 | ||
|
|
f6d9a2ac2d | ||
|
|
a06239095c | ||
|
|
854e223573 | ||
|
|
5250f1b472 | ||
|
|
f1db430071 | ||
|
|
a7fd649b9c | ||
|
|
21b5d14d37 | ||
|
|
724433fab1 | ||
|
|
a6fe923b11 | ||
|
|
a806e19b7c | ||
|
|
34b58163e9 | ||
|
|
7657b4e81d | ||
|
|
c8afa728a9 | ||
|
|
ecf27f69e0 | ||
|
|
97f0e50352 | ||
|
|
dc85fb7f94 | ||
|
|
5577ee29b4 | ||
|
|
562697a2a7 | ||
|
|
dcaf567116 | ||
|
|
9c6042116a | ||
|
|
de3919a7fe | ||
|
|
c568c81f60 | ||
|
|
9936dd7983 | ||
|
|
c693c4b8c7 | ||
|
|
01e1c515ff | ||
|
|
215f03af2e | ||
|
|
88fae8ded3 | ||
|
|
029e41c1bf | ||
|
|
ceceb307f9 | ||
|
|
4cbf297838 | ||
|
|
1361fb8cc6 | ||
|
|
c11ea02838 | ||
|
|
ecdf364f65 | ||
|
|
98d85b801d | ||
|
|
e1a5c1f588 | ||
|
|
da2b4b82f4 | ||
|
|
f03e60b30d | ||
|
|
c6ed005467 | ||
|
|
3461ae3417 | ||
|
|
45c0b529af | ||
|
|
f1e16ebaf8 | ||
|
|
1b901faab1 | ||
|
|
a7ae4f47a8 | ||
|
|
58bdc6b23a | ||
|
|
9bad2d4afa | ||
|
|
d920a25f57 | ||
|
|
2225fbed9a | ||
|
|
95ccf66984 | ||
|
|
c32b9ef765 | ||
|
|
c400ab787f | ||
|
|
91790b5a12 | ||
|
|
c65f3b4730 | ||
|
|
6185108c0f | ||
|
|
8b59e8c764 | ||
|
|
114db98bdf | ||
|
|
7364eb5446 | ||
|
|
31f16132dc | ||
|
|
70efebd88d | ||
|
|
d9f6a1b250 | ||
|
|
a3292747eb | ||
|
|
6b8b7673d8 | ||
|
|
283609cc50 | ||
|
|
efec992784 | ||
|
|
be49f3f57c | ||
|
|
3a89085279 | ||
|
|
b12b39f8c4 | ||
|
|
e6a7cd9b9f | ||
|
|
89bdedbf4f | ||
|
|
5ac75c4b63 | ||
|
|
f235fb2660 | ||
|
|
3839ac9e2f | ||
|
|
63a6f8bb32 | ||
|
|
4510acb3ea | ||
|
|
173abd42e4 | ||
|
|
27b026f011 | ||
|
|
1dcee2dbf0 | ||
|
|
3721d061fa | ||
|
|
403dad5318 | ||
|
|
58c49d5c5b | ||
|
|
bb519ae3af | ||
|
|
125bf08e73 | ||
|
|
e5066e087d | ||
|
|
345c2e5423 | ||
|
|
09b7cad44a | ||
|
|
01dab7312f | ||
|
|
366f99aef7 | ||
|
|
ea571ac1b8 | ||
|
|
59c26347ae | ||
|
|
9aa69c551e | ||
|
|
775657b90d | ||
|
|
4ae16a4a17 | ||
|
|
9bb50f6136 | ||
|
|
aa984c6a07 | ||
|
|
843863cc75 |
3
.git-crypt/.gitattributes
vendored
Normal file
3
.git-crypt/.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Do not edit this file. To specify the files to encrypt, create your own
|
||||
# .gitattributes file in the directory where your files are.
|
||||
* !filter !diff
|
||||
Binary file not shown.
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
private_dotfiles/** filter=git-crypt diff=git-crypt
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
private_dotfiles/**
|
||||
installed-prefs
|
||||
*.swp
|
||||
*~
|
||||
*.bak
|
||||
local_dotfiles
|
||||
|
||||
39
README.md
Normal file
39
README.md
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
### About ###
|
||||
This is a repository of configuration files that I like to have on all the
|
||||
machines that I use. I can just clone the repository and run "repo/setup.sh"
|
||||
and get most things setup the way I like them.
|
||||
|
||||
This started just as dotfiles, but expanded to include SSH keys, GPG keys,
|
||||
packages I like installed, and an ever-growing setup script. There are various
|
||||
options to install just parts of it, such as on a machine where I only have a
|
||||
user account but no root.
|
||||
|
||||
This now uses [git-crypt](https://github.com/AGWA/git-crypt) to protect
|
||||
`private_dotfiles` for things I don't want to splash all over the internet. :)
|
||||
I still wouldn't check in anything terribly sensitive, like private keys.
|
||||
|
||||
### Usefulness ###
|
||||
Mostly I post this to github so I can quickly grab the things I want, but it
|
||||
might also be useful to others. Feel free to raise an issue if you have any
|
||||
questions. I don't anticipating taking merge requests -- make your own
|
||||
dotfiles. ;)
|
||||
|
||||
### Options ###
|
||||
```
|
||||
BASEDIR: Where the skel framework is installed. Defaults to $HOME/.skel
|
||||
MINIMAL: Don't do things that require git clones or installation of anything
|
||||
not included in my .skel. (Defaults to 0, installs everything.)
|
||||
INSTALL_KEYS: Install GnuPG and SSH keys. SSH keys are placed in
|
||||
authorized_keys. (Defaults to 1, installs keys.)
|
||||
TRUST_ALL_KEYS: Allow all keys to be used for SSH login, versus a small subset.
|
||||
INSTALL_PKGS: Install common packages, if on a Debian-like system.
|
||||
(Defaults to opposite of $MINIMAL.)
|
||||
SAVE: Save the install options to ${BASEDIR}/installed-prefs
|
||||
```
|
||||
### TODO ###
|
||||
|
||||
[ ] Re-do the installation of packages.
|
||||
[ ] Make manual installation of sets easy/possible.
|
||||
[ ] Make missing packages not cause a full set failure.
|
||||
[X] Allow comments and blank lines.
|
||||
5
bin/_install_i3.sh
Executable file
5
bin/_install_i3.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-get install -y \
|
||||
i3 i3lock xss-lock rxvt-unicode-256color fonts-inconsolata scrot \
|
||||
xautolock xbacklight i3status
|
||||
16
bin/autostart.py
Executable file
16
bin/autostart.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python
|
||||
"""
|
||||
Launch desktop files from ~/.config/autostart
|
||||
"""
|
||||
|
||||
import glob
|
||||
import os.path
|
||||
from gi.repository import Gio
|
||||
|
||||
dirname = os.path.expanduser('~/.config/autostart')
|
||||
for desktop in glob.glob(os.path.join(dirname, '*.desktop')):
|
||||
try:
|
||||
fp = Gio.DesktopAppInfo.new_from_filename(desktop)
|
||||
except TypeError:
|
||||
continue
|
||||
fp.launch_uris([], None)
|
||||
30
bin/backup.sh
Executable file
30
bin/backup.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
DEFAULT=`echo /media/${USER}/[bB]ackup/${USER}/`
|
||||
DEST="${1:-${DEFAULT}}"
|
||||
|
||||
function verify_dest {
|
||||
arr=($1)
|
||||
items=${#arr[@]}
|
||||
if [ $items -ne 1 ] ; then
|
||||
echo "Bad count of backup destinations." > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
dir="$1"
|
||||
end=$((${#dir}-1))
|
||||
last="${dir:$end:1}"
|
||||
if [ "$last" != "/" ] ; then
|
||||
echo -n "Destination $dir does not end in a /, " > /dev/stderr
|
||||
echo "this is probably not what you want!" > /dev/stderr
|
||||
echo "Press a key to continue, or CTRL-C to cancel." > /dev/stderr
|
||||
read
|
||||
fi
|
||||
}
|
||||
|
||||
verify_dest "$DEST"
|
||||
|
||||
rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
|
||||
--delete-excluded "${HOME}/" "$DEST"
|
||||
882
bin/checksec.sh
Executable file
882
bin/checksec.sh
Executable file
@@ -0,0 +1,882 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# The BSD License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
# specifies the terms and conditions of use for checksec.sh:
|
||||
#
|
||||
# Copyright (c) 2009-2011, Tobias Klein.
|
||||
# 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 Tobias Klein nor the name of trapkit.de 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.
|
||||
#
|
||||
# Name : checksec.sh
|
||||
# Version : 1.5
|
||||
# Author : Tobias Klein
|
||||
# Date : November 2011
|
||||
# Download: http://www.trapkit.de/tools/checksec.html
|
||||
# Changes : http://www.trapkit.de/tools/checksec_changes.txt
|
||||
#
|
||||
# Description:
|
||||
#
|
||||
# Modern Linux distributions offer some mitigation techniques to make it
|
||||
# harder to exploit software vulnerabilities reliably. Mitigations such
|
||||
# as RELRO, NoExecute (NX), Stack Canaries, Address Space Layout
|
||||
# Randomization (ASLR) and Position Independent Executables (PIE) have
|
||||
# made reliably exploiting any vulnerabilities that do exist far more
|
||||
# challenging. The checksec.sh script is designed to test what *standard*
|
||||
# Linux OS and PaX (http://pax.grsecurity.net/) security features are being
|
||||
# used.
|
||||
#
|
||||
# As of version 1.3 the script also lists the status of various Linux kernel
|
||||
# protection mechanisms.
|
||||
#
|
||||
# Credits:
|
||||
#
|
||||
# Thanks to Brad Spengler (grsecurity.net) for the PaX support.
|
||||
# Thanks to Jon Oberheide (jon.oberheide.org) for the kernel support.
|
||||
# Thanks to Ollie Whitehouse (Research In Motion) for rpath/runpath support.
|
||||
#
|
||||
# Others that contributed to checksec.sh (in no particular order):
|
||||
#
|
||||
# Simon Ruderich, Denis Scherbakov, Stefan Kuttler, Radoslaw Madej,
|
||||
# Anthony G. Basile, Martin Vaeth and Brian Davis.
|
||||
#
|
||||
|
||||
# global vars
|
||||
have_readelf=1
|
||||
verbose=false
|
||||
|
||||
# FORTIFY_SOURCE vars
|
||||
FS_end=_chk
|
||||
FS_cnt_total=0
|
||||
FS_cnt_checked=0
|
||||
FS_cnt_unchecked=0
|
||||
FS_chk_func_libc=0
|
||||
FS_functions=0
|
||||
FS_libc=0
|
||||
|
||||
# version information
|
||||
version() {
|
||||
echo "checksec v1.5, Tobias Klein, www.trapkit.de, November 2011"
|
||||
echo
|
||||
}
|
||||
|
||||
# help
|
||||
help() {
|
||||
echo "Usage: checksec [OPTION]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo
|
||||
echo " --file <executable-file>"
|
||||
echo " --dir <directory> [-v]"
|
||||
echo " --proc <process name>"
|
||||
echo " --proc-all"
|
||||
echo " --proc-libs <process ID>"
|
||||
echo " --kernel"
|
||||
echo " --fortify-file <executable-file>"
|
||||
echo " --fortify-proc <process ID>"
|
||||
echo " --version"
|
||||
echo " --help"
|
||||
echo
|
||||
echo "For more information, see:"
|
||||
echo " http://www.trapkit.de/tools/checksec.html"
|
||||
echo
|
||||
}
|
||||
|
||||
# check if command exists
|
||||
command_exists () {
|
||||
type $1 > /dev/null 2>&1;
|
||||
}
|
||||
|
||||
# check if directory exists
|
||||
dir_exists () {
|
||||
if [ -d $1 ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check user privileges
|
||||
root_privs () {
|
||||
if [ $(/usr/bin/id -u) -eq 0 ] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check if input is numeric
|
||||
isNumeric () {
|
||||
echo "$@" | grep -q -v "[^0-9]"
|
||||
}
|
||||
|
||||
# check if input is a string
|
||||
isString () {
|
||||
echo "$@" | grep -q -v "[^A-Za-z]"
|
||||
}
|
||||
|
||||
# check file(s)
|
||||
filecheck() {
|
||||
# check for RELRO support
|
||||
if readelf -l $1 2>/dev/null | grep -q 'GNU_RELRO'; then
|
||||
if readelf -d $1 2>/dev/null | grep -q 'BIND_NOW'; then
|
||||
echo -n -e '\033[32mFull RELRO \033[m '
|
||||
else
|
||||
echo -n -e '\033[33mPartial RELRO\033[m '
|
||||
fi
|
||||
else
|
||||
echo -n -e '\033[31mNo RELRO \033[m '
|
||||
fi
|
||||
|
||||
# check for stack canary support
|
||||
if readelf -s $1 2>/dev/null | grep -q '__stack_chk_fail'; then
|
||||
echo -n -e '\033[32mCanary found \033[m '
|
||||
else
|
||||
echo -n -e '\033[31mNo canary found\033[m '
|
||||
fi
|
||||
|
||||
# check for NX support
|
||||
if readelf -W -l $1 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'; then
|
||||
echo -n -e '\033[31mNX disabled\033[m '
|
||||
else
|
||||
echo -n -e '\033[32mNX enabled \033[m '
|
||||
fi
|
||||
|
||||
# check for PIE support
|
||||
if readelf -h $1 2>/dev/null | grep -q 'Type:[[:space:]]*EXEC'; then
|
||||
echo -n -e '\033[31mNo PIE \033[m '
|
||||
elif readelf -h $1 2>/dev/null | grep -q 'Type:[[:space:]]*DYN'; then
|
||||
if readelf -d $1 2>/dev/null | grep -q '(DEBUG)'; then
|
||||
echo -n -e '\033[32mPIE enabled \033[m '
|
||||
else
|
||||
echo -n -e '\033[33mDSO \033[m '
|
||||
fi
|
||||
else
|
||||
echo -n -e '\033[33mNot an ELF file\033[m '
|
||||
fi
|
||||
|
||||
# check for rpath / run path
|
||||
if readelf -d $1 2>/dev/null | grep -q 'rpath'; then
|
||||
echo -n -e '\033[31mRPATH \033[m '
|
||||
else
|
||||
echo -n -e '\033[32mNo RPATH \033[m '
|
||||
fi
|
||||
|
||||
if readelf -d $1 2>/dev/null | grep -q 'runpath'; then
|
||||
echo -n -e '\033[31mRUNPATH \033[m '
|
||||
else
|
||||
echo -n -e '\033[32mNo RUNPATH \033[m '
|
||||
fi
|
||||
}
|
||||
|
||||
# check process(es)
|
||||
proccheck() {
|
||||
# check for RELRO support
|
||||
if readelf -l $1/exe 2>/dev/null | grep -q 'Program Headers'; then
|
||||
if readelf -l $1/exe 2>/dev/null | grep -q 'GNU_RELRO'; then
|
||||
if readelf -d $1/exe 2>/dev/null | grep -q 'BIND_NOW'; then
|
||||
echo -n -e '\033[32mFull RELRO \033[m '
|
||||
else
|
||||
echo -n -e '\033[33mPartial RELRO \033[m '
|
||||
fi
|
||||
else
|
||||
echo -n -e '\033[31mNo RELRO \033[m '
|
||||
fi
|
||||
else
|
||||
echo -n -e '\033[31mPermission denied (please run as root)\033[m\n'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check for stack canary support
|
||||
if readelf -s $1/exe 2>/dev/null | grep -q 'Symbol table'; then
|
||||
if readelf -s $1/exe 2>/dev/null | grep -q '__stack_chk_fail'; then
|
||||
echo -n -e '\033[32mCanary found \033[m '
|
||||
else
|
||||
echo -n -e '\033[31mNo canary found \033[m '
|
||||
fi
|
||||
else
|
||||
if [ "$1" != "1" ] ; then
|
||||
echo -n -e '\033[33mPermission denied \033[m '
|
||||
else
|
||||
echo -n -e '\033[33mNo symbol table found\033[m '
|
||||
fi
|
||||
fi
|
||||
|
||||
# first check for PaX support
|
||||
if cat $1/status 2> /dev/null | grep -q 'PaX:'; then
|
||||
pageexec=( $(cat $1/status 2> /dev/null | grep 'PaX:' | cut -b6) )
|
||||
segmexec=( $(cat $1/status 2> /dev/null | grep 'PaX:' | cut -b10) )
|
||||
mprotect=( $(cat $1/status 2> /dev/null | grep 'PaX:' | cut -b8) )
|
||||
randmmap=( $(cat $1/status 2> /dev/null | grep 'PaX:' | cut -b9) )
|
||||
if [[ "$pageexec" = "P" || "$segmexec" = "S" ]] && [[ "$mprotect" = "M" && "$randmmap" = "R" ]] ; then
|
||||
echo -n -e '\033[32mPaX enabled\033[m '
|
||||
elif [[ "$pageexec" = "p" && "$segmexec" = "s" && "$randmmap" = "R" ]] ; then
|
||||
echo -n -e '\033[33mPaX ASLR only\033[m '
|
||||
elif [[ "$pageexec" = "P" || "$segmexec" = "S" ]] && [[ "$mprotect" = "m" && "$randmmap" = "R" ]] ; then
|
||||
echo -n -e '\033[33mPaX mprot off \033[m'
|
||||
elif [[ "$pageexec" = "P" || "$segmexec" = "S" ]] && [[ "$mprotect" = "M" && "$randmmap" = "r" ]] ; then
|
||||
echo -n -e '\033[33mPaX ASLR off\033[m '
|
||||
elif [[ "$pageexec" = "P" || "$segmexec" = "S" ]] && [[ "$mprotect" = "m" && "$randmmap" = "r" ]] ; then
|
||||
echo -n -e '\033[33mPaX NX only\033[m '
|
||||
else
|
||||
echo -n -e '\033[31mPaX disabled\033[m '
|
||||
fi
|
||||
# fallback check for NX support
|
||||
elif readelf -W -l $1/exe 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'; then
|
||||
echo -n -e '\033[31mNX disabled\033[m '
|
||||
else
|
||||
echo -n -e '\033[32mNX enabled \033[m '
|
||||
fi
|
||||
|
||||
# check for PIE support
|
||||
if readelf -h $1/exe 2>/dev/null | grep -q 'Type:[[:space:]]*EXEC'; then
|
||||
echo -n -e '\033[31mNo PIE \033[m '
|
||||
elif readelf -h $1/exe 2>/dev/null | grep -q 'Type:[[:space:]]*DYN'; then
|
||||
if readelf -d $1/exe 2>/dev/null | grep -q '(DEBUG)'; then
|
||||
echo -n -e '\033[32mPIE enabled \033[m '
|
||||
else
|
||||
echo -n -e '\033[33mDynamic Shared Object\033[m '
|
||||
fi
|
||||
else
|
||||
echo -n -e '\033[33mNot an ELF file \033[m '
|
||||
fi
|
||||
}
|
||||
|
||||
# check mapped libraries
|
||||
libcheck() {
|
||||
libs=( $(awk '{ print $6 }' /proc/$1/maps | grep '/' | sort -u | xargs file | grep ELF | awk '{ print $1 }' | sed 's/:/ /') )
|
||||
|
||||
printf "\n* Loaded libraries (file information, # of mapped files: ${#libs[@]}):\n\n"
|
||||
|
||||
for element in $(seq 0 $((${#libs[@]} - 1)))
|
||||
do
|
||||
echo " ${libs[$element]}:"
|
||||
echo -n " "
|
||||
filecheck ${libs[$element]}
|
||||
printf "\n\n"
|
||||
done
|
||||
}
|
||||
|
||||
# check for system-wide ASLR support
|
||||
aslrcheck() {
|
||||
# PaX ASLR support
|
||||
if !(cat /proc/1/status 2> /dev/null | grep -q 'Name:') ; then
|
||||
echo -n -e ':\033[33m insufficient privileges for PaX ASLR checks\033[m\n'
|
||||
echo -n -e ' Fallback to standard Linux ASLR check'
|
||||
fi
|
||||
|
||||
if cat /proc/1/status 2> /dev/null | grep -q 'PaX:'; then
|
||||
printf ": "
|
||||
if cat /proc/1/status 2> /dev/null | grep 'PaX:' | grep -q 'R'; then
|
||||
echo -n -e '\033[32mPaX ASLR enabled\033[m\n\n'
|
||||
else
|
||||
echo -n -e '\033[31mPaX ASLR disabled\033[m\n\n'
|
||||
fi
|
||||
else
|
||||
# standard Linux 'kernel.randomize_va_space' ASLR support
|
||||
# (see the kernel file 'Documentation/sysctl/kernel.txt' for a detailed description)
|
||||
printf " (kernel.randomize_va_space): "
|
||||
if /sbin/sysctl -a 2>/dev/null | grep -q 'kernel.randomize_va_space = 1'; then
|
||||
echo -n -e '\033[33mOn (Setting: 1)\033[m\n\n'
|
||||
printf " Description - Make the addresses of mmap base, stack and VDSO page randomized.\n"
|
||||
printf " This, among other things, implies that shared libraries will be loaded to \n"
|
||||
printf " random addresses. Also for PIE-linked binaries, the location of code start\n"
|
||||
printf " is randomized. Heap addresses are *not* randomized.\n\n"
|
||||
elif /sbin/sysctl -a 2>/dev/null | grep -q 'kernel.randomize_va_space = 2'; then
|
||||
echo -n -e '\033[32mOn (Setting: 2)\033[m\n\n'
|
||||
printf " Description - Make the addresses of mmap base, heap, stack and VDSO page randomized.\n"
|
||||
printf " This, among other things, implies that shared libraries will be loaded to random \n"
|
||||
printf " addresses. Also for PIE-linked binaries, the location of code start is randomized.\n\n"
|
||||
elif /sbin/sysctl -a 2>/dev/null | grep -q 'kernel.randomize_va_space = 0'; then
|
||||
echo -n -e '\033[31mOff (Setting: 0)\033[m\n'
|
||||
else
|
||||
echo -n -e '\033[31mNot supported\033[m\n'
|
||||
fi
|
||||
printf " See the kernel file 'Documentation/sysctl/kernel.txt' for more details.\n\n"
|
||||
fi
|
||||
}
|
||||
|
||||
# check cpu nx flag
|
||||
nxcheck() {
|
||||
if grep -q nx /proc/cpuinfo; then
|
||||
echo -n -e '\033[32mYes\033[m\n\n'
|
||||
else
|
||||
echo -n -e '\033[31mNo\033[m\n\n'
|
||||
fi
|
||||
}
|
||||
|
||||
# check for kernel protection mechanisms
|
||||
kernelcheck() {
|
||||
printf " Description - List the status of kernel protection mechanisms. Rather than\n"
|
||||
printf " inspect kernel mechanisms that may aid in the prevention of exploitation of\n"
|
||||
printf " userspace processes, this option lists the status of kernel configuration\n"
|
||||
printf " options that harden the kernel itself against attack.\n\n"
|
||||
printf " Kernel config: "
|
||||
|
||||
if [ -f /proc/config.gz ] ; then
|
||||
kconfig="zcat /proc/config.gz"
|
||||
printf "\033[32m/proc/config.gz\033[m\n\n"
|
||||
elif [ -f /boot/config-`uname -r` ] ; then
|
||||
kconfig="cat /boot/config-`uname -r`"
|
||||
printf "\033[33m/boot/config-`uname -r`\033[m\n\n"
|
||||
printf " Warning: The config on disk may not represent running kernel config!\n\n";
|
||||
elif [ -f "${KBUILD_OUTPUT:-/usr/src/linux}"/.config ] ; then
|
||||
kconfig="cat ${KBUILD_OUTPUT:-/usr/src/linux}/.config"
|
||||
printf "\033[33m%s\033[m\n\n" "${KBUILD_OUTPUT:-/usr/src/linux}/.config"
|
||||
printf " Warning: The config on disk may not represent running kernel config!\n\n";
|
||||
else
|
||||
printf "\033[31mNOT FOUND\033[m\n\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf " GCC stack protector support: "
|
||||
if $kconfig | grep -qi 'CONFIG_CC_STACKPROTECTOR=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Strict user copy checks: "
|
||||
if $kconfig | grep -qi 'CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Enforce read-only kernel data: "
|
||||
if $kconfig | grep -qi 'CONFIG_DEBUG_RODATA=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
printf " Restrict /dev/mem access: "
|
||||
if $kconfig | grep -qi 'CONFIG_STRICT_DEVMEM=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Restrict /dev/kmem access: "
|
||||
if $kconfig | grep -qi 'CONFIG_DEVKMEM=y'; then
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
else
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "* grsecurity / PaX: "
|
||||
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC=y'; then
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC_HIGH=y'; then
|
||||
printf "\033[32mHigh GRKERNSEC\033[m\n\n"
|
||||
elif $kconfig | grep -qi 'CONFIG_GRKERNSEC_MEDIUM=y'; then
|
||||
printf "\033[33mMedium GRKERNSEC\033[m\n\n"
|
||||
elif $kconfig | grep -qi 'CONFIG_GRKERNSEC_LOW=y'; then
|
||||
printf "\033[31mLow GRKERNSEC\033[m\n\n"
|
||||
else
|
||||
printf "\033[33mCustom GRKERNSEC\033[m\n\n"
|
||||
fi
|
||||
|
||||
printf " Non-executable kernel pages: "
|
||||
if $kconfig | grep -qi 'CONFIG_PAX_KERNEXEC=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Prevent userspace pointer deref: "
|
||||
if $kconfig | grep -qi 'CONFIG_PAX_MEMORY_UDEREF=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Prevent kobject refcount overflow: "
|
||||
if $kconfig | grep -qi 'CONFIG_PAX_REFCOUNT=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Bounds check heap object copies: "
|
||||
if $kconfig | grep -qi 'CONFIG_PAX_USERCOPY=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Disable writing to kmem/mem/port: "
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC_KMEM=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Disable privileged I/O: "
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC_IO=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Harden module auto-loading: "
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC_MODHARDEN=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
|
||||
printf " Hide kernel symbols: "
|
||||
if $kconfig | grep -qi 'CONFIG_GRKERNSEC_HIDESYM=y'; then
|
||||
printf "\033[32mEnabled\033[m\n"
|
||||
else
|
||||
printf "\033[31mDisabled\033[m\n"
|
||||
fi
|
||||
else
|
||||
printf "\033[31mNo GRKERNSEC\033[m\n\n"
|
||||
printf " The grsecurity / PaX patchset is available here:\n"
|
||||
printf " http://grsecurity.net/\n"
|
||||
fi
|
||||
|
||||
printf "\n"
|
||||
printf "* Kernel Heap Hardening: "
|
||||
|
||||
if $kconfig | grep -qi 'CONFIG_KERNHEAP=y'; then
|
||||
if $kconfig | grep -qi 'CONFIG_KERNHEAP_FULLPOISON=y'; then
|
||||
printf "\033[32mFull KERNHEAP\033[m\n\n"
|
||||
else
|
||||
printf "\033[33mPartial KERNHEAP\033[m\n\n"
|
||||
fi
|
||||
else
|
||||
printf "\033[31mNo KERNHEAP\033[m\n\n"
|
||||
printf " The KERNHEAP hardening patchset is available here:\n"
|
||||
printf " https://www.subreption.com/kernheap/\n\n"
|
||||
fi
|
||||
}
|
||||
|
||||
# --- FORTIFY_SOURCE subfunctions (start) ---
|
||||
|
||||
# is FORTIFY_SOURCE supported by libc?
|
||||
FS_libc_check() {
|
||||
printf "* FORTIFY_SOURCE support available (libc) : "
|
||||
|
||||
if [ "${#FS_chk_func_libc[@]}" != "0" ] ; then
|
||||
printf "\033[32mYes\033[m\n"
|
||||
else
|
||||
printf "\033[31mNo\033[m\n"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# was the binary compiled with FORTIFY_SOURCE?
|
||||
FS_binary_check() {
|
||||
printf "* Binary compiled with FORTIFY_SOURCE support: "
|
||||
|
||||
for FS_elem_functions in $(seq 0 $((${#FS_functions[@]} - 1)))
|
||||
do
|
||||
if [[ ${FS_functions[$FS_elem_functions]} =~ _chk ]] ; then
|
||||
printf "\033[32mYes\033[m\n"
|
||||
return
|
||||
fi
|
||||
done
|
||||
printf "\033[31mNo\033[m\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
FS_comparison() {
|
||||
echo
|
||||
printf " ------ EXECUTABLE-FILE ------- . -------- LIBC --------\n"
|
||||
printf " FORTIFY-able library functions | Checked function names\n"
|
||||
printf " -------------------------------------------------------\n"
|
||||
|
||||
for FS_elem_libc in $(seq 0 $((${#FS_chk_func_libc[@]} - 1)))
|
||||
do
|
||||
for FS_elem_functions in $(seq 0 $((${#FS_functions[@]} - 1)))
|
||||
do
|
||||
FS_tmp_func=${FS_functions[$FS_elem_functions]}
|
||||
FS_tmp_libc=${FS_chk_func_libc[$FS_elem_libc]}
|
||||
|
||||
if [[ $FS_tmp_func =~ ^$FS_tmp_libc$ ]] ; then
|
||||
printf " \033[31m%-30s\033[m | __%s%s\n" $FS_tmp_func $FS_tmp_libc $FS_end
|
||||
let FS_cnt_total++
|
||||
let FS_cnt_unchecked++
|
||||
elif [[ $FS_tmp_func =~ ^$FS_tmp_libc(_chk) ]] ; then
|
||||
printf " \033[32m%-30s\033[m | __%s%s\n" $FS_tmp_func $FS_tmp_libc $FS_end
|
||||
let FS_cnt_total++
|
||||
let FS_cnt_checked++
|
||||
fi
|
||||
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
FS_summary() {
|
||||
echo
|
||||
printf "SUMMARY:\n\n"
|
||||
printf "* Number of checked functions in libc : ${#FS_chk_func_libc[@]}\n"
|
||||
printf "* Total number of library functions in the executable: ${#FS_functions[@]}\n"
|
||||
printf "* Number of FORTIFY-able functions in the executable : %s\n" $FS_cnt_total
|
||||
printf "* Number of checked functions in the executable : \033[32m%s\033[m\n" $FS_cnt_checked
|
||||
printf "* Number of unchecked functions in the executable : \033[31m%s\033[m\n" $FS_cnt_unchecked
|
||||
echo
|
||||
}
|
||||
|
||||
# --- FORTIFY_SOURCE subfunctions (end) ---
|
||||
|
||||
if !(command_exists readelf) ; then
|
||||
printf "\033[31mWarning: 'readelf' not found! It's required for most checks.\033[m\n\n"
|
||||
have_readelf=0
|
||||
fi
|
||||
|
||||
# parse command-line arguments
|
||||
case "$1" in
|
||||
|
||||
--version)
|
||||
version
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--dir)
|
||||
if [ "$3" = "-v" ] ; then
|
||||
verbose=true
|
||||
fi
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid directory.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# remove trailing slashes
|
||||
tempdir=`echo $2 | sed -e "s/\/*$//"`
|
||||
if [ ! -d $tempdir ] ; then
|
||||
printf "\033[31mError: The directory '$tempdir' does not exist.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
cd $tempdir
|
||||
printf "RELRO STACK CANARY NX PIE RPATH RUNPATH FILE\n"
|
||||
for N in [A-Za-z]*; do
|
||||
if [ "$N" != "[A-Za-z]*" ]; then
|
||||
# read permissions?
|
||||
if [ ! -r $N ]; then
|
||||
printf "\033[31mError: No read permissions for '$tempdir/$N' (run as root).\033[m\n"
|
||||
else
|
||||
# ELF executable?
|
||||
out=`file $N`
|
||||
if [[ ! $out =~ ELF ]] ; then
|
||||
if [ "$verbose" = "true" ] ; then
|
||||
printf "\033[34m*** Not an ELF file: $tempdir/"
|
||||
file $N
|
||||
printf "\033[m"
|
||||
fi
|
||||
else
|
||||
filecheck $N
|
||||
if [ `find $tempdir/$N \( -perm -004000 -o -perm -002000 \) -type f -print` ]; then
|
||||
printf "\033[37;41m%s%s\033[m" $2 $N
|
||||
else
|
||||
printf "%s%s" $tempdir/ $N
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--file)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid file.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# does the file exist?
|
||||
if [ ! -e $2 ] ; then
|
||||
printf "\033[31mError: The file '$2' does not exist.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# read permissions?
|
||||
if [ ! -r $2 ] ; then
|
||||
printf "\033[31mError: No read permissions for '$2' (run as root).\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# ELF executable?
|
||||
out=`file $2`
|
||||
if [[ ! $out =~ ELF ]] ; then
|
||||
printf "\033[31mError: Not an ELF file: "
|
||||
file $2
|
||||
printf "\033[m\n"
|
||||
exit 1
|
||||
fi
|
||||
printf "RELRO STACK CANARY NX PIE RPATH RUNPATH FILE\n"
|
||||
filecheck $2
|
||||
if [ `find $2 \( -perm -004000 -o -perm -002000 \) -type f -print` ] ; then
|
||||
printf "\033[37;41m%s%s\033[m" $2 $N
|
||||
else
|
||||
printf "%s" $2
|
||||
fi
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--proc-all)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
cd /proc
|
||||
printf "* System-wide ASLR"
|
||||
aslrcheck
|
||||
printf "* Does the CPU support NX: "
|
||||
nxcheck
|
||||
printf " COMMAND PID RELRO STACK CANARY NX/PaX PIE\n"
|
||||
for N in [1-9]*; do
|
||||
if [ $N != $$ ] && readlink -q $N/exe > /dev/null; then
|
||||
printf "%16s" `head -1 $N/status | cut -b 7-`
|
||||
printf "%7d " $N
|
||||
proccheck $N
|
||||
echo
|
||||
fi
|
||||
done
|
||||
if [ ! -e /usr/bin/id ] ; then
|
||||
printf "\n\033[33mNote: If you are running 'checksec.sh' as an unprivileged user, you\n"
|
||||
printf " will not see all processes. Please run the script as root.\033[m\n\n"
|
||||
else
|
||||
if !(root_privs) ; then
|
||||
printf "\n\033[33mNote: You are running 'checksec.sh' as an unprivileged user.\n"
|
||||
printf " Too see all processes, please run the script as root.\033[m\n\n"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--proc)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid process name.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if !(isString "$2") ; then
|
||||
printf "\033[31mError: Please provide a valid process name.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
cd /proc
|
||||
printf "* System-wide ASLR"
|
||||
aslrcheck
|
||||
printf "* Does the CPU support NX: "
|
||||
nxcheck
|
||||
printf " COMMAND PID RELRO STACK CANARY NX/PaX PIE\n"
|
||||
for N in `ps -Ao pid,comm | grep $2 | cut -b1-6`; do
|
||||
if [ -d $N ] ; then
|
||||
printf "%16s" `head -1 $N/status | cut -b 7-`
|
||||
printf "%7d " $N
|
||||
# read permissions?
|
||||
if [ ! -r $N/exe ] ; then
|
||||
if !(root_privs) ; then
|
||||
printf "\033[31mNo read permissions for '/proc/$N/exe' (run as root).\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! `readlink $N/exe` ] ; then
|
||||
printf "\033[31mPermission denied. Requested process ID belongs to a kernel thread.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
proccheck $N
|
||||
echo
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--proc-libs)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid process ID.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if !(isNumeric "$2") ; then
|
||||
printf "\033[31mError: Please provide a valid process ID.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
cd /proc
|
||||
printf "* System-wide ASLR"
|
||||
aslrcheck
|
||||
printf "* Does the CPU support NX: "
|
||||
nxcheck
|
||||
printf "* Process information:\n\n"
|
||||
printf " COMMAND PID RELRO STACK CANARY NX/PaX PIE\n"
|
||||
N=$2
|
||||
if [ -d $N ] ; then
|
||||
printf "%16s" `head -1 $N/status | cut -b 7-`
|
||||
printf "%7d " $N
|
||||
# read permissions?
|
||||
if [ ! -r $N/exe ] ; then
|
||||
if !(root_privs) ; then
|
||||
printf "\033[31mNo read permissions for '/proc/$N/exe' (run as root).\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! `readlink $N/exe` ] ; then
|
||||
printf "\033[31mPermission denied. Requested process ID belongs to a kernel thread.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
proccheck $N
|
||||
echo
|
||||
libcheck $N
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--kernel)
|
||||
cd /proc
|
||||
printf "* Kernel protection information:\n\n"
|
||||
kernelcheck
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--fortify-file)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid file.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# does the file exist?
|
||||
if [ ! -e $2 ] ; then
|
||||
printf "\033[31mError: The file '$2' does not exist.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# read permissions?
|
||||
if [ ! -r $2 ] ; then
|
||||
printf "\033[31mError: No read permissions for '$2' (run as root).\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
# ELF executable?
|
||||
out=`file $2`
|
||||
if [[ ! $out =~ ELF ]] ; then
|
||||
printf "\033[31mError: Not an ELF file: "
|
||||
file $2
|
||||
printf "\033[m\n"
|
||||
exit 1
|
||||
fi
|
||||
if [ -e /lib/libc.so.6 ] ; then
|
||||
FS_libc=/lib/libc.so.6
|
||||
elif [ -e /lib64/libc.so.6 ] ; then
|
||||
FS_libc=/lib64/libc.so.6
|
||||
elif [ -e /lib/i386-linux-gnu/libc.so.6 ] ; then
|
||||
FS_libc=/lib/i386-linux-gnu/libc.so.6
|
||||
elif [ -e /lib/x86_64-linux-gnu/libc.so.6 ] ; then
|
||||
FS_libc=/lib/x86_64-linux-gnu/libc.so.6
|
||||
else
|
||||
printf "\033[31mError: libc not found.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FS_chk_func_libc=( $(readelf -s $FS_libc | grep _chk@@ | awk '{ print $8 }' | cut -c 3- | sed -e 's/_chk@.*//') )
|
||||
FS_functions=( $(readelf -s $2 | awk '{ print $8 }' | sed 's/_*//' | sed -e 's/@.*//') )
|
||||
|
||||
FS_libc_check
|
||||
FS_binary_check
|
||||
FS_comparison
|
||||
FS_summary
|
||||
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--fortify-proc)
|
||||
if [ $have_readelf -eq 0 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
printf "\033[31mError: Please provide a valid process ID.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if !(isNumeric "$2") ; then
|
||||
printf "\033[31mError: Please provide a valid process ID.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
cd /proc
|
||||
N=$2
|
||||
if [ -d $N ] ; then
|
||||
# read permissions?
|
||||
if [ ! -r $N/exe ] ; then
|
||||
if !(root_privs) ; then
|
||||
printf "\033[31mNo read permissions for '/proc/$N/exe' (run as root).\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! `readlink $N/exe` ] ; then
|
||||
printf "\033[31mPermission denied. Requested process ID belongs to a kernel thread.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
if [ -e /lib/libc.so.6 ] ; then
|
||||
FS_libc=/lib/libc.so.6
|
||||
elif [ -e /lib64/libc.so.6 ] ; then
|
||||
FS_libc=/lib64/libc.so.6
|
||||
elif [ -e /lib/i386-linux-gnu/libc.so.6 ] ; then
|
||||
FS_libc=/lib/i386-linux-gnu/libc.so.6
|
||||
elif [ -e /lib/x86_64-linux-gnu/libc.so.6 ] ; then
|
||||
FS_libc=/lib/x86_64-linux-gnu/libc.so.6
|
||||
else
|
||||
printf "\033[31mError: libc not found.\033[m\n\n"
|
||||
exit 1
|
||||
fi
|
||||
printf "* Process name (PID) : %s (%d)\n" `head -1 $N/status | cut -b 7-` $N
|
||||
FS_chk_func_libc=( $(readelf -s $FS_libc | grep _chk@@ | awk '{ print $8 }' | cut -c 3- | sed -e 's/_chk@.*//') )
|
||||
FS_functions=( $(readelf -s $2/exe | awk '{ print $8 }' | sed 's/_*//' | sed -e 's/@.*//') )
|
||||
|
||||
FS_libc_check
|
||||
FS_binary_check
|
||||
FS_comparison
|
||||
FS_summary
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
if [ "$#" != "0" ] ; then
|
||||
printf "\033[31mError: Unknown option '$1'.\033[m\n\n"
|
||||
fi
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
3
bin/cyberchef
Executable file
3
bin/cyberchef
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec xdg-open $(dirname $0)/cyberchef.html
|
||||
382
bin/cyberchef.html
Normal file
382
bin/cyberchef.html
Normal file
File diff suppressed because one or more lines are too long
10
bin/google-chrome
Executable file
10
bin/google-chrome
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
CHROME=`which google-chrome`
|
||||
|
||||
if [ `id -u` != "0" ] ; then
|
||||
exec $CHROME "$@"
|
||||
fi
|
||||
|
||||
CMD="${CHROME} --user-data-dir=${HOME}/.chrome-data-dir \"$@\""
|
||||
su -c "${CMD}" chromeuser
|
||||
3
bin/google-chrome-burp
Executable file
3
bin/google-chrome-burp
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
# Launch chrome for burp
|
||||
exec /usr/bin/google-chrome-beta --ignore-certificate-errors --user-data-dir=${HOME}/.config/chrome-pentest --proxy-server=127.0.0.1:8080
|
||||
9
bin/i3lock.sh
Executable file
9
bin/i3lock.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
LOCKER="i3lock -c 000000"
|
||||
/usr/bin/xss-lock -- "${LOCKER}" &
|
||||
exec /usr/bin/xautolock \
|
||||
-time 5 \
|
||||
-detectsleep \
|
||||
-locker "${LOCKER}" \
|
||||
-notify 30 \
|
||||
-notifier "notify-send -u critical -t 10000 -- 'LOCKING SCREEN IN 30 SECONDS'"
|
||||
183
bin/install_tool
Executable file
183
bin/install_tool
Executable file
@@ -0,0 +1,183 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ue
|
||||
|
||||
REINSTALL=0
|
||||
PACKAGES=1
|
||||
|
||||
while getopts -- "-:" a ; do
|
||||
case "${a}" in
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
reinstall)
|
||||
REINSTALL=1
|
||||
;;
|
||||
no-packages)
|
||||
PACKAGES=0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown long option ${OPTARG}" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
echo "Usage: ${0} <tool>" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
TOOL=${1}
|
||||
|
||||
function install_pkgs {
|
||||
if [ ${PACKAGES} -eq 0 ] ; then
|
||||
return 0
|
||||
fi
|
||||
if [ `id -u` -ne "0" ] ; then
|
||||
sudo apt-get -y install $* || (
|
||||
echo -n "Unable to install packages, please ensure these " >/dev/stderr
|
||||
echo "are installed, then run with --no-packages." >/dev/stderr
|
||||
echo $*
|
||||
false )
|
||||
return 0
|
||||
fi
|
||||
apt-get -y install $*
|
||||
}
|
||||
|
||||
function download {
|
||||
SRC=${1}
|
||||
DST=${2}
|
||||
echo -n "Downloading ${SRC} to ${DST}..." >&2
|
||||
wget --no-server-response -q -O ${DST} --content-disposition ${SRC}
|
||||
echo " done." >&2
|
||||
}
|
||||
|
||||
function check_sudo {
|
||||
sudo -l >/dev/null
|
||||
}
|
||||
|
||||
DESTDIR="${HOME}/tools/${TOOL}"
|
||||
|
||||
if [ -d ${DESTDIR} ] ; then
|
||||
if [ ${REINSTALL} -eq 1 ] ; then
|
||||
rm -ri ${DESTDIR}
|
||||
else
|
||||
echo "${DESTDIR} exists but not reinstalling." >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${TOOL} in
|
||||
john)
|
||||
install_pkgs libssl-dev git build-essential yasm libgmp-dev libpcap-dev \
|
||||
pkg-config libbz2-dev libopenmpi-dev openmpi-bin libnss3-dev \
|
||||
libkrb5-dev libgmp-dev
|
||||
jtemp=`mktemp -d`
|
||||
git clone https://github.com/magnumripper/JohnTheRipper.git ${jtemp}/john
|
||||
cd ${jtemp}/john/src
|
||||
./configure && make -sj2
|
||||
mkdir -p ${DESTDIR}
|
||||
cp -r ${jtemp}/john/run/* ${DESTDIR}
|
||||
rm -rf ${jtemp}
|
||||
# Persistent files
|
||||
mkdir -p ${HOME}/.john
|
||||
touch ${HOME}/.john/john.pot
|
||||
ln -sf ${HOME}/.john/* ${DESTDIR}
|
||||
;;
|
||||
wordlists)
|
||||
mkdir -p ${DESTDIR}
|
||||
download \
|
||||
http://downloads.skullsecurity.org/passwords/rockyou.txt.bz2 \
|
||||
${DESTDIR}/rockyou.txt.bz2
|
||||
bunzip2 ${DESTDIR}/rockyou.txt.bz2
|
||||
download \
|
||||
http://downloads.skullsecurity.org/passwords/phpbb.txt.bz2 \
|
||||
${DESTDIR}/phpbb.txt.bz2
|
||||
bunzip2 ${DESTDIR}/phpbb.txt.bz2
|
||||
download \
|
||||
http://downloads.skullsecurity.org/passwords/hak5.txt.bz2 \
|
||||
${DESTDIR}/hak5.txt.bz2
|
||||
bunzip2 ${DESTDIR}/hak5.txt.bz2
|
||||
;;
|
||||
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"
|
||||
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
|
||||
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C ${DESTDIR}
|
||||
rm /tmp/gcloud.tar.gz
|
||||
;;
|
||||
android-sdk)
|
||||
# TODO: find a way to make this version independent
|
||||
asdk="https://dl.google.com/android/repository/tools_r25.2.3-linux.zip"
|
||||
download ${asdk} /tmp/android-tools.zip
|
||||
unzip -d ${DESTDIR} /tmp/android-tools.zip
|
||||
rm /tmp/android-tools.zip
|
||||
# Install components
|
||||
${DESTDIR}/tools/bin/sdkmanager "emulator" "platform-tools"
|
||||
;;
|
||||
burp)
|
||||
# Install latest burp free
|
||||
mkdir -p ${DESTDIR}
|
||||
download \
|
||||
https://portswigger.net/DownloadUpdate.ashx\?Product\=Free \
|
||||
${DESTDIR}/burp-free.jar
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Download failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -x /usr/bin/jarwrapper ] ; then
|
||||
# We have binfmt support for jar, so add to bin
|
||||
chmod +x ${DESTDIR}/*.jar
|
||||
ln -sf ${DESTDIR}/*.jar ${HOME}/bin/burp
|
||||
fi
|
||||
;;
|
||||
mitmproxy)
|
||||
# Find a better way to get the latest
|
||||
src="https://github.com/mitmproxy/mitmproxy/releases/download/v2.0.1/mitmproxy-2.0.1-linux.tar.gz"
|
||||
download ${src} /tmp/mitmproxy.tar.gz
|
||||
mkdir -p ${DESTDIR}
|
||||
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
|
||||
rm /tmp/mitmproxy.tar.gz
|
||||
;;
|
||||
esp)
|
||||
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
|
||||
download ${src} /tmp/esp32.tar.gz
|
||||
mkdir -p ${DESTDIR}
|
||||
tar zx -C ${DESTDIR} -f /tmp/esp32.tar.gz
|
||||
rm /tmp/esp32.tar.gz
|
||||
git clone --recursive https://github.com/espressif/esp-idf.git ${DESTDIR}/esp-idf
|
||||
;;
|
||||
dex2jar)
|
||||
src="https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip"
|
||||
download ${src} /tmp/dex2jar.zip
|
||||
tmpd=`mktemp -d`
|
||||
unzip -d ${tmpd} /tmp/dex2jar.zip
|
||||
mv ${tmpd}/* ${DESTDIR}
|
||||
rm /tmp/dex2jar.zip
|
||||
rm -rf ${tmpd}
|
||||
rm ${DESTDIR}/*.bat
|
||||
chmod +x ${DESTDIR}/*.sh
|
||||
;;
|
||||
proxmark3)
|
||||
install_pkgs p7zip git build-essential libreadline5 libreadline-dev \
|
||||
libusb-0.1-4 libusb-dev libqt4-dev perl pkg-config wget libncurses5-dev \
|
||||
gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||
src="https://github.com/Proxmark/proxmark3.git"
|
||||
git clone ${src} ${DESTDIR}
|
||||
cd ${DESTDIR}
|
||||
make -sj2
|
||||
check_sudo && sudo /bin/sh -c \
|
||||
"cp -rf driver/78-mm-usb-device-blacklist.rules \
|
||||
/etc/udev/rules.d/77-mm-usb-device-blacklist.rules &&
|
||||
udevadm control --reload-rules"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown tool: ${TOOL}" >/dev/stderr
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
37
bin/metasploit.sh
Executable file
37
bin/metasploit.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
export NAME=$(basename "$0")
|
||||
export BASE="/opt/metasploit" # TODO: search this path
|
||||
|
||||
# Autogen'd
|
||||
if [ -f "${BASE}/scripts/setenv.sh" ] ; then
|
||||
. ${BASE}/scripts/setenv.sh
|
||||
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" "$@"
|
||||
fi
|
||||
|
||||
echo "Couldn't find script." >&2
|
||||
exit 1
|
||||
1
bin/nasm_shell
Symbolic link
1
bin/nasm_shell
Symbolic link
@@ -0,0 +1 @@
|
||||
metasploit.sh
|
||||
1
bin/pattern_create
Symbolic link
1
bin/pattern_create
Symbolic link
@@ -0,0 +1 @@
|
||||
metasploit.sh
|
||||
1
bin/pattern_offset
Symbolic link
1
bin/pattern_offset
Symbolic link
@@ -0,0 +1 @@
|
||||
metasploit.sh
|
||||
28
bin/switch_virt.sh
Executable file
28
bin/switch_virt.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -lt 1 ] ; then
|
||||
echo "Usage: $0 <kvm|vbox>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ `whoami` != "root" ] ; then
|
||||
if which sudo >/dev/null 2>&1 ; then
|
||||
sudo $0 $*
|
||||
exit
|
||||
fi
|
||||
echo "Sorry, this requires root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" == "kvm" ] ; then
|
||||
/etc/init.d/virtualbox stop
|
||||
modprobe kvm
|
||||
modprobe kvm_intel
|
||||
elif [ "$1" == "vbox" ] ; then
|
||||
rmmod kvm_intel
|
||||
rmmod kvm
|
||||
/etc/init.d/virtualbox start
|
||||
else
|
||||
echo 'WTF?' >&2
|
||||
exit 1
|
||||
fi
|
||||
20
deb-to-kali.sh
Executable file
20
deb-to-kali.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ `whoami` != "root" ] ; then
|
||||
echo "This must be run as root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASEDIR=`dirname $0`
|
||||
if ! test -f ${BASEDIR}/keys/gpg/kali-repo.key ; then
|
||||
echo "Couldn't find key, are you in the right place?" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat >/etc/apt/sources.list.d/kali.list <<KALI_EOF
|
||||
deb http://http.kali.org/kali kali-rolling main contrib non-free
|
||||
KALI_EOF
|
||||
|
||||
/usr/bin/apt-key add ${BASEDIR}/keys/gpg/kali-repo.key
|
||||
/usr/bin/apt-get update
|
||||
/usr/bin/apt-get install -y kali-linux-full
|
||||
91
dotfiles/Xresources
Normal file
91
dotfiles/Xresources
Normal file
@@ -0,0 +1,91 @@
|
||||
Xcursor.size: 16
|
||||
|
||||
!!!
|
||||
! Xft for fonts
|
||||
!!!
|
||||
Xft.dpi: 96
|
||||
Xft.antialias: false
|
||||
Xft.lcdfilter: lcddefault
|
||||
Xft.rgba: rgb
|
||||
Xft.hinting: true
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.autohint: 0
|
||||
|
||||
!!!
|
||||
! Solarized urxvt
|
||||
!!!
|
||||
URxvt.depth: 32
|
||||
URxvt.geometry: 90x30
|
||||
URxvt.transparent: false
|
||||
URxvt.fading: 0
|
||||
URxvt.urgentOnBell: true
|
||||
URxvt.visualBell: false
|
||||
URxvt.loginShell: true
|
||||
URxvt.saveLines: 50000
|
||||
URxvt.internalBorder: 2
|
||||
URxvt.lineSpace: 0
|
||||
URxvt.iso14755: false
|
||||
|
||||
! Fonts
|
||||
URxvt*font: xft:inconsolata:pixelsize=16
|
||||
|
||||
! Fix font space
|
||||
URxvt*letterSpace: -1
|
||||
|
||||
! Scrollbar
|
||||
URxvt.scrollStyle: rxvt
|
||||
URxvt.scrollBar: false
|
||||
|
||||
! Perl extensions
|
||||
URxvt.perl-ext-common: default,matcher,resize-font
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.urlLauncher: /usr/bin/xdg-open
|
||||
URxvt.resize-font.smaller: C-Down
|
||||
URxvt.resize-font.bigger: C-Up
|
||||
|
||||
! Cursor
|
||||
URxvt.cursorBlink: true
|
||||
URxvt.cursorUnderline: false
|
||||
|
||||
! Pointer
|
||||
URxvt.pointerBlank: true
|
||||
|
||||
! Solarized colors begin
|
||||
URxvt.background: #002b36
|
||||
URxvt.foreground: #657b83
|
||||
URxvt.fadeColor: #002b36
|
||||
URxvt.cursorColor: #93a1a1
|
||||
URxvt.pointerColorBackground: #586e75
|
||||
URxvt.pointerColorForeground: #93a1a1
|
||||
|
||||
!! black dark/light
|
||||
URxvt.color0: #073642
|
||||
URxvt.color8: #002b36
|
||||
|
||||
!! red dark/light
|
||||
URxvt.color1: #dc322f
|
||||
URxvt.color9: #cb4b16
|
||||
|
||||
!! green dark/light
|
||||
URxvt.color2: #859900
|
||||
URxvt.color10: #586e75
|
||||
|
||||
!! yellow dark/light
|
||||
URxvt.color3: #b58900
|
||||
URxvt.color11: #657b83
|
||||
|
||||
!! blue dark/light
|
||||
URxvt.color4: #268bd2
|
||||
URxvt.color12: #839496
|
||||
|
||||
!! magenta dark/light
|
||||
URxvt.color5: #d33682
|
||||
URxvt.color13: #6c71c4
|
||||
|
||||
!! cyan dark/light
|
||||
URxvt.color6: #2aa198
|
||||
URxvt.color14: #93a1a1
|
||||
|
||||
!! white dark/light
|
||||
URxvt.color7: #eee8d5
|
||||
URxvt.color15: #fdf6e3
|
||||
3
dotfiles/ackrc
Normal file
3
dotfiles/ackrc
Normal file
@@ -0,0 +1,3 @@
|
||||
--follow
|
||||
--pager=less -LMXRF
|
||||
--smart-case
|
||||
35
dotfiles/aliases
Executable file
35
dotfiles/aliases
Executable file
@@ -0,0 +1,35 @@
|
||||
# General aliases, should only be sourced in interactive shells
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Cryptsetup alias
|
||||
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
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
fi
|
||||
|
||||
# Easy upgrade
|
||||
alias dist-upgrade="sudo sh -c 'apt-get update && apt-get -y dist-upgrade'"
|
||||
|
||||
# Timestamp in a machine-sortable form
|
||||
alias tstamp="date '+%Y%m%d-%H%M%S'"
|
||||
|
||||
# Prepare code for markdown
|
||||
alias mdcode="sed 's/^/ /'"
|
||||
|
||||
# Intel format plz
|
||||
alias objdump="command objdump -M intel"
|
||||
|
||||
# Useful directory utilities
|
||||
alias dircount="for d in * ; do find \$d -type d | wc -l | tr -d '\n' ; echo ' ' \$d ; done | sort -n"
|
||||
|
||||
# Drop caches for swap issues
|
||||
alias drop_caches="echo 3 | sudo /usr/bin/tee /proc/sys/vm/drop_caches"
|
||||
31
bashrc → dotfiles/bashrc
Normal file → Executable file
31
bashrc → dotfiles/bashrc
Normal file → Executable file
@@ -1,6 +1,10 @@
|
||||
# Load env first
|
||||
if [ -f $HOME/.env ] ; then source $HOME/.env ; fi
|
||||
|
||||
# History settings
|
||||
HISTCONTROL=ignoredups:ignorespace
|
||||
shopt -s histappend
|
||||
shopt -s expand_aliases
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=0
|
||||
|
||||
@@ -9,24 +13,13 @@ HISTFILESIZE=0
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Fancier outputs
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
force_color_prompt=yes
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe 2>/dev/null)"
|
||||
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
@@ -37,16 +30,16 @@ xterm*|rxvt*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# Bash completion
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
|
||||
|
||||
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
0
dotfiles/byobu/.welcome-displayed
Normal file
0
dotfiles/byobu/.welcome-displayed
Normal file
1
dotfiles/byobu/backend
Normal file
1
dotfiles/byobu/backend
Normal file
@@ -0,0 +1 @@
|
||||
BYOBU_BACKEND=tmux
|
||||
3
dotfiles/byobu/color
Normal file
3
dotfiles/byobu/color
Normal file
@@ -0,0 +1,3 @@
|
||||
BACKGROUND=k
|
||||
FOREGROUND=w
|
||||
MONOCHROME=0
|
||||
5
dotfiles/byobu/color.tmux
Normal file
5
dotfiles/byobu/color.tmux
Normal file
@@ -0,0 +1,5 @@
|
||||
BYOBU_DARK=black
|
||||
BYOBU_LIGHT=white
|
||||
BYOBU_ACCENT=magenta
|
||||
BYOBU_HIGHLIGHT=red
|
||||
MONOCHROME=0
|
||||
1
dotfiles/byobu/keybindings
Normal file
1
dotfiles/byobu/keybindings
Normal file
@@ -0,0 +1 @@
|
||||
source $BYOBU_PREFIX/share/byobu/keybindings/common
|
||||
4
dotfiles/byobu/keybindings.tmux
Normal file
4
dotfiles/byobu/keybindings.tmux
Normal file
@@ -0,0 +1,4 @@
|
||||
unbind-key -n C-a
|
||||
set -g prefix ^A
|
||||
set -g prefix2 ^A
|
||||
bind a send-prefix
|
||||
1
dotfiles/byobu/profile
Normal file
1
dotfiles/byobu/profile
Normal file
@@ -0,0 +1 @@
|
||||
source $BYOBU_PREFIX/share/byobu/profiles/common
|
||||
1
dotfiles/byobu/profile.tmux
Normal file
1
dotfiles/byobu/profile.tmux
Normal file
@@ -0,0 +1 @@
|
||||
source $BYOBU_PREFIX/share/byobu/profiles/tmux
|
||||
1
dotfiles/byobu/prompt
Normal file
1
dotfiles/byobu/prompt
Normal file
@@ -0,0 +1 @@
|
||||
[ -r /usr/share/byobu/profiles/bashrc ] && . /usr/share/byobu/profiles/bashrc #byobu-prompt#
|
||||
37
dotfiles/byobu/status
Normal file
37
dotfiles/byobu/status
Normal file
@@ -0,0 +1,37 @@
|
||||
# status - Byobu's default status enabled/disabled settings
|
||||
#
|
||||
# Override these in $BYOBU_CONFIG_DIR/status
|
||||
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
||||
# and $HOME/.byobu otherwise.
|
||||
#
|
||||
# Copyright (C) 2009-2011 Canonical Ltd.
|
||||
#
|
||||
# Authors: Dustin Kirkland <kirkland@byobu.co>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Status beginning with '#' are disabled.
|
||||
|
||||
# Screen has two status lines, with 4 quadrants for status
|
||||
screen_upper_left="color"
|
||||
screen_upper_right="color whoami hostname ip_address menu"
|
||||
screen_lower_left="color logo distro release #arch"
|
||||
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time"
|
||||
|
||||
# Tmux has one status line, with 2 halves for status
|
||||
tmux_left="logo #distro release #arch"
|
||||
# You can have as many tmux right lines below here, and cycle through them using Shift-F5
|
||||
tmux_right="#network #disk_io #custom #entropy raid reboot_required updates_available #apport #services #mail #users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname #ip_address #time_utc date time"
|
||||
#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time"
|
||||
#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time"
|
||||
#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime #ec2_cost #rcs_cost fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time"
|
||||
78
dotfiles/byobu/statusrc
Normal file
78
dotfiles/byobu/statusrc
Normal file
@@ -0,0 +1,78 @@
|
||||
# statusrc - Byobu's default status configurations
|
||||
#
|
||||
# Override these in $BYOBU_CONFIG_DIR/statusrc
|
||||
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
|
||||
# and $HOME/.byobu otherwise.
|
||||
#
|
||||
# Copyright (C) 2009-2011 Canonical Ltd.
|
||||
#
|
||||
# Authors: Dustin Kirkland <kirkland@byobu.co>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Configurations that you can override; if you leave these commented out,
|
||||
# Byobu will try to auto-detect them.
|
||||
|
||||
# This should be auto-detected for most distro, but setting it here will save
|
||||
# some call to lsb_release and the like.
|
||||
#DISTRO=Ubuntu
|
||||
|
||||
# Default: depends on the distro (which is either auto-detected, either set
|
||||
# via $DISTRO)
|
||||
#LOGO="\o/"
|
||||
|
||||
# Abbreviate the release to N characters
|
||||
# By default, this is disabled. But if you set RELEASE_ABBREVIATED=1
|
||||
# and your lsb_release is "precise", only "p" will be displayed
|
||||
#RELEASE_ABBREVIATED=1
|
||||
|
||||
# Default: /
|
||||
#MONITORED_DISK=/
|
||||
|
||||
# Minimum disk throughput that triggers the notification (in kB/s)
|
||||
# Default: 50
|
||||
#DISK_IO_THRESHOLD=50
|
||||
|
||||
# Default: eth0
|
||||
#MONITORED_NETWORK=eth0
|
||||
|
||||
# Unit used for network throughput (either bits per second or bytes per second)
|
||||
# Default: bits
|
||||
#NETWORK_UNITS=bytes
|
||||
|
||||
# Minimum network throughput that triggers the notification (in kbit/s)
|
||||
# Default: 20
|
||||
#NETWORK_THRESHOLD=20
|
||||
|
||||
# You can add an additional source of temperature here
|
||||
#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature
|
||||
|
||||
# Default: C
|
||||
#TEMP=F
|
||||
|
||||
#SERVICES="eucalyptus-nc|NC eucalyptus-cloud|CLC eucalyptus-walrus eucalyptus-cc|CC eucalyptus-sc|SC"
|
||||
|
||||
#FAN=$(find /sys -type f -name fan1_input | head -n1)
|
||||
|
||||
# You can set this to 1 to report your external/public ip address
|
||||
# Default: 0
|
||||
#IP_EXTERNAL=0
|
||||
|
||||
# The users notification normally counts ssh sessions; set this configuration to '1'
|
||||
# to instead count number of distinct users logged onto the system
|
||||
# Default: 0
|
||||
#USERS_DISTINCT=0
|
||||
|
||||
# Set this to zero to hide seconds int the time display
|
||||
# Default 1
|
||||
#TIME_SECONDS=0
|
||||
0
dotfiles/byobu/windows
Normal file
0
dotfiles/byobu/windows
Normal file
196
dotfiles/config/i3/config
Normal file
196
dotfiles/config/i3/config
Normal file
@@ -0,0 +1,196 @@
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec dmenu_run
|
||||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||
# installed.
|
||||
bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# move focus
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move windows
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# Move workspaces between monitors
|
||||
bindsym $mod+Shift+greater move workspace to output right
|
||||
bindsym $mod+Shift+less move workspace to output left
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec \
|
||||
"i3-nagbar -t warning -m \
|
||||
'You pressed the exit shortcut. Do you really want to exit i3? \
|
||||
This will end your X session.' \
|
||||
-b 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape or mod+r to toggle
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command bash -c "i3status -c <(~/.config/i3status/build_config.sh)"
|
||||
}
|
||||
|
||||
# Cycle through workspaces like cinnamon
|
||||
bindsym $alt+Control+Right workspace next
|
||||
bindsym $alt+Control+Left workspace prev
|
||||
|
||||
# i3 lock
|
||||
exec --no-startup-id ~/bin/i3lock.sh &
|
||||
bindsym $mod+l exec \
|
||||
bash -c "i3lock -c 000000 -d && (sleep 2 && xset dpms force off) &"
|
||||
bindsym $alt+Control+l exec \
|
||||
bash -c "i3lock -c 000000 -d && (sleep 2 && xset dpms force off) &"
|
||||
|
||||
# things to start quickly
|
||||
bindsym $mod+g exec /usr/bin/google-chrome-beta --password-store=gnome
|
||||
|
||||
# kill a window with middle click + mod
|
||||
bindsym --whole-window $mod+button2 kill
|
||||
# float a window with right click + mod
|
||||
bindsym --whole-window $mod+button3 floating toggle
|
||||
|
||||
# media keys
|
||||
# Pulse Audio controls
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
# Screen brightness controls
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
|
||||
|
||||
# screenshots
|
||||
set $scrotformat %F-%T.png
|
||||
set $screendir ~/Pictures/Screenshots
|
||||
# whole screen
|
||||
bindsym --release Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot $screendir/$scrotformat
|
||||
# current window
|
||||
bindsym --release Shift+Print exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/usr/bin/scrot -u $screendir/$scrotformat
|
||||
# selection
|
||||
bindsym --release $alt+Sys_Req exec --no-startup-id \
|
||||
mkdir -p $screendir && \
|
||||
/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 gnome-keyring-daemon --start --components=pkcs11,secrets
|
||||
# Make GTK fonts look great again
|
||||
exec --no-startup-id gnome-settings-daemon
|
||||
exec --no-startup-id (sleep 2; nm-applet) &
|
||||
exec --no-startup-id xset r rate 200 20
|
||||
exec --no-startup-id ~/bin/autostart.py
|
||||
|
||||
# customize windows
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="bubble"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
for_window [window_role="Preferences"] floating enable
|
||||
for_window [window_type="dialog"] floating enable
|
||||
for_window [window_type="menu"] floating enable
|
||||
|
||||
for_window [class="^google-chrome$"] border pixel
|
||||
for_window [class="^Google-chrome-beta$"] border pixel
|
||||
for_window [class="^burp-StartBurp$" title="^(?!Burp Suite)"] floating enable
|
||||
|
||||
# no need for borders on the edge of the screen
|
||||
hide_edge_borders both
|
||||
|
||||
# vim:filetype=i3
|
||||
132
dotfiles/config/i3status/build_config.sh
Executable file
132
dotfiles/config/i3status/build_config.sh
Executable file
@@ -0,0 +1,132 @@
|
||||
#!/bin/bash
|
||||
|
||||
function general {
|
||||
cat <<-EOF
|
||||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
function disks {
|
||||
local DISKS=(/ /home)
|
||||
local d
|
||||
local used
|
||||
for d in ${DISKS[@]} ; do
|
||||
local dev=`df $d | tail -1 | awk '{print $1}'`
|
||||
if [[ $used == *$dev* ]] ; then
|
||||
continue
|
||||
fi
|
||||
local size=`df $d | tail -1 | awk '{print $2}'`
|
||||
if [ $size -eq 0 ] ; then
|
||||
continue
|
||||
fi
|
||||
used="${used} ${dev}"
|
||||
cat <<-EOF
|
||||
disk "${d}" {
|
||||
format = "${d} %avail"
|
||||
}
|
||||
order += "disk ${d}"
|
||||
EOF
|
||||
done
|
||||
}
|
||||
|
||||
function wireless {
|
||||
which iwconfig >/dev/null || return
|
||||
iwconfig 2>&1 | grep . | grep -vq 'no wireless extensions' || return
|
||||
cat <<-EOF
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
order += "wireless _first_"
|
||||
EOF
|
||||
}
|
||||
|
||||
function wired {
|
||||
cat <<-EOF
|
||||
ethernet _first_ {
|
||||
format_up = "E: %ip"
|
||||
format_down = "E: down"
|
||||
}
|
||||
order += "ethernet _first_"
|
||||
EOF
|
||||
}
|
||||
|
||||
function ipv6 {
|
||||
echo "order += \"ipv6\""
|
||||
}
|
||||
|
||||
function load {
|
||||
cat <<-EOF
|
||||
load {
|
||||
format = "%1min %5min"
|
||||
}
|
||||
order += "load"
|
||||
EOF
|
||||
}
|
||||
|
||||
function now {
|
||||
cat <<-EOF
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M"
|
||||
}
|
||||
order += "tztime local"
|
||||
EOF
|
||||
}
|
||||
|
||||
function battery {
|
||||
local bat
|
||||
shopt -s nullglob
|
||||
for bat in /sys/class/power_supply/BAT* ; do
|
||||
local bid=${bat##*BAT}
|
||||
cat <<-EOF
|
||||
battery ${bid} {
|
||||
low_threshold = 15
|
||||
threshold_type = time
|
||||
status_chr = "↑ CHR"
|
||||
status_bat = "↓ BAT"
|
||||
EOF
|
||||
if [ $(bc <<< "$(i3status --version | awk '{print $2}') < 2.11") -eq 0 ] ;
|
||||
then
|
||||
cat <<-EOF
|
||||
status_unk = "? UNK"
|
||||
EOF
|
||||
fi
|
||||
cat <<-EOF
|
||||
status_full = "FULL"
|
||||
format = "%status %percentage"
|
||||
path = "/sys/class/power_supply/BAT${bid}/uevent"
|
||||
hide_seconds = true
|
||||
last_full_capacity = true
|
||||
}
|
||||
order += "battery ${bid}"
|
||||
EOF
|
||||
done
|
||||
}
|
||||
|
||||
function audio {
|
||||
cat <<-EOF
|
||||
volume master {
|
||||
format = "♪: %volume"
|
||||
format_muted = "♪: MUTE"
|
||||
device = "default"
|
||||
mixer = "Master"
|
||||
mixer_idx = 0
|
||||
}
|
||||
order += "volume master"
|
||||
EOF
|
||||
}
|
||||
|
||||
general
|
||||
disks
|
||||
wireless
|
||||
wired
|
||||
ipv6
|
||||
load
|
||||
battery
|
||||
audio
|
||||
now
|
||||
|
||||
# vim: noexpandtab
|
||||
52
dotfiles/config/i3status/config
Normal file
52
dotfiles/config/i3status/config
Normal file
@@ -0,0 +1,52 @@
|
||||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "ipv6"
|
||||
order += "disk /"
|
||||
order += "disk /home"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "battery all"
|
||||
order += "load"
|
||||
order += "tztime local"
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality at %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
# if you use %speed, i3status requires root privileges
|
||||
format_up = "E: %ip (%speed)"
|
||||
format_down = "E: down"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "%avail"
|
||||
}
|
||||
|
||||
disk "/home" {
|
||||
format = "%avail"
|
||||
}
|
||||
11
dotfiles/config/redshift.conf
Normal file
11
dotfiles/config/redshift.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
[redshift]
|
||||
temp-day=5700
|
||||
temp-night=4750
|
||||
transition=1
|
||||
brightness-day=1.0
|
||||
brightness-night=0.9
|
||||
adjustment-method=randr
|
||||
|
||||
[manual]
|
||||
lat=37.3
|
||||
lon=-121.9
|
||||
4
dotfiles/curlrc
Normal file
4
dotfiles/curlrc
Normal file
@@ -0,0 +1,4 @@
|
||||
tlsv1
|
||||
user-agent = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0 Safari/537.36"
|
||||
create-dirs
|
||||
referer = ";auto"
|
||||
295
dotfiles/dircolors
Normal file
295
dotfiles/dircolors
Normal file
@@ -0,0 +1,295 @@
|
||||
|
||||
# Dark 256 color solarized theme for the color GNU ls utility.
|
||||
# Used and tested with dircolors (GNU coreutils) 8.5
|
||||
#
|
||||
# @author {@link http://sebastian.tramp.name Sebastian Tramp}
|
||||
# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL)
|
||||
#
|
||||
# More Information at
|
||||
# https://github.com/seebi/dircolors-solarized
|
||||
|
||||
# Term Section
|
||||
TERM Eterm
|
||||
TERM ansi
|
||||
TERM color-xterm
|
||||
TERM con132x25
|
||||
TERM con132x30
|
||||
TERM con132x43
|
||||
TERM con132x60
|
||||
TERM con80x25
|
||||
TERM con80x28
|
||||
TERM con80x30
|
||||
TERM con80x43
|
||||
TERM con80x50
|
||||
TERM con80x60
|
||||
TERM cons25
|
||||
TERM console
|
||||
TERM cygwin
|
||||
TERM dtterm
|
||||
TERM dvtm
|
||||
TERM dvtm-256color
|
||||
TERM eterm-color
|
||||
TERM fbterm
|
||||
TERM gnome
|
||||
TERM gnome-256color
|
||||
TERM jfbterm
|
||||
TERM konsole
|
||||
TERM konsole-256color
|
||||
TERM kterm
|
||||
TERM linux
|
||||
TERM linux-c
|
||||
TERM mach-color
|
||||
TERM mlterm
|
||||
TERM putty
|
||||
TERM putty-256color
|
||||
TERM rxvt
|
||||
TERM rxvt-256color
|
||||
TERM rxvt-cygwin
|
||||
TERM rxvt-cygwin-native
|
||||
TERM rxvt-unicode
|
||||
TERM rxvt-unicode256
|
||||
TERM rxvt-unicode-256color
|
||||
TERM screen
|
||||
TERM screen-16color
|
||||
TERM screen-16color-bce
|
||||
TERM screen-16color-s
|
||||
TERM screen-16color-bce-s
|
||||
TERM screen-256color
|
||||
TERM screen-256color-bce
|
||||
TERM screen-256color-s
|
||||
TERM screen-256color-bce-s
|
||||
TERM screen-256color-italic
|
||||
TERM screen-bce
|
||||
TERM screen-w
|
||||
TERM screen.linux
|
||||
TERM screen.xterm-256color
|
||||
TERM st
|
||||
TERM st-meta
|
||||
TERM st-256color
|
||||
TERM st-meta-256color
|
||||
TERM vt100
|
||||
TERM xterm
|
||||
TERM xterm-16color
|
||||
TERM xterm-256color
|
||||
TERM xterm-256color-italic
|
||||
TERM xterm-88color
|
||||
TERM xterm-color
|
||||
TERM xterm-debian
|
||||
TERM xterm-termite
|
||||
|
||||
## Documentation
|
||||
#
|
||||
# standard colors
|
||||
#
|
||||
# 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
|
||||
# Text color codes:
|
||||
# 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
|
||||
#
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
28
dotfiles/env
Executable file
28
dotfiles/env
Executable file
@@ -0,0 +1,28 @@
|
||||
# Sourced by zshrc as well as bash.
|
||||
|
||||
umask 027
|
||||
ulimit -c unlimited
|
||||
|
||||
# Paths and preferences
|
||||
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
|
||||
export GOPATH="$HOME/Projects/Go"
|
||||
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH:$GOPATH/bin"
|
||||
export VISUAL=vim
|
||||
export EDITOR=vim
|
||||
export DEBEMAIL="david@systemoverlord.com"
|
||||
export DEBFULLNAME="David Tomaschik"
|
||||
export LESS="-MR"
|
||||
export QUOTING_STYLE="literal" # Coreutils quotes
|
||||
|
||||
# Fix gnome-terminal
|
||||
if [[ $TERM == "xterm" && $COLORTERM == "gnome-terminal" ]] ; then
|
||||
export TERM="xterm-256color"
|
||||
fi
|
||||
|
||||
# For virtualenvwrapper
|
||||
export WORKON_HOME=$HOME/.virtualenvs
|
||||
|
||||
# GPG full key id
|
||||
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
|
||||
|
||||
if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi
|
||||
40
dotfiles/gdbinit
Normal file
40
dotfiles/gdbinit
Normal file
@@ -0,0 +1,40 @@
|
||||
# General options
|
||||
set verbose off
|
||||
set confirm off
|
||||
set disassembly-flavor intel
|
||||
set output-radix 0x10
|
||||
set input-radix 10.
|
||||
|
||||
# helpful shortcuts
|
||||
define lsbp
|
||||
info breakpoints
|
||||
end
|
||||
document lsbp
|
||||
List all breakpoints
|
||||
end
|
||||
|
||||
define iframe
|
||||
info frame
|
||||
info args
|
||||
info locals
|
||||
end
|
||||
define reg
|
||||
info registers
|
||||
end
|
||||
|
||||
# Fancy sourcing of modules
|
||||
python
|
||||
import sys
|
||||
import os.path
|
||||
pwndbg = os.path.expanduser('~/.pwndbg/gdbinit.py')
|
||||
peda = os.path.expanduser('~/.peda/peda.py')
|
||||
if os.path.isfile(pwndbg):
|
||||
sys.path.insert(0, os.path.expanduser('~/.pwndbg/vendor'))
|
||||
gdb.execute('source {}'.format(pwndbg))
|
||||
elif os.path.isfile(peda):
|
||||
gdb.execute('source {}'.format(peda))
|
||||
|
||||
local_init = os.path.expanduser('~/.gdbinit.local')
|
||||
if os.path.isfile(local_init):
|
||||
gdb.execute('source {}'.format(local_init))
|
||||
end
|
||||
60
dotfiles/gitconfig
Normal file
60
dotfiles/gitconfig
Normal file
@@ -0,0 +1,60 @@
|
||||
[user]
|
||||
name = David Tomaschik
|
||||
email = david@systemoverlord.com
|
||||
signingKey = 0x5DEA789B
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.gitignore
|
||||
editor = vim
|
||||
whitespace = trailing-space,space-before-tab
|
||||
|
||||
[color]
|
||||
diff = auto
|
||||
status = auto
|
||||
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
|
||||
[difftool]
|
||||
prompt = false
|
||||
|
||||
[alias]
|
||||
st = status
|
||||
last = log -1 HEAD
|
||||
# Thanks to
|
||||
# http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
|
||||
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
|
||||
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
|
||||
files = ls-files
|
||||
f = "!git ls-files | grep -i"
|
||||
logtree = log --graph --oneline --decorate --all
|
||||
|
||||
[push]
|
||||
default = current
|
||||
|
||||
[web]
|
||||
browser = chrome
|
||||
|
||||
[github]
|
||||
user = matir
|
||||
|
||||
# Site specific config
|
||||
[url "https://github.com./"]
|
||||
insteadOf = "github:"
|
||||
insteadOf = "github://"
|
||||
|
||||
[url "ssh://git@github.com/"]
|
||||
pushInsteadOf = "github:"
|
||||
pushInsteadOf = "github://"
|
||||
|
||||
[url "git://gist.github.com/"]
|
||||
insteadOf = "gist:"
|
||||
|
||||
[url "git@gist.github.com:"]
|
||||
pushInsteadOf = "gist:"
|
||||
pushInsteadOf = "git://gist.github.com/"
|
||||
|
||||
[credential]
|
||||
helper = cache --timeout=36000
|
||||
[receive]
|
||||
denyCurrentBranch = updateInstead
|
||||
19
dotfiles/gitignore
Normal file
19
dotfiles/gitignore
Normal file
@@ -0,0 +1,19 @@
|
||||
# Common trash (metadata, backup files, etc.)
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
*.swp
|
||||
*~
|
||||
*.bak
|
||||
|
||||
# Object files
|
||||
*.py[co]
|
||||
*.[oa]
|
||||
|
||||
# Try to avoid accidentally checking in private keys
|
||||
id_rsa
|
||||
id_ecdsa
|
||||
2
dotfiles/gnupg/dirmngr.conf
Normal file
2
dotfiles/gnupg/dirmngr.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
keyserver hkps://hkps.pool.sks-keyservers.net
|
||||
hkp-cacert ~/.gnupg/sks-keyservers.pem
|
||||
@@ -1,6 +1,5 @@
|
||||
enable-ssh-support
|
||||
use-standard-socket
|
||||
default-cache-ttl 7200
|
||||
default-cache-ttl-ssh 7200
|
||||
max-cache-ttl 86400
|
||||
max-cache-ttl-ssh 86400
|
||||
enable-ssh-support
|
||||
9
dotfiles/gnupg/gpg.conf
Normal file
9
dotfiles/gnupg/gpg.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
use-agent
|
||||
# HKPS requires gnupg-curl for gpg1
|
||||
keyserver hkps://hkps.pool.sks-keyservers.net
|
||||
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
|
||||
32
dotfiles/gnupg/sks-keyservers.pem
Normal file
32
dotfiles/gnupg/sks-keyservers.pem
Normal file
@@ -0,0 +1,32 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFizCCA3OgAwIBAgIJAK9zyLTPn4CPMA0GCSqGSIb3DQEBBQUAMFwxCzAJBgNV
|
||||
BAYTAk5PMQ0wCwYDVQQIDARPc2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5u
|
||||
ZXQgQ0ExHjAcBgNVBAMMFXNrcy1rZXlzZXJ2ZXJzLm5ldCBDQTAeFw0xMjEwMDkw
|
||||
MDMzMzdaFw0yMjEwMDcwMDMzMzdaMFwxCzAJBgNVBAYTAk5PMQ0wCwYDVQQIDARP
|
||||
c2xvMR4wHAYDVQQKDBVza3Mta2V5c2VydmVycy5uZXQgQ0ExHjAcBgNVBAMMFXNr
|
||||
cy1rZXlzZXJ2ZXJzLm5ldCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
|
||||
ggIBANdsWy4PXWNUCkS3L//nrd0GqN3dVwoBGZ6w94Tw2jPDPifegwxQozFXkG6I
|
||||
6A4TK1CJLXPvfz0UP0aBYyPmTNadDinaB9T4jIwd4rnxl+59GiEmqkN3IfPsv5Jj
|
||||
MkKUmJnvOT0DEVlEaO1UZIwx5WpfprB3mR81/qm4XkAgmYrmgnLXd/pJDAMk7y1F
|
||||
45b5zWofiD5l677lplcIPRbFhpJ6kDTODXh/XEdtF71EAeaOdEGOvyGDmCO0GWqS
|
||||
FDkMMPTlieLA/0rgFTcz4xwUYj/cD5e0ZBuSkYsYFAU3hd1cGfBue0cPZaQH2HYx
|
||||
Qk4zXD8S3F4690fRhr+tki5gyG6JDR67aKp3BIGLqm7f45WkX1hYp+YXywmEziM4
|
||||
aSbGYhx8hoFGfq9UcfPEvp2aoc8u5sdqjDslhyUzM1v3m3ZGbhwEOnVjljY6JJLx
|
||||
MxagxnZZSAY424ZZ3t71E/Mn27dm2w+xFRuoy8JEjv1d+BT3eChM5KaNwrj0IO/y
|
||||
u8kFIgWYA1vZ/15qMT+tyJTfyrNVV/7Df7TNeWyNqjJ5rBmt0M6NpHG7CrUSkBy9
|
||||
p8JhimgjP5r0FlEkgg+lyD+V79H98gQfVgP3pbJICz0SpBQf2F/2tyS4rLm+49rP
|
||||
fcOajiXEuyhpcmzgusAj/1FjrtlynH1r9mnNaX4e+rLWzvU5AgMBAAGjUDBOMB0G
|
||||
A1UdDgQWBBTkwyoJFGfYTVISTpM8E+igjdq28zAfBgNVHSMEGDAWgBTkwyoJFGfY
|
||||
TVISTpM8E+igjdq28zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4ICAQAR
|
||||
OXnYwu3g1ZjHyley3fZI5aLPsaE17cOImVTehC8DcIphm2HOMR/hYTTL+V0G4P+u
|
||||
gH+6xeRLKSHMHZTtSBIa6GDL03434y9CBuwGvAFCMU2GV8w92/Z7apkAhdLToZA/
|
||||
X/iWP2jeaVJhxgEcH8uPrnSlqoPBcKC9PrgUzQYfSZJkLmB+3jEa3HKruy1abJP5
|
||||
gAdQvwvcPpvYRnIzUc9fZODsVmlHVFBCl2dlu/iHh2h4GmL4Da2rRkUMlbVTdioB
|
||||
UYIvMycdOkpH5wJftzw7cpjsudGas0PARDXCFfGyKhwBRFY7Xp7lbjtU5Rz0Gc04
|
||||
lPrhDf0pFE98Aw4jJRpFeWMjpXUEaG1cq7D641RpgcMfPFvOHY47rvDTS7XJOaUT
|
||||
BwRjmDt896s6vMDcaG/uXJbQjuzmmx3W2Idyh3s5SI0GTHb0IwMKYb4eBUIpQOnB
|
||||
cE77VnCYqKvN1NVYAqhWjXbY7XasZvszCRcOG+W3FqNaHOK/n/0ueb0uijdLan+U
|
||||
f4p1bjbAox8eAOQS/8a3bzkJzdyBNUKGx1BIK2IBL9bn/HravSDOiNRSnZ/R3l9G
|
||||
ZauX0tu7IIDlRCILXSyeazu0aj/vdT3YFQXPcvt5Fkf5wiNTo53f72/jYEJd6qph
|
||||
WrpoKqrwGwTpRUCMhYIUt65hsTxCiJJ5nKe39h46sg==
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,37 +1,4 @@
|
||||
servers = (
|
||||
{ address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
|
||||
{ address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
|
||||
{ address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
|
||||
{
|
||||
address = "irc.undernet.org";
|
||||
chatnet = "Undernet";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
|
||||
{
|
||||
address = "irc.quakenet.org";
|
||||
chatnet = "QuakeNet";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "irc.oftc.net"; chatnet = "OFTC"; port = "6667"; },
|
||||
{
|
||||
address = "irc.gamesurge.net";
|
||||
chatnet = "GameSurge";
|
||||
port = "6667";
|
||||
},
|
||||
{ address = "irc.webchat.org"; chatnet = "WebChat"; port = "6667"; },
|
||||
{ address = "irc.rizon.net"; chatnet = "Rizon"; port = "6667"; },
|
||||
{ address = "irc.link-net.org"; chatnet = "LinkNet"; port = "6667"; },
|
||||
{ address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
|
||||
{
|
||||
address = "irc.freenode.net";
|
||||
chatnet = "freenode";
|
||||
port = "7000";
|
||||
use_ssl = "yes";
|
||||
ssl_verify = "yes";
|
||||
ssl_capath = "/etc/ssl/certs";
|
||||
autoconnect = "yes";
|
||||
},
|
||||
{
|
||||
address = "ircs.overthewire.org";
|
||||
chatnet = "overthewire";
|
||||
@@ -49,82 +16,69 @@ servers = (
|
||||
autoconnect = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.us.hackint.eu";
|
||||
address = "irc.hackint.eu";
|
||||
chatnet = "hackint";
|
||||
port = "9999";
|
||||
use_ssl = "yes";
|
||||
ssl_verify = "no";
|
||||
autoconnect = "yes";
|
||||
},
|
||||
{
|
||||
address = "irc.geekshed.net";
|
||||
chatnet = "geekshed";
|
||||
port = "6697";
|
||||
use_ssl = "yes";
|
||||
ssl_verify = "no";
|
||||
autoconnect = "no";
|
||||
},
|
||||
{
|
||||
address = "irc.rpis.ec";
|
||||
chatnet = "rpisec";
|
||||
port = "6697";
|
||||
use_ssl = "yes";
|
||||
ssl_verify = "no";
|
||||
autoconnect = "yes";
|
||||
},
|
||||
{
|
||||
address = "chat.freenode.net";
|
||||
chatnet = "freenode";
|
||||
port = "7000";
|
||||
use_ssl = "yes";
|
||||
ssl_cert = "~/.irssi/matir.pem";
|
||||
ssl_verify = "yes";
|
||||
ssl_capath = "/etc/ssl/certs";
|
||||
family = "inet";
|
||||
autoconnect = "yes";
|
||||
}
|
||||
);
|
||||
|
||||
chatnets = {
|
||||
IRCnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "5";
|
||||
max_whois = "4";
|
||||
max_query_chans = "5";
|
||||
};
|
||||
EFNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "3";
|
||||
max_whois = "1";
|
||||
};
|
||||
Undernet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
DALnet = {
|
||||
type = "IRC";
|
||||
max_kicks = "4";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
QuakeNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
OFTC = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
GameSurge = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
WebChat = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
Rizon = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
LinkNet = {
|
||||
type = "IRC";
|
||||
max_kicks = "1";
|
||||
max_msgs = "3";
|
||||
max_whois = "30";
|
||||
};
|
||||
SILC = { type = "SILC"; };
|
||||
freenode = { type = "IRC"; };
|
||||
overthewire = { type = "IRC"; nick = "Matir"; };
|
||||
secfo = { type = "IRC"; };
|
||||
hackint = { type = "IRC"; nick = "Matir"; };
|
||||
freenode = {
|
||||
type = "IRC";
|
||||
nick = "Matir";
|
||||
username = "matir";
|
||||
realname = "Matir";
|
||||
max_kicks = "1";
|
||||
max_msgs = "4";
|
||||
max_modes = "4";
|
||||
max_whois = "1";
|
||||
};
|
||||
geekshed = {
|
||||
type = "IRC";
|
||||
nick = "KF4MDV";
|
||||
username = "kf4mdv";
|
||||
realname = "David";
|
||||
};
|
||||
rpisec = { type = "IRC"; };
|
||||
};
|
||||
|
||||
channels = (
|
||||
@@ -132,7 +86,15 @@ channels = (
|
||||
{ name = "#hak5"; chatnet = "secfo"; autojoin = "yes"; },
|
||||
{ name = "#wargames"; chatnet = "overthewire"; autojoin = "yes"; },
|
||||
{ name = "#social"; chatnet = "overthewire"; autojoin = "yes"; },
|
||||
{ name = "#openvpn"; chatnet = "freenode"; autojoin = "yes"; }
|
||||
{ name = "#openvpn"; chatnet = "freenode"; autojoin = "yes"; },
|
||||
{ name = "#amateria"; chatnet = "overthewire"; autojoin = "yes"; },
|
||||
{ name = "#io"; chatnet = "overthewire"; autojoin = "yes"; },
|
||||
{ name = "#radare"; chatnet = "freenode"; autojoin = "yes"; },
|
||||
{ name = "#vulnhub"; chatnet = "freenode"; autojoin = "yes"; },
|
||||
{ name = "#redditnet"; chatnet = "geekshed"; autojoin = "yes"; },
|
||||
{ name = "#rpisec"; chatnet = "rpisec"; autojoin = "yes"; },
|
||||
{ name = "#offsec"; chatnet = "freenode"; autojoin = "yes"; },
|
||||
{ name = "#offtopicsec"; chatnet = "freenode"; autojoin = "yes"; }
|
||||
);
|
||||
|
||||
aliases = {
|
||||
@@ -225,7 +187,7 @@ statusbar = {
|
||||
# the "default statusbar" to be displayed at the bottom of the window.
|
||||
# contains all the normal items.
|
||||
window = {
|
||||
disabled = "no";
|
||||
disabled = "yes";
|
||||
|
||||
# window, root
|
||||
type = "window";
|
||||
@@ -244,7 +206,6 @@ statusbar = {
|
||||
window = { };
|
||||
window_empty = { };
|
||||
lag = { priority = "-1"; };
|
||||
act = { priority = "10"; };
|
||||
more = { priority = "-1"; alignment = "right"; };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
@@ -289,11 +250,37 @@ statusbar = {
|
||||
visible = "always";
|
||||
items = {
|
||||
topicbarstart = { priority = "100"; };
|
||||
time = { priority = "100"; };
|
||||
topic = { };
|
||||
topic_empty = { };
|
||||
window_empty = { alignment = "right"; };
|
||||
user = { priority = "100"; alignment = "right"; };
|
||||
topicbarend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
placement = { items = { }; disabled = "yes"; };
|
||||
remove = { disabled = "yes"; };
|
||||
awl_0 = {
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
awl_0 = { };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
awl_1 = {
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
awl_1 = { };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
awl_2 = {
|
||||
items = {
|
||||
barstart = { priority = "100"; };
|
||||
awl_2 = { };
|
||||
barend = { priority = "100"; alignment = "right"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
@@ -307,11 +294,122 @@ settings = {
|
||||
"fe-common/core" = {
|
||||
autolog = "yes";
|
||||
autolog_path = "~/irclogs/%Y/%m/$tag/$0.log";
|
||||
autoclose_query = "1800";
|
||||
autocreate_own_query = "no";
|
||||
show_nickmode_empty = "no";
|
||||
term_charset = "utf-8";
|
||||
};
|
||||
"perl/core/scripts" = {
|
||||
awl_shared_sbar = "OFF";
|
||||
awl_viewer = "no";
|
||||
awl_block = "-15";
|
||||
awl_maxlines = "3";
|
||||
awl_height_adjust = "2";
|
||||
awl_hide_empty = "0";
|
||||
};
|
||||
};
|
||||
logs = {
|
||||
"~/irc.log.Window7" = {
|
||||
level = "ALL";
|
||||
items = ( { type = "window"; name = "7"; } );
|
||||
windows = {
|
||||
1 = { immortal = "yes"; name = "(status)"; level = "ALL"; };
|
||||
2 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#kali-linux";
|
||||
tag = "freenode";
|
||||
}
|
||||
);
|
||||
};
|
||||
3 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#radare";
|
||||
tag = "freenode";
|
||||
}
|
||||
);
|
||||
};
|
||||
4 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#vulnhub";
|
||||
tag = "freenode";
|
||||
}
|
||||
);
|
||||
};
|
||||
5 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#openvpn";
|
||||
tag = "freenode";
|
||||
}
|
||||
);
|
||||
};
|
||||
6 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#wargames";
|
||||
tag = "overthewire";
|
||||
}
|
||||
);
|
||||
};
|
||||
7 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#social";
|
||||
tag = "overthewire";
|
||||
}
|
||||
);
|
||||
};
|
||||
8 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#amateria";
|
||||
tag = "overthewire";
|
||||
}
|
||||
);
|
||||
};
|
||||
9 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#io";
|
||||
tag = "overthewire";
|
||||
}
|
||||
);
|
||||
};
|
||||
10 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#RedditNet";
|
||||
tag = "geekshed";
|
||||
}
|
||||
);
|
||||
};
|
||||
11 = {
|
||||
items = (
|
||||
{
|
||||
type = "CHANNEL";
|
||||
chat_type = "IRC";
|
||||
name = "#hak5";
|
||||
tag = "secfo";
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
mainwindows = { 1 = { first_line = "1"; lines = "78"; }; };
|
||||
logs = { };
|
||||
@@ -292,3 +292,6 @@ abstracts = {
|
||||
# hilight with specified color, $0 = color, $1 = text
|
||||
sb_act_hilight_color = "$0$1-%n";
|
||||
};
|
||||
formats = {
|
||||
"Irssi::Script::adv_windowlist" = { awl_display_header = ""; };
|
||||
};
|
||||
26
dotfiles/irssi/instantssl.crt
Normal file
26
dotfiles/irssi/instantssl.crt
Normal file
@@ -0,0 +1,26 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
|
||||
lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
|
||||
Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
|
||||
dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
|
||||
SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
|
||||
A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
|
||||
MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
|
||||
d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
|
||||
cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
|
||||
0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
|
||||
M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
|
||||
MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
|
||||
oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
|
||||
DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
|
||||
oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
|
||||
VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
|
||||
dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
|
||||
bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
|
||||
BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
|
||||
//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
|
||||
CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
|
||||
CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
|
||||
3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
|
||||
KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
|
||||
-----END CERTIFICATE-----
|
||||
2088
dotfiles/irssi/scripts/adv_windowlist.pl
Normal file
2088
dotfiles/irssi/scripts/adv_windowlist.pl
Normal file
File diff suppressed because it is too large
Load Diff
1
dotfiles/irssi/scripts/autorun/adv_windowlist.pl
Symbolic link
1
dotfiles/irssi/scripts/autorun/adv_windowlist.pl
Symbolic link
@@ -0,0 +1 @@
|
||||
../adv_windowlist.pl
|
||||
3646
dotfiles/john/john.conf
Normal file
3646
dotfiles/john/john.conf
Normal file
File diff suppressed because it is too large
Load Diff
2982
dotfiles/lldb/lisa.py
Normal file
2982
dotfiles/lldb/lisa.py
Normal file
File diff suppressed because it is too large
Load Diff
6
dotfiles/lldbinit
Normal file
6
dotfiles/lldbinit
Normal file
@@ -0,0 +1,6 @@
|
||||
settings set prompt "(lisa)"
|
||||
settings set target.x86-disassembly-flavor intel
|
||||
command script import ~/lisa.py
|
||||
command script import lldb
|
||||
command script add -f lisa.alias lisa
|
||||
lisa
|
||||
7
dotfiles/profile
Executable file
7
dotfiles/profile
Executable file
@@ -0,0 +1,7 @@
|
||||
# Always load ENV
|
||||
test -f "$HOME/.env" && . "$HOME/.env"
|
||||
|
||||
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"
|
||||
|
||||
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
5
dotfiles/radare2/xdot
Executable file
5
dotfiles/radare2/xdot
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
DOT=`mktemp`
|
||||
cat > $DOT
|
||||
xdot $DOT
|
||||
10
dotfiles/radare2rc
Normal file
10
dotfiles/radare2rc
Normal file
@@ -0,0 +1,10 @@
|
||||
e scr.color = true
|
||||
e scr.utf8 = true
|
||||
e dbg.bep = main
|
||||
e asm.syntax = intel
|
||||
e asm.linescall = true
|
||||
e asm.linesout = true
|
||||
e asm.lineswidth = 12
|
||||
|
||||
# Callgraph: .(cg)
|
||||
(cg,aa,ag | $HOME/.radare2/xdot || xdot -,)
|
||||
12
dotfiles/rsync_ignore
Normal file
12
dotfiles/rsync_ignore
Normal file
@@ -0,0 +1,12 @@
|
||||
tmp
|
||||
Downloads
|
||||
.cache
|
||||
.local/share/Trash
|
||||
.wine
|
||||
.thumbnails
|
||||
.histfile
|
||||
.zcompdump
|
||||
.zcompdump*
|
||||
.sqlite_history
|
||||
VirtualBox VMs
|
||||
Audits
|
||||
@@ -11,3 +11,9 @@ Host *
|
||||
ForwardX11 no
|
||||
ForwardX11Trusted no
|
||||
ServerAliveInterval 120
|
||||
CheckHostIP no
|
||||
|
||||
Host warzone
|
||||
Hostname warzone.shadowcats.club
|
||||
Port 22
|
||||
User matir
|
||||
0
dotfiles/ssh/master/.keep
Normal file
0
dotfiles/ssh/master/.keep
Normal file
59
dotfiles/tmux.conf
Normal file
59
dotfiles/tmux.conf
Normal file
@@ -0,0 +1,59 @@
|
||||
# Update environment on reconnect
|
||||
set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||
|
||||
# Custom binds
|
||||
bind K confirm kill-server
|
||||
bind X confirm kill-window
|
||||
bind ^[ copy-mode
|
||||
bind R source-file ~/.tmux.conf \; display-message " Config reloaded.."
|
||||
|
||||
# Scrollback
|
||||
set -g history-limit 10000
|
||||
|
||||
# Start indexing from 1
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# Terminal emulator window title
|
||||
set -g set-titles on
|
||||
set -g set-titles-string '#h:#S:#I.#P #W'
|
||||
|
||||
# Set a 256color $TERM variable so programs inside tmux know they can use 256
|
||||
# colors
|
||||
set -g default-terminal screen-256color
|
||||
|
||||
# Activity
|
||||
setw -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
# Autorename new tabs automatically
|
||||
setw -g automatic-rename on
|
||||
|
||||
# Color scheme
|
||||
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 status-interval 60
|
||||
set -g status-left-length 30
|
||||
set -g status-left '/#S/ '
|
||||
set -g status-right '#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=colour166]%H:%M#[default]'
|
||||
|
||||
# Advanced mouse mode from http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/
|
||||
# Toggle mouse on
|
||||
bind m \
|
||||
set -g mode-mouse on \;\
|
||||
set -g mouse-resize-pane on \;\
|
||||
set -g mouse-select-pane on \;\
|
||||
set -g mouse-select-window on \;\
|
||||
display 'Mouse: ON'
|
||||
|
||||
# Toggle mouse off
|
||||
bind M \
|
||||
set -g mode-mouse off \;\
|
||||
set -g mouse-resize-pane off \;\
|
||||
set -g mouse-select-pane off \;\
|
||||
set -g mouse-select-window off \;\
|
||||
display 'Mouse: OFF'
|
||||
31
dotfiles/tmux/tmux-solarized-256.conf
Normal file
31
dotfiles/tmux/tmux-solarized-256.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
#### 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
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-fg colour235 #base02
|
||||
set-option -g pane-active-border-fg colour240 #base01
|
||||
|
||||
# message text
|
||||
set-option -g message-bg colour235 #base02
|
||||
set-option -g message-fg colour166 #orange
|
||||
|
||||
# pane number display
|
||||
set-option -g display-panes-active-colour colour33 #blue
|
||||
set-option -g display-panes-colour colour166 #orange
|
||||
|
||||
# clock
|
||||
set-window-option -g clock-mode-colour colour64 #green
|
||||
7
dotfiles/vim/ftplugin/python.vim
Normal file
7
dotfiles/vim/ftplugin/python.vim
Normal file
@@ -0,0 +1,7 @@
|
||||
nnoremap <F8> :%!autopep8 -<CR>
|
||||
setlocal tabstop=4
|
||||
setlocal softtabstop=4
|
||||
setlocal shiftwidth=4
|
||||
setlocal textwidth=80
|
||||
setlocal smarttab
|
||||
setlocal expandtab
|
||||
164
dotfiles/vimrc
Normal file
164
dotfiles/vimrc
Normal file
@@ -0,0 +1,164 @@
|
||||
" 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//
|
||||
set undodir=~/.cache/vim/undo//
|
||||
if !isdirectory($HOME . '/.cache/vim/swap')
|
||||
silent !mkdir -p ~/.cache/vim/{backup,swap,undo}
|
||||
endif
|
||||
|
||||
" Make sure files get completely written, but don't write backups
|
||||
set nobackup
|
||||
set writebackup
|
||||
|
||||
" Whitespace/indent options
|
||||
set autoindent
|
||||
set copyindent
|
||||
set tabstop=2
|
||||
set softtabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
set shiftround
|
||||
set backspace=indent,eol,start
|
||||
" Shift-tab to go backwards in insert mode
|
||||
imap <S-Tab> <Esc><<A
|
||||
|
||||
" Line numbering, ruler
|
||||
set number
|
||||
set ruler
|
||||
set cursorline
|
||||
|
||||
" File options
|
||||
set encoding=utf-8
|
||||
" Syntax highlighting, look and feel
|
||||
syntax on
|
||||
set background=dark
|
||||
if has('gui_running')
|
||||
set guifont=Inconsolata\ Medium\ 12
|
||||
else
|
||||
let g:solarized_termcolors=256
|
||||
let g:solarized_termtrans=1
|
||||
endif
|
||||
silent! colorscheme solarized
|
||||
" Enable filetype support
|
||||
filetype plugin indent on
|
||||
" Default ASM syntax for ft support
|
||||
let asmsyntax="nasm"
|
||||
" Allow file modelines
|
||||
set modeline
|
||||
" Automatically re-read changed files
|
||||
set autoread
|
||||
" fsync() after writing files
|
||||
set fsync
|
||||
" Text width 80
|
||||
set textwidth=80
|
||||
" Write via sudo
|
||||
cnoremap sudow w !sudo tee % >/dev/null
|
||||
|
||||
" Search options
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
" Optional highlighting
|
||||
nmap <leader>hs :set hlsearch! hlsearch?<CR>
|
||||
|
||||
" Toggle paste mode
|
||||
nmap <silent> <F4> :set invpaste<CR>:set paste?<CR>
|
||||
imap <silent> <F4> <ESC>:set invpaste<CR>:set paste?<CR>
|
||||
|
||||
" Mediocre Hex editing in vim
|
||||
" Source: http://vim.wikia.com/wiki/Improved_hex_editing
|
||||
" TODO: move to an include
|
||||
nnoremap <C-H> :Hexmode<CR>
|
||||
command -bar Hexmode call ToggleHex()
|
||||
function ToggleHex()
|
||||
" hex mode should be considered a read-only operation
|
||||
" save values for modified and read-only for restoration later,
|
||||
" and clear the read-only flag for now
|
||||
let l:modified=&mod
|
||||
let l:oldreadonly=&readonly
|
||||
let &readonly=0
|
||||
let l:oldmodifiable=&modifiable
|
||||
let &modifiable=1
|
||||
if !exists("b:editHex") || !b:editHex
|
||||
" save old options
|
||||
let b:oldft=&ft
|
||||
let b:oldbin=&bin
|
||||
" set new options
|
||||
setlocal binary " make sure it overrides any textwidth, etc.
|
||||
let &ft="xxd"
|
||||
" set status
|
||||
let b:editHex=1
|
||||
" switch to hex editor
|
||||
%!xxd
|
||||
else
|
||||
" restore old options
|
||||
let &ft=b:oldft
|
||||
if !b:oldbin
|
||||
setlocal nobinary
|
||||
endif
|
||||
" set status
|
||||
let b:editHex=0
|
||||
" return to normal editing
|
||||
%!xxd -r
|
||||
endif
|
||||
" restore values for modified and read only state
|
||||
let &mod=l:modified
|
||||
let &readonly=l:oldreadonly
|
||||
let &modifiable=l:oldmodifiable
|
||||
endfunction
|
||||
|
||||
" Options for syntastic
|
||||
let g:syntastic_enable_signs = 1
|
||||
let g:syntastic_auto_loc_list = 2
|
||||
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
|
||||
|
||||
" Have F5 run the tests and display errors
|
||||
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
|
||||
|
||||
" Include a .vimrc.local if it exists
|
||||
if filereadable(glob("~/.vimrc.local"))
|
||||
source ~/.vimrc.local
|
||||
endif
|
||||
|
||||
" Options for vimoutliner
|
||||
autocmd Filetype votl setlocal sts=4
|
||||
|
||||
" Highlight whitespace at end of file
|
||||
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
|
||||
|
||||
" Color column at end of lines
|
||||
set colorcolumn=+1
|
||||
highlight ColorColumn ctermbg=black guibg=lightgrey
|
||||
|
||||
" Remove smart quotes
|
||||
command Unsmartquote %s/“\|”/"/g
|
||||
|
||||
" Markdown options
|
||||
autocmd Filetype markdown set expandtab shiftwidth=4
|
||||
41
dotfiles/weechat/alias.conf
Normal file
41
dotfiles/weechat/alias.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# weechat -- alias.conf
|
||||
#
|
||||
|
||||
[cmd]
|
||||
AAWAY = "allserv /away"
|
||||
AME = "allchan /me"
|
||||
AMSG = "allchan /msg *"
|
||||
ANICK = "allserv /nick"
|
||||
BEEP = "print -beep"
|
||||
BYE = "quit"
|
||||
C = "buffer clear"
|
||||
CHAT = "dcc chat"
|
||||
CL = "buffer clear"
|
||||
CLOSE = "buffer close"
|
||||
EXIT = "quit"
|
||||
IG = "ignore"
|
||||
J = "join"
|
||||
K = "kick"
|
||||
KB = "kickban"
|
||||
LEAVE = "part"
|
||||
M = "msg"
|
||||
MSGBUF = "command -buffer $1 * /input send $2-"
|
||||
MUB = "unban *"
|
||||
N = "names"
|
||||
Q = "query"
|
||||
REDRAW = "window refresh"
|
||||
SAY = "msg *"
|
||||
SIGNOFF = "quit"
|
||||
T = "topic"
|
||||
UB = "unban"
|
||||
UMODE = "mode $nick"
|
||||
V = "command core version"
|
||||
W = "who"
|
||||
WC = "window merge"
|
||||
WI = "whois"
|
||||
WII = "whois $1 $1"
|
||||
WW = "whowas"
|
||||
|
||||
[completion]
|
||||
MSGBUF = "%(buffers_plugins_names)"
|
||||
20
dotfiles/weechat/aspell.conf
Normal file
20
dotfiles/weechat/aspell.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# weechat -- aspell.conf
|
||||
#
|
||||
|
||||
[color]
|
||||
misspelled = lightred
|
||||
suggestions = default
|
||||
|
||||
[check]
|
||||
commands = "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"
|
||||
default_dict = ""
|
||||
during_search = off
|
||||
enabled = off
|
||||
real_time = off
|
||||
suggestions = -1
|
||||
word_min_length = 2
|
||||
|
||||
[dict]
|
||||
|
||||
[option]
|
||||
11
dotfiles/weechat/charset.conf
Normal file
11
dotfiles/weechat/charset.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# weechat -- charset.conf
|
||||
#
|
||||
|
||||
[default]
|
||||
decode = "iso-8859-1"
|
||||
encode = ""
|
||||
|
||||
[decode]
|
||||
|
||||
[encode]
|
||||
11
dotfiles/weechat/exec.conf
Normal file
11
dotfiles/weechat/exec.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# weechat -- exec.conf
|
||||
#
|
||||
|
||||
[command]
|
||||
default_options = ""
|
||||
purge_delay = 0
|
||||
|
||||
[color]
|
||||
flag_finished = lightred
|
||||
flag_running = lightgreen
|
||||
377
dotfiles/weechat/irc.conf
Normal file
377
dotfiles/weechat/irc.conf
Normal file
@@ -0,0 +1,377 @@
|
||||
#
|
||||
# weechat -- irc.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
buffer_open_before_autojoin = on
|
||||
buffer_open_before_join = off
|
||||
buffer_switch_autojoin = on
|
||||
buffer_switch_join = on
|
||||
color_nicks_in_names = off
|
||||
color_nicks_in_nicklist = off
|
||||
color_nicks_in_server_messages = on
|
||||
color_pv_nick_like_channel = on
|
||||
ctcp_time_format = "%a, %d %b %Y %T %z"
|
||||
display_away = local
|
||||
display_ctcp_blocked = on
|
||||
display_ctcp_reply = on
|
||||
display_ctcp_unknown = on
|
||||
display_host_join = on
|
||||
display_host_join_local = on
|
||||
display_host_quit = on
|
||||
display_join_message = "329,332,333,366"
|
||||
display_old_topic = on
|
||||
display_pv_away_once = on
|
||||
display_pv_back = on
|
||||
highlight_channel = "$nick"
|
||||
highlight_pv = "$nick"
|
||||
highlight_server = "$nick"
|
||||
highlight_tags_restrict = "irc_privmsg,irc_notice"
|
||||
item_channel_modes_hide_args = "k"
|
||||
item_display_server = buffer_plugin
|
||||
item_nick_modes = on
|
||||
item_nick_prefix = on
|
||||
join_auto_add_chantype = off
|
||||
msgbuffer_fallback = current
|
||||
new_channel_position = none
|
||||
new_pv_position = none
|
||||
nick_completion_smart = speakers
|
||||
nick_mode = prefix
|
||||
nick_mode_empty = off
|
||||
nicks_hide_password = "nickserv"
|
||||
notice_as_pv = auto
|
||||
notice_welcome_redirect = on
|
||||
notice_welcome_tags = ""
|
||||
notify_tags_ison = "notify_message"
|
||||
notify_tags_whois = "notify_message"
|
||||
part_closes_buffer = on
|
||||
pv_buffer = independent
|
||||
pv_tags = "notify_private"
|
||||
raw_messages = 256
|
||||
server_buffer = merge_with_core
|
||||
smart_filter = on
|
||||
smart_filter_delay = 5
|
||||
smart_filter_join = on
|
||||
smart_filter_join_unmask = 30
|
||||
smart_filter_mode = "+"
|
||||
smart_filter_nick = on
|
||||
smart_filter_quit = on
|
||||
temporary_servers = off
|
||||
topic_strip_colors = off
|
||||
|
||||
[color]
|
||||
input_nick = lightcyan
|
||||
item_channel_modes = default
|
||||
item_lag_counting = default
|
||||
item_lag_finished = yellow
|
||||
item_nick_modes = default
|
||||
message_join = green
|
||||
message_quit = red
|
||||
mirc_remap = "1,-1:darkgray"
|
||||
nick_prefixes = "q:lightred;a:lightcyan;o:lightgreen;h:lightmagenta;v:yellow;*:lightblue"
|
||||
notice = green
|
||||
reason_quit = default
|
||||
topic_current = default
|
||||
topic_new = white
|
||||
topic_old = default
|
||||
|
||||
[network]
|
||||
autoreconnect_delay_growing = 2
|
||||
autoreconnect_delay_max = 600
|
||||
ban_mask_default = "*!$ident@$host"
|
||||
channel_encode = off
|
||||
colors_receive = on
|
||||
colors_send = on
|
||||
lag_check = 60
|
||||
lag_max = 1800
|
||||
lag_min_show = 500
|
||||
lag_reconnect = 0
|
||||
lag_refresh_interval = 1
|
||||
notify_check_ison = 1
|
||||
notify_check_whois = 5
|
||||
sasl_fail_unavailable = on
|
||||
send_unknown_commands = off
|
||||
whois_double_nick = off
|
||||
|
||||
[msgbuffer]
|
||||
|
||||
[ctcp]
|
||||
|
||||
[ignore]
|
||||
|
||||
[server_default]
|
||||
addresses = ""
|
||||
anti_flood_prio_high = 2
|
||||
anti_flood_prio_low = 2
|
||||
autoconnect = off
|
||||
autojoin = ""
|
||||
autoreconnect = on
|
||||
autoreconnect_delay = 10
|
||||
autorejoin = off
|
||||
autorejoin_delay = 30
|
||||
away_check = 0
|
||||
away_check_max_nicks = 25
|
||||
capabilities = ""
|
||||
command = ""
|
||||
command_delay = 0
|
||||
connection_timeout = 60
|
||||
ipv6 = on
|
||||
local_hostname = ""
|
||||
msg_kick = ""
|
||||
msg_part = "WeeChat ${info:version}"
|
||||
msg_quit = "WeeChat ${info:version}"
|
||||
nicks = "Matir,Matir~,Matir[]"
|
||||
nicks_alternate = on
|
||||
notify = ""
|
||||
password = ""
|
||||
proxy = ""
|
||||
realname = ""
|
||||
sasl_fail = continue
|
||||
sasl_key = ""
|
||||
sasl_mechanism = plain
|
||||
sasl_password = ""
|
||||
sasl_timeout = 15
|
||||
sasl_username = ""
|
||||
ssl = off
|
||||
ssl_cert = ""
|
||||
ssl_dhkey_size = 2048
|
||||
ssl_fingerprint = ""
|
||||
ssl_priorities = "NORMAL"
|
||||
ssl_verify = on
|
||||
username = "matir"
|
||||
|
||||
[server]
|
||||
freenode.addresses = "chat.freenode.net/7000"
|
||||
freenode.proxy
|
||||
freenode.ipv6
|
||||
freenode.ssl = on
|
||||
freenode.ssl_cert = "%h/certs/freenode-matir.pem"
|
||||
freenode.ssl_priorities
|
||||
freenode.ssl_dhkey_size
|
||||
freenode.ssl_fingerprint
|
||||
freenode.ssl_verify = on
|
||||
freenode.password
|
||||
freenode.capabilities
|
||||
freenode.sasl_mechanism
|
||||
freenode.sasl_username
|
||||
freenode.sasl_password
|
||||
freenode.sasl_key
|
||||
freenode.sasl_timeout
|
||||
freenode.sasl_fail
|
||||
freenode.autoconnect = on
|
||||
freenode.autoreconnect
|
||||
freenode.autoreconnect_delay
|
||||
freenode.nicks = "Matir,Matir~"
|
||||
freenode.nicks_alternate
|
||||
freenode.username
|
||||
freenode.realname
|
||||
freenode.local_hostname
|
||||
freenode.command
|
||||
freenode.command_delay
|
||||
freenode.autojoin = "#kali-linux,#openvpn,#radare,#vulnhub,#offsec,#offtopicsec,##ctfcompetition,#dc404,#droidsec"
|
||||
freenode.autorejoin
|
||||
freenode.autorejoin_delay
|
||||
freenode.connection_timeout
|
||||
freenode.anti_flood_prio_high
|
||||
freenode.anti_flood_prio_low
|
||||
freenode.away_check
|
||||
freenode.away_check_max_nicks
|
||||
freenode.msg_kick
|
||||
freenode.msg_part
|
||||
freenode.msg_quit
|
||||
freenode.notify
|
||||
hak5.addresses = "irc.hak5.org/6697"
|
||||
hak5.proxy
|
||||
hak5.ipv6
|
||||
hak5.ssl = on
|
||||
hak5.ssl_cert = "%h/certs/freenode-matir.pem"
|
||||
hak5.ssl_priorities
|
||||
hak5.ssl_dhkey_size
|
||||
hak5.ssl_fingerprint
|
||||
hak5.ssl_verify = off
|
||||
hak5.password
|
||||
hak5.capabilities
|
||||
hak5.sasl_mechanism
|
||||
hak5.sasl_username
|
||||
hak5.sasl_password
|
||||
hak5.sasl_key
|
||||
hak5.sasl_timeout
|
||||
hak5.sasl_fail
|
||||
hak5.autoconnect = on
|
||||
hak5.autoreconnect
|
||||
hak5.autoreconnect_delay
|
||||
hak5.nicks
|
||||
hak5.nicks_alternate
|
||||
hak5.username
|
||||
hak5.realname
|
||||
hak5.local_hostname
|
||||
hak5.command
|
||||
hak5.command_delay
|
||||
hak5.autojoin = "#hak5,#pineapple,#ducky,#SDR,#lanturtle,#bashbunny"
|
||||
hak5.autorejoin
|
||||
hak5.autorejoin_delay
|
||||
hak5.connection_timeout
|
||||
hak5.anti_flood_prio_high
|
||||
hak5.anti_flood_prio_low
|
||||
hak5.away_check
|
||||
hak5.away_check_max_nicks
|
||||
hak5.msg_kick
|
||||
hak5.msg_part
|
||||
hak5.msg_quit
|
||||
hak5.notify
|
||||
rpisec.addresses = "irc.rpis.ec/6697"
|
||||
rpisec.proxy
|
||||
rpisec.ipv6
|
||||
rpisec.ssl = on
|
||||
rpisec.ssl_cert
|
||||
rpisec.ssl_priorities
|
||||
rpisec.ssl_dhkey_size
|
||||
rpisec.ssl_fingerprint
|
||||
rpisec.ssl_verify = on
|
||||
rpisec.password
|
||||
rpisec.capabilities
|
||||
rpisec.sasl_mechanism
|
||||
rpisec.sasl_username
|
||||
rpisec.sasl_password
|
||||
rpisec.sasl_key
|
||||
rpisec.sasl_timeout
|
||||
rpisec.sasl_fail
|
||||
rpisec.autoconnect = on
|
||||
rpisec.autoreconnect
|
||||
rpisec.autoreconnect_delay
|
||||
rpisec.nicks
|
||||
rpisec.nicks_alternate
|
||||
rpisec.username
|
||||
rpisec.realname
|
||||
rpisec.local_hostname
|
||||
rpisec.command
|
||||
rpisec.command_delay
|
||||
rpisec.autojoin = "#rpisec"
|
||||
rpisec.autorejoin
|
||||
rpisec.autorejoin_delay
|
||||
rpisec.connection_timeout
|
||||
rpisec.anti_flood_prio_high
|
||||
rpisec.anti_flood_prio_low
|
||||
rpisec.away_check
|
||||
rpisec.away_check_max_nicks
|
||||
rpisec.msg_kick
|
||||
rpisec.msg_part
|
||||
rpisec.msg_quit
|
||||
rpisec.notify
|
||||
overthewire.addresses = "ircs.overthewire.org/6697"
|
||||
overthewire.proxy
|
||||
overthewire.ipv6
|
||||
overthewire.ssl = on
|
||||
overthewire.ssl_cert = "%h/certs/freenode-matir.pem"
|
||||
overthewire.ssl_priorities
|
||||
overthewire.ssl_dhkey_size
|
||||
overthewire.ssl_fingerprint
|
||||
overthewire.ssl_verify = on
|
||||
overthewire.password
|
||||
overthewire.capabilities
|
||||
overthewire.sasl_mechanism
|
||||
overthewire.sasl_username
|
||||
overthewire.sasl_password
|
||||
overthewire.sasl_key
|
||||
overthewire.sasl_timeout
|
||||
overthewire.sasl_fail
|
||||
overthewire.autoconnect = on
|
||||
overthewire.autoreconnect
|
||||
overthewire.autoreconnect_delay
|
||||
overthewire.nicks
|
||||
overthewire.nicks_alternate
|
||||
overthewire.username
|
||||
overthewire.realname
|
||||
overthewire.local_hostname
|
||||
overthewire.command
|
||||
overthewire.command_delay
|
||||
overthewire.autojoin = "#wargames,#social,#amateria,#io"
|
||||
overthewire.autorejoin
|
||||
overthewire.autorejoin_delay
|
||||
overthewire.connection_timeout
|
||||
overthewire.anti_flood_prio_high
|
||||
overthewire.anti_flood_prio_low
|
||||
overthewire.away_check
|
||||
overthewire.away_check_max_nicks
|
||||
overthewire.msg_kick
|
||||
overthewire.msg_part
|
||||
overthewire.msg_quit
|
||||
overthewire.notify
|
||||
hackint.addresses = "irc.hackint.org/9999"
|
||||
hackint.proxy
|
||||
hackint.ipv6
|
||||
hackint.ssl = on
|
||||
hackint.ssl_cert
|
||||
hackint.ssl_priorities
|
||||
hackint.ssl_dhkey_size
|
||||
hackint.ssl_fingerprint
|
||||
hackint.ssl_verify = on
|
||||
hackint.password
|
||||
hackint.capabilities
|
||||
hackint.sasl_mechanism
|
||||
hackint.sasl_username
|
||||
hackint.sasl_password
|
||||
hackint.sasl_key
|
||||
hackint.sasl_timeout
|
||||
hackint.sasl_fail
|
||||
hackint.autoconnect = on
|
||||
hackint.autoreconnect
|
||||
hackint.autoreconnect_delay
|
||||
hackint.nicks
|
||||
hackint.nicks_alternate
|
||||
hackint.username
|
||||
hackint.realname
|
||||
hackint.local_hostname
|
||||
hackint.command
|
||||
hackint.command_delay
|
||||
hackint.autojoin
|
||||
hackint.autorejoin
|
||||
hackint.autorejoin_delay
|
||||
hackint.connection_timeout
|
||||
hackint.anti_flood_prio_high
|
||||
hackint.anti_flood_prio_low
|
||||
hackint.away_check
|
||||
hackint.away_check_max_nicks
|
||||
hackint.msg_kick
|
||||
hackint.msg_part
|
||||
hackint.msg_quit
|
||||
hackint.notify
|
||||
afternet.addresses = "irc.afternet.org/6697"
|
||||
afternet.proxy
|
||||
afternet.ipv6
|
||||
afternet.ssl = on
|
||||
afternet.ssl_cert
|
||||
afternet.ssl_priorities
|
||||
afternet.ssl_dhkey_size
|
||||
afternet.ssl_fingerprint
|
||||
afternet.ssl_verify = on
|
||||
afternet.password
|
||||
afternet.capabilities
|
||||
afternet.sasl_mechanism
|
||||
afternet.sasl_username
|
||||
afternet.sasl_password
|
||||
afternet.sasl_key
|
||||
afternet.sasl_timeout
|
||||
afternet.sasl_fail
|
||||
afternet.autoconnect = on
|
||||
afternet.autoreconnect
|
||||
afternet.autoreconnect_delay
|
||||
afternet.nicks
|
||||
afternet.nicks_alternate
|
||||
afternet.username
|
||||
afternet.realname
|
||||
afternet.local_hostname
|
||||
afternet.command
|
||||
afternet.command_delay
|
||||
afternet.autojoin = "#eevblog"
|
||||
afternet.autorejoin
|
||||
afternet.autorejoin_delay
|
||||
afternet.connection_timeout
|
||||
afternet.anti_flood_prio_high
|
||||
afternet.anti_flood_prio_low
|
||||
afternet.away_check
|
||||
afternet.away_check_max_nicks
|
||||
afternet.msg_kick
|
||||
afternet.msg_part
|
||||
afternet.msg_quit
|
||||
afternet.notify
|
||||
14
dotfiles/weechat/letsencrypt.sh
Executable file
14
dotfiles/weechat/letsencrypt.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Update the weechat SSL key. Should be called from cron via sudo.
|
||||
|
||||
eval WEEDIR="$(printf "~%q/.weechat/" "${SUDO_USER}")"
|
||||
LIVEKEY="${WEEDIR}/ssl/relay.pem"
|
||||
|
||||
certbot renew -q
|
||||
cat /etc/letsencrypt/live/$(hostname -f)/{privkey,fullchain}.pem > \
|
||||
${LIVEKEY}
|
||||
chown ${SUDO_USER}:$(id -gn ${SUDO_USER}) ${LIVEKEY}
|
||||
for fifo in ${WEEDIR}/weechat_fifo* ; do
|
||||
echo '*/relay sslcertkey' > ${fifo}
|
||||
done
|
||||
26
dotfiles/weechat/logger.conf
Normal file
26
dotfiles/weechat/logger.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# weechat -- logger.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
backlog = 20
|
||||
|
||||
[color]
|
||||
backlog_end = default
|
||||
backlog_line = default
|
||||
|
||||
[file]
|
||||
auto_log = on
|
||||
flush_delay = 120
|
||||
info_lines = off
|
||||
mask = "$plugin.$name.weechatlog"
|
||||
name_lower_case = on
|
||||
nick_prefix = ""
|
||||
nick_suffix = ""
|
||||
path = "%h/logs/"
|
||||
replacement_char = "_"
|
||||
time_format = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
[level]
|
||||
|
||||
[mask]
|
||||
15
dotfiles/weechat/plugins.conf
Normal file
15
dotfiles/weechat/plugins.conf
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# weechat -- plugins.conf
|
||||
#
|
||||
|
||||
[var]
|
||||
fifo.fifo = "on"
|
||||
guile.check_license = "off"
|
||||
javascript.check_license = "off"
|
||||
lua.check_license = "off"
|
||||
perl.check_license = "off"
|
||||
python.check_license = "off"
|
||||
ruby.check_license = "off"
|
||||
tcl.check_license = "off"
|
||||
|
||||
[desc]
|
||||
42
dotfiles/weechat/relay.conf
Normal file
42
dotfiles/weechat/relay.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# weechat -- relay.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
auto_open_buffer = on
|
||||
raw_messages = 256
|
||||
|
||||
[color]
|
||||
client = cyan
|
||||
status_active = lightblue
|
||||
status_auth_failed = lightred
|
||||
status_connecting = yellow
|
||||
status_disconnected = lightred
|
||||
status_waiting_auth = brown
|
||||
text = default
|
||||
text_bg = default
|
||||
text_selected = white
|
||||
|
||||
[network]
|
||||
allow_empty_password = off
|
||||
allowed_ips = ""
|
||||
bind_address = ""
|
||||
clients_purge_delay = 0
|
||||
compression_level = 6
|
||||
ipv6 = on
|
||||
max_clients = 5
|
||||
password = "${sec.data.relay_password}"
|
||||
ssl_cert_key = "%h/ssl/relay.pem"
|
||||
ssl_priorities = "NORMAL:-VERS-SSL3.0"
|
||||
websocket_allowed_origins = ""
|
||||
|
||||
[irc]
|
||||
backlog_max_minutes = 1440
|
||||
backlog_max_number = 256
|
||||
backlog_since_last_disconnect = on
|
||||
backlog_since_last_message = off
|
||||
backlog_tags = "irc_privmsg"
|
||||
backlog_time_format = "[%H:%M] "
|
||||
|
||||
[port]
|
||||
ssl.weechat = 9001
|
||||
50
dotfiles/weechat/script.conf
Normal file
50
dotfiles/weechat/script.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# weechat -- script.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
columns = "%s %n %V %v %u | %d | %t"
|
||||
diff_color = on
|
||||
diff_command = "auto"
|
||||
display_source = on
|
||||
quiet_actions = on
|
||||
sort = "p,n"
|
||||
translate_description = on
|
||||
use_keys = on
|
||||
|
||||
[color]
|
||||
status_autoloaded = cyan
|
||||
status_held = white
|
||||
status_installed = lightcyan
|
||||
status_obsolete = lightmagenta
|
||||
status_popular = yellow
|
||||
status_running = lightgreen
|
||||
status_unknown = lightred
|
||||
text = default
|
||||
text_bg = default
|
||||
text_bg_selected = red
|
||||
text_date = default
|
||||
text_date_selected = white
|
||||
text_delimiters = default
|
||||
text_description = default
|
||||
text_description_selected = white
|
||||
text_extension = default
|
||||
text_extension_selected = white
|
||||
text_name = cyan
|
||||
text_name_selected = lightcyan
|
||||
text_selected = white
|
||||
text_tags = brown
|
||||
text_tags_selected = yellow
|
||||
text_version = magenta
|
||||
text_version_loaded = default
|
||||
text_version_loaded_selected = white
|
||||
text_version_selected = lightmagenta
|
||||
|
||||
[scripts]
|
||||
autoload = on
|
||||
cache_expire = 1440
|
||||
download_timeout = 30
|
||||
hold = ""
|
||||
path = "%h/script"
|
||||
url = "http://weechat.org/files/plugins.xml.gz"
|
||||
url_force_https = on
|
||||
13
dotfiles/weechat/sec.conf
Normal file
13
dotfiles/weechat/sec.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# weechat -- sec.conf
|
||||
#
|
||||
|
||||
[crypt]
|
||||
cipher = aes256
|
||||
hash_algo = sha256
|
||||
passphrase_file = "~/.weechat-passphrase"
|
||||
salt = on
|
||||
|
||||
[data]
|
||||
__passphrase__ = on
|
||||
relay_password = "D1FD30C08951B1A5BCBBB7EE6AAFB6AF9B86017B353182A1CA8826D5A98EB88E7E723591C544FC41A6913EA67E8764E50BDD8A5AD3D0A0"
|
||||
52
dotfiles/weechat/trigger.conf
Normal file
52
dotfiles/weechat/trigger.conf
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# weechat -- trigger.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
enabled = on
|
||||
monitor_strip_colors = off
|
||||
|
||||
[color]
|
||||
flag_command = lightgreen
|
||||
flag_conditions = yellow
|
||||
flag_post_action = lightblue
|
||||
flag_regex = lightcyan
|
||||
flag_return_code = lightmagenta
|
||||
regex = white
|
||||
replace = cyan
|
||||
trigger = green
|
||||
trigger_disabled = red
|
||||
|
||||
[trigger]
|
||||
beep.arguments = ""
|
||||
beep.command = "/print -beep"
|
||||
beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
beep.enabled = on
|
||||
beep.hook = print
|
||||
beep.post_action = none
|
||||
beep.regex = ""
|
||||
beep.return_code = ok
|
||||
cmd_pass.arguments = "5000|input_text_display;5000|history_add;5000|irc_command_auth"
|
||||
cmd_pass.command = ""
|
||||
cmd_pass.conditions = ""
|
||||
cmd_pass.enabled = on
|
||||
cmd_pass.hook = modifier
|
||||
cmd_pass.post_action = none
|
||||
cmd_pass.regex = "==^((/(msg|quote) +nickserv +(id|identify|register|ghost +[^ ]+|release +[^ ]+|regain +[^ ]+) +)|/oper +[^ ]+ +|/quote +pass +|/set +[^ ]*password[^ ]* +|/secure +(passphrase|decrypt|set +[^ ]+) +)(.*)==$1$.*+"
|
||||
cmd_pass.return_code = ok
|
||||
msg_auth.arguments = "5000|irc_message_auth"
|
||||
msg_auth.command = ""
|
||||
msg_auth.conditions = ""
|
||||
msg_auth.enabled = on
|
||||
msg_auth.hook = modifier
|
||||
msg_auth.post_action = none
|
||||
msg_auth.regex = "==^(.*(id|identify|register|ghost +[^ ]+|release +[^ ]+) +)(.*)==$1$.*+"
|
||||
msg_auth.return_code = ok
|
||||
server_pass.arguments = "5000|input_text_display;5000|history_add"
|
||||
server_pass.command = ""
|
||||
server_pass.conditions = ""
|
||||
server_pass.enabled = on
|
||||
server_pass.hook = modifier
|
||||
server_pass.post_action = none
|
||||
server_pass.regex = "==^(/(server|connect) .*-(sasl_)?password=)([^ ]+)(.*)==$1$.*4$5"
|
||||
server_pass.return_code = ok
|
||||
595
dotfiles/weechat/weechat.conf
Normal file
595
dotfiles/weechat/weechat.conf
Normal file
@@ -0,0 +1,595 @@
|
||||
#
|
||||
# weechat -- weechat.conf
|
||||
#
|
||||
|
||||
[debug]
|
||||
|
||||
[startup]
|
||||
command_after_plugins = ""
|
||||
command_before_plugins = ""
|
||||
display_logo = on
|
||||
display_version = on
|
||||
sys_rlimit = ""
|
||||
|
||||
[look]
|
||||
align_end_of_lines = message
|
||||
bar_more_down = "++"
|
||||
bar_more_left = "<<"
|
||||
bar_more_right = ">>"
|
||||
bar_more_up = "--"
|
||||
bare_display_exit_on_input = on
|
||||
bare_display_time_format = "%H:%M"
|
||||
buffer_auto_renumber = on
|
||||
buffer_notify_default = all
|
||||
buffer_position = end
|
||||
buffer_search_case_sensitive = off
|
||||
buffer_search_force_default = off
|
||||
buffer_search_regex = off
|
||||
buffer_search_where = prefix_message
|
||||
buffer_time_format = "%H:%M:%S"
|
||||
color_basic_force_bold = off
|
||||
color_inactive_buffer = on
|
||||
color_inactive_message = on
|
||||
color_inactive_prefix = on
|
||||
color_inactive_prefix_buffer = on
|
||||
color_inactive_time = off
|
||||
color_inactive_window = on
|
||||
color_nick_offline = off
|
||||
color_pairs_auto_reset = 5
|
||||
color_real_white = off
|
||||
command_chars = ""
|
||||
command_incomplete = off
|
||||
confirm_quit = off
|
||||
confirm_upgrade = off
|
||||
day_change = on
|
||||
day_change_message_1date = "-- %a, %d %b %Y --"
|
||||
day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --"
|
||||
eat_newline_glitch = off
|
||||
emphasized_attributes = ""
|
||||
highlight = ""
|
||||
highlight_regex = ""
|
||||
highlight_tags = ""
|
||||
hotlist_add_conditions = "${buffer.num_displayed} == 0 && ${priority} >= 1"
|
||||
hotlist_buffer_separator = ", "
|
||||
hotlist_count_max = 0
|
||||
hotlist_count_min_msg = 2
|
||||
hotlist_names_count = 10000
|
||||
hotlist_names_length = 0
|
||||
hotlist_names_level = 14
|
||||
hotlist_names_merged_buffers = off
|
||||
hotlist_prefix = "Act: "
|
||||
hotlist_remove = merged
|
||||
hotlist_short_names = on
|
||||
hotlist_sort = group_time_asc
|
||||
hotlist_suffix = ""
|
||||
hotlist_unique_numbers = on
|
||||
input_cursor_scroll = 20
|
||||
input_share = none
|
||||
input_share_overwrite = off
|
||||
input_undo_max = 32
|
||||
item_away_message = on
|
||||
item_buffer_filter = "*"
|
||||
item_buffer_zoom = "!"
|
||||
item_mouse_status = "M"
|
||||
item_time_format = "%H:%M"
|
||||
jump_current_to_previous_buffer = on
|
||||
jump_previous_buffer_when_closing = on
|
||||
jump_smart_back_to_buffer = on
|
||||
key_bind_safe = on
|
||||
key_grab_delay = 800
|
||||
mouse = off
|
||||
mouse_timer_delay = 100
|
||||
nick_color_force = ""
|
||||
nick_color_hash = djb2
|
||||
nick_color_stop_chars = "_|["
|
||||
nick_prefix = ""
|
||||
nick_suffix = ""
|
||||
paste_auto_add_newline = on
|
||||
paste_bracketed = on
|
||||
paste_bracketed_timer_delay = 10
|
||||
paste_max_lines = 1
|
||||
prefix_action = " *"
|
||||
prefix_align = right
|
||||
prefix_align_max = 15
|
||||
prefix_align_min = 0
|
||||
prefix_align_more = "+"
|
||||
prefix_align_more_after = on
|
||||
prefix_buffer_align = right
|
||||
prefix_buffer_align_max = 0
|
||||
prefix_buffer_align_more = "+"
|
||||
prefix_buffer_align_more_after = on
|
||||
prefix_error = "=!="
|
||||
prefix_join = "-->"
|
||||
prefix_network = "--"
|
||||
prefix_quit = "<--"
|
||||
prefix_same_nick = ""
|
||||
prefix_suffix = "|"
|
||||
quote_nick_prefix = "<"
|
||||
quote_nick_suffix = ">"
|
||||
quote_time_format = "%H:%M:%S"
|
||||
read_marker = line
|
||||
read_marker_always_show = off
|
||||
read_marker_string = "- "
|
||||
save_config_on_exit = on
|
||||
save_layout_on_exit = none
|
||||
scroll_amount = 3
|
||||
scroll_bottom_after_switch = off
|
||||
scroll_page_percent = 100
|
||||
search_text_not_found_alert = on
|
||||
separator_horizontal = "-"
|
||||
separator_vertical = ""
|
||||
tab_width = 1
|
||||
time_format = "%a, %d %b %Y %T"
|
||||
window_auto_zoom = off
|
||||
window_separator_horizontal = on
|
||||
window_separator_vertical = on
|
||||
window_title = "irc"
|
||||
word_chars_highlight = "!\u00A0,-,_,|,alnum"
|
||||
word_chars_input = "!\u00A0,-,_,|,alnum"
|
||||
|
||||
[palette]
|
||||
|
||||
[color]
|
||||
bar_more = lightmagenta
|
||||
chat = default
|
||||
chat_bg = default
|
||||
chat_buffer = white
|
||||
chat_channel = white
|
||||
chat_day_change = cyan
|
||||
chat_delimiters = green
|
||||
chat_highlight = yellow
|
||||
chat_highlight_bg = magenta
|
||||
chat_host = cyan
|
||||
chat_inactive_buffer = default
|
||||
chat_inactive_window = default
|
||||
chat_nick = lightcyan
|
||||
chat_nick_colors = "cyan,magenta,green,brown,lightblue,default,lightcyan,lightmagenta,lightgreen,blue"
|
||||
chat_nick_offline = default
|
||||
chat_nick_offline_highlight = default
|
||||
chat_nick_offline_highlight_bg = blue
|
||||
chat_nick_other = cyan
|
||||
chat_nick_prefix = green
|
||||
chat_nick_self = white
|
||||
chat_nick_suffix = green
|
||||
chat_prefix_action = white
|
||||
chat_prefix_buffer = brown
|
||||
chat_prefix_buffer_inactive_buffer = default
|
||||
chat_prefix_error = yellow
|
||||
chat_prefix_join = lightgreen
|
||||
chat_prefix_more = lightmagenta
|
||||
chat_prefix_network = magenta
|
||||
chat_prefix_quit = lightred
|
||||
chat_prefix_suffix = green
|
||||
chat_read_marker = magenta
|
||||
chat_read_marker_bg = default
|
||||
chat_server = brown
|
||||
chat_tags = red
|
||||
chat_text_found = yellow
|
||||
chat_text_found_bg = lightmagenta
|
||||
chat_time = default
|
||||
chat_time_delimiters = brown
|
||||
chat_value = cyan
|
||||
chat_value_null = blue
|
||||
emphasized = yellow
|
||||
emphasized_bg = magenta
|
||||
input_actions = lightgreen
|
||||
input_text_not_found = red
|
||||
item_away = yellow
|
||||
nicklist_away = cyan
|
||||
nicklist_group = green
|
||||
separator = blue
|
||||
status_count_highlight = magenta
|
||||
status_count_msg = brown
|
||||
status_count_other = default
|
||||
status_count_private = green
|
||||
status_data_highlight = lightmagenta
|
||||
status_data_msg = yellow
|
||||
status_data_other = default
|
||||
status_data_private = lightgreen
|
||||
status_filter = green
|
||||
status_more = yellow
|
||||
status_mouse = green
|
||||
status_name = white
|
||||
status_name_ssl = lightgreen
|
||||
status_nicklist_count = default
|
||||
status_number = yellow
|
||||
status_time = default
|
||||
|
||||
[completion]
|
||||
base_word_until_cursor = on
|
||||
command_inline = on
|
||||
default_template = "%(nicks)|%(irc_channels)"
|
||||
nick_add_space = on
|
||||
nick_completer = ":"
|
||||
nick_first_only = off
|
||||
nick_ignore_chars = "[]`_-^"
|
||||
partial_completion_alert = on
|
||||
partial_completion_command = off
|
||||
partial_completion_command_arg = off
|
||||
partial_completion_count = on
|
||||
partial_completion_other = off
|
||||
|
||||
[history]
|
||||
display_default = 5
|
||||
max_buffer_lines_minutes = 0
|
||||
max_buffer_lines_number = 4096
|
||||
max_commands = 100
|
||||
max_visited_buffers = 50
|
||||
|
||||
[proxy]
|
||||
|
||||
[network]
|
||||
connection_timeout = 60
|
||||
gnutls_ca_file = "~/.weechat/certs/ca-certificates.crt"
|
||||
gnutls_handshake_timeout = 30
|
||||
proxy_curl = ""
|
||||
|
||||
[plugin]
|
||||
autoload = "*"
|
||||
debug = off
|
||||
extension = ".so,.dll"
|
||||
path = "%h/plugins"
|
||||
save_config_on_unload = on
|
||||
|
||||
[bar]
|
||||
input.color_bg = default
|
||||
input.color_delim = cyan
|
||||
input.color_fg = default
|
||||
input.conditions = ""
|
||||
input.filling_left_right = vertical
|
||||
input.filling_top_bottom = horizontal
|
||||
input.hidden = off
|
||||
input.items = "[input_prompt]+(away),[input_search],[input_paste],input_text"
|
||||
input.position = bottom
|
||||
input.priority = 1000
|
||||
input.separator = off
|
||||
input.size = 1
|
||||
input.size_max = 0
|
||||
input.type = window
|
||||
nicklist.color_bg = default
|
||||
nicklist.color_delim = cyan
|
||||
nicklist.color_fg = default
|
||||
nicklist.conditions = "${nicklist}"
|
||||
nicklist.filling_left_right = vertical
|
||||
nicklist.filling_top_bottom = columns_vertical
|
||||
nicklist.hidden = on
|
||||
nicklist.items = "buffer_nicklist"
|
||||
nicklist.position = right
|
||||
nicklist.priority = 200
|
||||
nicklist.separator = on
|
||||
nicklist.size = 0
|
||||
nicklist.size_max = 0
|
||||
nicklist.type = window
|
||||
status.color_bg = 0
|
||||
status.color_delim = cyan
|
||||
status.color_fg = default
|
||||
status.conditions = ""
|
||||
status.filling_left_right = vertical
|
||||
status.filling_top_bottom = horizontal
|
||||
status.hidden = off
|
||||
status.items = "[time],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,[lag],[hotlist],completion,scroll"
|
||||
status.position = bottom
|
||||
status.priority = 500
|
||||
status.separator = off
|
||||
status.size = 2
|
||||
status.size_max = 0
|
||||
status.type = window
|
||||
title.color_bg = 0
|
||||
title.color_delim = cyan
|
||||
title.color_fg = default
|
||||
title.conditions = ""
|
||||
title.filling_left_right = vertical
|
||||
title.filling_top_bottom = horizontal
|
||||
title.hidden = off
|
||||
title.items = "buffer_title"
|
||||
title.position = top
|
||||
title.priority = 500
|
||||
title.separator = off
|
||||
title.size = 1
|
||||
title.size_max = 0
|
||||
title.type = window
|
||||
|
||||
[layout]
|
||||
|
||||
[notify]
|
||||
|
||||
[filter]
|
||||
irc_smart = on;*;irc_smart_filter;*
|
||||
|
||||
[key]
|
||||
ctrl-? = "/input delete_previous_char"
|
||||
ctrl-A = "/input move_beginning_of_line"
|
||||
ctrl-B = "/input move_previous_char"
|
||||
ctrl-C_ = "/input insert \x1F"
|
||||
ctrl-Cb = "/input insert \x02"
|
||||
ctrl-Cc = "/input insert \x03"
|
||||
ctrl-Ci = "/input insert \x1D"
|
||||
ctrl-Co = "/input insert \x0F"
|
||||
ctrl-Cv = "/input insert \x16"
|
||||
ctrl-D = "/input delete_next_char"
|
||||
ctrl-E = "/input move_end_of_line"
|
||||
ctrl-F = "/input move_next_char"
|
||||
ctrl-H = "/input delete_previous_char"
|
||||
ctrl-I = "/input complete_next"
|
||||
ctrl-J = "/input return"
|
||||
ctrl-K = "/input delete_end_of_line"
|
||||
ctrl-L = "/window refresh"
|
||||
ctrl-M = "/input return"
|
||||
ctrl-N = "/buffer +1"
|
||||
ctrl-P = "/buffer -1"
|
||||
ctrl-R = "/input search_text"
|
||||
ctrl-Sctrl-U = "/input set_unread"
|
||||
ctrl-T = "/input transpose_chars"
|
||||
ctrl-U = "/input delete_beginning_of_line"
|
||||
ctrl-W = "/input delete_previous_word"
|
||||
ctrl-X = "/input switch_active_buffer"
|
||||
ctrl-Y = "/input clipboard_paste"
|
||||
meta-meta2-1~ = "/window scroll_top"
|
||||
meta-meta2-23~ = "/bar scroll nicklist * b"
|
||||
meta-meta2-24~ = "/bar scroll nicklist * e"
|
||||
meta-meta2-4~ = "/window scroll_bottom"
|
||||
meta-meta2-5~ = "/window scroll_up"
|
||||
meta-meta2-6~ = "/window scroll_down"
|
||||
meta-meta2-7~ = "/window scroll_top"
|
||||
meta-meta2-8~ = "/window scroll_bottom"
|
||||
meta-meta2-A = "/buffer -1"
|
||||
meta-meta2-B = "/buffer +1"
|
||||
meta-meta2-C = "/buffer +1"
|
||||
meta-meta2-D = "/buffer -1"
|
||||
meta-- = "/filter toggle @"
|
||||
meta-/ = "/input jump_last_buffer_displayed"
|
||||
meta-0 = "/buffer *10"
|
||||
meta-1 = "/buffer *1"
|
||||
meta-2 = "/buffer *2"
|
||||
meta-3 = "/buffer *3"
|
||||
meta-4 = "/buffer *4"
|
||||
meta-5 = "/buffer *5"
|
||||
meta-6 = "/buffer *6"
|
||||
meta-7 = "/buffer *7"
|
||||
meta-8 = "/buffer *8"
|
||||
meta-9 = "/buffer *9"
|
||||
meta-< = "/input jump_previously_visited_buffer"
|
||||
meta-= = "/filter toggle"
|
||||
meta-> = "/input jump_next_visited_buffer"
|
||||
meta-OA = "/input history_global_previous"
|
||||
meta-OB = "/input history_global_next"
|
||||
meta-OC = "/input move_next_word"
|
||||
meta-OD = "/input move_previous_word"
|
||||
meta-OF = "/input move_end_of_line"
|
||||
meta-OH = "/input move_beginning_of_line"
|
||||
meta-Oa = "/input history_global_previous"
|
||||
meta-Ob = "/input history_global_next"
|
||||
meta-Oc = "/input move_next_word"
|
||||
meta-Od = "/input move_previous_word"
|
||||
meta2-15~ = "/buffer -1"
|
||||
meta2-17~ = "/buffer +1"
|
||||
meta2-18~ = "/window -1"
|
||||
meta2-19~ = "/window +1"
|
||||
meta2-1;3A = "/buffer -1"
|
||||
meta2-1;3B = "/buffer +1"
|
||||
meta2-1;3C = "/buffer +1"
|
||||
meta2-1;3D = "/buffer -1"
|
||||
meta2-1;3F = "/window scroll_bottom"
|
||||
meta2-1;3H = "/window scroll_top"
|
||||
meta2-1;5A = "/input history_global_previous"
|
||||
meta2-1;5B = "/input history_global_next"
|
||||
meta2-1;5C = "/input move_next_word"
|
||||
meta2-1;5D = "/input move_previous_word"
|
||||
meta2-1~ = "/input move_beginning_of_line"
|
||||
meta2-200~ = "/input paste_start"
|
||||
meta2-201~ = "/input paste_stop"
|
||||
meta2-20~ = "/bar scroll title * -30%"
|
||||
meta2-21~ = "/bar scroll title * +30%"
|
||||
meta2-23;3~ = "/bar scroll nicklist * b"
|
||||
meta2-23~ = "/bar scroll nicklist * -100%"
|
||||
meta2-24;3~ = "/bar scroll nicklist * e"
|
||||
meta2-24~ = "/bar scroll nicklist * +100%"
|
||||
meta2-3~ = "/input delete_next_char"
|
||||
meta2-4~ = "/input move_end_of_line"
|
||||
meta2-5;3~ = "/window scroll_up"
|
||||
meta2-5~ = "/window page_up"
|
||||
meta2-6;3~ = "/window scroll_down"
|
||||
meta2-6~ = "/window page_down"
|
||||
meta2-7~ = "/input move_beginning_of_line"
|
||||
meta2-8~ = "/input move_end_of_line"
|
||||
meta2-A = "/input history_previous"
|
||||
meta2-B = "/input history_next"
|
||||
meta2-C = "/input move_next_char"
|
||||
meta2-D = "/input move_previous_char"
|
||||
meta2-F = "/input move_end_of_line"
|
||||
meta2-G = "/window page_down"
|
||||
meta2-H = "/input move_beginning_of_line"
|
||||
meta2-I = "/window page_up"
|
||||
meta2-Z = "/input complete_previous"
|
||||
meta2-[E = "/buffer -1"
|
||||
meta-_ = "/input redo"
|
||||
meta-a = "/input jump_smart"
|
||||
meta-b = "/input move_previous_word"
|
||||
meta-d = "/input delete_next_word"
|
||||
meta-f = "/input move_next_word"
|
||||
meta-h = "/input hotlist_clear"
|
||||
meta-jmeta-f = "/buffer -"
|
||||
meta-jmeta-l = "/buffer +"
|
||||
meta-jmeta-r = "/server raw"
|
||||
meta-jmeta-s = "/server jump"
|
||||
meta-j01 = "/buffer 1"
|
||||
meta-j02 = "/buffer 2"
|
||||
meta-j03 = "/buffer 3"
|
||||
meta-j04 = "/buffer 4"
|
||||
meta-j05 = "/buffer 5"
|
||||
meta-j06 = "/buffer 6"
|
||||
meta-j07 = "/buffer 7"
|
||||
meta-j08 = "/buffer 8"
|
||||
meta-j09 = "/buffer 9"
|
||||
meta-j10 = "/buffer 10"
|
||||
meta-j11 = "/buffer 11"
|
||||
meta-j12 = "/buffer 12"
|
||||
meta-j13 = "/buffer 13"
|
||||
meta-j14 = "/buffer 14"
|
||||
meta-j15 = "/buffer 15"
|
||||
meta-j16 = "/buffer 16"
|
||||
meta-j17 = "/buffer 17"
|
||||
meta-j18 = "/buffer 18"
|
||||
meta-j19 = "/buffer 19"
|
||||
meta-j20 = "/buffer 20"
|
||||
meta-j21 = "/buffer 21"
|
||||
meta-j22 = "/buffer 22"
|
||||
meta-j23 = "/buffer 23"
|
||||
meta-j24 = "/buffer 24"
|
||||
meta-j25 = "/buffer 25"
|
||||
meta-j26 = "/buffer 26"
|
||||
meta-j27 = "/buffer 27"
|
||||
meta-j28 = "/buffer 28"
|
||||
meta-j29 = "/buffer 29"
|
||||
meta-j30 = "/buffer 30"
|
||||
meta-j31 = "/buffer 31"
|
||||
meta-j32 = "/buffer 32"
|
||||
meta-j33 = "/buffer 33"
|
||||
meta-j34 = "/buffer 34"
|
||||
meta-j35 = "/buffer 35"
|
||||
meta-j36 = "/buffer 36"
|
||||
meta-j37 = "/buffer 37"
|
||||
meta-j38 = "/buffer 38"
|
||||
meta-j39 = "/buffer 39"
|
||||
meta-j40 = "/buffer 40"
|
||||
meta-j41 = "/buffer 41"
|
||||
meta-j42 = "/buffer 42"
|
||||
meta-j43 = "/buffer 43"
|
||||
meta-j44 = "/buffer 44"
|
||||
meta-j45 = "/buffer 45"
|
||||
meta-j46 = "/buffer 46"
|
||||
meta-j47 = "/buffer 47"
|
||||
meta-j48 = "/buffer 48"
|
||||
meta-j49 = "/buffer 49"
|
||||
meta-j50 = "/buffer 50"
|
||||
meta-j51 = "/buffer 51"
|
||||
meta-j52 = "/buffer 52"
|
||||
meta-j53 = "/buffer 53"
|
||||
meta-j54 = "/buffer 54"
|
||||
meta-j55 = "/buffer 55"
|
||||
meta-j56 = "/buffer 56"
|
||||
meta-j57 = "/buffer 57"
|
||||
meta-j58 = "/buffer 58"
|
||||
meta-j59 = "/buffer 59"
|
||||
meta-j60 = "/buffer 60"
|
||||
meta-j61 = "/buffer 61"
|
||||
meta-j62 = "/buffer 62"
|
||||
meta-j63 = "/buffer 63"
|
||||
meta-j64 = "/buffer 64"
|
||||
meta-j65 = "/buffer 65"
|
||||
meta-j66 = "/buffer 66"
|
||||
meta-j67 = "/buffer 67"
|
||||
meta-j68 = "/buffer 68"
|
||||
meta-j69 = "/buffer 69"
|
||||
meta-j70 = "/buffer 70"
|
||||
meta-j71 = "/buffer 71"
|
||||
meta-j72 = "/buffer 72"
|
||||
meta-j73 = "/buffer 73"
|
||||
meta-j74 = "/buffer 74"
|
||||
meta-j75 = "/buffer 75"
|
||||
meta-j76 = "/buffer 76"
|
||||
meta-j77 = "/buffer 77"
|
||||
meta-j78 = "/buffer 78"
|
||||
meta-j79 = "/buffer 79"
|
||||
meta-j80 = "/buffer 80"
|
||||
meta-j81 = "/buffer 81"
|
||||
meta-j82 = "/buffer 82"
|
||||
meta-j83 = "/buffer 83"
|
||||
meta-j84 = "/buffer 84"
|
||||
meta-j85 = "/buffer 85"
|
||||
meta-j86 = "/buffer 86"
|
||||
meta-j87 = "/buffer 87"
|
||||
meta-j88 = "/buffer 88"
|
||||
meta-j89 = "/buffer 89"
|
||||
meta-j90 = "/buffer 90"
|
||||
meta-j91 = "/buffer 91"
|
||||
meta-j92 = "/buffer 92"
|
||||
meta-j93 = "/buffer 93"
|
||||
meta-j94 = "/buffer 94"
|
||||
meta-j95 = "/buffer 95"
|
||||
meta-j96 = "/buffer 96"
|
||||
meta-j97 = "/buffer 97"
|
||||
meta-j98 = "/buffer 98"
|
||||
meta-j99 = "/buffer 99"
|
||||
meta-k = "/input grab_key_command"
|
||||
meta-l = "/window bare"
|
||||
meta-m = "/mute mouse toggle"
|
||||
meta-n = "/window scroll_next_highlight"
|
||||
meta-p = "/window scroll_previous_highlight"
|
||||
meta-r = "/input delete_line"
|
||||
meta-s = "/mute aspell toggle"
|
||||
meta-u = "/window scroll_unread"
|
||||
meta-wmeta-meta2-A = "/window up"
|
||||
meta-wmeta-meta2-B = "/window down"
|
||||
meta-wmeta-meta2-C = "/window right"
|
||||
meta-wmeta-meta2-D = "/window left"
|
||||
meta-wmeta2-1;3A = "/window up"
|
||||
meta-wmeta2-1;3B = "/window down"
|
||||
meta-wmeta2-1;3C = "/window right"
|
||||
meta-wmeta2-1;3D = "/window left"
|
||||
meta-wmeta-b = "/window balance"
|
||||
meta-wmeta-s = "/window swap"
|
||||
meta-x = "/input zoom_merged_buffer"
|
||||
meta-z = "/window zoom"
|
||||
ctrl-_ = "/input undo"
|
||||
|
||||
[key_search]
|
||||
ctrl-I = "/input search_switch_where"
|
||||
ctrl-J = "/input search_stop"
|
||||
ctrl-M = "/input search_stop"
|
||||
ctrl-R = "/input search_switch_regex"
|
||||
meta2-A = "/input search_previous"
|
||||
meta2-B = "/input search_next"
|
||||
meta-c = "/input search_switch_case"
|
||||
|
||||
[key_cursor]
|
||||
ctrl-J = "/cursor stop"
|
||||
ctrl-M = "/cursor stop"
|
||||
meta-meta2-A = "/cursor move area_up"
|
||||
meta-meta2-B = "/cursor move area_down"
|
||||
meta-meta2-C = "/cursor move area_right"
|
||||
meta-meta2-D = "/cursor move area_left"
|
||||
meta2-1;3A = "/cursor move area_up"
|
||||
meta2-1;3B = "/cursor move area_down"
|
||||
meta2-1;3C = "/cursor move area_right"
|
||||
meta2-1;3D = "/cursor move area_left"
|
||||
meta2-A = "/cursor move up"
|
||||
meta2-B = "/cursor move down"
|
||||
meta2-C = "/cursor move right"
|
||||
meta2-D = "/cursor move left"
|
||||
@item(buffer_nicklist):K = "/window ${_window_number};/kickban ${nick}"
|
||||
@item(buffer_nicklist):b = "/window ${_window_number};/ban ${nick}"
|
||||
@item(buffer_nicklist):k = "/window ${_window_number};/kick ${nick}"
|
||||
@item(buffer_nicklist):q = "/window ${_window_number};/query ${nick};/cursor stop"
|
||||
@item(buffer_nicklist):w = "/window ${_window_number};/whois ${nick}"
|
||||
@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop"
|
||||
@chat:m = "hsignal:chat_quote_message;/cursor stop"
|
||||
@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop"
|
||||
|
||||
[key_mouse]
|
||||
@bar(input):button2 = "/input grab_mouse_area"
|
||||
@bar(nicklist):button1-gesture-down = "/bar scroll nicklist ${_window_number} +100%"
|
||||
@bar(nicklist):button1-gesture-down-long = "/bar scroll nicklist ${_window_number} e"
|
||||
@bar(nicklist):button1-gesture-up = "/bar scroll nicklist ${_window_number} -100%"
|
||||
@bar(nicklist):button1-gesture-up-long = "/bar scroll nicklist ${_window_number} b"
|
||||
@chat(script.scripts):button1 = "/window ${_window_number};/script go ${_chat_line_y}"
|
||||
@chat(script.scripts):button2 = "/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}"
|
||||
@chat(script.scripts):wheeldown = "/script down 5"
|
||||
@chat(script.scripts):wheelup = "/script up 5"
|
||||
@item(buffer_nicklist):button1 = "/window ${_window_number};/query ${nick}"
|
||||
@item(buffer_nicklist):button1-gesture-left = "/window ${_window_number};/kick ${nick}"
|
||||
@item(buffer_nicklist):button1-gesture-left-long = "/window ${_window_number};/kickban ${nick}"
|
||||
@item(buffer_nicklist):button2 = "/window ${_window_number};/whois ${nick}"
|
||||
@item(buffer_nicklist):button2-gesture-left = "/window ${_window_number};/ban ${nick}"
|
||||
@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%"
|
||||
@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%"
|
||||
@chat:button1 = "/window ${_window_number}"
|
||||
@chat:button1-gesture-left = "/window ${_window_number};/buffer -1"
|
||||
@chat:button1-gesture-left-long = "/window ${_window_number};/buffer 1"
|
||||
@chat:button1-gesture-right = "/window ${_window_number};/buffer +1"
|
||||
@chat:button1-gesture-right-long = "/window ${_window_number};/input jump_last_buffer"
|
||||
@chat:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%"
|
||||
@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%"
|
||||
@chat:wheeldown = "/window scroll_down -window ${_window_number}"
|
||||
@chat:wheelup = "/window scroll_up -window ${_window_number}"
|
||||
@*:button3 = "/cursor go ${_x},${_y}"
|
||||
39
dotfiles/weechat/xfer.conf
Normal file
39
dotfiles/weechat/xfer.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# weechat -- xfer.conf
|
||||
#
|
||||
|
||||
[look]
|
||||
auto_open_buffer = on
|
||||
progress_bar_size = 20
|
||||
pv_tags = "notify_private"
|
||||
|
||||
[color]
|
||||
status_aborted = lightred
|
||||
status_active = lightblue
|
||||
status_connecting = yellow
|
||||
status_done = lightgreen
|
||||
status_failed = lightred
|
||||
status_waiting = lightcyan
|
||||
text = default
|
||||
text_bg = default
|
||||
text_selected = white
|
||||
|
||||
[network]
|
||||
blocksize = 65536
|
||||
fast_send = on
|
||||
own_ip = ""
|
||||
port_range = ""
|
||||
speed_limit = 0
|
||||
timeout = 300
|
||||
|
||||
[file]
|
||||
auto_accept_chats = off
|
||||
auto_accept_files = off
|
||||
auto_accept_nicks = ""
|
||||
auto_check_crc32 = off
|
||||
auto_rename = on
|
||||
auto_resume = on
|
||||
convert_spaces = on
|
||||
download_path = "%h/xfer"
|
||||
upload_path = "~"
|
||||
use_nick_in_filename = on
|
||||
18
dotfiles/wgetrc
Normal file
18
dotfiles/wgetrc
Normal file
@@ -0,0 +1,18 @@
|
||||
# Use server timestamps and name
|
||||
timestamping = on
|
||||
trust_server_names = on
|
||||
content_disposition = on
|
||||
|
||||
# Recursive download options
|
||||
no_parent = on
|
||||
follow_ftp = on
|
||||
adjust_extension = on
|
||||
robots = off
|
||||
|
||||
# Show responses
|
||||
server_response = on
|
||||
|
||||
# Retry handling
|
||||
tries = 3
|
||||
timeout = 60
|
||||
retry_connrefused = on
|
||||
4
dotfiles/xsessionrc
Normal file
4
dotfiles/xsessionrc
Normal file
@@ -0,0 +1,4 @@
|
||||
setxkbmap -option ctrl:nocaps
|
||||
test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd &
|
||||
test -f "$HOME/.env" && "$HOME/.env"
|
||||
test -f "$HOME/.profile" && . "$HOME/.profile"
|
||||
45
dotfiles/xsettingsd
Normal file
45
dotfiles/xsettingsd
Normal file
@@ -0,0 +1,45 @@
|
||||
Gdk/UnscaledDPI 98304
|
||||
Gdk/WindowScalingFactor 1
|
||||
Gtk/AutoMnemonics 1
|
||||
Gtk/ButtonImages 0
|
||||
Gtk/CanChangeAccels 0
|
||||
Gtk/ColorPalette "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
|
||||
Gtk/ColorScheme ""
|
||||
Gtk/CursorBlinkTimeout 10
|
||||
Gtk/CursorThemeName "Adwaita"
|
||||
Gtk/CursorThemeSize 24
|
||||
Gtk/DecorationLayout "menu:minimize,maximize,close"
|
||||
Gtk/EnableAnimations 1
|
||||
Gtk/FontName "Sans 9"
|
||||
Gtk/IMModule ""
|
||||
Gtk/IMPreeditStyle "callback"
|
||||
Gtk/IMStatusStyle "callback"
|
||||
Gtk/KeyThemeName "Default"
|
||||
Gtk/MenuBarAccel "F10"
|
||||
Gtk/MenuImages 0
|
||||
Gtk/Modules ""
|
||||
Gtk/RecentFilesEnabled 0
|
||||
Gtk/RecentFilesMaxAge -1
|
||||
Gtk/ShellShowsAppMenu 0
|
||||
Gtk/ShellShowsMenubar 0
|
||||
Gtk/ShowInputMethodMenu 1
|
||||
Gtk/ShowUnicodeMenu 1
|
||||
Gtk/TimeoutInitial 200
|
||||
Gtk/TimeoutRepeat 20
|
||||
Gtk/ToolbarIconSize "large"
|
||||
Gtk/ToolbarStyle "both-horiz"
|
||||
Net/CursorBlink 1
|
||||
Net/CursorBlinkTime 1200
|
||||
Net/DndDragThreshold 8
|
||||
Net/DoubleClickTime 400
|
||||
Net/EnableEventSounds 0
|
||||
Net/EnableInputFeedbackSounds 0
|
||||
Net/FallbackIconTheme "gnome"
|
||||
Net/IconThemeName "Humanity"
|
||||
Net/SoundThemeName "freedesktop"
|
||||
Net/ThemeName "Ambiance"
|
||||
Xft/Antialias 1
|
||||
Xft/DPI 98304
|
||||
Xft/Hinting 1
|
||||
Xft/HintStyle "hintslight"
|
||||
Xft/RGBA "rgb"
|
||||
0
dotfiles/zprezto_custom/.keep
Normal file
0
dotfiles/zprezto_custom/.keep
Normal file
52
dotfiles/zprezto_custom/jekyll/functions/_jekyll
Normal file
52
dotfiles/zprezto_custom/jekyll/functions/_jekyll
Normal file
@@ -0,0 +1,52 @@
|
||||
#compdef jekyll
|
||||
|
||||
_jekyll() {
|
||||
local curcontext="${curcontext}" state line file
|
||||
typeset -A opt_args
|
||||
|
||||
local -a _subcommands
|
||||
_subcommands=('docs:list documentation'
|
||||
'import:import posts'
|
||||
'serve:run server'
|
||||
'help:get help'
|
||||
'doctor:deprecation warnings'
|
||||
'build:compile site'
|
||||
'new:create new site'
|
||||
'clean:clean output'
|
||||
'draft:create new draft'
|
||||
'post:create new post'
|
||||
'publish:publish draft'
|
||||
'edit:edit post')
|
||||
|
||||
_arguments -C \
|
||||
"(source)"{-s,--source}"[source]:source dir:_files -/" \
|
||||
"(dest)"{-d,--destination}"[dest]:dest dir:_files -/" \
|
||||
"--safe[safe mode]" \
|
||||
"(plugins)"{-p,--plugins}"[plugins]:plugins dir:_files -/" \
|
||||
"--layouts[layouts]:layouts dir:_files -/" \
|
||||
"--profile[generate liquid profile]" \
|
||||
"(help)"{-h,--help}"[help]" \
|
||||
"(version)"{-v,--version}"[version]" \
|
||||
"(trace)"{-t,--trace}"[trace]" \
|
||||
"1:command:->command" \
|
||||
"*: :->args"
|
||||
|
||||
case $state in
|
||||
command)
|
||||
_describe -t commands "jekyll subcommand" _subcommands
|
||||
;;
|
||||
args)
|
||||
case "$line[1]" in
|
||||
edit)
|
||||
# TODO: Fix to get --source argument
|
||||
local -a postpaths
|
||||
postpaths=("${JEKYLL_DIR}/_posts" "${JEKYLL_DIR}/_drafts")
|
||||
_files -W postpaths
|
||||
;;
|
||||
publish)
|
||||
# TODO: Fix to get --source argument
|
||||
_files -W ${JEKYLL_DIR}/_drafts
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
140
dotfiles/zprezto_custom/jekyll/init.zsh
Normal file
140
dotfiles/zprezto_custom/jekyll/init.zsh
Normal file
@@ -0,0 +1,140 @@
|
||||
function _jekyll_locate_dir {
|
||||
if [[ -n "${JEKYLL_DIR}" && -f "${JEKYLL_DIR}" ]] ; then
|
||||
echo ${JEKYLL_DIR}
|
||||
elif test -f `pwd`/_config.yml ; then
|
||||
pwd
|
||||
elif test -f ${HOME}/Projects/blog/_config.yml ; then
|
||||
echo ${HOME}/Projects/blog
|
||||
else
|
||||
echo "Jekyll instance not found!" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
function _jekyll_set_date {
|
||||
local FILENAME
|
||||
local DATE
|
||||
FILENAME=${1}
|
||||
DATE=${2}
|
||||
sed -i "2,/---/{s/^date:.*$/date: ${DATE}/;s/---/date: ${DATE}\n---/}" ${FILENAME}
|
||||
}
|
||||
|
||||
function _jekyll_find_post {
|
||||
local files
|
||||
local fname
|
||||
local jekyll_dir
|
||||
|
||||
jekyll_dir="${3}"
|
||||
|
||||
if [ -f "${1}" ] ; then
|
||||
printf -- "${1}"
|
||||
return 0
|
||||
fi
|
||||
if [ -f "${jekyll_dir}/_posts/${1}" ] ; then
|
||||
printf -- "${jekyll_dir}/_posts/${1}"
|
||||
return 0
|
||||
fi
|
||||
if [ -f "${jekyll_dir}/_drafts/${1}" ] ; then
|
||||
printf -- "${jekyll_dir}/_drafts/${1}"
|
||||
return 0
|
||||
fi
|
||||
fname=${2:-${1}}
|
||||
files=(${jekyll_dir}/_posts/*${fname}* ${jekyll_dir}/_drafts/*${fname}*)
|
||||
if [ ${#files} -eq "0" ] ; then
|
||||
echo "No post found for ${fname}" >&2
|
||||
return 1
|
||||
fi
|
||||
if [ ${#files} -gt "1" ] ; then
|
||||
echo "Ambiguous results: ${files}" >&2
|
||||
return 1
|
||||
fi
|
||||
printf -- ${files}
|
||||
return 0
|
||||
}
|
||||
|
||||
function jekyll {
|
||||
setopt localoptions nullglob
|
||||
local JTEMPLATE
|
||||
local TITLE
|
||||
local SLUG
|
||||
local FILENAME
|
||||
local DATE
|
||||
local NEWNAME
|
||||
local JEKYLL_DIR
|
||||
|
||||
JEKYLL_DIR=`_jekyll_locate_dir`
|
||||
|
||||
if [ -z "${JEKYLL_DIR}" ] ; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
JTEMPLATE="---\n"
|
||||
JTEMPLATE+="layout: post\n"
|
||||
JTEMPLATE+="title: \"%s\"\n"
|
||||
JTEMPLATE+="category: Blog\n"
|
||||
JTEMPLATE+="---\n\n"
|
||||
TITLE=${@[2,-1]}
|
||||
SLUG=$(echo -n ${TITLE}|tr A-Z a-z|tr -c -s -- a-z0-9 -)
|
||||
DATE=`date +%Y-%m-%d`
|
||||
|
||||
case "${1:-help}" in
|
||||
help|--help)
|
||||
command jekyll help
|
||||
echo "Added by zsh plugin:"
|
||||
echo " draft Create a new draft post."
|
||||
echo " post Create a new post to publish immediately."
|
||||
echo " publish Publish a draft post by name."
|
||||
echo " edit Edit a post."
|
||||
;;
|
||||
draft)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
echo "slug is required."
|
||||
return 1
|
||||
fi
|
||||
mkdir -p "${JEKYLL_DIR}/_drafts"
|
||||
FILENAME="${JEKYLL_DIR}/_drafts/${SLUG}.md"
|
||||
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
|
||||
vim "${FILENAME}" '+$' '+startinsert'
|
||||
;;
|
||||
post)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
echo "slug is required."
|
||||
return 1
|
||||
fi
|
||||
FILENAME="${JEKYLL_DIR}/_posts/${DATE}-${SLUG}.md"
|
||||
printf -- "${JTEMPLATE}" "${TITLE}" > "${FILENAME}"
|
||||
_jekyll_set_date "${FILENAME}" "${DATE}"
|
||||
vim "${FILENAME}" '+$' '+startinsert'
|
||||
;;
|
||||
publish)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
echo "slug is required."
|
||||
return 1
|
||||
fi
|
||||
FILENAME=$(_jekyll_find_post "${TITLE}" "${SLUG}" "${JEKYLL_DIR}")
|
||||
if [ $? -ne 0 ] ; then
|
||||
return 1
|
||||
fi
|
||||
if ! [[ "${FILENAME}" =~ '/_drafts/' ]] ; then
|
||||
echo "${FILENAME} is not a draft." >&2
|
||||
return 1
|
||||
fi
|
||||
NEWNAME=$(echo "${FILENAME}" | sed "s/_drafts\//_posts\/${DATE}-/")
|
||||
mv "${FILENAME}" "${NEWNAME}"
|
||||
_jekyll_set_date "${NEWNAME}" "${DATE}"
|
||||
;;
|
||||
edit)
|
||||
if [ -z "${SLUG}" ] ; then
|
||||
echo "slug is required."
|
||||
return 1
|
||||
fi
|
||||
FILENAME=$(_jekyll_find_post "${TITLE}" "${SLUG}" "${JEKYLL_DIR}")
|
||||
if [ $? -ne 0 ] ; then
|
||||
return
|
||||
fi
|
||||
vim "${FILENAME}"
|
||||
;;
|
||||
*)
|
||||
command jekyll "$@"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
36
dotfiles/zprezto_custom/matir/functions/prompt_matir_setup
Normal file
36
dotfiles/zprezto_custom/matir/functions/prompt_matir_setup
Normal file
@@ -0,0 +1,36 @@
|
||||
function prompt_matir_setup {
|
||||
autoload -Uz add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
autoload -Uz colors
|
||||
|
||||
prompt_opts=(sp subst cr percent)
|
||||
|
||||
colors
|
||||
|
||||
add-zsh-hook precmd prompt_matir_precmd
|
||||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' formats ' (%b%u)'
|
||||
zstyle ':vcs_info:*' stagedstr '*'
|
||||
zstyle ':vcs_info:*' unstagedstr '*'
|
||||
|
||||
# TODO: add virtualenv/rvm info
|
||||
PROMPT='%{$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[blue]%}${vcs_info_msg_0_}%{$fg[white]%}%#%{$reset_color%} '
|
||||
|
||||
# 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
|
||||
RPROMPT='%(?:: %{$fg[red]%}'
|
||||
RPROMPT+=${show_return}
|
||||
RPROMPT+='%{$reset_color)%}'
|
||||
}
|
||||
|
||||
function prompt_matir_precmd {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
prompt_matir_setup "$@"
|
||||
@@ -0,0 +1,58 @@
|
||||
#compdef msfconsole
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2014 Spencer McIntyre
|
||||
# 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 project 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 ZSH-USERS 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.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the Metasploit Framework's msfconsole command
|
||||
# (http://www.metasploit.com/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Spencer McIntyre
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_arguments \
|
||||
{-a,--ask}"[Ask before exiting Metasploit or accept 'exit -y']" \
|
||||
"-c[Load the specified configuration file]:configuration file:_files" \
|
||||
{-d,--defanged}"[Execute the console as defanged]" \
|
||||
{-E,--environment}"[Specify the database environment to load from the configuration]:environment:(production development)" \
|
||||
{-h,--help}"[Show help text]" \
|
||||
{-L,--real-readline}"[Use the system Readline library instead of RbReadline]" \
|
||||
{-M,--migration-path}"[Specify a directory containing additional DB migrations]:directory:_files -/" \
|
||||
{-m,--module-path}"[Specifies an additional module search path]:search path:_files -/" \
|
||||
{-n,--no-database}"[Disable database support]" \
|
||||
{-o,--output}"[Output to the specified file]:output file" \
|
||||
{-p,--plugin}"[Load a plugin on startup]:plugin file:_files" \
|
||||
{-q,--quiet}"[Do not print the banner on start up]" \
|
||||
{-r,--resource}"[Execute the specified resource file]:resource file:_files" \
|
||||
{-v,--version}"[Show version]" \
|
||||
{-x,--execute-command}"[Execute the specified string as console commands]:commands" \
|
||||
{-y,--yaml}"[Specify a YAML file containing database settings]:yaml file:_files"
|
||||
100
dotfiles/zprezto_custom/xtra_completions/functions/_msfvenom
Normal file
100
dotfiles/zprezto_custom/xtra_completions/functions/_msfvenom
Normal file
@@ -0,0 +1,100 @@
|
||||
#compdef msfvenom
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright (c) 2014 Spencer McIntyre
|
||||
# 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 project 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 ZSH-USERS 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.
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for the Metasploit Framework's msfvenom command
|
||||
# (http://www.metasploit.com/).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Spencer McIntyre
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
_msfvenom_encoders_list=(
|
||||
'cmd/generic_sh'
|
||||
'cmd/ifs'
|
||||
'cmd/powershell_base64'
|
||||
'cmd/printf_php_mq'
|
||||
'generic/eicar'
|
||||
'generic/none'
|
||||
'mipsbe/byte_xori'
|
||||
'mipsbe/longxor'
|
||||
'mipsle/byte_xori'
|
||||
'mipsle/longxor'
|
||||
'php/base64'
|
||||
'ppc/longxor'
|
||||
'ppc/longxor_tag'
|
||||
'sparc/longxor_tag'
|
||||
'x64/xor'
|
||||
'x86/add_sub'
|
||||
'x86/alpha_mixed'
|
||||
'x86/alpha_upper'
|
||||
'x86/avoid_underscore_tolower'
|
||||
'x86/avoid_utf8_tolower'
|
||||
'x86/bloxor'
|
||||
'x86/call4_dword_xor'
|
||||
'x86/context_cpuid'
|
||||
'x86/context_stat'
|
||||
'x86/context_time'
|
||||
'x86/countdown'
|
||||
'x86/fnstenv_mov'
|
||||
'x86/jmp_call_additive'
|
||||
'x86/nonalpha'
|
||||
'x86/nonupper'
|
||||
'x86/opt_sub'
|
||||
'x86/shikata_ga_nai'
|
||||
'x86/single_static_bit'
|
||||
'x86/unicode_mixed'
|
||||
'x86/unicode_upper'
|
||||
)
|
||||
|
||||
_msfvenom_encoder() {
|
||||
_describe -t encoders 'available encoders' _msfvenom_encoders_list || compadd "$@"
|
||||
}
|
||||
|
||||
_arguments \
|
||||
{-a,--arch}"[The architecture to encode as]:architecture:(cmd generic mipsbe mipsle php ppc sparc x64 x86)" \
|
||||
{-b,--bad-chars}"[The list of characters to avoid, example: '\x00\xff']:bad characters" \
|
||||
{-c,--add-code}"[Specify an additional win32 shellcode file to include]:shellcode file:_files" \
|
||||
{-e,--encoder}"[The encoder to use]:encoder:_msfvenom_encoder" \
|
||||
{-f,--format}"[Output format]:output format:(bash c csharp dw dword java js_be js_le num perl pl powershell ps1 py python raw rb ruby sh vbapplication vbscript asp aspx aspx-exe dll elf exe exe-only exe-service exe-small loop-vbs macho msi msi-nouac osx-app psh psh-net psh-reflection vba vba-exe vbs war)" \
|
||||
"--help-formats[List available formats]" \
|
||||
{-h,--help}"[Help banner]" \
|
||||
{-i,--iterations}"[The number of times to encode the payload]:iterations" \
|
||||
{-k,--keep}"[Preserve the template behavior and inject the payload as a new thread]" \
|
||||
{-l,--list}"[List a module type]:module type:(all encoders nops payloads)" \
|
||||
{-n,--nopsled}"[Prepend a nopsled of length size on to the payload]:nopsled length" \
|
||||
{-o,--options}"[List the payload's standard options]" \
|
||||
"--platform[The platform to encode for]:target platform:(android bsd bsdi java linux netware nodejs osx php python ruby solaris unix win)" \
|
||||
{-p,--payload}"[Payload to use. Specify a '-' or stdin to use custom payloads]:payload" \
|
||||
{-s,--space}"[The maximum size of the resulting payload]:length" \
|
||||
{-x,--template}"[Specify an alternate executable template]:template file:_files"
|
||||
161
dotfiles/zprezto_custom/xtra_completions/functions/_virsh
Normal file
161
dotfiles/zprezto_custom/xtra_completions/functions/_virsh
Normal file
@@ -0,0 +1,161 @@
|
||||
#compdef virsh
|
||||
|
||||
# Copyright (c) 2015, Jan-Philipp Litza <janphilipp@litza.de>
|
||||
# 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 <organization> 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 <COPYRIGHT HOLDER> 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.
|
||||
|
||||
local -a args reply
|
||||
|
||||
function _virsh_domains() {
|
||||
local -a out
|
||||
local description="${(P)#}"
|
||||
shift -p
|
||||
local domaintype="${description/running/}"
|
||||
out=( ${(f)"$(_call_program commands virsh list --name ${domaintype:+--$domaintype} 2>&1)"} )
|
||||
if (( $#out == 0 )); then
|
||||
_message "No $description domains"
|
||||
else
|
||||
_describe "$description domains" out "$@"
|
||||
fi
|
||||
return $?
|
||||
}
|
||||
|
||||
_virsh() {
|
||||
_arguments \
|
||||
{-c,--connect}':hypervisor connection URI:_files' \
|
||||
{-d,--debug}':debug level:( 0 1 2 3 4 )' \
|
||||
{-e,--escape}':escape character for console:' \
|
||||
{-h,--help}'[show help]' \
|
||||
{-k,--keepalive-interval}':keepalive interval in seconds, 0 for disable:' \
|
||||
{-K,--keepalive-count}':number of possible missed keepalive messages:' \
|
||||
{-l,--log}'[output logging to file]:logfile:_files' \
|
||||
{-q,--quiet}'[quiet mode]' \
|
||||
{-r,--readonly}'[connect readonly]' \
|
||||
{-t,--timing}'[print timing information]' \
|
||||
'-v:show version' \
|
||||
'-V:long version' \
|
||||
'--version[show version]:type:( short long )' \
|
||||
'::virsh command:_virsh_subcommand' \
|
||||
'*::virsh command arguments:_virsh_subcommand_args'
|
||||
}
|
||||
|
||||
_virsh_domain_or_file() {
|
||||
_alternative \
|
||||
"domains:domains:_virsh_domains ${1:-all}" \
|
||||
"files:files:_files"
|
||||
}
|
||||
|
||||
_virsh_fallback_command() {
|
||||
domains() {
|
||||
echo "$1 domains:_virsh_domains $1"
|
||||
}
|
||||
local files="file:_files"
|
||||
local -A cmd_args
|
||||
cmd_args=(
|
||||
attach-device "$files"
|
||||
autostart "$(domains all)"
|
||||
cd "dirs:_dirs"
|
||||
console "$(domains running)"
|
||||
cpu-baseline "$files"
|
||||
cpu-compare "$files"
|
||||
create "$files"
|
||||
start "$(domains inactive)"
|
||||
destroy "$(domains running)"
|
||||
detach-device "$(domains all)"
|
||||
define "$files"
|
||||
domid "$(domains all)"
|
||||
domuuid "$(domains all)"
|
||||
dominfo "$(domains all)"
|
||||
domjobinfo "$(domains all)"
|
||||
domjobabort "$(domains all)"
|
||||
domname "$(domains all)"
|
||||
domstate "$(domains all)"
|
||||
dommemstat "$(domains all)"
|
||||
dumpxml "$(domains all)"
|
||||
edit "$(domains all)"
|
||||
list "$(domains all)"
|
||||
net-create "$files"
|
||||
net-define "$files"
|
||||
managedsave "$(domains running)"
|
||||
managedsave-remove "$(domains all)"
|
||||
nwfilter-define "$files"
|
||||
pool-create "$files"
|
||||
pool-define "$files"
|
||||
secret-define "$files"
|
||||
reboot "$(domains running)"
|
||||
reset "$(domains running)"
|
||||
restore "$files"
|
||||
resume "$(domains running)"
|
||||
send-key "$(domains running)"
|
||||
setmem "$(domains all)"
|
||||
setmaxmem "$(domains all)"
|
||||
setvcpus "$(domains all)"
|
||||
shutdown "$(domains running)"
|
||||
suspend "$(domains running)"
|
||||
ttyconsole "$(domains running)"
|
||||
undefine "$(domains inactive)"
|
||||
vcpuinfo "$(domains running)"
|
||||
vncdisplay "$(domains running)"
|
||||
snapshot-current "$(domains all)"
|
||||
snapshot-list "$(domains all)"
|
||||
)
|
||||
|
||||
local cmd="$1"
|
||||
local -a options
|
||||
options=(
|
||||
${${(M)${(f)"$(_call_program commands virsh help $cmd 2>&1)"}:# -*}/#(#b) ([a-z-]##) ##([^[:space:]]*)/$match[1]:$match[2]}
|
||||
)
|
||||
if (( $+cmd_args[$cmd] )); then
|
||||
options+=( ":$cmd_args[$cmd]" )
|
||||
else
|
||||
options+=( ":$(domains all)" ":$files" )
|
||||
fi
|
||||
_arguments "$options[@]"
|
||||
}
|
||||
|
||||
_virsh_build_cmds() {
|
||||
(( $+_virsh_cmds )) || _virsh_cmds=(
|
||||
${${(M)${(f)"$(_call_program commands virsh help 2>&1)"}:# *}/#(#b) ([a-z-]##) ##([^[:space:]])/$match[1]:$match[2]}
|
||||
)
|
||||
}
|
||||
|
||||
_virsh_subcommand() {
|
||||
_virsh_build_cmds
|
||||
_describe 'virsh command' _virsh_cmds
|
||||
}
|
||||
|
||||
_virsh_subcommand_args() {
|
||||
_virsh_build_cmds
|
||||
local curcontext="$curcontext"
|
||||
|
||||
cmd="${${_virsh_cmds[(r)$words[1]:*]%%:*}:-${(k)_virsh_syns[(r)(*:|)$words[1](:*|)]}}"
|
||||
if (( $#cmd )); then
|
||||
curcontext="${curcontext%:*:*}:virsh-${cmd}:"
|
||||
_virsh_fallback_command "$cmd"
|
||||
else
|
||||
_message "unknown virsh command; $words[1]"
|
||||
fi
|
||||
}
|
||||
|
||||
_virsh "$@"
|
||||
230
dotfiles/zpreztorc
Normal file
230
dotfiles/zpreztorc
Normal file
@@ -0,0 +1,230 @@
|
||||
#
|
||||
# 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' \
|
||||
'history-substring-search' \
|
||||
'jekyll' \
|
||||
'prompt' \
|
||||
'xtra_completions'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:autosuggestions:color' found ''
|
||||
|
||||
#
|
||||
# Completions
|
||||
#
|
||||
|
||||
# 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' \
|
||||
# 'cursor' \
|
||||
# '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 'yes'
|
||||
|
||||
# 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'
|
||||
2
zshenv → dotfiles/zshenv
Normal file → Executable file
2
zshenv → dotfiles/zshenv
Normal file → Executable file
@@ -1,2 +1,4 @@
|
||||
if [[ -f $HOME/.env ]] ; then source $HOME/.env ; fi
|
||||
|
||||
# ZSH specific environment
|
||||
DEBIAN_PREVENT_KEYBOARD_CHANGES=yes
|
||||
78
dotfiles/zshrc
Executable file
78
dotfiles/zshrc
Executable file
@@ -0,0 +1,78 @@
|
||||
# For interactive shells
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases
|
||||
unsetopt beep histbeep listbeep flowcontrol
|
||||
bindkey -e
|
||||
|
||||
# Completion
|
||||
zstyle :compinstall filename '/home/david/.zshrc'
|
||||
autoload -Uz compinit && compinit
|
||||
|
||||
DIRSTACKSIZE=16
|
||||
case $TERM in
|
||||
xterm*)
|
||||
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
|
||||
;;
|
||||
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
|
||||
|
||||
# .profile is universal
|
||||
# but after oh-my-zsh to use anything setup there
|
||||
. ~/.profile
|
||||
# Deduplicate the path
|
||||
typeset -U path
|
||||
|
||||
|
||||
# Keybindings
|
||||
bindkey '^[[A' history-search-backward
|
||||
bindkey '^[[B' history-search-forward
|
||||
bindkey '^[[1;5C' forward-word
|
||||
bindkey '^[[1;5D' backward-word
|
||||
|
||||
# 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
|
||||
|
||||
# In case ack is named ack-grep
|
||||
if [ -x /usr/bin/ack-grep ] ; then
|
||||
alias ack='/usr/bin/ack-grep'
|
||||
fi
|
||||
|
||||
# Most is nice, if we have it
|
||||
if command -v most >/dev/null 2>&1; then
|
||||
export PAGER="most"
|
||||
fi
|
||||
|
||||
# Load any local settings
|
||||
if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi
|
||||
|
||||
function start_esp {
|
||||
if [ ! -d ${HOME}/tools/esp ] ; then
|
||||
echo "ESP not installed!" >/dev/stderr
|
||||
return 1
|
||||
fi
|
||||
export PATH="${PATH}:${HOME}/tools/esp/xtensa-esp32-elf/bin"
|
||||
export IDF_PATH="${HOME}/tools/esp/esp-idf"
|
||||
}
|
||||
|
||||
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
11
dotfiles/zshrc.d/afk.zsh
Normal file
11
dotfiles/zshrc.d/afk.zsh
Normal file
@@ -0,0 +1,11 @@
|
||||
function afk {
|
||||
# Note, may fail if multiple users are logged in with different desktop
|
||||
# environments.
|
||||
if pidof cinnamon-screensaver >/dev/null ; then
|
||||
cinnamon-screensaver-command -l
|
||||
elif pidof gnome-screensaver >/dev/null ; then
|
||||
gnome-screensaver-command -l
|
||||
else
|
||||
echo 'No screensaver found...' >&2
|
||||
fi
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user