591 Commits

Author SHA1 Message Date
David Tomaschik
a82e0cdb37 Fix escaping of Jekyll titles. 2019-10-02 21:43:01 -07:00
David Tomaschik
80d0b2844e Merge pull request #8 from Matir/zshopt
Reformat zsh options as upper case.
2019-10-02 21:14:52 -07:00
David Tomaschik
7f40245bb0 Reformat zsh options as upper case. 2019-10-02 21:13:03 -07:00
David Tomaschik
157fa34915 Fix up keymap display on line init. 2019-09-30 22:04:24 -07:00
David Tomaschik
2a359f1a02 ACPI Temperature alias. 2019-09-29 19:18:17 -07:00
David Tomaschik
c3f41435da Quieter gpg-agent. 2019-09-27 19:24:44 -07:00
David Tomaschik
aa3a1e0237 Remove prezto entirely. 2019-09-27 16:51:26 -07:00
David Tomaschik
68e53c426b More cleanup. 2019-09-27 16:42:58 -07:00
David Tomaschik
fcb04c0ae7 More cleanup. 2019-09-27 15:56:36 -07:00
David Tomaschik
b096fd2a24 Drop more prezto deps. 2019-09-27 13:16:39 -07:00
David Tomaschik
cc94650bad Even fewer deps. 2019-09-27 00:03:56 -07:00
David Tomaschik
1b2f75ca47 Reduce prezto deps. 2019-09-26 23:43:31 -07:00
David Tomaschik
55064a548d Really fix package installation. 2019-09-26 22:49:54 -07:00
David Tomaschik
cb051b8686 Fix testing for packages. 2019-09-26 22:30:58 -07:00
David Tomaschik
fae0e69619 Bump submodules. 2019-09-26 22:06:34 -07:00
David Tomaschik
d21e21ebf6 Merge branch 'master' of https://github.com./Matir/skel 2019-09-26 22:03:50 -07:00
David Tomaschik
ff14dcaf56 Prune package list better. 2019-09-26 22:03:39 -07:00
David Tomaschik
83645e39ee Bump submodules. 2019-09-26 10:44:18 -07:00
David Tomaschik
73f4cdfb20 Bump submodules. 2019-09-26 00:00:54 -07:00
David Tomaschik
ec06c2fcb2 Merge branch 'master' of https://github.com./Matir/skel 2019-09-25 23:59:18 -07:00
David Tomaschik
6c49de9512 Remove shallow clones, they cause trouble. 2019-09-25 23:59:08 -07:00
David Tomaschik
ef16b33fd8 Improve gef support. 2019-09-23 13:31:03 -07:00
David Tomaschik
ba56fb89b3 Merge branch 'master' of https://github.com./Matir/skel 2019-09-23 10:09:49 -07:00
David Tomaschik
395297e08b Update benchmark for variable size. 2019-09-22 19:34:05 -07:00
David Tomaschik
a20636347c Switch to trap for benchmark cleanup. 2019-09-22 19:24:29 -07:00
David Tomaschik
170c3f0e9f Add disk benchmark script. 2019-09-22 19:22:49 -07:00
David Tomaschik
b45f977de9 Use vimdiff. 2019-09-22 19:22:34 -07:00
David Tomaschik
df4e87fdf2 Update submodules. 2019-09-17 15:10:51 -07:00
David Tomaschik
40fa505146 Update metasploit.sh 2019-09-10 21:46:36 -07:00
David Tomaschik
9076b9f07e Bump submodules. 2019-09-10 21:00:01 -07:00
David Tomaschik
ac2b8650b8 Add support for gef. 2019-09-02 21:30:11 -07:00
David Tomaschik
5353336b9d Bump submodules. 2019-09-02 21:30:01 -07:00
David Tomaschik
78a9dc5835 Bump submodules. 2019-08-30 20:08:15 -07:00
David Tomaschik
57fff46dd8 Merge branch 'master' of https://github.com./Matir/skel 2019-08-30 20:07:39 -07:00
David Tomaschik
59cc1e6ed9 Update tmux styles for 2.9. 2019-08-30 20:05:04 -07:00
David Tomaschik
748b113fe9 Fixup locale. 2019-08-25 22:24:15 -07:00
David Tomaschik
b920e94cc5 Bump solarized8. 2019-08-23 20:13:46 -07:00
David Tomaschik
ea63773f4f Add rvmrc. 2019-08-23 10:53:17 -07:00
David Tomaschik
4bea5020b1 Merge branch 'master' of https://github.com./Matir/skel 2019-08-19 19:19:56 -07:00
David Tomaschik
0c5a5e6fc9 Bump zprezto. 2019-08-19 19:06:44 -07:00
David Tomaschik
6b659ac9a9 Bump vim plugins. 2019-08-19 19:05:24 -07:00
David Tomaschik
b30b40f259 Bump fugitive. 2019-08-19 19:04:34 -07:00
David Tomaschik
43680df2e2 Merge branch 'master' of https://github.com./Matir/skel 2019-08-19 14:54:09 -07:00
David Tomaschik
dc621af59d Avoid error if nothing exists in zshrc.d. 2019-08-19 14:53:40 -07:00
David Tomaschik
5ea16b8ace Update john.conf. 2019-08-13 14:35:23 -07:00
David Tomaschik
b800b624ae Suspend after 10 mins. 2019-07-30 13:53:57 -07:00
David Tomaschik
9364e70986 Add word splitting for xss-lock. 2019-07-30 13:53:12 -07:00
David Tomaschik
4b03c7d9e0 Fix ls alias with grc. 2019-07-29 13:27:27 -07:00
David Tomaschik
937328a833 Disable unused git aliases. 2019-07-25 10:48:55 -07:00
David Tomaschik
699fc2ac66 Add grc 2019-07-25 10:43:24 -07:00
David Tomaschik
803712f0db Merge branch 'master' of https://github.com./Matir/skel 2019-07-24 13:06:29 -07:00
David Tomaschik
2dbc8f33ea Comment things that should not be used anymore. 2019-07-24 13:06:11 -07:00
David Tomaschik
e2361baa37 Merge branch 'master' of https://github.com./Matir/skel 2019-07-13 11:46:12 -07:00
David Tomaschik
1ec5aa8056 Add fonts packages. 2019-07-13 11:45:46 -07:00
David Tomaschik
863e985bc6 Merge branch 'master' of https://github.com./Matir/skel 2019-07-13 11:15:19 -07:00
David Tomaschik
b40cbc1811 Add scar key. 2019-07-12 18:51:42 -07:00
David Tomaschik
5913bbb4c7 Add some package renames. 2019-07-10 19:46:42 -07:00
David Tomaschik
fc621bb31a Changes to Keyserver configuration.
See https://gist.github.com/rjhansen/67ab921ffb4084c865b3618d6955275f
for rationale.
2019-06-29 10:20:53 -07:00
David Tomaschik
d620566562 Add libnotify-bin to i3 install. 2019-06-23 13:22:09 -07:00
David Tomaschik
4d2d8c89f6 i3status: Use default route for ethernet address first. 2019-06-07 16:15:46 -07:00
David Tomaschik
e325cc3b93 Merge branch 'master' of https://github.com./Matir/skel 2019-06-07 14:04:23 -07:00
David Tomaschik
a5dc656656 Add a symlink for SSH_AUTH_SOCK remotely. 2019-06-07 10:42:10 -07:00
David Tomaschik
b1799197fe Set nomodeline. 2019-06-05 10:32:14 -07:00
David Tomaschik
4b37169735 Fix git submodule call to use BASEDIR. 2019-06-04 08:32:15 -07:00
David Tomaschik
2531595828 Add ipython_config. 2019-05-27 14:59:13 -07:00
David Tomaschik
9394758ff9 vimrc updates. 2019-05-25 12:03:01 -07:00
David Tomaschik
713e59fb32 Fix s/set/let/. 2019-05-22 17:10:23 -07:00
David Tomaschik
f0641f4113 Close preview window on exiting insert mode. 2019-05-22 17:08:47 -07:00
David Tomaschik
7739339515 Bump vim-go. 2019-05-22 17:08:03 -07:00
David Tomaschik
af556f0a75 Bump vim-go. 2019-05-21 07:11:49 -07:00
David Tomaschik
90a87e0e93 Merge branch 'master' of github.com:Matir/skel 2019-05-16 21:15:53 -07:00
David Tomaschik
ccb6bcb616 Support the vim-youcompleteme package on Debian. 2019-05-16 21:15:40 -07:00
David Tomaschik
460163089b Merge branch 'master' of https://github.com./Matir/skel 2019-05-04 13:05:11 -07:00
David Tomaschik
448b7a6c4d Disable tracker-store service. 2019-05-04 13:03:32 -07:00
David Tomaschik
24c7171a73 Rearrange vimrc. 2019-04-30 16:36:08 -07:00
David Tomaschik
379ab1c375 Fix install on bash. 2019-04-29 18:27:19 -07:00
David Tomaschik
968c9529c8 Merge branch 'master' of github.com:Matir/skel 2019-04-29 18:06:35 -07:00
David Tomaschik
f96ad7773f Fix xiwibg. 2019-04-29 18:06:14 -07:00
David Tomaschik
03a12e509e Add a bash/zsh compatibility option. 2019-04-29 16:33:17 -07:00
David Tomaschik
19d78117cb Symlink submodules as a whole instead of each file. Fixes #6. 2019-04-29 15:59:58 -07:00
David Tomaschik
1a592beaea Merge branch 'master' of https://github.com./Matir/skel 2019-04-29 15:19:43 -07:00
David Tomaschik
05c2ef7848 Fix double equals in posix shell comparison. 2019-04-29 13:09:39 -07:00
David Tomaschik
17c2767de5 Add syntastic for vim. 2019-04-29 12:58:44 -07:00
David Tomaschik
006188e07d Add xiwibg function. 2019-04-28 18:54:07 -07:00
David Tomaschik
322358b0f0 Add env var to disable zprezto. 2019-04-27 20:28:28 -07:00
David Tomaschik
3db0742889 Add sqliterc. 2019-04-27 20:17:04 -07:00
David Tomaschik
d2849bfe9e Fix comparison operator. 2019-04-27 13:16:44 -07:00
David Tomaschik
ac8fae69c6 Add google public key. 2019-04-26 11:20:28 -07:00
David Tomaschik
1881916c8e Fix darwin LSCOLORS. 2019-04-26 11:07:07 -07:00
David Tomaschik
08952e7f22 LSCOLORS on Darwin. 2019-04-26 11:03:45 -07:00
David Tomaschik
eb0d0ebfc1 Only use dircolors when available. 2019-04-26 10:55:25 -07:00
David Tomaschik
33d9e53327 Add tmux-logging. 2019-04-24 21:49:28 -07:00
David Tomaschik
53fa86ba4a Always recurse modules. 2019-04-24 12:55:13 -07:00
David Tomaschik
b135ee423b Bump vim-go to v1.20 2019-04-23 20:02:41 -07:00
David Tomaschik
25fb3cc6a0 Add hterm prefs. 2019-04-21 13:20:05 -07:00
David Tomaschik
b073e7d61c Not so shallow checkouts. 2019-04-18 19:28:02 -07:00
David Tomaschik
781142e8f2 Only run git if we have it. 2019-04-17 12:00:41 -07:00
David Tomaschik
3e87044901 Do shallow copies. 2019-04-17 10:28:31 -07:00
David Tomaschik
cb01867ba6 Use submodule for zprezto. 2019-04-16 23:36:57 -07:00
David Tomaschik
1fcdb910a2 Improvements. 2019-04-16 23:07:57 -07:00
David Tomaschik
cb5df8e7e6 Merge branch 'master' of github.com:Matir/skel 2019-04-16 23:01:46 -07:00
David Tomaschik
815cf0a6e4 Move pwndbg to tools from dotfile status. 2019-04-16 23:01:40 -07:00
David Tomaschik
72914aa6e1 Remove vundle as I no longer use it. 2019-04-16 22:45:31 -07:00
David Tomaschik
404c9592ec Add histmode on/off commands. 2019-04-15 15:04:30 +02:00
David Tomaschik
c2371d29a6 Bump font sizes. 2019-04-11 16:01:03 +02:00
David Tomaschik
25c03b677a Use solarized palette for LS_COLORS. 2019-04-11 15:56:55 +02:00
David Tomaschik
b9c2e6afb9 Fix solarized foreground from base00 to base0. 2019-04-11 15:34:38 +02:00
David Tomaschik
3f29a03ba4 Support both urlLauncher and url-launcher for URxvt. 2019-04-11 14:57:44 +02:00
David Tomaschik
b4db394761 Export BROWSER as well. 2019-04-11 14:54:47 +02:00
David Tomaschik
a85a9c52be Update some urxvt resources. 2019-04-09 18:18:42 +02:00
David Tomaschik
6be3fde55c Update some urxvt resources. 2019-04-09 18:10:02 +02:00
David Tomaschik
161028537c Fix hinting in xft.
This fixes the weird font issues I had with i3 that I "fixed" by
starting cinnamon-settings-daemon.
2019-04-09 15:53:33 +02:00
David Tomaschik
426fdbd7ee Fixup some startup scripts. 2019-04-09 15:33:53 +02:00
David Tomaschik
90060a290e Use Monospace as backup for Inconsolata. 2019-04-09 13:50:37 +02:00
David Tomaschik
b4c462a66c Set colors properly on urxvt. 2019-04-09 10:53:26 +02:00
David Tomaschik
18d5697827 Add a comment about xterm-256color. 2019-04-08 10:29:28 +02:00
David Tomaschik
75d0943548 Merge branch 'master' of https://github.com./Matir/skel 2019-04-08 10:22:16 +02:00
David Tomaschik
78b9efc04b Add gocode path to GOPATH. 2019-04-08 10:22:13 +02:00
David Tomaschik
6c2bb3ded8 Add vim-go. 2019-04-04 23:24:32 -07:00
David Tomaschik
312036587e Add vim-go. 2019-04-03 14:07:34 -07:00
David Tomaschik
0f97610473 Add id_ecdsa_chromebook.pub to trusted set. 2019-03-31 15:58:10 -07:00
David Tomaschik
c825c6af28 Add more editing tools. 2019-03-29 21:24:59 -07:00
David Tomaschik
394eb7996c Conditionally start ipython. 2019-03-27 22:46:06 -07:00
David Tomaschik
c7619f93dc Support submodules in install. 2019-03-25 21:03:42 -07:00
David Tomaschik
ee67442965 Fix aliases file. 2019-03-21 15:25:05 -07:00
David Tomaschik
f70488eab7 Better support on FreeBSD. 2019-03-21 14:15:09 -07:00
David Tomaschik
4cb51c3bba Add fugitive. 2019-03-21 14:10:17 -07:00
David Tomaschik
d77d76f184 Add more vim plugins. 2019-03-19 21:19:38 -07:00
David Tomaschik
b3224e9ad3 Begin migrating from Vundle to Vim8 packages. 2019-03-19 20:23:54 -07:00
David Tomaschik
6bd457700e Merge branch 'master' of https://github.com./Matir/skel 2019-03-06 13:14:41 -08:00
David Tomaschik
4b189b73dd Only autocomplete root and current user. 2019-03-06 11:24:06 -08:00
David Tomaschik
c86050bc3b Use ipython when available. 2019-03-04 07:40:08 -08:00
David Tomaschik
10cd949696 Add editorconfig VIM plugin. 2019-02-21 22:53:13 -06:00
David Tomaschik
81d4dbbdba Merge branch 'master' of https://github.com./Matir/skel 2018-12-20 13:38:42 -08:00
David Tomaschik
14197fe6c0 Add pwgen. 2018-11-07 10:10:53 -08:00
David Tomaschik
5cda2fc25b Update packages. 2018-11-02 20:48:57 -05:00
David Tomaschik
8b0c4dd29a Update packages. 2018-11-02 12:34:38 -07:00
David Tomaschik
2ab99dd2b4 Add gibson key. 2018-11-02 11:16:18 -07:00
David Tomaschik
3f69a044d3 Fix install_tool for new installs. 2018-11-02 11:12:48 -07:00
David Tomaschik
76d0078497 Add symlink for john. 2018-10-23 00:33:51 -05:00
David Tomaschik
523f272c58 Update john.conf to bleeding edge. 2018-10-23 00:32:57 -05:00
David Tomaschik
475e347fe6 Remove noglob scp workaround. 2018-10-17 15:55:28 -07:00
David Tomaschik
2bd6d63fe4 Merge pull request #5 from Matir/noutility
Stop including prezto alias module.
2018-10-17 11:28:32 -07:00
David Tomaschik
db14ac6e06 Stop including prezto alias module. 2018-10-17 11:27:48 -07:00
David Tomaschik
584678d67e Merge pull request #4 from Matir/workupdates
Add msitools.
2018-10-11 20:22:20 -07:00
David Tomaschik
503bba6516 Add msitools. 2018-10-11 11:31:21 -05:00
David Tomaschik
815dc47846 Merge pull request #3 from Matir/ptffix
PTF fix
2018-10-03 05:46:06 -07:00
David Tomaschik
e52cf7ae00 Add ptf to install_tool. 2018-10-03 05:45:07 -07:00
David Tomaschik
eb2d6e776f Remove ptf from default install script. 2018-10-03 05:39:42 -07:00
David Tomaschik
af85d6f81f Add seclists tool. 2018-10-03 05:38:57 -07:00
David Tomaschik
d84ee23039 Merge branch 'master' of https://github.com./Matir/skel 2018-09-10 16:04:17 -07:00
David Tomaschik
ea1d3f669b Rework overrides for ssh config. 2018-09-10 16:04:15 -07:00
David Tomaschik
47b4248de2 Git ignore kicad-bak files. 2018-09-01 12:49:52 -07:00
David Tomaschik
33e9188612 Add apktool to install_tool. 2018-09-01 12:49:36 -07:00
David Tomaschik
2f6c9c8c0a No special highlighting for root. 2018-09-01 12:49:18 -07:00
David Tomaschik
7128789d48 Merge branch 'master' of https://github.com./Matir/skel 2018-08-18 16:15:10 -07:00
David Tomaschik
19068da3f8 Fix _install_apt_proxy.sh 2018-08-18 16:15:00 -07:00
David Tomaschik
10851db1a9 Improve package installation. 2018-08-03 22:37:06 -07:00
David Tomaschik
1b8d6b85db Merge branch 'master' of https://github.com./Matir/skel 2018-08-02 16:51:49 -07:00
David Tomaschik
653fa39cf7 Remove cursorline from vimrc.
It makes things very slow when enabled on complex files.
See this github issue for context:

https://github.com/vim/vim/issues/2584
2018-08-02 16:51:17 -07:00
David Tomaschik
7b0713675c Add psmisc to packages.cli. 2018-08-01 20:32:53 -07:00
David Tomaschik
52ed3913c8 Symlinks in tools. 2018-07-30 20:20:56 -07:00
David Tomaschik
6d23e72bd7 Set default key for GnuPG. 2018-07-29 19:49:10 -07:00
David Tomaschik
da545f0de7 Support restoring dconf. 2018-07-08 13:56:37 -07:00
David Tomaschik
8d9cf14608 Add a minimal inputrc. 2018-07-06 15:52:20 +02:00
David Tomaschik
bdc1551122 Prevent hiding cursor when moving with arrows. 2018-07-05 14:35:49 +02:00
David Tomaschik
ba497cd5bf Enable syntax highlighting in zsh. 2018-07-04 11:12:37 +02:00
David Tomaschik
ca63946c5e Merge remote-tracking branch 'gh/master' 2018-06-25 20:47:36 +02:00
David Tomaschik
0b6fa6b0fa Install dex with i3. 2018-06-25 20:46:10 +02:00
David Tomaschik
12247790a6 Use dex for desktop files. 2018-06-25 20:45:34 +02:00
David Tomaschik
4d245198a8 Add SSH canonicalization settings. 2018-06-25 20:45:14 +02:00
David Tomaschik
8f4e4fe77b I don't like noglob scp. 2018-06-18 09:25:48 -07:00
David Tomaschik
1cafe1cf7a Don't always send a fake user agent. 2018-06-13 14:26:44 -07:00
David Tomaschik
ba546d478e Add tmux copy/pasta. 2018-06-11 21:55:00 -07:00
David Tomaschik
08d9567bdf Update zsh. 2018-06-11 21:29:50 -07:00
David Tomaschik
a460ee3bb4 More convenience keybindings. 2018-06-10 12:57:38 -07:00
David Tomaschik
f005bae9e6 Move SSH config to include-based. 2018-06-02 21:18:26 -07:00
David Tomaschik
3279d52505 Change locale detection. 2018-05-25 21:03:08 -07:00
David Tomaschik
939c604381 Fix env syntax. 2018-05-24 20:09:45 -07:00
David Tomaschik
d2061e29ef Make .env POSIX compliant. 2018-05-20 21:41:24 -07:00
David Tomaschik
de62342054 Merge branch 'master' of https://github.com/Matir/skel 2018-05-20 21:39:24 -07:00
David Tomaschik
2cf2aa4e78 Merge branch 'master' of https://github.com./Matir/skel 2018-05-16 17:05:55 -07:00
David Tomaschik
672767d758 Add PICKit3 udev rules. 2018-05-16 17:05:06 -07:00
David Tomaschik
96c2c37eb8 Merge branch 'master' of https://github.com./Matir/skel 2018-05-12 15:57:30 -07:00
David Tomaschik
ffb5d753cd Always try sudo if needed. 2018-05-12 15:57:23 -07:00
David Tomaschik
7a7340ef1d Add chromebook key. 2018-05-12 15:57:23 -07:00
David Tomaschik
b1bea45a48 Update skel to handle minimal environments. 2018-05-12 15:57:23 -07:00
David Tomaschik
01432d1f41 Roll back removing titles for groupings. 2018-05-12 15:57:17 -07:00
David Tomaschik
d6800370de Always try sudo if needed. 2018-05-12 12:50:16 -07:00
David Tomaschik
8f547abf93 Add chromebook key. 2018-05-12 12:45:25 -07:00
David Tomaschik
a02825fb1f Update skel to handle minimal environments. 2018-05-07 22:25:17 -07:00
David Tomaschik
5e3d133f8b Switch to vim keybindings. 2018-05-02 22:13:42 -07:00
David Tomaschik
48477290f0 Fix zshrc compinstall path 2018-05-02 14:43:34 -07:00
David Tomaschik
6bf68dfb2e Merge branch 'master' of https://github.com./Matir/skel 2018-04-23 22:12:14 -07:00
David Tomaschik
590a1a2fa0 Script to setup APT proxy. 2018-04-23 22:12:05 -07:00
David Tomaschik
697db6ca24 Merge branch 'master' of https://github.com./Matir/skel 2018-04-18 16:08:35 -07:00
David Tomaschik
f028c2f320 Fix SSH to github when ndots=2. 2018-04-18 16:07:50 -07:00
David Tomaschik
32a1c18c5d Add compose key. 2018-04-18 16:07:34 -07:00
David Tomaschik
4ec3fa1e22 Fix tab completion of usernames. 2018-04-18 16:07:15 -07:00
David Tomaschik
26685dfadb Add jekyll dev command. 2018-04-16 11:59:39 -07:00
David Tomaschik
0b327577e7 Fixing completion. 2018-04-15 17:45:02 -07:00
David Tomaschik
373f6c31c6 Merge branch 'master' of https://github.com./Matir/skel 2018-04-15 09:10:27 -07:00
David Tomaschik
4f7d98930d More improvements in slugs. 2018-04-11 16:09:29 +02:00
David Tomaschik
1aa256252f Note untracked files. 2018-04-07 20:05:47 +02:00
David Tomaschik
5705cb59c8 Use $EDITOR for editing. 2018-04-07 14:46:27 +02:00
David Tomaschik
c8b33e39c7 Avoid leading and trailing dashes in blog post slugs. 2018-04-07 13:58:02 +02:00
David Tomaschik
a9012bebea Add docker tab completion. 2018-04-07 12:26:54 +02:00
David Tomaschik
6100557a2b Add nasm to packages.cli. 2018-03-22 14:11:23 -07:00
David Tomaschik
5709d8fbb0 Setup locale in .env. 2018-03-18 17:55:27 -07:00
David Tomaschik
5dc84926be Add zlogin to build zcompdump.zwc. 2018-03-18 15:52:15 -07:00
David Tomaschik
b303c1b5c5 virtualenv info in prompt 2018-03-17 21:34:38 -07:00
David Tomaschik
dfd2b48b94 Merge branch 'master' of https://github.com./Matir/skel 2018-03-17 21:24:25 -07:00
David Tomaschik
0e1370a93f Initialize virtualenv. 2018-03-17 21:24:20 -07:00
David Tomaschik
4ebf519af7 Add Zeal documentation browser. 2018-03-17 21:03:45 -07:00
David Tomaschik
1386dc49d0 Rename installed-prefs to .installed-prefs. 2018-03-17 16:59:37 -07:00
David Tomaschik
360aa1c8ec Update zpretorc. 2018-03-16 22:45:02 -07:00
David Tomaschik
8e8d220539 Update rsync_ignore. 2018-03-16 21:03:24 -07:00
David Tomaschik
9b7561ce8f Merge branch 'master' of https://github.com./Matir/skel 2018-03-16 21:03:02 -07:00
David Tomaschik
c9c65e10d7 Install latest mitmproxy. 2018-03-14 22:15:52 -07:00
David Tomaschik
61b4dbe963 Do cyberchef install_tool style. 2018-03-14 13:44:40 -07:00
David Tomaschik
20a8db806c Make HISTFILE zprezto compatible. 2018-03-13 11:26:25 -07:00
David Tomaschik
be1bca8dbe Fix up prompt for vicmd mode. 2018-03-11 17:15:45 -07:00
David Tomaschik
9c3ad64036 Fix up GREP_COLORS. 2018-03-11 16:21:43 -07:00
David Tomaschik
d392eb8dfc Optimize backup. 2018-03-11 16:21:32 -07:00
David Tomaschik
6f15f7096a Fix prompt for git. 2018-03-11 12:44:41 -07:00
David Tomaschik
c7e40f1321 Fix rvm changes. 2018-03-10 23:14:16 -08:00
David Tomaschik
376fbb9f73 Merge branch 'prezto' 2018-03-10 23:13:03 -08:00
David Tomaschik
769989127b Fix up prezto. 2018-03-10 23:11:35 -08:00
David Tomaschik
4091cc3f03 Basic prezto support. 2018-03-10 22:49:32 -08:00
David Tomaschik
82c2833490 Remove google-chrome-burp alias. 2018-03-09 12:43:03 -08:00
David Tomaschik
634f031c56 Add google-chrome-burp as script. 2018-03-09 12:42:51 -08:00
David Tomaschik
7564acc939 Fix alias. 2018-03-09 11:35:47 -08:00
David Tomaschik
bfaabd18d0 Fix uber keys. 2018-03-06 08:48:26 -08:00
David Tomaschik
286eb02f4b Update git branches on push.
This pushes to clean checked-out repositories.  Only works since git
2.3.0, so on older versions, I'll apparently need to use a local dotfile
for those systems.

git config receive.denyCurrentBranch updateInstead
2018-03-04 22:15:36 -08:00
David Tomaschik
5a9e0b6578 Merge branch 'master' of theta.systemoverlord.com:.skel 2018-03-04 22:08:32 -08:00
David Tomaschik
f77ed125de Fix alias change. Doh. 2018-03-03 17:50:59 -08:00
David Tomaschik
24676d6a87 Don't use GNU aliases on NetBSD either. 2018-03-03 17:43:01 -08:00
David Tomaschik
d08af13a1c Update ssh/config. 2018-03-03 17:42:13 -08:00
David Tomaschik
8c9627caa1 Chmod only if exists. 2018-03-01 21:08:56 -08:00
David Tomaschik
40485f10f0 Conditional gpg. 2018-03-01 20:53:57 -08:00
David Tomaschik
b5ef3c37e4 Fix dotfile installation conditionals. 2018-03-01 20:52:35 -08:00
David Tomaschik
874750f22b Add python-nwdiag package. 2018-02-19 14:23:28 -08:00
David Tomaschik
89f555cdcb Merge branch 'master' of https://www.github.com/Matir/skel 2018-02-18 12:54:10 -08:00
David Tomaschik
4a7b263a9e Error handling for jekyll. 2018-02-14 18:27:39 -08:00
David Tomaschik
753035cc57 Support installing dotfiles separately. 2018-02-13 11:08:42 -08:00
David Tomaschik
32275ca788 Different workaround for ndots configuration. 2018-02-13 11:05:31 -08:00
David Tomaschik
58f63a17dc udev rules for various devices I use. 2018-02-10 15:07:28 -08:00
David Tomaschik
f355fe84d2 Add xsettingsd. 2018-02-09 13:33:03 -08:00
David Tomaschik
f3125f7cd7 Merge branch 'master' of https://www.github.com/Matir/skel 2018-02-05 16:27:34 -08:00
David Tomaschik
6894dc9214 Fix gitconfig to use www and other github aliases. 2018-02-05 16:26:33 -08:00
David Tomaschik
a59cbf1e41 Add new glaptop SSH keys.
Signed-off-by: David Tomaschik <david@systemoverlord.com>
2018-02-04 15:22:42 -08:00
David Tomaschik
d43bbcfae9 Add new glaptop SSH keys. 2018-02-04 14:58:37 -08:00
David Tomaschik
00cf4d1577 Add most to package list. 2018-02-03 19:20:40 -08:00
David Tomaschik
143e6e1e74 Use most if available. 2018-01-30 21:21:46 -08:00
David Tomaschik
8f6127d19d Fix conditional. 2018-01-30 19:35:44 -08:00
David Tomaschik
7c5a617897 Final bashism cleanup. 2018-01-30 19:25:47 -08:00
David Tomaschik
696cc9c6cd Fix some bashisms in install.sh. 2018-01-29 22:36:47 -08:00
David Tomaschik
2c2ac626e5 Make install script run on FreeBSD. 2018-01-30 05:35:34 +00:00
David Tomaschik
0431c83423 Merge remote-tracking branch 'vdesktop/master' 2018-01-27 10:31:51 -08:00
David Tomaschik
d9ae2ca974 Add socat to package list. 2018-01-27 10:31:13 -08:00
David Tomaschik
db007ad604 More MacOS fixes. 2018-01-26 09:39:38 -08:00
David Tomaschik
89ee4ce390 Merge branch 'master' of https://github.com/Matir/skel 2018-01-26 09:27:01 -08:00
David Tomaschik
48fb9289b4 Nasty hack to fix find on MacOS. 2018-01-26 09:26:58 -08:00
David Tomaschik
430bb6e7b9 Fix ls alias on MacOS. 2018-01-26 09:24:07 -08:00
David Tomaschik
bf81c13d47 Merge branch 'master' of xi.systemoverlord.com:.skel 2018-01-25 19:26:40 -08:00
David Tomaschik
bda75033a0 python-pypdf is entirely virtual. 2018-01-25 00:44:12 +00:00
David Tomaschik
53f7bc9fe3 Fix package installation. 2018-01-25 00:24:33 +00:00
David Tomaschik
a2acbeb8b5 Update weechat config. 2018-01-18 21:29:10 -08:00
David Tomaschik
de89e88c90 Weechat config bump. 2018-01-18 21:23:19 -08:00
David Tomaschik
d8d7e94aed Make script executable. 2018-01-06 20:53:46 -08:00
David Tomaschik
a2bd17e935 Script to rotate weechat key with letsencrypt. 2018-01-06 20:53:24 -08:00
David Tomaschik
abc42681af Avoid dumping all variables on running. 2018-01-06 14:31:14 -08:00
David Tomaschik
05a3905eb0 Give an initial value to pkg_list. 2018-01-06 14:29:03 -08:00
David Tomaschik
0c38ad65f7 Update how argument list is sliced. 2018-01-06 13:44:53 -08:00
David Tomaschik
a24b6ef51e Switch some backtick uses to proper shell substitution. 2018-01-06 13:41:22 -08:00
David Tomaschik
13c42ab008 Merge branch 'master' of https://github.com/Matir/skel 2018-01-06 13:40:40 -08:00
David Tomaschik
9db6ad55aa Fix HAVE_X error. 2018-01-06 13:40:33 -08:00
David Tomaschik
5d1eaccbbc Make pwndbg a separate action. 2018-01-04 09:57:22 -08:00
David Tomaschik
0859908724 Support arguments to install_git. 2018-01-03 13:50:57 -08:00
David Tomaschik
805998921a Fix options;modularize. 2018-01-03 13:28:45 -08:00
David Tomaschik
89aa4c1be2 Package updates. 2017-12-28 10:39:06 -08:00
David Tomaschik
b7c5a28fe0 README bump. 2017-12-28 10:27:17 -08:00
David Tomaschik
8ffc255e93 Make resources executable. 2017-12-16 11:35:36 -08:00
David Tomaschik
87fd3193e0 Remove default package list. 2017-12-02 12:41:13 +01:00
David Tomaschik
d96a41aeaf Update package installation to have minimal grouping. 2017-12-02 12:40:53 +01:00
David Tomaschik
43659b27a8 Add jq tool for JSON parsing. 2017-11-06 16:55:24 -08:00
David Tomaschik
ec0fb88453 Add verilog support in vim. 2017-11-06 16:55:12 -08:00
David Tomaschik
fcda32a417 Add ability to drop cache for swapping. 2017-11-03 19:00:08 -07:00
David Tomaschik
d33ee9fa4d Enable safe-paste oh-my-zsh plugin. 2017-11-01 13:22:40 -07:00
David Tomaschik
0dc5950334 Bump xresources. 2017-11-01 13:22:26 -07:00
David Tomaschik
4d3c2ea0b1 Merge branch 'master' of https://github.com/Matir/skel 2017-11-01 08:54:37 -07:00
David Tomaschik
157ff8a451 Don't clobber ssh-agent 2017-11-01 08:54:28 -07:00
David Tomaschik
a6df743476 Improve minimal mode. 2017-10-30 19:34:34 -07:00
David Tomaschik
4edf1e6b01 Merge branch 'master' of https://github.com/Matir/skel 2017-10-30 18:45:56 -07:00
David Tomaschik
953d592561 Update .ssh/config 2017-10-30 18:45:29 -07:00
David Tomaschik
fdf1ec9790 fix gtk fonts in i3. 2017-10-30 10:12:53 -07:00
David Tomaschik
99670fd834 Add PGP key id to .env 2017-10-29 22:23:34 -07:00
David Tomaschik
28d45d20da Always use gpgconf when needed. 2017-10-29 20:38:39 -07:00
David Tomaschik
42f93dc9d2 use gpgconf 2017-10-29 20:33:18 -07:00
David Tomaschik
f7ae1cb9f9 Add new signing 5dea789b subkey. 2017-10-29 20:20:08 -07:00
David Tomaschik
21ece50f73 gpg-agent from systemd support. 2017-10-29 20:18:51 -07:00
David Tomaschik
08d284efad Merge branch 'master' of https://github.com/Matir/skel 2017-10-27 11:41:55 -07:00
David Tomaschik
b23d196994 Re-enable fatih/vim-go plugin. 2017-10-27 11:41:49 -07:00
David Tomaschik
6b23295be9 Fix jekyll publish command. 2017-10-24 21:53:59 -05:00
David Tomaschik
7f7e2e21bf Update gpg to use dirmnger.conf. 2017-10-21 16:21:57 -07:00
David Tomaschik
12a4202709 Merge branch 'master' of https://github.com/Matir/skel 2017-10-21 09:48:46 -07:00
David Tomaschik
585f1f4101 Update glaptop key. 2017-10-21 09:47:28 -07:00
David Tomaschik
8d533e4cd3 Set QUOTING_STYLE=literal. 2017-10-17 18:06:21 -07:00
David Tomaschik
0c5dc52926 Store burp prefs. 2017-10-15 22:45:22 -07:00
David Tomaschik
62276e4843 Prefer syntastic over go-vim. 2017-10-14 11:14:50 -07:00
David Tomaschik
a8d205d8f6 Add proxmark3 to install_tool. 2017-09-27 13:41:13 -07:00
David Tomaschik
7c1bb5c6f9 Merge branch 'master' of https://github.com/Matir/skel 2017-09-11 18:08:43 -07:00
David Tomaschik
bdedb651d4 Fix i3 locking. 2017-09-11 18:08:01 -07:00
David Tomaschik
e62edc3fee Add python3-pip to packages. 2017-08-28 20:11:20 -07:00
David Tomaschik
1dce4d6ece Merge branch 'master' of https://github.com/Matir/skel 2017-08-26 23:05:37 -07:00
David Tomaschik
4eb5ae9087 More vim plugins. 2017-08-26 23:05:33 -07:00
David Tomaschik
b945bb69da Fix i3 screenshotting. I think. 2017-08-22 08:08:02 -07:00
David Tomaschik
44b2f55b1f Add bettercap to packages.kali. 2017-08-12 14:23:53 -07:00
David Tomaschik
9c1bbdd1ae Fix jekyll oh-my-zsh plugin. 2017-08-12 14:23:30 -07:00
David Tomaschik
e68a194066 install_tool for dex2jar. 2017-08-06 16:40:03 -07:00
David Tomaschik
8f4a5397c7 Function to start using ESP. 2017-08-05 15:12:37 -07:00
David Tomaschik
ec42e83d03 Add esp to tools selection. 2017-08-05 15:04:12 -07:00
David Tomaschik
0505bc90c4 Update john.conf 2017-07-31 15:34:32 -07:00
David Tomaschik
5e62177da5 Merge branch 'master' of https://github.com/Matir/skel 2017-07-31 10:05:28 -07:00
David Tomaschik
2394887cda Support for directory locating in jekyll oh-my-zsh plugin. 2017-07-31 10:05:06 -07:00
David Tomaschik
cd6f1ccca7 Merge branch 'master' of https://github.com/Matir/skel 2017-07-10 10:43:45 -07:00
David Tomaschik
f528cb3991 i3 fixes. 2017-07-10 10:43:35 -07:00
David Tomaschik
493fec9ced Fix markdown formatting in vim. 2017-05-19 08:36:16 -07:00
David Tomaschik
c7166479a9 Vim options for markdown. 2017-05-13 16:52:42 -07:00
David Tomaschik
21f8d645be Merge branch 'master' of https://github.com/Matir/skel 2017-05-13 16:39:02 -07:00
David Tomaschik
aafc352dd0 Add vim command to remove "smart" quotes. 2017-05-13 16:37:56 -07:00
David Tomaschik
c1df470815 sleep before turning display off. 2017-04-17 15:42:26 -07:00
David Tomaschik
de2a159024 Fix conditional test. 2017-04-17 08:29:27 -07:00
David Tomaschik
4f332566aa status_unk is not supported on i3status < 2.11 2017-04-17 08:15:35 -07:00
David Tomaschik
be3d3196ae s/xss-auto/xss-lock/ 2017-04-16 13:56:41 -07:00
David Tomaschik
7efc19fec7 i3 updates. 2017-04-15 19:35:01 -07:00
David Tomaschik
209778db2f Fix battery displays. 2017-04-14 19:54:39 -07:00
David Tomaschik
fa86c01eab i3status for each machine. 2017-04-14 15:38:32 -07:00
David Tomaschik
26af37422d Update weechat colors. 2017-04-14 13:28:32 -07:00
David Tomaschik
b29e600842 enable solarized_termtrans for urxvt. 2017-04-14 11:42:39 -07:00
David Tomaschik
2035518278 More i3 niceness. 2017-04-14 11:16:49 -07:00
David Tomaschik
63806dec01 Update urxvt extensions. 2017-04-14 10:29:23 -07:00
David Tomaschik
63e845904e Config for solarized urxvt. 2017-04-14 10:14:55 -07:00
David Tomaschik
702b8547d9 Float Burp filter windows. 2017-04-14 08:47:42 -07:00
David Tomaschik
f928309043 media keys. 2017-04-14 01:53:18 -07:00
David Tomaschik
9cffb92ef5 Merge branch 'master' of https://github.com/Matir/skel 2017-04-14 01:46:14 -07:00
David Tomaschik
044bd1dffc Hide borders on edge of screen. 2017-04-14 01:46:11 -07:00
David Tomaschik
c7194cb349 Add i3status. 2017-04-13 22:56:09 -07:00
David Tomaschik
12dd58dc01 Run autostart .desktop files on i3 login. 2017-04-13 21:13:47 -07:00
David Tomaschik
9018536732 i3 updates. 2017-04-13 19:26:42 -07:00
David Tomaschik
7e8687ffa8 Resize mode fix. 2017-04-13 17:47:38 -07:00
David Tomaschik
7f6114fb5d Update i3 fonts. 2017-04-13 16:14:21 -07:00
David Tomaschik
c144bc1bcc Add .Xresources. 2017-04-13 15:46:02 -07:00
David Tomaschik
576a6f227b Also CTRL+ALT+L for locking. 2017-04-13 15:44:35 -07:00
David Tomaschik
173230dd06 More convenience bindings in i3. 2017-04-13 13:36:07 -07:00
David Tomaschik
955fdb59f8 more i3 settings 2017-04-13 11:21:27 -07:00
David Tomaschik
8c366f69f7 Add gnome features for i3. 2017-04-13 10:15:19 -07:00
David Tomaschik
6ed5979c8f Screen off when locked. 2017-04-13 08:52:16 -07:00
David Tomaschik
a5f8e973fa i3 updates. 2017-04-12 15:42:32 -07:00
David Tomaschik
aa6f4213ff Time to give i3 a try. 2017-04-12 14:38:43 -07:00
David Tomaschik
3c2b06a81b More tool installation. 2017-03-25 09:06:28 -07:00
David Tomaschik
607204a85c Move burp from standalone script to install_tool. 2017-03-25 07:38:03 -07:00
David Tomaschik
dbe4c21ca1 Add android-sdk to install_tool. 2017-03-22 22:06:49 -07:00
David Tomaschik
13d389360d Merge branch 'master' of https://github.com/Matir/skel 2017-03-04 17:41:36 -08:00
David Tomaschik
aa690c0985 Install Unicorn for pwndbg. 2017-03-04 17:41:26 -08:00
David Tomaschik
6075ecf89b Merge branch 'master' of https://github.com/Matir/skel 2017-02-23 12:33:01 -08:00
David Tomaschik
cabdaac7a6 Rely entirely on oh-my-zsh to start gpg-agent. 2017-02-23 12:32:52 -08:00
David Tomaschik
8066f71ef5 Merge branch 'master' of https://github.com/Matir/skel 2017-02-09 19:50:28 -08:00
David Tomaschik
aee7cacaf4 Remove unused git aliases. 2017-02-09 19:49:56 -08:00
David Tomaschik
70cc5c5218 kubectl completion. 2017-02-04 16:48:40 -08:00
David Tomaschik
c8c954617e gcloud in tools. 2017-02-04 12:29:25 -08:00
David Tomaschik
f3b6be53e0 Add metasploit tab completion. 2017-02-04 08:04:26 -08:00
David Tomaschik
59b0bca33c Delete unneeded scripts. 2017-02-04 07:54:15 -08:00
David Tomaschik
e94f1caab3 Update install_tool script. 2017-02-04 07:53:38 -08:00
David Tomaschik
2701a9e8f0 Wordlist script. 2017-02-03 17:29:21 -08:00
David Tomaschik
4d196a0b75 install_tool fixes. 2017-02-03 09:16:24 -08:00
David Tomaschik
e7c797e195 Update install_tool for john configs. 2017-02-03 09:08:32 -08:00
David Tomaschik
58ae338ece Fix color for colorcolumn. 2017-02-03 09:06:18 -08:00
David Tomaschik
5eaabf4716 Basic tool installer. 2017-02-02 22:35:24 -08:00
David Tomaschik
de1758b847 Merge branch 'master' of https://github.com/Matir/skel 2017-01-28 09:19:10 -08:00
David Tomaschik
aabc40e4c0 Add GCHQ Cyberchef. 2017-01-28 09:18:43 -08:00
David Tomaschik
3175b2bcd7 Add colorcolumn. 2017-01-23 21:01:32 -08:00
David Tomaschik
ab73763b4f Highlight trailing whitespace in vim. 2017-01-23 20:33:13 -08:00
David Tomaschik
dc9fbe1cd9 Update switch_virt.sh 2017-01-07 16:42:27 -08:00
David Tomaschik
d79dbd890f Update hak5. 2017-01-05 23:22:58 -08:00
David Tomaschik
3e78cde55e Start in insert mode when writing a new post. 2016-12-30 18:52:08 -08:00
David Tomaschik
a6c2421ddc Escape arguments to printf in jekyll oh-my-zsh script. 2016-12-30 18:43:30 -08:00
David Tomaschik
e6fa446b19 Script to switch virtualization hypervisors. 2016-12-26 21:13:51 -08:00
David Tomaschik
59cb3a01fb Update ack for newer packages. 2016-12-26 21:11:05 -08:00
David Tomaschik
9203299eb2 Add GOPATH/bin to PATH. 2016-12-17 19:30:56 -08:00
David Tomaschik
8f30b94c97 Remove stray escape. 2016-12-17 18:17:14 -08:00
David Tomaschik
db1c72a86f Bump ssh config. 2016-12-07 17:20:05 -08:00
David Tomaschik
78df984b55 Install pwndbg in a custom manner. 2016-12-06 12:07:37 -08:00
David Tomaschik
68dcadd52b Remove outdated utf8 lines from tmux. 2016-11-19 19:36:24 -08:00
David Tomaschik
0b5ceae185 Add relay options. 2016-10-26 11:19:04 -07:00
David Tomaschik
525697a4ea Update GOPATH. 2016-10-23 15:30:59 -07:00
David Tomaschik
4bedb5496b Bump IRC config. 2016-10-21 19:55:26 -07:00
David Tomaschik
ee4b273710 Bump IRC config. 2016-10-21 19:50:32 -07:00
David Tomaschik
3586722774 Add dircount alias. 2016-10-19 21:51:13 -07:00
David Tomaschik
afa200905c Update cryptsetup alias. 2016-09-17 20:33:37 -07:00
David Tomaschik
751f39f854 Add new rsync_ignore entry. 2016-09-17 20:32:19 -07:00
David Tomaschik
d4d0005811 Update gpg-agent plugin with custom build. 2016-07-24 16:17:21 -07:00
David Tomaschik
cf360f0eb1 Update profile gpg-agent path. 2016-07-24 15:56:39 -07:00
David Tomaschik
52991d097a Remove drupal.org from .ssh/config. 2016-07-24 13:50:35 -07:00
David Tomaschik
aeb2e89755 Fix deb-to-kali.sh 2016-07-24 12:01:17 -07:00
David Tomaschik
2baead04ef Matir PvJ key. 2016-07-24 11:53:21 -07:00
David Tomaschik
8ea9f8c10f Require slug for custom commands. 2016-07-07 22:11:36 -07:00
David Tomaschik
4320edaee6 Add virtualbox vms to ignore. 2016-07-07 20:34:33 -07:00
David Tomaschik
acc7085c66 Add gcloud path. 2016-05-03 20:51:41 -07:00
David Tomaschik
4e427cf208 Remove cnf support. 2016-04-25 20:15:28 -07:00
David Tomaschik
072e6e6405 More error suppression. 2016-04-17 19:52:44 -07:00
David Tomaschik
930b11b821 Suppress lesspipe errors. 2016-04-17 19:49:46 -07:00
David Tomaschik
8e01e9a0ab Suppress more errors. 2016-04-12 21:13:26 -07:00
David Tomaschik
b076afb811 Suppress dpkg-query error on non-Debian systems. 2016-04-12 21:12:18 -07:00
David Tomaschik
33223e5af0 Add lisa for LLDB. 2016-04-11 00:58:05 -07:00
David Tomaschik
e514149340 Update some configs. 2016-04-09 11:08:16 -07:00
David Tomaschik
e752074886 Quote post title when creating new jekyll post. 2016-03-27 16:40:19 -07:00
David Tomaschik
4cb6be69e0 Remove unneccessary blog post script. 2016-03-27 13:25:17 -07:00
David Tomaschik
997b27dd19 Include digits in slugs. 2016-03-26 20:43:01 -07:00
David Tomaschik
3071ecd7f7 Add some completions for jekyll. 2016-03-26 20:42:12 -07:00
David Tomaschik
9c1f09c563 Remove noclobber because it makes oh-my-zsh blow up. 2016-03-26 11:15:36 -07:00
David Tomaschik
5c23070292 Add oh-my-zsh plugin to manage jekyll posts. 2016-03-24 22:46:34 -07:00
David Tomaschik
31f04428ca Script to add new blog post. 2016-03-23 22:00:11 -07:00
David Tomaschik
0b16c79274 Fix flake8 plugin. 2016-03-23 18:22:32 -07:00
David Tomaschik
c29e859c4a Add a redshift config. 2016-03-22 21:14:43 -07:00
David Tomaschik
1e2c131cc8 Get env in profile. 2016-03-19 23:10:07 -07:00
David Tomaschik
80795ffb33 Add virtualenvwrapper support to dotfiles. 2016-03-19 11:01:40 -07:00
David Tomaschik
5900f47829 Add completions for common msf commands. 2016-03-16 04:12:35 -07:00
David Tomaschik
56ca5cc721 Only source setenv.sh if available. 2016-03-16 04:03:09 -07:00
David Tomaschik
58db233697 Update metasploit.sh script to handle metasploit-framework deb install. 2016-03-16 04:00:53 -07:00
David Tomaschik
46255e9ab7 Check path for deb-to-kali. 2016-03-15 20:48:15 -07:00
David Tomaschik
6a6216a720 Remove recursive loop failure in metasploit.sh. 2016-03-11 19:33:40 -08:00
David Tomaschik
28348ca08e Merge branch 'master' of https://github.com/Matir/skel 2016-03-09 21:33:11 -08:00
David Tomaschik
6347759506 More weechat customization. 2016-03-09 11:36:14 -08:00
David Tomaschik
0949c61bc3 Properly fix modeline by adding trailing colon. 2016-03-09 11:26:02 -08:00
David Tomaschik
87a42121f9 Use nasm syntax by default. 2016-03-09 11:18:45 -08:00
David Tomaschik
6914922a3e Merge branch 'master' of https://github.com/Matir/skel 2016-03-08 10:00:22 -08:00
David Tomaschik
26f7f78569 Add venv prompt support. 2016-03-08 10:00:08 -08:00
David Tomaschik
1e00c7212a Fix weechat looks. 2016-03-06 17:38:24 -08:00
David Tomaschik
96ab83949a Add weechat config. 2016-03-05 19:31:13 -08:00
David Tomaschik
d24862dc84 Update PS1 to match oh-my-zsh theme. 2016-03-04 22:21:40 -08:00
David Tomaschik
d48f5a3681 Add noclobber zsh option. 2016-03-03 09:02:22 -08:00
David Tomaschik
1baf32f6bf Add more packages. 2016-02-25 21:51:11 -08:00
David Tomaschik
664e310323 Add more ignore files. 2016-02-24 20:48:15 -08:00
David Tomaschik
1c4e2fb7dd Don't use zsh if not installed for cleanup. 2016-02-23 10:01:13 -08:00
David Tomaschik
d56db56d2b Merge branch 'master' of https://github.com/Matir/skel 2016-02-22 18:58:08 -08:00
David Tomaschik
fd974a153c Get env in xsessionrc. 2016-02-22 14:38:57 -08:00
David Tomaschik
0259497329 Add support for local profile. 2016-02-22 13:34:11 -08:00
David Tomaschik
a43c80639d Add an unmanaged local_dotfiles dir to override dotfiles. 2016-02-17 10:15:14 -08:00
David Tomaschik
bf6e7bd315 Refresh GPG keys on install. 2016-02-16 13:25:14 -08:00
David Tomaschik
089261264f Remove rvm auto-changes. 2016-02-15 08:53:00 -08:00
David Tomaschik
87dc698f31 Rearrange GPG startup. 2016-02-12 21:08:23 -08:00
David Tomaschik
20581f766f Remove SSH hacks that break things. 2016-02-12 14:46:59 -08:00
David Tomaschik
dfc1021cba Really add RVM key. 2016-02-11 18:32:57 -08:00
David Tomaschik
424febea00 Add rvm install script and key. 2016-02-11 18:32:42 -08:00
David Tomaschik
7ccc6ec6c0 Add RVM. 2016-02-11 18:00:54 -08:00
David Tomaschik
ab6b1784bd Add function to re-source the gnupg environment. 2016-02-10 13:48:12 -08:00
David Tomaschik
7bdcfdf18a Update packages. 2016-02-09 13:13:30 -08:00
David Tomaschik
fe8e33eb92 Merge remote-tracking branch 'origin/master' 2016-02-08 10:38:57 -08:00
David Tomaschik
8786ca65b9 Update README.md. 2016-02-07 23:02:01 -08:00
David Tomaschik
4615724282 Make sure we have git-crypt setup before installing private_dotfiles. 2016-02-07 22:57:42 -08:00
David Tomaschik
aa41a0e1ee Add 1 git-crypt collaborator
New collaborators:

	5DEA789B David Tomaschik <david@systemoverlord.com>
2016-02-07 22:52:00 -08:00
David Tomaschik
552a3bdd1d Use git-crypt to store private_dotfiles. 2016-02-07 22:50:26 -08:00
David Tomaschik
97b5a694d3 Set CheckHostIP no. 2016-02-07 16:05:31 -08:00
David Tomaschik
d35dd23019 Only try to change shell on interactive sessions. 2016-02-07 16:05:21 -08:00
David Tomaschik
9a26c713d7 Fix problems with seahorse stealing ssh-agent. 2016-02-07 14:40:56 -08:00
David Tomaschik
dc64160e83 Move kali repo key into keys dir. 2016-02-07 13:07:53 -08:00
David Tomaschik
ec8b2379e5 Resurrect deb-to-kali.sh for Kali rolling. 2016-02-06 14:01:21 -08:00
David Tomaschik
baa267e4e7 Remove unmaintained deb-to-kali script. 2016-02-03 19:11:23 -08:00
David Tomaschik
31e19d6f90 Cleanup after Chrome install. 2016-02-03 19:10:37 -08:00
David Tomaschik
736e24468b Update AWL formatting. 2016-01-30 14:11:19 -08:00
David Tomaschik
727981e760 Fix freenode due to CA change. 2016-01-30 13:21:34 -08:00
David Tomaschik
ac2c605a5e Remove wallpapers to move to another repo. 2016-01-26 21:40:19 -08:00
David Tomaschik
7c2964b6d8 Chrome wrapper for kali use. 2016-01-25 21:53:00 -08:00
David Tomaschik
73873a9316 Merge branch 'master' of https://github.com/Matir/skel 2016-01-25 09:52:48 -08:00
David Tomaschik
452dfa1ec2 Add uber pubkey. 2016-01-21 18:39:20 -08:00
David Tomaschik
37099ff94d Add unzip to packages. 2016-01-21 18:38:59 -08:00
David Tomaschik
1df1d1f244 Remove wallpapers to be moved to another directory. 2016-01-14 06:52:00 -08:00
David Tomaschik
1ac4c6e0b1 Add wallpapers. 2016-01-01 01:37:01 -08:00
David Tomaschik
358c5d48a5 Mouse mode updates in tmux.conf. 2015-12-23 23:15:56 -08:00
David Tomaschik
b8c290965b Merge branch 'master' of https://github.com/Matir/skel 2015-12-16 12:33:10 -08:00
David Tomaschik
ecfbce96c0 Rename xprofile to xsessionrc. 2015-12-16 12:32:48 -08:00
David Tomaschik
c9a4277724 John rules including KoreLogic wordlist rules. 2015-12-12 08:48:03 -08:00
David Tomaschik
ec69fed5d2 Dotfile refactoring. 2015-12-10 19:37:53 -08:00
David Tomaschik
138f9ef3c3 Alternative solution for path for MSF tools. 2015-11-25 00:14:52 -08:00
David Tomaschik
1442824e64 Add nasm_shell to metasploit aliases. 2015-11-24 23:41:44 -08:00
David Tomaschik
934dfe32df Add MSF aliases. 2015-11-24 11:21:48 -08:00
David Tomaschik
79f96d0ed3 Update install script for verbosity. 2015-11-18 21:46:10 -08:00
David Tomaschik
b9cf6bae01 site2pdf support. 2015-11-18 01:23:20 -08:00
David Tomaschik
056f0087e7 Add Pentester Framework. 2015-11-18 00:23:21 -08:00
David Tomaschik
0ce708d0ec Add ptf. 2015-11-18 00:16:29 -08:00
David Tomaschik
fc3903003e Quieter apt-get update. 2015-11-17 23:56:10 -08:00
David Tomaschik
dd4beff725 Fix install_git/git_install mixup. 2015-11-17 23:53:33 -08:00
David Tomaschik
4858e33ff1 Wrap git install to also update. 2015-11-17 10:39:06 -08:00
David Tomaschik
9520a9b484 Merge branch 'master' of https://github.com/Matir/skel 2015-11-15 13:27:41 -08:00
David Tomaschik
54481260b8 Add vimoutliner. Closes #1. 2015-11-15 13:27:34 -08:00
David Tomaschik
59e5f5ad79 Fix up TERM for gnome-terminal. Ugly hack. 2015-11-12 16:15:12 -08:00
David Tomaschik
4c044264d8 Prune without prompting. 2015-11-12 16:06:22 -08:00
David Tomaschik
129e7088f3 Solarized dircolors. 2015-11-12 10:43:44 -08:00
David Tomaschik
5c57186807 Don't ask for confirmation if there are no results. 2015-11-12 10:35:10 -08:00
David Tomaschik
97d0f2f1d0 Prune broken symlinks now confirms. 2015-11-12 10:33:25 -08:00
David Tomaschik
742e2c10c3 Default install packages to off. 2015-11-11 18:59:12 -08:00
David Tomaschik
a0ce33ddb1 Switch from reverser gdbinit to PEDA. 2015-11-11 18:57:47 -08:00
David Tomaschik
6a0c55ac73 Install script gets zsh as needed. 2015-11-08 12:26:56 -08:00
David Tomaschik
dfdf1b8588 Basic skel update script. 2015-11-08 10:44:03 -08:00
David Tomaschik
7955b24be6 Cleanup broken symlinks at end of setup. 2015-11-07 14:07:57 -08:00
David Tomaschik
bfdd2f4d6a Add proper shebang to get zsh functionality. 2015-11-07 13:34:20 -08:00
David Tomaschik
a234f2934f Make burp work from alt-f2 and other non-function locations. 2015-11-07 13:15:35 -08:00
David Tomaschik
71df11db58 Merge branch 'master' of https://github.com/Matir/skel 2015-11-07 12:05:21 -08:00
David Tomaschik
a61efc0fb1 Avoid using features not present in /bin/sh. 2015-11-07 12:04:39 -08:00
David Tomaschik
850ab7090a Disable mouse mode in tmux, as it interferes with copy/paste. 2015-11-02 08:40:29 -08:00
David Tomaschik
90410ca322 New subkeys. 2015-10-29 21:47:06 -07:00
David Tomaschik
e42a8472f6 Merge branch 'master' of https://github.com/Matir/skel 2015-10-29 20:33:13 -07:00
David Tomaschik
81e25dc192 Update irssi. 2015-10-29 20:33:05 -07:00
David Tomaschik
6bc3a67fb0 Merge remote-tracking branch 'origin/master' 2015-10-27 09:14:16 -07:00
David Tomaschik
cb6ca10f6f Enable command-not-found. 2015-10-27 09:13:51 -07:00
David Tomaschik
ef887ed209 Cache credentials in git. 2015-10-27 09:13:15 -07:00
David Tomaschik
d9fcc5b1e6 Merge branch 'master' of https://github.com/Matir/skel 2015-10-22 21:25:59 -07:00
David Tomaschik
95f68cd822 Merge branch 'master' of https://github.com/Matir/skel 2015-10-22 13:33:46 -07:00
David Tomaschik
2291c85db5 Preserve PYTHONPATH. 2015-10-22 13:33:43 -07:00
David Tomaschik
a55243a867 Add mosh to packages. 2015-10-21 20:24:32 -07:00
David Tomaschik
c4154d8ca9 Add appengine. 2015-10-21 20:23:32 -07:00
David Tomaschik
c1350c83d2 Fix package relative paths. 2015-10-10 16:02:29 -07:00
David Tomaschik
f4232608f6 Add ipython. 2015-10-10 11:38:49 -07:00
David Tomaschik
4f64e41232 Suppress dpkg error message. 2015-10-10 01:48:23 -07:00
David Tomaschik
98455d4917 Remove spurious echos. 2015-10-09 00:32:12 -07:00
David Tomaschik
0da6ca2c47 Merge branch 'master' of https://github.com/Matir/skel 2015-10-08 16:27:48 -07:00
David Tomaschik
fc25cfd8d3 Support for saving skel preferences across runs. 2015-10-08 16:27:40 -07:00
David Tomaschik
4c1639535b Have a notion of fully trusted vs partially trusted keys. 2015-10-08 16:08:40 -07:00
David Tomaschik
4cd1306393 Add more useful git aliases. 2015-10-08 15:35:36 -07:00
David Tomaschik
a33d352cf9 Recognize multiple paths for zsh. 2015-10-08 15:28:14 -07:00
David Tomaschik
79b352d091 Use consistent test operator of modern bash builtin. 2015-10-08 10:14:53 -07:00
David Tomaschik
7b3750a768 Merge branch 'master' of https://github.com/Matir/skel 2015-10-07 16:15:48 -07:00
David Tomaschik
f7f8baad03 Silence gpg-agent warnings. 2015-10-07 16:15:37 -07:00
David Tomaschik
fc4ab371f5 Merge branch 'master' of https://github.com/Matir/skel 2015-10-07 00:04:40 -07:00
David Tomaschik
2546279b92 Make all install variables function-local. 2015-10-07 00:04:30 -07:00
David Tomaschik
b1de895300 Update deb-to-kali script to handle relative paths. 2015-10-06 09:43:36 -07:00
David Tomaschik
9846031492 Silence chrome installed query. 2015-10-05 08:14:57 -07:00
David Tomaschik
1b0cec9ce2 Script to convert debian to kali. 2015-10-04 17:44:18 -07:00
David Tomaschik
3ebb6a65a7 Don't try to reinstall chrome. 2015-10-04 17:16:46 -07:00
David Tomaschik
59c51ca93e Add features to install on Kali. 2015-10-04 17:13:41 -07:00
David Tomaschik
9cb9d60fe6 Add more packages and sort the list. 2015-10-04 15:47:28 -07:00
David Tomaschik
52fcdfea60 More packet sniffing packages. 2015-10-04 13:43:24 -07:00
David Tomaschik
1cf72204a2 Leave ZSH set. 2015-10-04 10:30:59 -07:00
David Tomaschik
b16daa5da6 Make sure weare on a debian system when using dpkg-query to check fo X. 2015-10-03 13:00:37 -07:00
David Tomaschik
8e55e1dbe9 Switch delete mode in backup.sh 2015-10-02 08:57:51 -07:00
David Tomaschik
8a84e547e1 Update documentation. 2015-10-01 14:02:21 -07:00
David Tomaschik
d1696d88f1 scapy is useful. 2015-09-30 12:03:12 -07:00
David Tomaschik
4bf05842ec Merge branch 'master' of https://github.com/Matir/skel 2015-09-29 13:23:17 -07:00
David Tomaschik
1456c91f99 Don't set TZ, it doesn't always help when it's wrong! 2015-09-29 13:23:14 -07:00
David Tomaschik
a2a308c7d3 Setting TZ universally is confusing. 2015-09-28 20:34:05 -07:00
David Tomaschik
2432245885 Add more packages. 2015-09-27 18:16:34 -07:00
David Tomaschik
f828e32917 Add support for packages that require X.
Checks if xserver-xorg is installed to determine whether
or not to install the 'X' family of packages.
2015-09-26 06:52:02 -07:00
David Tomaschik
d809341953 Add Go appengine SDK to path. 2015-09-26 06:16:01 -07:00
David Tomaschik
a05dd1ee07 Add --delete-excluded to backup script. 2015-09-25 20:08:32 -07:00
David Tomaschik
2af2fe3e71 Add "afk" function to lock screen. 2015-09-24 07:51:20 -07:00
David Tomaschik
d4ad0603e3 Add gist urls to gitconfig. 2015-09-24 07:50:57 -07:00
David Tomaschik
93b33f668f Update gitconfig options. 2015-09-23 20:21:11 -07:00
David Tomaschik
1730ce9994 More packages. 2015-09-23 19:43:08 -07:00
David Tomaschik
00771b2031 Move ^S/^Q control to .zshrc so no errors during xprofile. 2015-09-23 17:21:08 -07:00
David Tomaschik
343c9f6e30 Fix package installation. 2015-09-22 17:33:15 -07:00
David Tomaschik
9b1bed0810 Add support for package installation. 2015-09-22 16:37:32 -07:00
David Tomaschik
873354b9c0 Delete tempfile after assembly. 2015-09-21 22:48:53 -07:00
David Tomaschik
a9ba0f73fe Add known_hosts support. 2015-09-21 20:35:13 -07:00
David Tomaschik
269426f11d Add checksec script. 2015-09-19 13:55:32 -07:00
David Tomaschik
2fba9d3bf5 Add ability to assemble shellcode. 2015-09-19 10:54:16 -07:00
David Tomaschik
bbf444460e Update zshrc since it's not really generated anymore. 2015-09-13 13:57:01 -07:00
David Tomaschik
4edcafe55b Add GPG keys as well. 2015-09-13 13:31:40 -07:00
David Tomaschik
5661e286d2 Add support for adding ssh keys. 2015-09-12 23:02:36 -07:00
David Tomaschik
891fe54140 Try to avoid checking in private keys. 2015-09-12 22:09:03 -07:00
David Tomaschik
e65a1e0793 Allow for minimal installs. 2015-09-12 14:41:30 -07:00
David Tomaschik
74a02287f8 Expand gitignore patterns. 2015-09-11 20:11:14 -07:00
David Tomaschik
6fd91c6742 Honor Content-disposition in wget 2015-09-11 20:07:04 -07:00
David Tomaschik
dc3598fa31 Add more zsh options. 2015-09-11 20:04:43 -07:00
David Tomaschik
746f65e2a1 Fix stderr output. 2015-09-11 20:04:23 -07:00
David Tomaschik
f6d9a2ac2d Function to prune broken symlinks. 2015-09-11 18:22:57 -07:00
David Tomaschik
a06239095c Add script to retrieve SSL certificates with s_client. 2015-09-11 15:11:53 -07:00
David Tomaschik
854e223573 Rename zshrc functions to end in .zsh 2015-09-11 13:58:10 -07:00
David Tomaschik
5250f1b472 Add function to sum up integers. 2015-09-11 13:57:41 -07:00
David Tomaschik
f1db430071 Fix how I handle when no solarized scheme exists. 2015-09-11 10:46:28 -07:00
David Tomaschik
a7fd649b9c Numeric glob sort for version numbers. 2015-09-11 00:04:06 -07:00
David Tomaschik
21b5d14d37 Fix up install script to actually install things. 2015-09-11 00:00:16 -07:00
David Tomaschik
724433fab1 Have xprofile source .profile, since that doesn't seem to be the default. 2015-09-10 23:59:51 -07:00
David Tomaschik
a6fe923b11 Fix vimgui font. 2015-09-10 23:59:16 -07:00
David Tomaschik
a806e19b7c Add burp wrapper function with downloader. 2015-09-10 23:58:58 -07:00
David Tomaschik
34b58163e9 Add backup script. 2015-09-03 18:32:44 -07:00
David Tomaschik
7657b4e81d Fix extra dot. 2015-09-03 18:32:32 -07:00
David Tomaschik
c8afa728a9 Fix install script. 2015-09-03 18:25:55 -07:00
David Tomaschik
ecf27f69e0 Update readme. 2015-09-03 18:10:36 -07:00
David Tomaschik
97f0e50352 Merge branch 'refactor'
Start using the refactor into multiple components.
2015-09-03 18:08:22 -07:00
David Tomaschik
dc85fb7f94 add README.md 2015-09-03 18:08:06 -07:00
159 changed files with 18510 additions and 4207 deletions

3
.git-crypt/.gitattributes vendored Normal file
View 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

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
private_dotfiles/** filter=git-crypt diff=git-crypt

5
.gitignore vendored
View File

@@ -1,5 +1,6 @@
private_dotfiles
private_dotfiles/**
installed-prefs
.installed-prefs
*.swp
*~
*.bak
local_dotfiles

31
.gitmodules vendored Normal file
View File

@@ -0,0 +1,31 @@
[submodule "dotfiles/vim/pack/matir/opt/solarized8"]
path = dotfiles/vim/pack/matir/opt/solarized8
url = https://github.com/lifepillar/vim-solarized8.git
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/surround"]
path = dotfiles/vim/pack/matir/start/surround
url = https://github.com/tpope/vim-surround.git
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/editorconfig"]
path = dotfiles/vim/pack/matir/start/editorconfig
url = https://github.com/editorconfig/editorconfig-vim.git
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/fugitive"]
path = dotfiles/vim/pack/matir/start/fugitive
url = https://github.com/tpope/vim-fugitive
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/ctrlp"]
path = dotfiles/vim/pack/matir/start/ctrlp
url = https://github.com/ctrlpvim/ctrlp.vim.git
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/vim-go"]
path = dotfiles/vim/pack/matir/start/vim-go
url = https://github.com/fatih/vim-go.git
fetchRecurseSubmodules = true
[submodule "dotfiles/tmux/tmux-logging"]
path = dotfiles/tmux/tmux-logging
url = https://github.com/tmux-plugins/tmux-logging.git
fetchRecurseSubmodules = true
[submodule "dotfiles/vim/pack/matir/start/syntastic"]
path = dotfiles/vim/pack/matir/start/syntastic
url = https://github.com/vim-syntastic/syntastic.git

39
README.md Normal file
View 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.

35
bin/_install_apt_proxy.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -o errexit
set -o nounset
if test -f /etc/apt/apt.conf.d/90-proxy ; then
echo "Looks already setup."
exit 0
fi
cat >/etc/apt/proxy-detect <<'EOF'
#!/bin/bash
PROXY=192.168.60.10:3142
if ! test -x /bin/nc ; then
echo DIRECT
exit 0
fi
if nc -w 2 -z ${PROXY/:/ } ; then
echo ${PROXY}
exit 0
fi
echo DIRECT
EOF
chmod 755 /etc/apt/proxy-detect
cat >/etc/apt/apt.conf.d/90-proxy <<'EOF'
Acquire::http::Proxy-Auto-Detect "/etc/apt/proxy-detect";
EOF
echo "Setup APT Proxying."

5
bin/_install_i3.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
apt-get install -y \
i3 i3lock xss-lock rxvt-unicode-256color fonts-inconsolata scrot \
xautolock xbacklight i3status dex libnotify-bin

16
bin/autostart.py Executable file
View 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
View 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"
exec nice rsync -Hax --delete --exclude-from="$HOME/.rsync_ignore" \
--delete-excluded "${HOME}/" "$DEST"

882
bin/checksec.sh Executable file
View 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

11
bin/cyberchef Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -u
CHEF_FILE=${HOME}/tools/cyberchef/cyberchef.html
if [ ! -f ${CHEF_FILE} ] ; then
${HOME}/bin/install_tool cyberchef
fi
exec xdg-open ${CHEF_FILE}

22
bin/disk-benchmark Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -ue
FILENAME=${1}
BENCHMARK_SIZE=${BENCHMARK_SIZE:-1000m}
if [ -f ${FILENAME} ] ; then
echo "File ${FILENAME} already exists!" >/dev/stderr
exit 1
fi
trap "test -f ${FILENAME} && rm -f ${FILENAME}" EXIT
fio --loops=5 --size=${BENCHMARK_SIZE} --filename=${FILENAME} \
--stonewall --ioengine=libaio --direct=1 \
--name=Seqread --bs=1m --rw=read \
--name=Seqwrite --bs=1m --rw=write \
--name=512Kread --bs=512k --rw=randread \
--name=512Kwrite --bs=512k --rw=randwrite \
--name=4kQD32read --bs=4k --iodepth=32 --rw=randread \
--name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite

10
bin/google-chrome Executable file
View 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
View 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

10
bin/i3lock.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
LOCKER="i3lock -c 000000"
# intentionally want word splitting below
/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'"

258
bin/install_tool Executable file
View File

@@ -0,0 +1,258 @@
#!/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 die {
echo $* >/dev/stderr
return 1
}
function install_pkgs {
if [ ${PACKAGES} -eq 0 ] ; then
return 0
fi
# TODO: check if packages are already installed
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
# TODO: consider curl instead?
wget --no-server-response -q -O ${DST} --content-disposition ${SRC}
echo " done." >&2
}
function check_sudo {
sudo -l >/dev/null
}
function add_bin_symlink {
local TARGET NAME BINDIR
TARGET=${1}
NAME=${2:-$(basename ${1})}
BINDIR=${HOME}/bin/tools/
mkdir -p -- ${BINDIR}
ln -sf ${DESTDIR}/${TARGET} ${BINDIR}/${NAME}
}
mkdir -p "${HOME}/tools"
DESTDIR="${HOME}/tools/${TOOL}"
if [ -d ${DESTDIR} ] ; then
if [ ${REINSTALL} -eq 1 ] ; then
rm -ri ${DESTDIR}
else
echo "${DESTDIR} exists but not reinstalling." >/dev/stderr
exit 1
fi
fi
# Begin main tool selection
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}
add_bin_symlink john
;;
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
;;
seclists)
git clone https://github.com/danielmiessler/SecLists.git ${DESTDIR}
;;
gcloud)
mkdir -p ${DESTDIR}
gtemp=`mktemp -d`
gbase="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/"
# TODO: find a way to make this version independent
gsdk="google-cloud-sdk-209.0.0-linux-x86_64.tar.gz"
download "${gbase}${gsdk}" /tmp/gcloud.tar.gz
tar zxf /tmp/gcloud.tar.gz --strip-components=1 -C ${DESTDIR}
rm /tmp/gcloud.tar.gz
add_bin_symlink bin/gcloud
;;
android-sdk)
# TODO: find a way to make this version independent
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)
ver=$(python -c 'import urllib2; import json; print(json.load(urllib2.urlopen("https://api.github.com/repos/mitmproxy/mitmproxy/releases/latest"))["name"].replace("v",""))')
download https://snapshots.mitmproxy.org/${ver}/mitmproxy-${ver}-linux.tar.gz /tmp/mitmproxy.tar.gz
mkdir -p ${DESTDIR}
tar zx -C ${DESTDIR} -f /tmp/mitmproxy.tar.gz
rm /tmp/mitmproxy.tar.gz
add_bin_symlink mitmproxy
add_bin_symlink mitmweb
;;
esp)
src="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
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"
;;
cyberchef)
mkdir -p ${DESTDIR}
src=$(python -c 'import urllib2; import json; print(filter(lambda x: x["name"]=="cyberchef.htm", json.load(urllib2.urlopen("https://api.github.com/repos/gchq/CyberChef/releases/latest"))["assets"])[0]["browser_download_url"])')
download ${src} ${DESTDIR}/cyberchef.html
;;
apktool)
mkdir -p ${DESTDIR}
download \
https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
${DESTDIR}/apktool
download \
https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.3.jar \
${DESTDIR}/apktool.jar
chmod +x ${DESTDIR}/apktool
add_bin_symlink apktool
;;
ptf)
src="https://github.com/trustedsec/ptf.git"
git clone ${src} ${DESTDIR}
;;
pwndbg)
if ! which gdb > /dev/null 2>&1 ; then
echo 'No gdb available!' >/dev/stderr
exit 1
fi
git clone --depth 1 -b stable https://github.com/pwndbg/pwndbg.git ${DESTDIR}
local PY_PACKAGES=${DESTDIR}/vendor
mkdir -p ${PY_PACKAGES}
local PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
local PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
PYTHON="${PYTHON}${PYVER}"
${PYTHON} -m pip install --target ${PY_PACKAGES} -Ur ${DESTDIR}/requirements.txt
${PYTHON} -m pip install --target ${PY_PACKAGES} -U capstone unicorn
# capstone package is broken
cp ${PY_PACKAGES}/usr/lib/*/dist-packages/capstone/libcapstone.so ${PY_PACKAGES}/capstone
;;
gef)
if ! which gdb > /dev/null 2>&1 ; then
echo 'No gdb available!' >/dev/stderr
exit 1
fi
mkdir -p ${DESTDIR}
download \
https://github.com/hugsy/gef/raw/master/gef.py \
${DESTDIR}/gef.py
;;
*)
echo "Unknown tool: ${TOOL}" >/dev/stderr
echo "Options:" >/dev/stderr
for opt in $(awk 'BEGIN {s=0;FS=")"};/main tool selection/{s=1};/^\s+\w+)$/{if(s==1){print $1}}' $0|sort); do
echo -e "\t${opt}" >/dev/stderr
done
exit 1
;;
esac

17
bin/metasploit.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
export NAME=$(basename "$0")
export BASE="/opt/metasploit-framework" # TODO: search this path
unset GEM_PATH
if [ -f "${BASE}/bin/${NAME}" ] ; then
exec "${BASE}/bin/${NAME}" "$@"
fi
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
View File

@@ -0,0 +1 @@
metasploit.sh

1
bin/pattern_create Symbolic link
View File

@@ -0,0 +1 @@
metasploit.sh

1
bin/pattern_offset Symbolic link
View File

@@ -0,0 +1 @@
metasploit.sh

28
bin/switch_virt.sh Executable file
View 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

26
chromeos/hterm.json Normal file
View File

@@ -0,0 +1,26 @@
{
"background-color": "rgba(0, 43, 54, 1)",
"cursor-color": "rgba(238, 232, 213, 0.5)",
"color-palette-overrides": {
"0": "#073642",
"1": "#dc322f",
"2": "#859900",
"3": "#b58900",
"4": "#268bd2",
"5": "#d33682",
"6": "#2aa198",
"7": "#eee8d5",
"8": "#002b36",
"9": "#cb4b16",
"10": "#586e75",
"11": "#657b83",
"12": "#839496",
"13": "#6c71c4",
"14": "#93a1a1",
"15": "#fdf6e3"
},
"font-family": "\"Inconsolata\", \"DejaVu Sans Mono\", \"Noto Sans Mono\", \"Everson Mono\", FreeMono, Menlo, Terminal, monospace",
"font-size": "15",
"foreground-color": "rgba(238, 232, 213, 1)",
"user-css": "https://cdn.jsdelivr.net/gh/wernight/powerline-web-fonts@ba4426cb0c0b05eb6cb342c7719776a41e1f2114/PowerlineFonts.css"
}

View File

@@ -0,0 +1,24 @@
[media-keys]
screensaver=['<Primary><Alt>l', 'XF86ScreenSaver']
[wm]
move-to-workspace-1=['<Shift><Super>exclam']
move-to-workspace-2=['<Shift><Super>at']
move-to-workspace-3=['<Shift><Super>numbersign']
move-to-workspace-4=['<Shift><Super>dollar']
move-to-workspace-5=['<Shift><Super>percent']
move-to-workspace-6=['<Shift><Super>asciicircum']
move-to-workspace-7=['<Shift><Super>ampersand']
move-to-workspace-8=['<Shift><Super>asterisk']
move-to-workspace-9=['<Shift><Super>parenleft']
switch-to-workspace-4=['<Super>4']
switch-to-workspace-1=['<Super>1']
switch-to-workspace-10=['<Super>0']
switch-to-workspace-3=['<Super>3']
switch-to-workspace-8=['<Super>8']
switch-to-workspace-5=['<Super>5']
move-to-workspace-10=['<Shift><Super>parenright']
switch-to-workspace-2=['<Super>2']
switch-to-workspace-9=['<Super>9']
switch-to-workspace-6=['<Super>6']
switch-to-workspace-7=['<Super>7']

20
deb-to-kali.sh Executable file
View 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

113
dotfiles/Xresources Normal file
View File

@@ -0,0 +1,113 @@
Xcursor.size: 16
!!!
! Xft for fonts
!!!
!Xft.dpi: 144
Xft.antialias: true
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=17,xft:monospace:size=12
! Fix font space
URxvt.letterSpace: -1
! Scrollbar and scrolling
URxvt.scrollStyle: rxvt
URxvt.scrollBar: false
! do not scroll with output
URxvt.scrollTtyOutput: false
! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt.scrollWithBuffer: true
! scroll back to the bottom on keypress
URxvt.scrollTtyKeypress: true
! Allow apps to manage their own secondary screen
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0
! Perl extensions
URxvt.perl-ext-common: default,matcher,font-size,eval
URxvt.matcher.button: 1
URxvt.urlLauncher: /usr/bin/xdg-open
URxvt.url-launcher: /usr/bin/xdg-open
! Copy/Paste Stuff
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
! Cursor
URxvt.cursorBlink: true
URxvt.cursorUnderline: false
! Pointer
URxvt.pointerBlank: true
! Disable printing the terminal contents when pressing PrintScreen.
URxvt.print-pipe: "cat > /dev/null"
!!! Solarized colors begin
! base03
URxvt.background: #002b36
! base0
URxvt.foreground: #839496
! base03
URxvt.fadeColor: #002b36
! base1
URxvt.cursorColor: #93a1a1
! base01
URxvt.pointerColorBackground: #586e75
! base1
URxvt.pointerColorForeground: #93a1a1
!! black dark/light
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

18
dotfiles/aliases Normal file → Executable file
View File

@@ -5,13 +5,18 @@
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='sudo cryptsetup luksFormat -s 512 -c aes-xts-plain --use-random -h sha256 -i 5000'
alias luksFormat='cryptsetup luksFormat -s 512 -c aes-xts-plain64 -h sha256 -i 15000'
# Colors
if ls --version >/dev/null 2>&1 ; then
alias ls='ls --color=auto'
fi
if [ `uname` != 'Darwin' -a `uname` != 'NetBSD' -a `uname` != 'FreeBSD' -a `uname` != 'OpenBSD' ] ; then
# Should have a better way to check for GNU versions
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
fi
# Easy upgrade
alias dist-upgrade="sudo sh -c 'apt-get update && apt-get -y dist-upgrade'"
@@ -25,8 +30,11 @@ alias mdcode="sed 's/^/ /'"
# Intel format plz
alias objdump="command objdump -M intel"
# ACK
alias ack="ack-grep"
# Useful directory utilities
alias dircount="for d in * ; do find \$d -type d | wc -l | tr -d '\n' ; echo ' ' \$d ; done | sort -n"
# Launch chrome for burp
alias chrome-for-burp="/usr/bin/google-chrome --ignore-certificate-errors --user-data-dir=${HOME}/.chrome-for-burp --proxy-server=127.0.0.1:8080 >/dev/null 2>&1 &"
# Drop caches for swap issues
alias drop_caches="echo 3 | sudo /usr/bin/tee /proc/sys/vm/drop_caches"
# dump acpi temperature
alias temp='printf "%02.2f\n" "$(cat /sys/class/thermal/thermal_zone0/temp)e-3"'

21
dotfiles/bashrc Normal file → Executable file
View 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
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe 2>/dev/null)"
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; 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
@@ -45,3 +38,5 @@ fi
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi

198
dotfiles/config/i3/config Normal file
View File

@@ -0,0 +1,198 @@
# 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 &
exec --no-startup-id xset dpms 600
bindsym $mod+l exec \
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
bindsym $alt+Control+l exec \
bash -c "i3lock -c 000000 && (sleep 2 && xset dpms force off) &"
# 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
exec --no-startup-id dex --autostart --environment x-cinnamon
# 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

View File

@@ -0,0 +1,143 @@
#!/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 {
local def_iface="$(ip route get 1.1.1.1 2>&1 | grep -oP 'dev \K\S+')"
if test -n "${def_iface}" ; then
cat <<-EOF
ethernet "${def_iface}" {
format_up = "E: %ip"
format_down = "E: down"
}
order += "ethernet ${def_iface}"
EOF
return 0
fi
cat <<-EOF
ethernet _first_ {
format_up = "E: %ip"
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

View 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"
}

View 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

View File

@@ -0,0 +1 @@
/dev/null

View File

@@ -1,4 +1,3 @@
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"

480
dotfiles/dircolors Normal file
View File

@@ -0,0 +1,480 @@
# Exact Solarized Dark color theme for the color GNU ls utility.
# Designed for dircolors (GNU coreutils) 5.97
#
# This simple theme was simultaneously designed for these terminal color schemes:
# - Solarized dark (best)
# - Solarized light
# - default dark
# - default light
# with a slight optimization for Solarized Dark.
#
# How the colors were selected:
# - Terminal emulators often have an option typically enabled by default that makes
# bold a different color. It is important to leave this option enabled so that
# you can access the entire 16-color Solarized palette, and not just 8 colors.
# - We favor universality over a greater number of colors. So we limit the number
# of colors so that this theme will work out of the box in all terminals,
# Solarized or not, dark or light.
# - We choose to have the following category of files:
# NORMAL & FILE, DIR, LINK, EXEC and
# editable text including source, unimportant text, binary docs & multimedia source
# files, viewable multimedia, archived/compressed, and unimportant non-text
# - For uniqueness, we stay away from the Solarized foreground colors are -- either
# base00 (brightyellow) or base0 (brightblue). However, they can be used if
# you know what the bg/fg colors of your terminal are, in order to optimize the display.
# - 3 different options are provided: universal, solarized dark, and solarized light.
# The only difference between the universal scheme and one that's optimized for
# dark/light is the color of "unimportant" files, which should blend more with the
# background
# - We note that blue is the hardest color to see on dark bg and yellow is the hardest
# color to see on light bg (with blue being particularly bad). So we choose yellow
# for multimedia files which are usually accessed in a GUI folder browser anyway.
# And blue is kept for custom use of this scheme's user.
# - See table below to see the assignments.
# Installation instructions:
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Below, there should be one TERM entry for each termtype that is colorizable
TERM ansi
TERM color_xterm
TERM color-xterm
TERM con132x25
TERM con132x30
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
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 nxterm
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 screen.xterm-new
TERM st
TERM st-meta
TERM st-256color
TERM st-meta-256color
TERM tmux
TERM tmux-256color
TERM vt100
TERM xterm
TERM xterm-new
TERM xterm-16color
TERM xterm-256color
TERM xterm-256color-italic
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
TERM xterm-termite
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
#############################################################################
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
#
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# 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
#
# NOTES:
# - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html
# - Color combinations
# ANSI Color code Solarized Notes Universal SolDark SolLight
# ~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~ ~~~~~~~~~ ~~~~~~~ ~~~~~~~~
# 00 none NORMAL, FILE <SAME> <SAME>
# 30 black base02
# 01;30 bright black base03 bg of SolDark
# 31 red red docs & mm src <SAME> <SAME>
# 01;31 bright red orange EXEC <SAME> <SAME>
# 32 green green editable text <SAME> <SAME>
# 01;32 bright green base01 unimportant text <SAME>
# 33 yellow yellow unclear in light bg multimedia <SAME> <SAME>
# 01;33 bright yellow base00 fg of SolLight unimportant non-text
# 34 blue blue unclear in dark bg user customized <SAME> <SAME>
# 01;34 bright blue base0 fg in SolDark unimportant text
# 35 magenta magenta LINK <SAME> <SAME>
# 01;35 bright magenta violet archive/compressed <SAME> <SAME>
# 36 cyan cyan DIR <SAME> <SAME>
# 01;36 bright cyan base1 unimportant non-text <SAME>
# 37 white base2
# 01;37 bright white base3 bg in SolLight
# 05;37;41 unclear in Putty dark
### By file type
# global default
NORMAL 00
# normal file
FILE 00
# directory
DIR 34
# 777 directory
OTHER_WRITABLE 34;40
# symbolic link
LINK 35
# pipe, socket, block device, character device (blue bg)
FIFO 30;44
SOCK 35;44
DOOR 35;44 # Solaris 2.5 and later
BLK 33;44
CHR 37;44
#############################################################################
### By file attributes
# Orphaned symlinks (blinking white on red)
# Blink may or may not work (works on iTerm dark or light, and Putty dark)
ORPHAN 05;37;41
# ... and the files that orphaned symlinks point to (blinking white on red)
MISSING 05;37;41
# files with execute permission
EXEC 01;31 # Unix
.cmd 01;31 # Win
.exe 01;31 # Win
.com 01;31 # Win
.bat 01;31 # Win
.reg 01;31 # Win
.app 01;31 # OSX
#############################################################################
### By extension
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
### Text formats
# Text that we can edit with a regular editor
.txt 32
.org 32
.md 32
.mkd 32
# Source text
.h 32
.hpp 32
.c 32
.C 32
.cc 32
.cpp 32
.cxx 32
.objc 32
.cl 32
.sh 32
.bash 32
.csh 32
.zsh 32
.el 32
.vim 32
.java 32
.pl 32
.pm 32
.py 32
.rb 32
.hs 32
.php 32
.htm 32
.html 32
.shtml 32
.erb 32
.haml 32
.xml 32
.rdf 32
.css 32
.sass 32
.scss 32
.less 32
.js 32
.coffee 32
.man 32
.0 32
.1 32
.2 32
.3 32
.4 32
.5 32
.6 32
.7 32
.8 32
.9 32
.l 32
.n 32
.p 32
.pod 32
.tex 32
.go 32
.sql 32
.csv 32
.sv 32
.svh 32
.v 32
.vh 32
.vhd 32
### Multimedia formats
# Image
.bmp 33
.cgm 33
.dl 33
.dvi 33
.emf 33
.eps 33
.gif 33
.jpeg 33
.jpg 33
.JPG 33
.mng 33
.pbm 33
.pcx 33
.pdf 33
.pgm 33
.png 33
.PNG 33
.ppm 33
.pps 33
.ppsx 33
.ps 33
.svg 33
.svgz 33
.tga 33
.tif 33
.tiff 33
.xbm 33
.xcf 33
.xpm 33
.xwd 33
.xwd 33
.yuv 33
# Audio
.aac 33
.au 33
.flac 33
.m4a 33
.mid 33
.midi 33
.mka 33
.mp3 33
.mpa 33
.mpeg 33
.mpg 33
.ogg 33
.opus 33
.ra 33
.wav 33
# Video
.anx 33
.asf 33
.avi 33
.axv 33
.flc 33
.fli 33
.flv 33
.gl 33
.m2v 33
.m4v 33
.mkv 33
.mov 33
.MOV 33
.mp4 33
.mp4v 33
.mpeg 33
.mpg 33
.nuv 33
.ogm 33
.ogv 33
.ogx 33
.qt 33
.rm 33
.rmvb 33
.swf 33
.vob 33
.webm 33
.wmv 33
### Misc
# Binary document formats and multimedia source
.doc 31
.docx 31
.rtf 31
.odt 31
.dot 31
.dotx 31
.ott 31
.xls 31
.xlsx 31
.ods 31
.ots 31
.ppt 31
.pptx 31
.odp 31
.otp 31
.fla 31
.psd 31
# Archives, compressed
.7z 1;35
.apk 1;35
.arj 1;35
.bin 1;35
.bz 1;35
.bz2 1;35
.cab 1;35 # Win
.deb 1;35
.dmg 1;35 # OSX
.gem 1;35
.gz 1;35
.iso 1;35
.jar 1;35
.msi 1;35 # Win
.rar 1;35
.rpm 1;35
.tar 1;35
.tbz 1;35
.tbz2 1;35
.tgz 1;35
.tx 1;35
.war 1;35
.xpi 1;35
.xz 1;35
.z 1;35
.Z 1;35
.zip 1;35
# For testing
.ANSI-30-black 30
.ANSI-01;30-brblack 01;30
.ANSI-31-red 31
.ANSI-01;31-brred 01;31
.ANSI-32-green 32
.ANSI-01;32-brgreen 01;32
.ANSI-33-yellow 33
.ANSI-01;33-bryellow 01;33
.ANSI-34-blue 34
.ANSI-01;34-brblue 01;34
.ANSI-35-magenta 35
.ANSI-01;35-brmagenta 01;35
.ANSI-36-cyan 36
.ANSI-01;36-brcyan 01;36
.ANSI-37-white 37
.ANSI-01;37-brwhite 01;37
#############################################################################
# Your customizations
# Unimportant text files
# For universal scheme, use brightgreen 01;32
# For optimal on light bg (but too prominent on dark bg), use white 01;34
.log 01;32
*~ 01;32
*# 01;32
#.log 01;34
#*~ 01;34
#*# 01;34
# Unimportant non-text files
# For universal scheme, use brightcyan 01;36
# For optimal on dark bg (but too prominent on light bg), change to 01;33
#.bak 01;36
#.BAK 01;36
#.old 01;36
#.OLD 01;36
#.org_archive 01;36
#.off 01;36
#.OFF 01;36
#.dist 01;36
#.DIST 01;36
#.orig 01;36
#.ORIG 01;36
#.swp 01;36
#.swo 01;36
#*,v 01;36
.bak 01;33
.BAK 01;33
.old 01;33
.OLD 01;33
.org_archive 01;33
.off 01;33
.OFF 01;33
.dist 01;33
.DIST 01;33
.orig 01;33
.ORIG 01;33
.swp 01;33
.swo 01;33
*,v 01;33
# The brightmagenta (Solarized: purple) color is free for you to use for your
# custom file type
.gpg 34
.gpg 34
.pgp 34
.asc 34
.3des 34
.aes 34
.enc 34
.sqlite 34

82
dotfiles/env Executable file
View File

@@ -0,0 +1,82 @@
# Sourced by zshrc as well as bash.
# Should only use POSIX shell constructs.
umask 027
# Paths and preferences
export PYTHONPATH="$HOME/.python:$PYTHONPATH"
export GOPATH="$HOME/Projects/Go:/usr/share/gocode"
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH:$GOPATH/bin"
export 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
# Requires `ncurses-base` package for terminfo.
export TERM="xterm-256color"
fi
# Terminal preferences for i3
if [ -z "${TERMINAL}" ] ; then
for t in urxvt gnome-terminal; do
if TERMINAL=$(command -v ${t}) ; then
export TERMINAL
fi
done
fi
# Browser preferences
if [ -z "${BROWSER}" ] ; then
for t in google-chrome-beta google-chrome firefox ; do
if BROWSER=$(command -v ${t}); then
export BROWSER
fi
done
fi
# For virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# GPG full key id
export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
# Setup locale
if test -x /usr/bin/locale ; then
for l in en_US.utf8 C.UTF-8 C ; do
if /usr/bin/locale -a | grep -q "${l}" ; then
export LC_CTYPE=${l}
export LC_NUMERIC=${l}
export LC_TIME=${l}
export LC_MONETARY=${l}
export LC_MESSAGES=${l}
export LC_PAPER=${l}
export LC_NAME=${l}
export LC_ADDRESS=${l}
export LC_TELEPHONE=${l}
export LC_MEASUREMENT=${l}
export LC_IDENTIFICATION=${l}
break
fi
done
else
export LC_CTYPE=C
export LC_NUMERIC=C
export LC_TIME=C
export LC_MONETARY=C
export LC_MESSAGES=C
export LC_PAPER=C
export LC_NAME=C
export LC_ADDRESS=C
export LC_TELEPHONE=C
export LC_MEASUREMENT=C
export LC_IDENTIFICATION=C
fi
export LC_COLLATE=C
# shellcheck source=/dev/null
test -e "$HOME/.localenv" && . "$HOME/.localenv"

View File

@@ -1,5 +1,6 @@
# General options
set verbose off
set confirm off
set disassembly-flavor intel
set output-radix 0x10
set input-radix 10.
@@ -21,62 +22,22 @@ define reg
info registers
end
# __________________gdb options_________________
# Fancy sourcing of modules
python
import sys
import os.path
gef = os.path.expanduser('~/tools/gef/gef.py')
pwndbg = os.path.expanduser('~/tools/pwndbg/gdbinit.py')
peda = os.path.expanduser('~/.peda/peda.py')
if os.path.isfile(gef):
gdb.execute('source {}'.format(gef))
elif os.path.isfile(pwndbg):
sys.path.insert(0, os.path.expanduser('~/tools/pwndbg/vendor'))
gdb.execute('source {}'.format(pwndbg))
elif os.path.isfile(peda):
gdb.execute('source {}'.format(peda))
# set to 1 to have ARM target debugging as default, use the "arm" command to switch inside gdb
set $ARM = 0
# set to 0 if you have problems with the colorized prompt - reported by Plouj with Ubuntu gdb 7.2
set $COLOUREDPROMPT = 0
# Colour the first line of the disassembly - default is green, if you want to change it search for
# SETCOLOUR1STLINE and modify it :-)
set $SETCOLOUR1STLINE = 0
# set to 0 to remove display of objectivec messages (default is 1)
set $SHOWOBJECTIVEC = 1
# set to 0 to remove display of cpu registers (default is 1)
set $SHOWCPUREGISTERS = 1
# set to 1 to enable display of stack (default is 0)
set $SHOWSTACK = 1
# set to 1 to show 4 bytes of the stack at a time for 32bit and 8 bytes for 64bit
set $STACK_WORDSIZE = 1
# set to 1 to enable display of data window (default is 0)
set $SHOWDATAWIN = 0
# set to 0 to disable coloured display of changed registers
set $SHOWREGCHANGES = 1
# set to 1 so skip command to execute the instruction at the new location
# by default it EIP/RIP will be modified and update the new context but not execute the instruction
set $SKIPEXECUTE = 0
# if $SKIPEXECUTE is 1 configure the type of execution
# 1 = use stepo (do not get into calls), 0 = use stepi (step into calls)
set $SKIPSTEP = 1
# show the ARM opcodes - change to 0 if you don't want such thing (in x/i command)
set $ARMOPCODES = 1
# x86 disassembly flavor: 0 for Intel, 1 for AT&T
set $X86FLAVOR = 0
# use colorized output or not
set $USECOLOR = 0
# 64 bit options
set $64BITS = 0
# Remote 64 bit debugging
set $KDP64BITS = -1
set confirm off
set verbose off
set output-radix 0x10
set input-radix 0x10
# These make gdb never pause in its output
set height 0
set width 0
set $SHOW_CONTEXT = 1
set $SHOW_NEST_INSN = 0
set $CONTEXTSIZE_STACK = 6
set $CONTEXTSIZE_DATA = 8
set $CONTEXTSIZE_CODE = 8
# __________________end gdb options_________________
#
source ~/.reverser-gdbinit
local_init = os.path.expanduser('~/.gdbinit.local')
if os.path.isfile(local_init):
gdb.execute('source {}'.format(local_init))
end

125
dotfiles/gef.rc Normal file
View File

@@ -0,0 +1,125 @@
[context]
clear_screen = False
enable = True
grow_stack_down = False
ignore_registers =
layout = legend regs stack code args source memory threads trace extra
nb_lines_backtrace = 10
nb_lines_code = 6
nb_lines_code_prev = 3
nb_lines_stack = 8
nb_lines_threads = -1
peek_calls = True
peek_ret = True
redirect =
show_registers_raw = False
show_stack_raw = False
[dereference]
max_recursion = 7
[entry-break]
entrypoint_symbols = main _main __libc_start_main __uClibc_main start _start
[gef-remote]
clean_on_exit = False
[gef]
autosave_breakpoints_file =
debug = False
disable_color = False
extra_plugins_dir =
follow_child = True
readline_compat = False
[got]
function_not_resolved = yellow
function_resolved = green
[heap-analysis-helper]
check_double_free = True
check_free_null = False
check_heap_overlap = True
check_uaf = True
check_weird_free = True
[heap-chunks]
peek_nb_byte = 16
[hexdump]
always_show_ascii = False
[highlight]
regex = False
[ida-interact]
host = 127.0.0.1
port = 1337
sync_cursor = False
[pattern]
length = 1024
[pcustom]
struct_path = /tmp/gef/structs
[process-search]
ps_command = /bin/ps auxww
[syscall-args]
path = /tmp/gef/syscall-tables
[theme]
address_code = red
address_heap = green
address_stack = pink
context_title_line = gray
context_title_message = cyan
default_title_line = gray
default_title_message = cyan
dereference_base_address = cyan
dereference_code = gray
dereference_register_value = bold blue
dereference_string = yellow
disassemble_current_instruction = green
registers_register_name = blue
registers_value_changed = bold red
source_current_line = green
table_heading = blue
[trace-run]
max_tracing_recursion = 1
tracefile_prefix = ./gef-trace-
[aliases]
pf = print-format
status = process-status
binaryninja-interact = ida-interact
bn = ida-interact
binja = ida-interact
lookup = scan
grep = search-pattern
xref = search-pattern
flags = edit-flags
sc-search = shellcode search
sc-get = shellcode get
ps = process-search
start = entry-break
nb = name-break
ctx = context
telescope = dereference
pattern offset = pattern search
hl = highlight
highlight ls = highlight list
hll = highlight list
hlc = highlight clear
highlight set = highlight add
hla = highlight add
highlight delete = highlight remove
highlight del = highlight remove
highlight unset = highlight remove
highlight rm = highlight remove
hlr = highlight remove
fmtstr-helper = format-string-helper
screen-setup = tmux-setup

View File

@@ -1,15 +1,65 @@
[user]
name = David Tomaschik
email = david@systemoverlord.com
[push]
default = current
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
[url "https://github.com/"]
insteadOf = github://
# Site specific config
[url "https://github.com./"]
insteadOf = "github:"
insteadOf = "github://"
[url "ssh://git@github.com/"]
pushInsteadOf = github://
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
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
prompt = false

View File

@@ -1,3 +1,4 @@
# Common trash (metadata, backup files, etc.)
.DS_Store
.DS_Store?
._*
@@ -8,3 +9,14 @@ Thumbs.db
*.swp
*~
*.bak
# Object files
*.py[co]
*.[oa]
# Try to avoid accidentally checking in private keys
id_rsa
id_ecdsa
# Kicad backup files
*.kicad_pcb-bak

View File

@@ -0,0 +1 @@
keyserver hkps://keys.openpgp.org

View File

@@ -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

View File

@@ -1,10 +1,10 @@
use-agent
# HKPS requires gnupg-curl for gpg1
keyserver hkps://hkps.pool.sks-keyservers.net
# Unfortunately, the path must be fully-qualified
keyserver-options auto-key-retrieve ca-cert-file=/home/david/.gnupg/sks-keyservers.pem
keyserver hkps://keys.openpgp.org
keyserver-options auto-key-retrieve no-honor-keyserver-url
auto-key-locate keyserver
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
cipher-algo AES256
default-key 7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B

4
dotfiles/inputrc Normal file
View File

@@ -0,0 +1,4 @@
set editing-mode vi
set keymap vi
set convert-meta on

7
dotfiles/ipython.py Normal file
View File

@@ -0,0 +1,7 @@
try:
import os, IPython
os.environ['PYTHONSTARTUP'] = '' # Prevent running this again
IPython.start_ipython()
raise SystemExit
except ImportError:
pass

View File

@@ -0,0 +1,611 @@
# Configuration file for ipython.
#------------------------------------------------------------------------------
# InteractiveShellApp(Configurable) configuration
#------------------------------------------------------------------------------
## A Mixin for applications that start InteractiveShell instances.
#
# Provides configurables for loading extensions and executing files as part of
# configuring a Shell environment.
#
# The following methods should be called by the :meth:`initialize` method of the
# subclass:
#
# - :meth:`init_path`
# - :meth:`init_shell` (to be implemented by the subclass)
# - :meth:`init_gui_pylab`
# - :meth:`init_extensions`
# - :meth:`init_code`
## Execute the given command string.
#c.InteractiveShellApp.code_to_run = ''
## Run the file referenced by the PYTHONSTARTUP environment variable at IPython
# startup.
c.InteractiveShellApp.exec_PYTHONSTARTUP = False
## List of files to run at IPython startup.
#c.InteractiveShellApp.exec_files = []
## lines of code to run at IPython startup.
#c.InteractiveShellApp.exec_lines = []
## A list of dotted module names of IPython extensions to load.
#c.InteractiveShellApp.extensions = []
## dotted module name of an IPython extension to load.
#c.InteractiveShellApp.extra_extension = ''
## A file to be run
#c.InteractiveShellApp.file_to_run = ''
## Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk2', 'gtk3',
# 'osx', 'pyglet', 'qt', 'qt4', 'qt5', 'tk', 'wx', 'gtk2', 'qt4').
#c.InteractiveShellApp.gui = None
## Should variables loaded at startup (by startup files, exec_lines, etc.) be
# hidden from tools like %who?
#c.InteractiveShellApp.hide_initial_ns = True
## Configure matplotlib for interactive use with the default matplotlib backend.
#c.InteractiveShellApp.matplotlib = None
## Run the module as a script.
#c.InteractiveShellApp.module_to_run = ''
## Pre-load matplotlib and numpy for interactive use, selecting a particular
# matplotlib backend and loop integration.
#c.InteractiveShellApp.pylab = None
## If true, IPython will populate the user namespace with numpy, pylab, etc. and
# an ``import *`` is done from numpy and pylab, when using pylab mode.
#
# When False, pylab mode should not import any names into the user namespace.
#c.InteractiveShellApp.pylab_import_all = True
## Reraise exceptions encountered loading IPython extensions?
#c.InteractiveShellApp.reraise_ipython_extension_failures = False
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging formatters for %(asctime)s
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
## The Logging format template
#c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'
## Set the log level by value or name.
#c.Application.log_level = 30
#------------------------------------------------------------------------------
# BaseIPythonApplication(Application) configuration
#------------------------------------------------------------------------------
## IPython: an enhanced interactive Python shell.
## Whether to create profile dir if it doesn't exist
#c.BaseIPythonApplication.auto_create = False
## Whether to install the default config files into the profile dir. If a new
# profile is being created, and IPython contains config files for that profile,
# then they will be staged into the new directory. Otherwise, default config
# files will be automatically generated.
#c.BaseIPythonApplication.copy_config_files = False
## Path to an extra config file to load.
#
# If specified, load this config file in addition to any other IPython config.
#c.BaseIPythonApplication.extra_config_file = ''
## The name of the IPython directory. This directory is used for logging
# configuration (through profiles), history storage, etc. The default is usually
# $HOME/.ipython. This option can also be specified through the environment
# variable IPYTHONDIR.
#c.BaseIPythonApplication.ipython_dir = ''
## Whether to overwrite existing config files when copying
#c.BaseIPythonApplication.overwrite = False
## The IPython profile to use.
#c.BaseIPythonApplication.profile = 'default'
## Create a massive crash report when IPython encounters what may be an internal
# error. The default is to append a short message to the usual traceback
#c.BaseIPythonApplication.verbose_crash = False
#------------------------------------------------------------------------------
# TerminalIPythonApp(BaseIPythonApplication,InteractiveShellApp) configuration
#------------------------------------------------------------------------------
## Whether to display a banner upon starting IPython.
#c.TerminalIPythonApp.display_banner = True
## If a command or file is given via the command-line, e.g. 'ipython foo.py',
# start an interactive shell after executing the file or command.
#c.TerminalIPythonApp.force_interact = False
## Class to use to instantiate the TerminalInteractiveShell object. Useful for
# custom Frontends
#c.TerminalIPythonApp.interactive_shell_class = 'IPython.terminal.interactiveshell.TerminalInteractiveShell'
## Start IPython quickly by skipping the loading of config files.
#c.TerminalIPythonApp.quick = False
#------------------------------------------------------------------------------
# InteractiveShell(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## An enhanced, interactive shell for Python.
## 'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which
# nodes should be run interactively (displaying output from expressions).
#c.InteractiveShell.ast_node_interactivity = 'last_expr'
## A list of ast.NodeTransformer subclass instances, which will be applied to
# user input before code is run.
#c.InteractiveShell.ast_transformers = []
## Automatically run await statement in the top level repl.
#c.InteractiveShell.autoawait = True
## Make IPython automatically call any callable object even if you didn't type
# explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
# The value can be '0' to disable the feature, '1' for 'smart' autocall, where
# it is not applied if there are no more arguments on the line, and '2' for
# 'full' autocall, where all callable objects are automatically called (even if
# no arguments are present).
#c.InteractiveShell.autocall = 0
## Autoindent IPython code entered interactively.
#c.InteractiveShell.autoindent = True
## Enable magic commands to be called without the leading %.
#c.InteractiveShell.automagic = True
## The part of the banner to be printed before the profile
#c.InteractiveShell.banner1 = "Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) \nType 'copyright', 'credits' or 'license' for more information\nIPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.\n"
## The part of the banner to be printed after the profile
#c.InteractiveShell.banner2 = ''
## Set the size of the output cache. The default is 1000, you can change it
# permanently in your config file. Setting it to 0 completely disables the
# caching system, and the minimum value accepted is 3 (if you provide a value
# less than 3, it is reset to 0 and a warning is issued). This limit is defined
# because otherwise you'll spend more time re-flushing a too small cache than
# working
#c.InteractiveShell.cache_size = 1000
## Use colors for displaying information about objects. Because this information
# is passed through a pager (like 'less'), and some pagers get confused with
# color codes, this capability can be turned off.
#c.InteractiveShell.color_info = True
## Set the color scheme (NoColor, Neutral, Linux, or LightBG).
#c.InteractiveShell.colors = 'Neutral'
##
#c.InteractiveShell.debug = False
## Don't call post-execute functions that have failed in the past.
#c.InteractiveShell.disable_failing_post_execute = False
## If True, anything that would be passed to the pager will be displayed as
# regular output instead.
#c.InteractiveShell.display_page = False
## (Provisional API) enables html representation in mime bundles sent to pagers.
#c.InteractiveShell.enable_html_pager = False
## Total length of command history
#c.InteractiveShell.history_length = 10000
## The number of saved history entries to be loaded into the history buffer at
# startup.
#c.InteractiveShell.history_load_length = 1000
##
#c.InteractiveShell.ipython_dir = ''
## Start logging to the given file in append mode. Use `logfile` to specify a log
# file to **overwrite** logs to.
#c.InteractiveShell.logappend = ''
## The name of the logfile to use.
#c.InteractiveShell.logfile = ''
## Start logging to the default log file in overwrite mode. Use `logappend` to
# specify a log file to **append** logs to.
#c.InteractiveShell.logstart = False
## Select the loop runner that will be used to execute top-level asynchronous
# code
#c.InteractiveShell.loop_runner = 'IPython.core.interactiveshell._asyncio_runner'
##
#c.InteractiveShell.object_info_string_level = 0
## Automatically call the pdb debugger after every exception.
#c.InteractiveShell.pdb = False
## Deprecated since IPython 4.0 and ignored since 5.0, set
# TerminalInteractiveShell.prompts object directly.
#c.InteractiveShell.prompt_in1 = 'In [\\#]: '
## Deprecated since IPython 4.0 and ignored since 5.0, set
# TerminalInteractiveShell.prompts object directly.
#c.InteractiveShell.prompt_in2 = ' .\\D.: '
## Deprecated since IPython 4.0 and ignored since 5.0, set
# TerminalInteractiveShell.prompts object directly.
#c.InteractiveShell.prompt_out = 'Out[\\#]: '
## Deprecated since IPython 4.0 and ignored since 5.0, set
# TerminalInteractiveShell.prompts object directly.
#c.InteractiveShell.prompts_pad_left = True
##
#c.InteractiveShell.quiet = False
##
#c.InteractiveShell.separate_in = '\n'
##
#c.InteractiveShell.separate_out = ''
##
#c.InteractiveShell.separate_out2 = ''
## Show rewritten input, e.g. for autocall.
#c.InteractiveShell.show_rewritten_input = True
## Enables rich html representation of docstrings. (This requires the docrepr
# module).
#c.InteractiveShell.sphinxify_docstring = False
##
#c.InteractiveShell.wildcards_case_sensitive = True
## Switch modes for the IPython exception handlers.
#c.InteractiveShell.xmode = 'Context'
#------------------------------------------------------------------------------
# TerminalInteractiveShell(InteractiveShell) configuration
#------------------------------------------------------------------------------
## Set to confirm when you try to exit IPython with an EOF (Control-D in Unix,
# Control-Z/Enter in Windows). By typing 'exit' or 'quit', you can force a
# direct exit without any confirmation.
#c.TerminalInteractiveShell.confirm_exit = True
## Options for displaying tab completions, 'column', 'multicolumn', and
# 'readlinelike'. These options are for `prompt_toolkit`, see `prompt_toolkit`
# documentation for more information.
#c.TerminalInteractiveShell.display_completions = 'multicolumn'
## Shortcut style to use at the prompt. 'vi' or 'emacs'.
c.TerminalInteractiveShell.editing_mode = 'vi'
## Set the editor used by IPython (default to $EDITOR/vi/notepad).
#c.TerminalInteractiveShell.editor = 'vim'
## Allows to enable/disable the prompt toolkit history search
#c.TerminalInteractiveShell.enable_history_search = True
## Enable vi (v) or Emacs (C-X C-E) shortcuts to open an external editor. This is
# in addition to the F2 binding, which is always enabled.
#c.TerminalInteractiveShell.extra_open_editor_shortcuts = False
## Provide an alternative handler to be called when the user presses Return. This
# is an advanced option intended for debugging, which may be changed or removed
# in later releases.
#c.TerminalInteractiveShell.handle_return = None
## Highlight matching brackets.
#c.TerminalInteractiveShell.highlight_matching_brackets = True
## The name or class of a Pygments style to use for syntax highlighting. To see
# available styles, run `pygmentize -L styles`.
#c.TerminalInteractiveShell.highlighting_style = traitlets.Undefined
## Override highlighting format for specific tokens
#c.TerminalInteractiveShell.highlighting_style_overrides = {}
## Enable mouse support in the prompt (Note: prevents selecting text with the
# mouse)
#c.TerminalInteractiveShell.mouse_support = False
## Display the current vi mode (when using vi editing mode).
#c.TerminalInteractiveShell.prompt_includes_vi_mode = True
## Class used to generate Prompt token for prompt_toolkit
#c.TerminalInteractiveShell.prompts_class = 'IPython.terminal.prompts.Prompts'
## Use `raw_input` for the REPL, without completion and prompt colors.
#
# Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR.
# Known usage are: IPython own testing machinery, and emacs inferior-shell
# integration through elpy.
#
# This mode default to `True` if the `IPY_TEST_SIMPLE_PROMPT` environment
# variable is set, or the current terminal is not a tty.
#c.TerminalInteractiveShell.simple_prompt = False
## Number of line at the bottom of the screen to reserve for the completion menu
#c.TerminalInteractiveShell.space_for_menu = 6
## Automatically set the terminal title
#c.TerminalInteractiveShell.term_title = True
## Customize the terminal title format. This is a python format string.
# Available substitutions are: {cwd}.
#c.TerminalInteractiveShell.term_title_format = 'IPython: {cwd}'
## Use 24bit colors instead of 256 colors in prompt highlighting. If your
# terminal supports true color, the following command should print 'TRUECOLOR'
# in orange: printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"
#c.TerminalInteractiveShell.true_color = False
#------------------------------------------------------------------------------
# HistoryAccessor(HistoryAccessorBase) configuration
#------------------------------------------------------------------------------
## Access the history database without adding to it.
#
# This is intended for use by standalone history tools. IPython shells use
# HistoryManager, below, which is a subclass of this.
## Options for configuring the SQLite connection
#
# These options are passed as keyword args to sqlite3.connect when establishing
# database connections.
#c.HistoryAccessor.connection_options = {}
## enable the SQLite history
#
# set enabled=False to disable the SQLite history, in which case there will be
# no stored history, no SQLite connection, and no background saving thread.
# This may be necessary in some threaded environments where IPython is embedded.
#c.HistoryAccessor.enabled = True
## Path to file to use for SQLite history database.
#
# By default, IPython will put the history database in the IPython profile
# directory. If you would rather share one history among profiles, you can set
# this value in each, so that they are consistent.
#
# Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
# If you see IPython hanging, try setting this to something on a local disk,
# e.g::
#
# ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
#
# you can also use the specific value `:memory:` (including the colon at both
# end but not the back ticks), to avoid creating an history file.
#c.HistoryAccessor.hist_file = ''
#------------------------------------------------------------------------------
# HistoryManager(HistoryAccessor) configuration
#------------------------------------------------------------------------------
## A class to organize all history-related functionality in one place.
## Write to database every x commands (higher values save disk access & power).
# Values of 1 or less effectively disable caching.
#c.HistoryManager.db_cache_size = 0
## Should the history database include output? (default: no)
#c.HistoryManager.db_log_output = False
#------------------------------------------------------------------------------
# ProfileDir(LoggingConfigurable) configuration
#------------------------------------------------------------------------------
## An object to manage the profile directory and its resources.
#
# The profile directory is used by all IPython applications, to manage
# configuration, logging and security.
#
# This object knows how to find, create and manage these directories. This
# should be used by any code that wants to handle profiles.
## Set the profile location directly. This overrides the logic used by the
# `profile` option.
#c.ProfileDir.location = ''
#------------------------------------------------------------------------------
# BaseFormatter(Configurable) configuration
#------------------------------------------------------------------------------
## A base formatter class that is configurable.
#
# This formatter should usually be used as the base class of all formatters. It
# is a traited :class:`Configurable` class and includes an extensible API for
# users to determine how their objects are formatted. The following logic is
# used to find a function to format an given object.
#
# 1. The object is introspected to see if it has a method with the name
# :attr:`print_method`. If is does, that object is passed to that method
# for formatting.
# 2. If no print method is found, three internal dictionaries are consulted
# to find print method: :attr:`singleton_printers`, :attr:`type_printers`
# and :attr:`deferred_printers`.
#
# Users should use these dictionaries to register functions that will be used to
# compute the format data for their objects (if those objects don't have the
# special print methods). The easiest way of using these dictionaries is through
# the :meth:`for_type` and :meth:`for_type_by_name` methods.
#
# If no function/callable is found to compute the format data, ``None`` is
# returned and this format type is not used.
##
#c.BaseFormatter.deferred_printers = {}
##
#c.BaseFormatter.enabled = True
##
#c.BaseFormatter.singleton_printers = {}
##
#c.BaseFormatter.type_printers = {}
#------------------------------------------------------------------------------
# PlainTextFormatter(BaseFormatter) configuration
#------------------------------------------------------------------------------
## The default pretty-printer.
#
# This uses :mod:`IPython.lib.pretty` to compute the format data of the object.
# If the object cannot be pretty printed, :func:`repr` is used. See the
# documentation of :mod:`IPython.lib.pretty` for details on how to write pretty
# printers. Here is a simple example::
#
# def dtype_pprinter(obj, p, cycle):
# if cycle:
# return p.text('dtype(...)')
# if hasattr(obj, 'fields'):
# if obj.fields is None:
# p.text(repr(obj))
# else:
# p.begin_group(7, 'dtype([')
# for i, field in enumerate(obj.descr):
# if i > 0:
# p.text(',')
# p.breakable()
# p.pretty(field)
# p.end_group(7, '])')
##
#c.PlainTextFormatter.float_precision = ''
## Truncate large collections (lists, dicts, tuples, sets) to this size.
#
# Set to 0 to disable truncation.
#c.PlainTextFormatter.max_seq_length = 1000
##
#c.PlainTextFormatter.max_width = 79
##
#c.PlainTextFormatter.newline = '\n'
##
#c.PlainTextFormatter.pprint = True
##
#c.PlainTextFormatter.verbose = False
#------------------------------------------------------------------------------
# Completer(Configurable) configuration
#------------------------------------------------------------------------------
## Enable unicode completions, e.g. \alpha<tab> . Includes completion of latex
# commands, unicode names, and expanding unicode characters back to latex
# commands.
#c.Completer.backslash_combining_completions = True
## Enable debug for the Completer. Mostly print extra information for
# experimental jedi integration.
#c.Completer.debug = False
## Activate greedy completion PENDING DEPRECTION. this is now mostly taken care
# of with Jedi.
#
# This will enable completion on elements of lists, results of function calls,
# etc., but can be unsafe because the code is actually evaluated on TAB.
#c.Completer.greedy = False
## Experimental: restrict time (in milliseconds) during which Jedi can compute
# types. Set to 0 to stop computing types. Non-zero value lower than 100ms may
# hurt performance by preventing jedi to build its cache.
#c.Completer.jedi_compute_type_timeout = 400
## Experimental: Use Jedi to generate autocompletions. Default to True if jedi is
# installed.
#c.Completer.use_jedi = True
#------------------------------------------------------------------------------
# IPCompleter(Completer) configuration
#------------------------------------------------------------------------------
## Extension of the completer class with IPython-specific features
## DEPRECATED as of version 5.0.
#
# Instruct the completer to use __all__ for the completion
#
# Specifically, when completing on ``object.<tab>``.
#
# When True: only those names in obj.__all__ will be included.
#
# When False [default]: the __all__ attribute is ignored
#c.IPCompleter.limit_to__all__ = False
## Whether to merge completion results into a single list
#
# If False, only the completion results from the first non-empty completer will
# be returned.
#c.IPCompleter.merge_completions = True
## Instruct the completer to omit private method names
#
# Specifically, when completing on ``object.<tab>``.
#
# When 2 [default]: all names that start with '_' will be excluded.
#
# When 1: all 'magic' names (``__foo__``) will be excluded.
#
# When 0: nothing will be excluded.
#c.IPCompleter.omit__names = 2
#------------------------------------------------------------------------------
# ScriptMagics(Magics) configuration
#------------------------------------------------------------------------------
## Magics for talking to scripts
#
# This defines a base `%%script` cell magic for running a cell with a program in
# a subprocess, and registers a few top-level magics that call %%script with
# common interpreters.
## Extra script cell magics to define
#
# This generates simple wrappers of `%%script foo` as `%%foo`.
#
# If you want to add script magics that aren't on your path, specify them in
# script_paths
#c.ScriptMagics.script_magics = []
## Dict mapping short 'ruby' names to full paths, such as '/opt/secret/bin/ruby'
#
# Only necessary for items in script_magics where the default path will not find
# the right interpreter.
#c.ScriptMagics.script_paths = {}
#------------------------------------------------------------------------------
# LoggingMagics(Magics) configuration
#------------------------------------------------------------------------------
## Magics related to all logging machinery.
## Suppress output of log state when logging is enabled
#c.LoggingMagics.quiet = False
#------------------------------------------------------------------------------
# StoreMagics(Magics) configuration
#------------------------------------------------------------------------------
## Lightweight persistence for python variables.
#
# Provides the %store magic.
## If True, any %store-d variables will be automatically restored when IPython
# starts.
#c.StoreMagics.autorestore = False

View File

@@ -16,13 +16,11 @@ servers = (
autoconnect = "yes";
},
{
address = "chat.freenode.net";
chatnet = "freenode";
port = "7000";
address = "irc.hackint.eu";
chatnet = "hackint";
port = "9999";
use_ssl = "yes";
ssl_cert = "~/.irssi/matir.pem";
ssl_verify = "yes";
ssl_cafile = "~/.irssi/instantssl.crt";
ssl_verify = "no";
autoconnect = "yes";
},
{
@@ -31,7 +29,7 @@ servers = (
port = "6697";
use_ssl = "yes";
ssl_verify = "no";
autoconnect = "yes";
autoconnect = "no";
},
{
address = "irc.rpis.ec";
@@ -40,6 +38,17 @@ servers = (
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";
}
);
@@ -78,13 +87,14 @@ channels = (
{ name = "#wargames"; chatnet = "overthewire"; autojoin = "yes"; },
{ name = "#social"; chatnet = "overthewire"; autojoin = "yes"; },
{ name = "#openvpn"; chatnet = "freenode"; autojoin = "yes"; },
{ name = "#shadowcats"; 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 = "#rpisec"; chatnet = "rpisec"; autojoin = "yes"; },
{ name = "#offsec"; chatnet = "freenode"; autojoin = "yes"; },
{ name = "#offtopicsec"; chatnet = "freenode"; autojoin = "yes"; }
);
aliases = {
@@ -264,6 +274,13 @@ statusbar = {
barend = { priority = "100"; alignment = "right"; };
};
};
awl_2 = {
items = {
barstart = { priority = "100"; };
awl_2 = { };
barend = { priority = "100"; alignment = "right"; };
};
};
};
};
settings = {
@@ -286,8 +303,9 @@ settings = {
awl_shared_sbar = "OFF";
awl_viewer = "no";
awl_block = "-15";
awl_maxlines = "2";
awl_maxlines = "3";
awl_height_adjust = "2";
awl_hide_empty = "0";
};
};
windows = {
@@ -394,3 +412,4 @@ windows = {
};
};
mainwindows = { 1 = { first_line = "1"; lines = "78"; }; };
logs = { };

View File

@@ -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 = ""; };
};

3962
dotfiles/john/john.conf Normal file

File diff suppressed because it is too large Load Diff

2982
dotfiles/lldb/lisa.py Normal file

File diff suppressed because it is too large Load Diff

6
dotfiles/lldbinit Normal file
View 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

69
dotfiles/profile Normal file → Executable file
View File

@@ -1,54 +1,29 @@
# Sourced by zshrc as well as bash.
#!/bin/bash
# Also sourced by zsh, etc.
# Interactive shells only.
# Should only use POSIX constructs.
umask 027
ulimit -c unlimited
# Always load ENV
test -f "$HOME/.env" && . "$HOME/.env"
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
shopt -s expand_aliases
fi
# Setup GREP_COLORS
export GREP_COLOR='01;31'
export GREP_COLORS='mt=01;31:mc=01;31:ms=01;31'
# Paths and preferences
export PATH="$HOME/bin:/sbin:/usr/sbin:$PATH"
export PYTHONPATH="$HOME/.python"
export GOPATH="$HOME/.go"
export VISUAL=vim
export EDITOR=vim
export TZ='America/Los_Angeles'
export DEBEMAIL="david@systemoverlord.com"
export DEBFULLNAME="David Tomaschik"
export LESS="-MR"
EXTRA_PATHS=("$HOME/.gce/google-cloud-sdk/bin" "$HOME/bin/genymotion"
"$HOME/bin/genymotion/tools" )
for p in "${EXTRA_PATHS[@]}" ; do
if [ -d "$p" ] ; then
export PATH="$PATH:$p"
fi
done
unset EXTRA_PATHS
# Disable stty ctrl-s/ctrl-q behavior
stty stop undef
stty start undef
# Setup GPG Agent
GPG_AGENT_INFO_PATH=$HOME/.gnupg/gpg-agent-info-`hostname`
if test -f $GPG_AGENT_INFO_PATH && kill -0 `cut -d: -f 2 $GPG_AGENT_INFO_PATH` 2>/dev/null ; then
. $GPG_AGENT_INFO_PATH
export GPG_AGENT_INFO SSH_AUTH_SOCK SSH_AGENT_PID
# Setup LS_COLORS
if whence dircolors >/dev/null 2>&1 ; then
test -f "${HOME}/.dircolors" && \
eval "$(dircolors "${HOME}/.dircolors")"
else
if which gpg-agent >/dev/null 2>&1 ; then
gpg-agent -q || eval `gpg-agent --daemon --enable-ssh-support --write-env-file $GPG_AGENT_INFO_PATH` 2>/dev/null
# Static solarized LS_COLORS
LS_COLORS='no=00:fi=00:di=34:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.hpp=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.cl=32:*.sh=32:*.bash=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.go=32:*.sql=32:*.csv=32:*.sv=32:*.svh=32:*.v=32:*.vh=32:*.vhd=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.PNG=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.m4a=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.opus=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.MOV=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.webm=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.odt=31:*.dot=31:*.dotx=31:*.ott=31:*.xls=31:*.xlsx=31:*.ods=31:*.ots=31:*.ppt=31:*.pptx=31:*.odp=31:*.otp=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*,v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:*.sqlite=34:';
export LS_COLORS
fi
if [ "$(uname)" = "Darwin" ] ; then
LSCOLORS="gxfxbEaEBxxEhEhBaDaCaD"
export LSCOLORS
CLICOLOR=1
export CLICOLOR
fi
unset GPG_AGENT_INFO_PATH
export GPG_TTY=`tty`
# End GPG
if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"

File diff suppressed because it is too large Load Diff

13
dotfiles/rsync_ignore Normal file
View File

@@ -0,0 +1,13 @@
tmp
Downloads
.cache
.local/share/Trash
.wine
.thumbnails
.histfile
.zcompdump
.zcompdump*
.sqlite_history
VirtualBox VMs
Audits
SpiderOak Hive

1
dotfiles/rvmrc Normal file
View File

@@ -0,0 +1 @@
rvm_silence_path_mismatch_check_flag=1

2
dotfiles/sqliterc Normal file
View File

@@ -0,0 +1,2 @@
.header on
.mode column

View File

@@ -1,9 +1,21 @@
# Universal Settings (can't override)
# Never fall back to protocol 1: it's broken
# Universal Settings
Protocol 2
# Permit Local Overrides
Include ~/.ssh/config.d/*
# Enable canonicalization, unless overridden
CanonicalizeHostname yes
CanonicalizeFallbackLocal yes
CanonicalDomains systemoverlord.com
CanonicalizeMaxDots 0
# Defaults (May be Overridden)
Host *
Host *.*
CheckHostIP yes
Match canonical all
CheckHostIP no
ControlMaster auto
ControlPath ~/.ssh/master/%r@%h:%p
ControlPersist yes
@@ -11,3 +23,6 @@ Host *
ForwardX11 no
ForwardX11Trusted no
ServerAliveInterval 120
UpdateHostKeys yes
User david
VerifyHostKeyDNS yes

7
dotfiles/ssh/rc Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
REMOTE_LINK="${HOME}/.ssh/remote_agent.sock"
if test \! -L "${REMOTE_LINK}" -a -n "${SSH_AUTH_SOCK}" ; then
ln -sf "${SSH_AUTH_SOCK}" "${REMOTE_LINK}"
fi

View File

@@ -14,23 +14,18 @@ set -g history-limit 10000
set -g base-index 1
set -g pane-base-index 1
# Let us use utf-8 drawing characters to make tab-like window formats
setw -g utf8 on
set -g status-utf8 on
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#h:#S:#I.#P #W'
# Set keybindings
set -g mode-keys vi
set -g status-keys vi
# Set a 256color $TERM variable so programs inside tmux know they can use 256
# colors
set -g default-terminal screen-256color
# Mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
# Activity
setw -g monitor-activity on
set -g visual-activity on
@@ -42,10 +37,32 @@ setw -g automatic-rename on
source-file ~/.tmux/tmux-solarized-256.conf
# Provide a statusbar
set -g window-status-current-bg colour33
set -g window-status-current-fg colour235
set -g window-status-current-attr bold
set -g window-status-current-style fg=colour235,bg=colour33,bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '/#S/ '
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'
# tmux X clipboard integration
bind C-c run "tmux show-buffer | xsel -i -b"
bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer"
# Enable logging module, if available
run-shell "~/.tmux/tmux-logging/logging.tmux || true"

View File

@@ -1,27 +1,22 @@
#### COLOUR (Solarized 256)
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
set-option -g status-style fg=colour136,bg=colour235 #yellow and base02
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
set-window-option -g window-status-style fg=colour244,bg=default #base0 and default
#set-window-option -g window-status-style dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-style fg=colour166,bg=default #orange and default
#set-window-option -g window-status-current-style bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
set-option -g pane-border-style fg=colour235 #base02
set-option -g pane-active-border-style fg=colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
set-option -g message-style fg=colour166,bg=colour235 #orange and base02
# pane number display
set-option -g display-panes-active-colour colour33 #blue
@@ -29,3 +24,6 @@ set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red

View File

View File

View File

@@ -1,24 +1,6 @@
" Allow full use of vim options
set nocompatible
" Enable Vundle if installed
if filereadable(glob("~/.vim/bundle/Vundle.vim/README.md"))
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'eistaa/vim-flake8'
Plugin 'tpope/vim-fugitive'
Plugin 'mileszs/ack.vim'
Plugin 'tpope/vim-unimpaired'
Plugin 'scrooloose/syntastic'
Plugin 'mattn/webapi-vim'
Plugin 'mattn/gist-vim'
Plugin 'fatih/vim-go'
Plugin 'altercation/vim-colors-solarized'
call vundle#end()
endif
" Setup paths
set backupdir=~/.cache/vim/backup//
set directory=~/.cache/vim/swap//
@@ -46,7 +28,6 @@ imap <S-Tab> <Esc><<A
" Line numbering, ruler
set number
set ruler
set cursorline
" File options
set encoding=utf-8
@@ -54,15 +35,20 @@ set encoding=utf-8
syntax on
set background=dark
if has('gui_running')
set guifont=Inconsolata\ 11
set guifont=Inconsolata\ Medium\ 12
else
let g:solarized_termcolors=256
let g:solarized_termtrans=1
endif
colorscheme solarized
" Enable filetype support
filetype plugin indent on
" Allow file modelines
set modeline
if $TERM ==? 'rxvt-unicode-256color'
" I have .Xresources setup for solarized
let g:solarized_use16=1
endif
silent! colorscheme solarized8
" Default ASM syntax for ft support
let asmsyntax="nasm"
" Too risky to allow file modelines
set nomodeline
" Automatically re-read changed files
set autoread
" fsync() after writing files
@@ -128,10 +114,46 @@ 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']
let g:syntastic_python_checkers=['flake8']
" Have F5 run the tests and display errors
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
" Load vim-ycm if installed on the system level
if isdirectory("/usr/share/vim-youcompleteme")
let g:ycm_autoclose_preview_window_after_insertion=1
set runtimepath+=/usr/share/vim-youcompleteme
endif
" Include a .vimrc.local if it exists
if filereadable(glob("~/.vimrc.local"))
source ~/.vimrc.local
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
" Python options
autocmd Filetype python set expandtab shiftwidth=4
" Makefile options
autocmd BufRead,BufNewFile Makefile* set noexpandtab
" Enable filetype support
" Needs to be at end of vimrc
filetype plugin indent on

View 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)"

View 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]

View File

@@ -0,0 +1,11 @@
#
# weechat -- charset.conf
#
[default]
decode = "iso-8859-1"
encode = ""
[decode]
[encode]

View 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
View 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
View 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

View 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]

View 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]

View 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

View 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
View 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"

View 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

View 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}"

View 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

View File

@@ -1,6 +1,7 @@
# Use server timestamps and name
timestamping = on
trust_server_names = on
content_disposition = on
# Recursive download options
no_parent = on

View File

@@ -1 +0,0 @@
setxkbmap -option ctrl:nocaps

4
dotfiles/xsessionrc Normal file
View File

@@ -0,0 +1,4 @@
setxkbmap -option ctrl:nocaps -option compose:ralt
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
View 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"

8
dotfiles/zlogin Normal file
View File

@@ -0,0 +1,8 @@
# Execute code that does not affect the current session in the background.
{
# Compile the completion dump to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump"
fi
} &!

View File

@@ -1,3 +0,0 @@
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]%}$(git_prompt_info)%{$fg[white]%}%#%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" ("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"

2
dotfiles/zshenv Normal file → Executable file
View File

@@ -1,2 +1,4 @@
if [[ -f $HOME/.env ]] ; then source $HOME/.env ; fi
# ZSH specific environment
DEBIAN_PREVENT_KEYBOARD_CHANGES=yes

145
dotfiles/zshrc Normal file → Executable file
View File

@@ -1,18 +1,57 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace
unsetopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/david/.zshrc'
# For interactive shells
HISTFILE=~/.zhistory
HISTSIZE=10000
SAVEHIST=10000
setopt \
ALWAYS_TO_END \
APPEND_HISTORY \
AUTO_CD \
AUTO_LIST \
AUTO_MENU \
AUTO_PARAM_SLASH \
AUTO_PUSHD \
BANG_HIST \
C_BASES \
COMPLETE_IN_WORD \
EXTENDED_GLOB \
EXTENDED_HISTORY \
HIST_EXPIRE_DUPS_FIRST \
HIST_FIND_NO_DUPS \
HIST_IGNORE_DUPS \
HIST_IGNORE_SPACE \
HIST_LEX_WORDS \
HIST_SAVE_NO_DUPS \
HIST_VERIFY \
INTERACTIVE_COMMENTS \
LONG_LIST_JOBS \
MULTIOS \
NO_CLOBBER \
NO_HUP \
NOMATCH \
NOTIFY \
PUSHD_IGNORE_DUPS \
PUSHD_SILENT \
PUSHD_TO_HOME \
RC_QUOTES \
SHARE_HISTORY
unsetopt \
BEEP \
CDABLE_VARS \
HIST_BEEP \
LIST_BEEP \
FLOW_CONTROL \
MAIL_WARNING \
HUP \
BG_NICE \
CHECK_JOBS
# vi keybindings
bindkey -v
autoload -Uz compinit && compinit
# End of lines added by compinstall
# Allow core files
ulimit -c unlimited
DIRSTACKSIZE=16
# Set terminal title
case $TERM in
xterm*)
precmd () {print -Pn "\e]0;%n@%m: %~\a"}
@@ -20,32 +59,82 @@ case $TERM in
esac
autoload -U colors && colors
PS1="%{%(!.$fg[red].$fg[green])%}%n%{$fg[white]%}@%{$fg[cyan]%}%m%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} "
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%} "
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache"
# .profile is universal
. ~/.profile
# Deduplicate the path
typeset -U path
alias ls='ls --color'
# Load oh-my-zsh
if [ -d $HOME/.oh-my-zsh ] ; then
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="matir"
ZSH_CUSTOM="$HOME/.zsh_custom"
plugins=(git encode64 gpg-agent pep8 pip python tmux urltools extract sudo virsh virtualenv)
source $ZSH/oh-my-zsh.sh
unset ZSH_THEME
fi
# Keybindings
# Additional Keybindings
bindkey '^[[A' history-search-backward
bindkey '^[[B' history-search-forward
# ctrl-arrow keys
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
bindkey '^P' up-history
bindkey '^N' down-history
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
# ok, a few emacs convenience bindings
bindkey '^w' backward-kill-word
bindkey '^r' history-incremental-search-backward
# Source extras
for file in $HOME/.zshrc.d/* ; do source "$file" ; done
# Source extras and aliases if interactive
if [[ $- == *i* ]] ; then
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi
# zsh-only-ism to avoid error if glob doesn't expand
for file in $HOME/.zshrc.d/[a-zA-Z0-9]*.zsh(N) ; do
source "$file"
done
# extra completions, prompt
fpath=(~/.zshrc.completions ~/.zshrc.d/matir_prompt $fpath)
# Completion
zstyle ':compinstall' filename "${HOME}/.zshrc"
zstyle ':completion:*' users root ${USER}
# Modules after fpath
autoload -Uz compinit && compinit -i
autoload -Uz promptinit && promptinit
# Prompt
prompt matir
# Virtualenvwrapper
if test -f /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh ; then
source /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
fi
# Enable grc if we have it
if ls --version 2>&1 >/dev/null ; then
alias ls='ls --color -C'
fi
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
# Syntax highlighting and substring search
if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
if test -f ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh ; then
source ${HOME}/.zshrc.d/_zsh-history-substring-search.zsh
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
fi
fi # End interactive-only block
# In case ack is named ack-grep
if [ -x /usr/bin/ack-grep ] ; then
alias ack='/usr/bin/ack-grep'
fi
# Setup PATH for tools
PATH=${PATH}:${HOME}/bin/tools
# Most is nice, if we have it
if command -v most >/dev/null 2>&1; then
export PAGER="most"
fi
# Load any local settings
if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi

File diff suppressed because it is too large Load Diff

View 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
}

View File

@@ -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"

View 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"

View File

@@ -0,0 +1,759 @@
#!/usr/bin/env zsh
##############################################################################
#
# Copyright (c) 2009 Peter Stephenson
# Copyright (c) 2011 Guido van Steen
# Copyright (c) 2011 Suraj N. Kurapati
# Copyright (c) 2011 Sorin Ionescu
# Copyright (c) 2011 Vincent Guerci
# Copyright (c) 2016 Geza Lore
# Copyright (c) 2017 Bengt Brodersen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# * Neither the name of the FIZSH nor the names of its contributors
# may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
##############################################################################
#-----------------------------------------------------------------------------
# declare global configuration variables
#-----------------------------------------------------------------------------
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
typeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
typeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''
typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY=''
#-----------------------------------------------------------------------------
# declare internal global variables
#-----------------------------------------------------------------------------
typeset -g BUFFER MATCH MBEGIN MEND CURSOR
typeset -g _history_substring_search_refresh_display
typeset -g _history_substring_search_query_highlight
typeset -g _history_substring_search_result
typeset -g _history_substring_search_query
typeset -g -a _history_substring_search_query_parts
typeset -g -a _history_substring_search_raw_matches
typeset -g -i _history_substring_search_raw_match_index
typeset -g -a _history_substring_search_matches
typeset -g -i _history_substring_search_match_index
typeset -g -A _history_substring_search_unique_filter
#-----------------------------------------------------------------------------
# the main ZLE widgets
#-----------------------------------------------------------------------------
history-substring-search-up() {
_history-substring-search-begin
_history-substring-search-up-history ||
_history-substring-search-up-buffer ||
_history-substring-search-up-search
_history-substring-search-end
}
history-substring-search-down() {
_history-substring-search-begin
_history-substring-search-down-history ||
_history-substring-search-down-buffer ||
_history-substring-search-down-search
_history-substring-search-end
}
zle -N history-substring-search-up
zle -N history-substring-search-down
#-----------------------------------------------------------------------------
# implementation details
#-----------------------------------------------------------------------------
zmodload -F zsh/parameter
#
# We have to "override" some keys and widgets if the
# zsh-syntax-highlighting plugin has not been loaded:
#
# https://github.com/nicoulaj/zsh-syntax-highlighting
#
if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
#
# Dummy implementation of _zsh_highlight() that
# simply removes any existing highlights when the
# user inserts printable characters into $BUFFER.
#
_zsh_highlight() {
if [[ $KEYS == [[:print:]] ]]; then
region_highlight=()
fi
}
#
# The following snippet was taken from the zsh-syntax-highlighting project:
#
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/56b134f5d62ae3d4e66c7f52bd0cc2595f9b305b/zsh-syntax-highlighting.zsh#L126-161
#
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of the zsh-syntax-highlighting contributors nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#--------------8<-------------------8<-------------------8<-----------------
# Rebind all ZLE widgets to make them invoke _zsh_highlights.
_zsh_highlight_bind_widgets()
{
# Load ZSH module zsh/zleparameter, needed to override user defined widgets.
zmodload zsh/zleparameter 2>/dev/null || {
echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter.' >&2
return 1
}
# Override ZLE widgets to make them invoke _zsh_highlight.
local cur_widget
for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do
case $widgets[$cur_widget] in
# Already rebound event: do nothing.
user:$cur_widget|user:_zsh_highlight_widget_*);;
# User defined widget: override and rebind old one with prefix "orig-".
user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Completion widget: override and rebind old one with prefix "orig-".
completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
_zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Builtin widget: override and make it call the builtin ".widget".
builtin) eval "_zsh_highlight_widget_$cur_widget() { builtin zle .$cur_widget -- \"\$@\" && _zsh_highlight }; \
zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
# Default: unhandled case.
*) echo "zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget'" >&2 ;;
esac
done
}
#-------------->8------------------->8------------------->8-----------------
_zsh_highlight_bind_widgets
fi
_history-substring-search-begin() {
setopt localoptions extendedglob
_history_substring_search_refresh_display=
_history_substring_search_query_highlight=
#
# If the buffer is the same as the previously displayed history substring
# search result, then just keep stepping through the match list. Otherwise
# start a new search.
#
if [[ -n $BUFFER && $BUFFER == ${_history_substring_search_result:-} ]]; then
return;
fi
#
# Clear the previous result.
#
_history_substring_search_result=''
if [[ -z $BUFFER ]]; then
#
# If the buffer is empty, we will just act like up-history/down-history
# in ZSH, so we do not need to actually search the history. This should
# speed things up a little.
#
_history_substring_search_query=
_history_substring_search_query_parts=()
_history_substring_search_raw_matches=()
else
#
# For the purpose of highlighting we keep a copy of the original
# query string.
#
_history_substring_search_query=$BUFFER
#
# compose search pattern
#
if [[ -n $HISTORY_SUBSTRING_SEARCH_FUZZY ]]; then
#
# `=` split string in arguments
#
_history_substring_search_query_parts=(${=_history_substring_search_query})
else
_history_substring_search_query_parts=(${==_history_substring_search_query})
fi
#
# Escape and join query parts with wildcard character '*' as seperator
# `(j:CHAR:)` join array to string with CHAR as seperator
#
local search_pattern="*${(j:*:)_history_substring_search_query_parts[@]//(#m)[\][()|\\*?#<>~^]/\\$MATCH}*"
#
# Find all occurrences of the search pattern in the history file.
#
# (k) returns the "keys" (history index numbers) instead of the values
# (R) returns values in reverse older, so the index of the youngest
# matching history entry is at the head of the list.
#
_history_substring_search_raw_matches=(${(k)history[(R)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${search_pattern}]})
fi
#
# In order to stay as responsive as possible, we will process the raw
# matches lazily (when the user requests the next match) to choose items
# that need to be displayed to the user.
# _history_substring_search_raw_match_index holds the index of the last
# unprocessed entry in _history_substring_search_raw_matches. Any items
# that need to be displayed will be added to
# _history_substring_search_matches.
#
# We use an associative array (_history_substring_search_unique_filter) as
# a 'set' data structure to ensure uniqueness of the results if desired.
# If an entry (key) is in the set (non-empty value), then we have already
# added that entry to _history_substring_search_matches.
#
_history_substring_search_raw_match_index=0
_history_substring_search_matches=()
_history_substring_search_unique_filter=()
#
# If $_history_substring_search_match_index is equal to
# $#_history_substring_search_matches + 1, this indicates that we
# are beyond the end of $_history_substring_search_matches and that we
# have also processed all entries in
# _history_substring_search_raw_matches.
#
# If $#_history_substring_search_match_index is equal to 0, this indicates
# that we are beyond the beginning of $_history_substring_search_matches.
#
# If we have initially pressed "up" we have to initialize
# $_history_substring_search_match_index to 0 so that it will be
# incremented to 1.
#
# If we have initially pressed "down" we have to initialize
# $_history_substring_search_match_index to 1 so that it will be
# decremented to 0.
#
if [[ $WIDGET == history-substring-search-down ]]; then
_history_substring_search_match_index=1
else
_history_substring_search_match_index=0
fi
}
_history-substring-search-end() {
setopt localoptions extendedglob
_history_substring_search_result=$BUFFER
# the search was successful so display the result properly by clearing away
# existing highlights and moving the cursor to the end of the result buffer
if [[ $_history_substring_search_refresh_display -eq 1 ]]; then
region_highlight=()
CURSOR=${#BUFFER}
fi
# highlight command line using zsh-syntax-highlighting
_zsh_highlight
# highlight the search query inside the command line
if [[ -n $_history_substring_search_query_highlight ]]; then
# highlight first matching query parts
local highlight_start_index=0
local highlight_end_index=0
local query_part
for query_part in $_history_substring_search_query_parts; do
local escaped_query_part=${query_part//(#m)[\][()|\\*?#<>~^]/\\$MATCH}
# (i) get index of pattern
local query_part_match_index="${${BUFFER:$highlight_start_index}[(i)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${escaped_query_part}]}"
if [[ $query_part_match_index -le ${#BUFFER:$highlight_start_index} ]]; then
highlight_start_index=$(( $highlight_start_index + $query_part_match_index ))
highlight_end_index=$(( $highlight_start_index + ${#query_part} ))
region_highlight+=("$(($highlight_start_index - 1)) $(($highlight_end_index - 1)) $_history_substring_search_query_highlight")
fi
done
fi
# For debugging purposes:
# zle -R "mn: "$_history_substring_search_match_index" m#: "${#_history_substring_search_matches}
# read -k -t 200 && zle -U $REPLY
# Exit successfully from the history-substring-search-* widgets.
return 0
}
_history-substring-search-up-buffer() {
#
# Check if the UP arrow was pressed to move the cursor within a multi-line
# buffer. This amounts to three tests:
#
# 1. $#buflines -gt 1.
#
# 2. $CURSOR -ne $#BUFFER.
#
# 3. Check if we are on the first line of the current multi-line buffer.
# If so, pressing UP would amount to leaving the multi-line buffer.
#
# We check this by adding an extra "x" to $LBUFFER, which makes
# sure that xlbuflines is always equal to the number of lines
# until $CURSOR (including the line with the cursor on it).
#
local buflines XLBUFFER xlbuflines
buflines=(${(f)BUFFER})
XLBUFFER=$LBUFFER"x"
xlbuflines=(${(f)XLBUFFER})
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xlbuflines -ne 1 ]]; then
zle up-line-or-history
return 0
fi
return 1
}
_history-substring-search-down-buffer() {
#
# Check if the DOWN arrow was pressed to move the cursor within a multi-line
# buffer. This amounts to three tests:
#
# 1. $#buflines -gt 1.
#
# 2. $CURSOR -ne $#BUFFER.
#
# 3. Check if we are on the last line of the current multi-line buffer.
# If so, pressing DOWN would amount to leaving the multi-line buffer.
#
# We check this by adding an extra "x" to $RBUFFER, which makes
# sure that xrbuflines is always equal to the number of lines
# from $CURSOR (including the line with the cursor on it).
#
local buflines XRBUFFER xrbuflines
buflines=(${(f)BUFFER})
XRBUFFER="x"$RBUFFER
xrbuflines=(${(f)XRBUFFER})
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xrbuflines -ne 1 ]]; then
zle down-line-or-history
return 0
fi
return 1
}
_history-substring-search-up-history() {
#
# Behave like up in ZSH, except clear the $BUFFER
# when beginning of history is reached like in Fish.
#
if [[ -z $_history_substring_search_query ]]; then
# we have reached the absolute top of history
if [[ $HISTNO -eq 1 ]]; then
BUFFER=
# going up from somewhere below the top of history
else
zle up-line-or-history
fi
return 0
fi
return 1
}
_history-substring-search-down-history() {
#
# Behave like down-history in ZSH, except clear the
# $BUFFER when end of history is reached like in Fish.
#
if [[ -z $_history_substring_search_query ]]; then
# going down from the absolute top of history
if [[ $HISTNO -eq 1 && -z $BUFFER ]]; then
BUFFER=${history[1]}
_history_substring_search_refresh_display=1
# going down from somewhere above the bottom of history
else
zle down-line-or-history
fi
return 0
fi
return 1
}
_history_substring_search_process_raw_matches() {
#
# Process more outstanding raw matches and append any matches that need to
# be displayed to the user to _history_substring_search_matches.
# Return whether there were any more results appended.
#
#
# While we have more raw matches. Process them to see if there are any more
# matches that need to be displayed to the user.
#
while [[ $_history_substring_search_raw_match_index -lt $#_history_substring_search_raw_matches ]]; do
#
# Move on to the next raw entry and get its history index.
#
_history_substring_search_raw_match_index+=1
local index=${_history_substring_search_raw_matches[$_history_substring_search_raw_match_index]}
#
# If HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set to a non-empty value,
# then ensure that only unique matches are presented to the user.
# When HIST_IGNORE_ALL_DUPS is set, ZSH already ensures a unique history,
# so in this case we do not need to do anything.
#
if [[ ! -o HIST_IGNORE_ALL_DUPS && -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
#
# Get the actual history entry at the new index, and check if we have
# already added it to _history_substring_search_matches.
#
local entry=${history[$index]}
if [[ -z ${_history_substring_search_unique_filter[$entry]} ]]; then
#
# This is a new unique entry. Add it to the filter and append the
# index to _history_substring_search_matches.
#
_history_substring_search_unique_filter[$entry]=1
_history_substring_search_matches+=($index)
#
# Indicate that we did find a match.
#
return 0
fi
else
#
# Just append the new history index to the processed matches.
#
_history_substring_search_matches+=($index)
#
# Indicate that we did find a match.
#
return 0
fi
done
#
# We are beyond the end of the list of raw matches. Indicate that no
# more matches are available.
#
return 1
}
_history-substring-search-has-next() {
#
# Predicate function that returns whether any more older matches are
# available.
#
if [[ $_history_substring_search_match_index -lt $#_history_substring_search_matches ]]; then
#
# We did not reach the end of the processed list, so we do have further
# matches.
#
return 0
else
#
# We are at the end of the processed list. Try to process further
# unprocessed matches. _history_substring_search_process_raw_matches
# returns whether any more matches were available, so just return
# that result.
#
_history_substring_search_process_raw_matches
return $?
fi
}
_history-substring-search-has-prev() {
#
# Predicate function that returns whether any more younger matches are
# available.
#
if [[ $_history_substring_search_match_index -gt 1 ]]; then
#
# We did not reach the beginning of the processed list, so we do have
# further matches.
#
return 0
else
#
# We are at the beginning of the processed list. We do not have any more
# matches.
#
return 1
fi
}
_history-substring-search-found() {
#
# A match is available. The index of the match is held in
# $_history_substring_search_match_index
#
# 1. Make $BUFFER equal to the matching history entry.
#
# 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
# to highlight the current buffer.
#
BUFFER=$history[$_history_substring_search_matches[$_history_substring_search_match_index]]
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
}
_history-substring-search-not-found() {
#
# No more matches are available.
#
# 1. Make $BUFFER equal to $_history_substring_search_query so the user can
# revise it and search again.
#
# 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
# to highlight the current buffer.
#
BUFFER=$_history_substring_search_query
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
}
_history-substring-search-up-search() {
_history_substring_search_refresh_display=1
#
# Select history entry during history-substring-down-search:
#
# The following variables have been initialized in
# _history-substring-search-up/down-search():
#
# $_history_substring_search_matches is the current list of matches that
# need to be displayed to the user.
# $_history_substring_search_match_index is the index of the current match
# that is being displayed to the user.
#
# The range of values that $_history_substring_search_match_index can take
# is: [0, $#_history_substring_search_matches + 1]. A value of 0
# indicates that we are beyond the beginning of
# $_history_substring_search_matches. A value of
# $#_history_substring_search_matches + 1 indicates that we are beyond
# the end of $_history_substring_search_matches and that we have also
# processed all entries in _history_substring_search_raw_matches.
#
# If $_history_substring_search_match_index equals
# $#_history_substring_search_matches and
# $_history_substring_search_raw_match_index is not greater than
# $#_history_substring_search_raw_matches, then we need to further process
# $_history_substring_search_raw_matches to see if there are any more
# entries that need to be displayed to the user.
#
# In _history-substring-search-up-search() the initial value of
# $_history_substring_search_match_index is 0. This value is set in
# _history-substring-search-begin(). _history-substring-search-up-search()
# will initially increment it to 1.
#
if [[ $_history_substring_search_match_index -gt $#_history_substring_search_matches ]]; then
#
# We are beyond the end of $_history_substring_search_matches. This
# can only happen if we have also exhausted the unprocessed matches in
# _history_substring_search_raw_matches.
#
# 1. Update display to indicate search not found.
#
_history-substring-search-not-found
return
fi
if _history-substring-search-has-next; then
#
# We do have older matches.
#
# 1. Move index to point to the next match.
# 2. Update display to indicate search found.
#
_history_substring_search_match_index+=1
_history-substring-search-found
else
#
# We do not have older matches.
#
# 1. Move the index beyond the end of
# _history_substring_search_matches.
# 2. Update display to indicate search not found.
#
_history_substring_search_match_index+=1
_history-substring-search-not-found
fi
#
# When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
# history should be matched, make sure the new and old results are different.
#
# However, if the HIST_IGNORE_ALL_DUPS shell option, or
# HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a
# unique history, so in this case we do not need to do anything.
#
if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
return
fi
if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
#
# Repeat the current search so that a different (unique) match is found.
#
_history-substring-search-up-search
fi
}
_history-substring-search-down-search() {
_history_substring_search_refresh_display=1
#
# Select history entry during history-substring-down-search:
#
# The following variables have been initialized in
# _history-substring-search-up/down-search():
#
# $_history_substring_search_matches is the current list of matches that
# need to be displayed to the user.
# $_history_substring_search_match_index is the index of the current match
# that is being displayed to the user.
#
# The range of values that $_history_substring_search_match_index can take
# is: [0, $#_history_substring_search_matches + 1]. A value of 0
# indicates that we are beyond the beginning of
# $_history_substring_search_matches. A value of
# $#_history_substring_search_matches + 1 indicates that we are beyond
# the end of $_history_substring_search_matches and that we have also
# processed all entries in _history_substring_search_raw_matches.
#
# In _history-substring-search-down-search() the initial value of
# $_history_substring_search_match_index is 1. This value is set in
# _history-substring-search-begin(). _history-substring-search-down-search()
# will initially decrement it to 0.
#
if [[ $_history_substring_search_match_index -lt 1 ]]; then
#
# We are beyond the beginning of $_history_substring_search_matches.
#
# 1. Update display to indicate search not found.
#
_history-substring-search-not-found
return
fi
if _history-substring-search-has-prev; then
#
# We do have younger matches.
#
# 1. Move index to point to the previous match.
# 2. Update display to indicate search found.
#
_history_substring_search_match_index+=-1
_history-substring-search-found
else
#
# We do not have younger matches.
#
# 1. Move the index beyond the beginning of
# _history_substring_search_matches.
# 2. Update display to indicate search not found.
#
_history_substring_search_match_index+=-1
_history-substring-search-not-found
fi
#
# When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
# history should be matched, make sure the new and old results are different.
#
# However, if the HIST_IGNORE_ALL_DUPS shell option, or
# HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a
# unique history, so in this case we do not need to do anything.
#
if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then
return
fi
if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
#
# Repeat the current search so that a different (unique) match is found.
#
_history-substring-search-down-search
fi
}
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et

11
dotfiles/zshrc.d/afk.zsh Normal file
View 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