34 Commits

Author SHA1 Message Date
David Tomaschik
11ecbdaf04 Add hashall function 2023-08-20 13:56:49 -07:00
David Tomaschik
bc9150b592 shellcheck fixes 2023-08-14 21:41:12 -07:00
David Tomaschik
f81410cfc0 ensure $USER is set 2023-08-14 21:20:31 -07:00
David Tomaschik
87239b2034 fix up change 2023-08-14 20:57:47 -07:00
David Tomaschik
50011b1675 update keepalives for ssh 2023-08-09 10:24:48 -07:00
David Tomaschik
eb3392966a belloff 2023-08-08 01:45:37 -07:00
David Tomaschik
3188effbd3 update installer 2023-08-05 00:25:37 -07:00
David Tomaschik
80b119f6ad Add hak5 ssh config 2023-07-31 22:37:14 -07:00
David Tomaschik
e87b4cb3d4 add C.utf8 to shenv 2023-07-21 10:39:43 -07:00
David Tomaschik
0c08d4ebe7 xfce4 2023-06-19 17:26:27 -07:00
David Tomaschik
a7d59e971f bump 2023-06-19 17:23:49 -07:00
David Tomaschik
233b3e7a7b Update 2023-06-03 20:45:02 -07:00
David Tomaschik
691f64a477 Don't pass -C to ls in alias. 2023-05-26 10:18:42 -07:00
David Tomaschik
670875f227 Bump bsidessf 2023-05-23 18:05:54 -07:00
David Tomaschik
e90c014d88 Bump, add pipx 2023-05-16 19:55:40 -07:00
David Tomaschik
d76a278a95 Merge branch 'main' of github.com:Matir/skel 2023-04-28 21:12:51 -07:00
David Tomaschik
8eff002d55 Update skel 2023-04-28 21:12:42 -07:00
David Tomaschik
3015e7a1c0 Default disable SSH forwarding in earthly 2023-03-20 11:11:42 -07:00
David Tomaschik
a286795570 Merge branch 'main' of github.com:Matir/skel 2023-03-05 19:54:16 -08:00
David Tomaschik
99e8ff6f2b Add some packages 2023-02-14 11:22:28 -08:00
David Tomaschik
4a77c0e900 add refresh alias 2023-02-06 20:23:20 -08:00
David Tomaschik
35f494c3d4 Add unblob 2023-02-01 20:43:21 -08:00
David Tomaschik
f650d12efb Merge branch 'main' of github.com:Matir/skel 2023-01-31 14:14:10 -08:00
David Tomaschik
2c67b58ba6 Add history aliases 2023-01-31 14:13:59 -08:00
David Tomaschik
ba9534577a Add igrep, rustup to install_tool 2023-01-13 11:05:25 -08:00
David Tomaschik
193b22e0d1 Bump skel 2022-12-29 20:37:22 -08:00
David Tomaschik
b7353bd34e Setup rust paths for ycm 2022-12-02 17:23:36 -08:00
David Tomaschik
12b2ed211b deb_only marking 2022-11-26 15:30:18 -08:00
David Tomaschik
ee5a78b578 Merge branch 'main' of github.com:Matir/skel 2022-11-26 13:06:33 -08:00
David Tomaschik
25a9194480 Replace go get with go install 2022-11-26 13:06:16 -08:00
David Tomaschik
f4ea05681c Bump 2022-11-23 12:11:20 -08:00
David Tomaschik
eb193fe1de Remove unused keys 2022-10-22 13:59:56 -07:00
David Tomaschik
b628453b10 Rename .env to .shenv.
Requires updating symlinks.

Fixes #13.
2022-10-19 10:08:21 -07:00
David Tomaschik
157e6ee20e Load profile in sh emulation mode. 2022-10-19 10:08:21 -07:00
23 changed files with 194 additions and 65 deletions

2
.gitignore vendored
View File

@@ -4,3 +4,5 @@ installed-prefs
*~ *~
*.bak *.bak
local_dotfiles local_dotfiles
dotfile_overlays
!dotfile_overlays/.keep

View File

@@ -110,6 +110,18 @@ function makedest_or_die {
makedest || die "Aborting." makedest || die "Aborting."
} }
function deb_only {
# Error if not on a debian or derivative
if ! test -f /etc/debian_version ; then
echo "This tool only available for debian." >&2
exit 1
fi
}
function require_pipx {
command -v pipx >/dev/null 2>&1 || die "Requires pipx"
}
# Begin main tool selection # Begin main tool selection
case ${TOOL} in case ${TOOL} in
john) john)
@@ -323,6 +335,7 @@ case ${TOOL} in
add_bin_symlink "Cura.AppImage" cura add_bin_symlink "Cura.AppImage" cura
;; ;;
rr) rr)
deb_only
ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])') ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])')
echo "Latest rr is ${ver}" echo "Latest rr is ${ver}"
download \ download \
@@ -370,7 +383,7 @@ EOF
;; ;;
gf) gf)
install_pkgs golang-go silversearcher-ag install_pkgs golang-go silversearcher-ag
go get -u github.com/tomnomnom/gf go install github.com/tomnomnom/gf@latest
mkdir -p ${HOME}/.config mkdir -p ${HOME}/.config
if test -d ${HOME}/.config/gf ; then if test -d ${HOME}/.config/gf ; then
git -C ${HOME}/.config/gf pull git -C ${HOME}/.config/gf pull
@@ -379,19 +392,19 @@ EOF
fi fi
;; ;;
gron) gron)
go get -u github.com/tomnomnom/gron go install github.com/tomnomnom/gron@latest
;; ;;
httprobe) httprobe)
go get -u github.com/tomnomnom/httprobe go install github.com/tomnomnom/httprobe@latest
;; ;;
ffuf) ffuf)
go get -u github.com/ffuf/ffuf go install github.com/ffuf/ffuf@latest
;; ;;
gobuster) gobuster)
go get -u github.com/OJ/gobuster go install github.com/OJ/gobuster@latest
;; ;;
amass) amass)
go get -u github.com/OWASP/Amass/v3/... go install github.com/OWASP/Amass/v3/...
;; ;;
cht.sh) cht.sh)
install_pkgs rlwrap install_pkgs rlwrap
@@ -401,8 +414,8 @@ EOF
add_bin_symlink cht.sh add_bin_symlink cht.sh
;; ;;
age) age)
go get -u filippo.io/age/cmd/age go install filippo.io/age/cmd/age@latest
go get -u filippo.io/age/cmd/age-keygen go install filippo.io/age/cmd/age-keygen@latest
;; ;;
docker-compose) docker-compose)
mkdir -p ${DESTDIR} mkdir -p ${DESTDIR}
@@ -413,10 +426,12 @@ EOF
add_bin_symlink docker-compose add_bin_symlink docker-compose
;; ;;
tldr) tldr)
pip3 install --user tldr require_pipx
pipx install tldr
;; ;;
blint) blint)
pip3 install --user blint require_pipx
pipx install blint
;; ;;
dust) dust)
if ! command -v cargo >/dev/null 2>&1 ; then if ! command -v cargo >/dev/null 2>&1 ; then
@@ -433,7 +448,8 @@ EOF
cargo install bottom cargo install bottom
;; ;;
delta) delta)
if !check_sudo ; then deb_only
if ! check_sudo ; then
echo "Must be able to run as sudo." echo "Must be able to run as sudo."
exit 1 exit 1
fi fi
@@ -492,6 +508,24 @@ EOF
tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl" tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl"
add_bin_symlink doctl add_bin_symlink doctl
;; ;;
rustup)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- --no-modify-path -y
;;
igrep)
if ! command -v cargo >/dev/null 2>&1 ; then
echo "This needs cargo (for rust)!" >/dev/stderr
exit 1
fi
cargo install igrep
;;
unblob)
require_pipx
pipx install unblob
;;
fq)
go install github.com/wader/fq@latest
;;
*) *)
echo "Unknown tool: ${TOOL}" >/dev/stderr echo "Unknown tool: ${TOOL}" >/dev/stderr
list_tools list_tools

View File

@@ -56,3 +56,12 @@ alias dfh="df -h -x tmpfs -x devtmpfs"
# Clear the GPG agent # Clear the GPG agent
alias clear-gpg-agent="echo RELOADAGENT | gpg-connect-agent" alias clear-gpg-agent="echo RELOADAGENT | gpg-connect-agent"
# Battery details
alias bat-details='upower -i $(upower -e | grep battery)'
# Nvidia refresh rate
alias nvidia-refresh-rate='nvidia-settings --display=:0 -q RefreshRate -t'
# Earthly ssh
alias earthly='earthly --ssh-auth-sock ""'

View File

@@ -1,7 +1,7 @@
# This file contains fish universal variable definitions. # This file contains fish universal variable definitions.
# VERSION: 3.0 # VERSION: 3.0
SETUVAR EDITOR:vim SETUVAR EDITOR:vim
SETUVAR __fish_initialized:3100 SETUVAR __fish_initialized:3400
SETUVAR fish_color_autosuggestion:586e75 SETUVAR fish_color_autosuggestion:586e75
SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:93a1a1 SETUVAR fish_color_command:93a1a1
@@ -31,3 +31,4 @@ SETUVAR fish_pager_color_completion:B3A06D
SETUVAR fish_pager_color_description:B3A06D SETUVAR fish_pager_color_description:B3A06D
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr

View File

@@ -1,16 +1,17 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
htop_version=3.2.2
config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=-1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1 hide_kernel_threads=1
hide_userland_threads=1 hide_userland_threads=1
hide_running_in_container=0
shadow_other_users=0 shadow_other_users=0
show_thread_names=0 show_thread_names=0
show_program_path=1 show_program_path=1
highlight_base_name=0 highlight_base_name=0
highlight_deleted_exe=1
shadow_distribution_path_prefix=0
highlight_megabytes=1 highlight_megabytes=1
highlight_threads=1 highlight_threads=1
highlight_changes=0 highlight_changes=0
@@ -18,9 +19,8 @@ highlight_changes_delay_secs=5
find_comm_in_cmdline=1 find_comm_in_cmdline=1
strip_exe_from_cmdline=1 strip_exe_from_cmdline=1
show_merged_command=0 show_merged_command=0
tree_view=0
tree_view_always_by_pid=0
header_margin=1 header_margin=1
screen_tabs=0
detailed_cpu_time=0 detailed_cpu_time=0
cpu_count_from_one=1 cpu_count_from_one=1
show_cpu_usage=1 show_cpu_usage=1
@@ -32,8 +32,32 @@ account_guest_in_cpu_meter=0
color_scheme=6 color_scheme=6
enable_mouse=1 enable_mouse=1
delay=15 delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2
hide_function_bar=0 hide_function_bar=0
header_layout=two_50_50
column_meters_0=AllCPUs Memory Swap
column_meter_modes_0=1 1 1
column_meters_1=Tasks LoadAverage Uptime
column_meter_modes_1=2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

View File

@@ -29,12 +29,12 @@
<property name="&lt;Super&gt;r" type="empty"> <property name="&lt;Super&gt;r" type="empty">
<property name="startup-notify" type="empty"/> <property name="startup-notify" type="empty"/>
</property> </property>
<property name="&lt;Alt&gt;&lt;Super&gt;s" type="empty"/>
</property> </property>
<property name="custom" type="empty"> <property name="custom" type="empty">
<property name="&lt;Alt&gt;F2" type="string" value="xfce4-appfinder --collapsed"> <property name="&lt;Alt&gt;F2" type="string" value="xfce4-appfinder --collapsed">
<property name="startup-notify" type="bool" value="true"/> <property name="startup-notify" type="bool" value="true"/>
</property> </property>
<property name="&lt;Alt&gt;Print" type="string" value="xfce4-screenshooter -w"/>
<property name="&lt;Super&gt;r" type="string" value="xfce4-appfinder -c"> <property name="&lt;Super&gt;r" type="string" value="xfce4-appfinder -c">
<property name="startup-notify" type="bool" value="true"/> <property name="startup-notify" type="bool" value="true"/>
</property> </property>
@@ -43,9 +43,7 @@
<property name="&lt;Alt&gt;F3" type="string" value="xfce4-appfinder"> <property name="&lt;Alt&gt;F3" type="string" value="xfce4-appfinder">
<property name="startup-notify" type="bool" value="true"/> <property name="startup-notify" type="bool" value="true"/>
</property> </property>
<property name="Print" type="string" value="xfce4-screenshooter"/>
<property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/> <property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/>
<property name="&lt;Shift&gt;Print" type="string" value="xfce4-screenshooter -r"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xfce4-session-logout"/> <property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xfce4-session-logout"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;t" type="string" value="exo-open --launch TerminalEmulator"/> <property name="&lt;Primary&gt;&lt;Alt&gt;t" type="string" value="exo-open --launch TerminalEmulator"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;f" type="string" value="thunar"/> <property name="&lt;Primary&gt;&lt;Alt&gt;f" type="string" value="thunar"/>
@@ -59,6 +57,8 @@
<property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/> <property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
<property name="override" type="bool" value="true"/> <property name="override" type="bool" value="true"/>
<property name="&lt;Super&gt;l" type="string" value="xflock4"/> <property name="&lt;Super&gt;l" type="string" value="xflock4"/>
<property name="Print" type="string" value="flameshot gui"/>
<property name="&lt;Shift&gt;Print" type="string" value="flameshot full"/>
</property> </property>
</property> </property>
<property name="xfwm4" type="empty"> <property name="xfwm4" type="empty">
@@ -117,8 +117,8 @@
<property name="&lt;Primary&gt;F12" type="empty"/> <property name="&lt;Primary&gt;F12" type="empty"/>
<property name="&lt;Super&gt;KP_Left" type="empty"/> <property name="&lt;Super&gt;KP_Left" type="empty"/>
<property name="&lt;Super&gt;KP_Right" type="empty"/> <property name="&lt;Super&gt;KP_Right" type="empty"/>
<property name="&lt;Super&gt;KP_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Down" type="empty"/> <property name="&lt;Super&gt;KP_Down" type="empty"/>
<property name="&lt;Super&gt;KP_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Page_Up" type="empty"/> <property name="&lt;Super&gt;KP_Page_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Home" type="empty"/> <property name="&lt;Super&gt;KP_Home" type="empty"/>
<property name="&lt;Super&gt;KP_End" type="empty"/> <property name="&lt;Super&gt;KP_End" type="empty"/>

View File

@@ -34,4 +34,9 @@ if [ -z "${LIBVIRT_DEFAULT_URI}" ] ; then
fi fi
fi fi
# Got rust? (gvim, etc.)
if test -d "${HOME}/.cargo/bin" ; then
PATH="${PATH}:${HOME}/.cargo/bin"
fi
test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local" test -f "${HOME}/.profile.local" && . "${HOME}/.profile.local"

View File

@@ -10,35 +10,36 @@
.cargo .cargo
.config/discord .config/discord
.config/gcloud/logs .config/gcloud/logs
.config/google-chrome
.config/google-chrome-beta
.config/unity3d/cache
.dropbox-dist .dropbox-dist
.gnupg.bak .gnupg.bak
.gradle .gradle
.histfile .histfile
.kube/cache .kube/cache
.local/lib
.local/share/Steam .local/share/Steam
.local/share/Trash .local/share/Trash
.local/lib
.m2 .m2
.minikube
.npm .npm
.p2 .p2
.rvm* .platformio
.rustup .rustup
.rvm*
.sliver .sliver
.sqlite_history .sqlite_history
.thumbnails .thumbnails
.virtualenvs .virtualenvs
.wine .wine
.xsession-errors*
.zcompdump .zcompdump
.zcompdump* .zcompdump*
Audits Audits
Downloads Downloads
SpiderOak Hive SpiderOak Hive
Unity
VirtualBox VMs VirtualBox VMs
tmp tmp
tools tools
.minikube
.config/unity3d/cache
.xsession-errors*
.config/google-chrome-beta
.config/google-chrome
Unity

View File

@@ -47,7 +47,7 @@ export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B
# Setup locale # Setup locale
if test -x /usr/bin/locale ; then if test -x /usr/bin/locale ; then
for l in en_US.utf8 en_US.UTF-8 C.UTF-8 C ; do for l in en_US.utf8 en_US.UTF-8 C.UTF-8 C.utf8 C ; do
if /usr/bin/locale -a | grep -q "${l}" ; then if /usr/bin/locale -a | grep -q "${l}" ; then
export LC_CTYPE=${l} export LC_CTYPE=${l}
export LC_NUMERIC=${l} export LC_NUMERIC=${l}
@@ -84,5 +84,8 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
# Suppress lvm warnings # Suppress lvm warnings
export LVM_SUPPRESS_FD_WARNINGS=1 export LVM_SUPPRESS_FD_WARNINGS=1
# Default disable SSH forwarding in EARTHLY
export EARTHLY_SSH_AUTH_SOCK=""
# shellcheck source=/dev/null # shellcheck source=/dev/null
test -e "$HOME/.localenv" && . "$HOME/.localenv" test -e "$HOME/.localenv" && . "$HOME/.localenv"

View File

@@ -29,7 +29,8 @@ Match canonical all
ForwardAgent no ForwardAgent no
ForwardX11 no ForwardX11 no
ForwardX11Trusted no ForwardX11Trusted no
ServerAliveInterval 120 ServerAliveInterval 30
ServerAliveCountMax 3
UpdateHostKeys yes UpdateHostKeys yes
User david User david
VerifyHostKeyDNS yes VerifyHostKeyDNS yes

View File

@@ -0,0 +1,7 @@
Host hak5squirrel
Hostname 172.16.32.1
User root
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa

View File

@@ -69,3 +69,10 @@ bind C-v run "tmux set-buffer -- \"$(xsel -o -b)\"; tmux paste-buffer"
# Enable logging module, if available # Enable logging module, if available
run-shell "~/.tmux/tmux-logging/logging.tmux || true" run-shell "~/.tmux/tmux-logging/logging.tmux || true"
# Enable TMUX Plugin Manager
# install with:
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run-shell "~/.tmux/plugins/tpm/tpm || true"

View File

@@ -154,10 +154,15 @@ nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
" Currently only works on debian-based systems... " Currently only works on debian-based systems...
" It also does not play nicely with virtual envs, so we skip it then " It also does not play nicely with virtual envs, so we skip it then
if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV) if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV)
let g:ycm_gopls_binary_path='gopls'
let g:ycm_autoclose_preview_window_after_insertion=1
set runtimepath+=/usr/share/vim-youcompleteme set runtimepath+=/usr/share/vim-youcompleteme
endif endif
let g:ycm_autoclose_preview_window_after_insertion=1
" Add rust settings
let g:tmp_rust_path=trim(system("rustc --print sysroot"))
if isdirectory(g:tmp_rust_path)
let g:ycm_rust_toolchain_root=g:tmp_rust_path
endif
unlet! g:tmp_rust_path
" Enable vim-bracketed-paste mode " Enable vim-bracketed-paste mode
" From " From
@@ -215,3 +220,6 @@ autocmd BufRead,BufNewFile Makefile* set noexpandtab
" Enable filetype support " Enable filetype support
" Needs to be at end of vimrc " Needs to be at end of vimrc
filetype plugin indent on filetype plugin indent on
" Disable bell
set belloff=all

View File

@@ -1,4 +1,5 @@
setxkbmap -option ctrl:nocaps -option compose:ralt setxkbmap -option ctrl:nocaps -option compose:ralt
test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd & test -x /usr/bin/xsettingsd && /usr/bin/xsettingsd &
test -f "$HOME/.env" && "$HOME/.env" test -f "$HOME/.env" && "$HOME/.env"
test -f "$HOME/.shenv" && "$HOME/.shenv"
test -f "$HOME/.profile" && . "$HOME/.profile" test -f "$HOME/.profile" && . "$HOME/.profile"

View File

@@ -110,7 +110,7 @@ if [[ $- == *i* ]] ; then
source /usr/bin/virtualenvwrapper_lazy.sh source /usr/bin/virtualenvwrapper_lazy.sh
fi fi
if command ls --version >/dev/null 2>&1 ; then if command ls --version >/dev/null 2>&1 ; then
alias ls="$(whence -p ls) --color=auto -C" alias ls="$(whence -p ls) --color=auto"
fi fi
# Syntax highlighting and substring search # Syntax highlighting and substring search
if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then if test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ; then
@@ -126,13 +126,20 @@ if [[ $- == *i* ]] ; then
bindkey -M vicmd 'j' history-substring-search-down bindkey -M vicmd 'j' history-substring-search-down
fi fi
# Suggestions # Suggestions
if test -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ; then for sugg_path in /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ; do
# Works well for solarized if test -f "${sugg_path}"; then
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10" # Works well for solarized
# Strategy -- note that 'completion' is slow AF ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=10"
ZSH_AUTOSUGGEST_STRATEGY=(history) # Strategy -- note that 'completion' is slow AF
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ZSH_AUTOSUGGEST_STRATEGY=(history)
fi source "${sugg_path}"
break
fi
done
unset sugg_path
# History
alias fullhist="history 1"
alias longhist="history -1000"
fi # End interactive-only block fi # End interactive-only block
# In case ack is named ack-grep # In case ack is named ack-grep

View File

@@ -21,3 +21,7 @@ if test -f ${HOME}/.zprompt ; then
fi fi
fi fi
unset _STARSHIP_PATH unset _STARSHIP_PATH
function hashall {
tee >(md5sum) | tee >(sha1sum) | sha256sum
}

View File

@@ -6,6 +6,9 @@ set -o nounset
set -o errexit set -o errexit
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
USER=${USER:-$(id -un)}
HOME=${HOME:-$(cd ~ && pwd)}
case $(uname) in case $(uname) in
Linux) Linux)
FINDTYPE="-xtype" FINDTYPE="-xtype"
@@ -65,7 +68,7 @@ install_dotfile_dir() {
${submodule_prune} \) \ ${submodule_prune} \) \
-prune -o ${FINDTYPE} f -print | \ -prune -o ${FINDTYPE} f -print | \
while read -r dotfile ; do while read -r dotfile ; do
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}" local TARGET="${HOME}/.${dotfile#"${SRCDIR}"/}"
mkdir -p "$(dirname "${TARGET}")" mkdir -p "$(dirname "${TARGET}")"
ln -s -f "${dotfile}" "${TARGET}" ln -s -f "${dotfile}" "${TARGET}"
done done
@@ -73,7 +76,7 @@ install_dotfile_dir() {
awk '{print $2}' | \ awk '{print $2}' | \
while read -r submodule ; do while read -r submodule ; do
local FULLNAME="${BASEDIR}/${submodule}" local FULLNAME="${BASEDIR}/${submodule}"
local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}" local TARGET="${HOME}/.${FULLNAME#"${SRCDIR}"/}"
mkdir -p "$(dirname "${TARGET}")" mkdir -p "$(dirname "${TARGET}")"
if test -L "${TARGET}" ; then if test -L "${TARGET}" ; then
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
@@ -93,7 +96,7 @@ install_basic_dir() {
local file local file
find "${SRCDIR}" ${FINDTYPE} f -print | \ find "${SRCDIR}" ${FINDTYPE} f -print | \
while read -r file ; do while read -r file ; do
local TARGET="${2}/${file#${SRCDIR}/}" local TARGET="${2}/${file#"${SRCDIR}"/}"
mkdir -p "$(dirname "${TARGET}")" mkdir -p "$(dirname "${TARGET}")"
ln -s -f "${file}" "${TARGET}" ln -s -f "${file}" "${TARGET}"
done done
@@ -351,22 +354,29 @@ verbose() {
install_dotfiles() { install_dotfiles() {
install_dotfile_dir "${BASEDIR}/dotfiles" install_dotfile_dir "${BASEDIR}/dotfiles"
# shellcheck disable=SC2015 if test -d "${BASEDIR}/private_dotfiles" && \
test -d "${BASEDIR}/private_dotfiles" && \ test -d "${BASEDIR}/.git/git-crypt" ; then
test -d "${BASEDIR}/.git/git-crypt" && \ install_dotfile_dir "${BASEDIR}/private_dotfiles"
install_dotfile_dir "${BASEDIR}/private_dotfiles" || \ fi
true if test -d "${BASEDIR}/local_dotfiles" ; then
# shellcheck disable=SC2015 install_dotfile_dir "${BASEDIR}/local_dotfiles"
test -d "${BASEDIR}/local_dotfiles" && \ fi
install_dotfile_dir "${BASEDIR}/local_dotfiles" || \ if test -d "${BASEDIR}/dotfile_overlays" ; then
true for dotfiledir in "${BASEDIR}/dotfile_overlays/"* ; do
if test -d "${dotfiledir}" ; then
install_dotfile_dir "${dotfiledir}"
fi
done
fi
} }
install_main() { install_main() {
test -d "${BASEDIR}/.git" && command -v git >/dev/null 2>&1 && \ if test -d "${BASEDIR}/.git" ; then
git -C "${BASEDIR}" pull --ff-only command -v git >/dev/null 2>&1 && \
test "$MINIMAL" = 1 || ( command -v git >/dev/null 2>&1 && \ git -C "${BASEDIR}" pull --ff-only
git -C "${BASEDIR}" submodule update --init --recursive ) test "$MINIMAL" = 1 || ( command -v git >/dev/null 2>&1 && \
git -C "${BASEDIR}" submodule update --init --recursive )
fi
test "$MINIMAL" = 1 || prerequisites test "$MINIMAL" = 1 || prerequisites
test "$INSTALL_PKGS" = 1 && is_deb_system && install_apt_pkgs test "$INSTALL_PKGS" = 1 && is_deb_system && install_apt_pkgs
install_dotfiles install_dotfiles

View File

@@ -1 +0,0 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIsFYLEsalNh/l6PtMZhi0f/eZ22uoMw/xYpgPy6vBU6OlpN2FjW7R0pwX29fZjjVQoF0eEG0K/9/CcYcnxtspw= chronos@localhost

View File

@@ -1 +0,0 @@
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKI+CwNBBoC1G9M2rRR0P0lWAU9uvEZpvDg+CpD+I9NQOLuy80YJMRwIYgTZVTWo8OUqsKSMzYywP6NdMKVdVGg= david@human

View File

@@ -1 +0,0 @@
../id_ecdsa_scar.pub

View File

@@ -1,17 +1,25 @@
ack ack
bat
curl curl
dnsutils dnsutils
exa
fzf
gdb gdb
git git
git-crypt git-crypt
git-delta
glances
gnupg2 gnupg2
gnupg-agent gnupg-agent
httpie
ltrace ltrace
mosh mosh
ngrep ngrep
nmap nmap
ripgrep
strace strace
tcpdump tcpdump
tldr-py
tmux tmux
traceroute traceroute
tshark tshark