From d7cc6fd50843a8b6e9024048a6e3a8dc4e28901b Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 20 Oct 2022 11:00:45 -0700 Subject: [PATCH 01/11] Add wfh chromebox key --- keys/ssh/id_ed25519_wfh_chromebox.pub | 1 + 1 file changed, 1 insertion(+) create mode 100644 keys/ssh/id_ed25519_wfh_chromebox.pub diff --git a/keys/ssh/id_ed25519_wfh_chromebox.pub b/keys/ssh/id_ed25519_wfh_chromebox.pub new file mode 100644 index 0000000..889a48f --- /dev/null +++ b/keys/ssh/id_ed25519_wfh_chromebox.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICvHatAcnYEJ2BXWGN+MaE40avyghYeEZDgfQD8WcRti david@wfh_chromebook From cb3ba03c49fdf3d5050a1bd4eaaf3b5725824607 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Tue, 18 Oct 2022 13:52:53 -0700 Subject: [PATCH 02/11] Load profile in sh emulation mode. --- dotfiles/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index a28ad38..45d88fe 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -66,8 +66,8 @@ zstyle ':completion::complete:*' use-cache on zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache" # .profile is universal -. /etc/profile -. ~/.profile +emulate sh -c '. /etc/profile' +emulate sh -c '. ~/.profile' # Deduplicate the path typeset -U path From 6c3dea37217094ad283b6c935c1cbfdc69f549ce Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Tue, 18 Oct 2022 14:43:33 -0700 Subject: [PATCH 03/11] Rename .env to .shenv. Requires updating symlinks. Fixes #13. --- dotfiles/bashrc | 2 +- dotfiles/profile | 2 +- dotfiles/{env => shenv} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename dotfiles/{env => shenv} (100%) diff --git a/dotfiles/bashrc b/dotfiles/bashrc index b7483d7..a08bc5b 100755 --- a/dotfiles/bashrc +++ b/dotfiles/bashrc @@ -1,5 +1,5 @@ # Load env first -if [ -f $HOME/.env ] ; then source $HOME/.env ; fi +if [ -f $HOME/.shenv ] ; then source $HOME/.shenv ; fi # History settings HISTCONTROL=ignoredups:ignorespace diff --git a/dotfiles/profile b/dotfiles/profile index ec983de..b829cb7 100755 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -4,7 +4,7 @@ # Should only use POSIX constructs. # Always load ENV -test -f "$HOME/.env" && . "$HOME/.env" +test -f "$HOME/.shenv" && . "$HOME/.shenv" # Setup GREP_COLORS export GREP_COLOR='01;31' diff --git a/dotfiles/env b/dotfiles/shenv similarity index 100% rename from dotfiles/env rename to dotfiles/shenv From e02dc0be80687124f038289f288854c6185b785d Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 21 Oct 2022 19:58:12 -0700 Subject: [PATCH 04/11] Update nerdfonts --- bin/setup/nerdfonts.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/setup/nerdfonts.sh b/bin/setup/nerdfonts.sh index 8aa00c7..adc6221 100755 --- a/bin/setup/nerdfonts.sh +++ b/bin/setup/nerdfonts.sh @@ -2,24 +2,25 @@ set -ue -FONTS=( - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/DejaVuSansMono.zip - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraCode.zip - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/FiraMono.zip - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Hack.zip - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Inconsolata.zip - https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/OpenDyslexic.zip -) +VER="v2.2.2" -echo ${FONTS} +FONTS=( + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/DejaVuSansMono.zip + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraCode.zip + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/FiraMono.zip + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Hack.zip + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/Inconsolata.zip + https://github.com/ryanoasis/nerd-fonts/releases/download/${VER}/OpenDyslexic.zip +) FPATH=${HOME}/.fonts/nerdfonts mkdir -p ${FPATH} cd ${FPATH} for f in ${FONTS[@]}; do - echo ${f} BN=$(basename $f) wget -O ${FPATH}/${BN} ${f} unzip -o -d ${FPATH} ${FPATH}/${BN} done + +fc-cache -v From eb193fe1de6ddd3d6c2b45eea6a3eb1f7fd74580 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 22 Oct 2022 13:59:56 -0700 Subject: [PATCH 05/11] Remove unused keys --- keys/ssh/id_ecdsa_chromebook.pub | 1 - keys/ssh/id_ecdsa_scar.pub | 1 - 2 files changed, 2 deletions(-) delete mode 100644 keys/ssh/id_ecdsa_chromebook.pub delete mode 100644 keys/ssh/id_ecdsa_scar.pub diff --git a/keys/ssh/id_ecdsa_chromebook.pub b/keys/ssh/id_ecdsa_chromebook.pub deleted file mode 100644 index 1014780..0000000 --- a/keys/ssh/id_ecdsa_chromebook.pub +++ /dev/null @@ -1 +0,0 @@ -ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIsFYLEsalNh/l6PtMZhi0f/eZ22uoMw/xYpgPy6vBU6OlpN2FjW7R0pwX29fZjjVQoF0eEG0K/9/CcYcnxtspw= chronos@localhost diff --git a/keys/ssh/id_ecdsa_scar.pub b/keys/ssh/id_ecdsa_scar.pub deleted file mode 100644 index ddbe677..0000000 --- a/keys/ssh/id_ecdsa_scar.pub +++ /dev/null @@ -1 +0,0 @@ -ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKI+CwNBBoC1G9M2rRR0P0lWAU9uvEZpvDg+CpD+I9NQOLuy80YJMRwIYgTZVTWo8OUqsKSMzYywP6NdMKVdVGg= david@human From f4ea05681c2f324cb0620c8e8c077f41a6c7a54e Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Wed, 23 Nov 2022 12:11:20 -0800 Subject: [PATCH 06/11] Bump --- dotfiles/rsync_ignore | 17 +++++++++-------- dotfiles/vimrc | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dotfiles/rsync_ignore b/dotfiles/rsync_ignore index 928b831..dfd67a3 100644 --- a/dotfiles/rsync_ignore +++ b/dotfiles/rsync_ignore @@ -10,35 +10,36 @@ .cargo .config/discord .config/gcloud/logs +.config/google-chrome +.config/google-chrome-beta +.config/unity3d/cache .dropbox-dist .gnupg.bak .gradle .histfile .kube/cache +.local/lib .local/share/Steam .local/share/Trash -.local/lib .m2 +.minikube .npm .p2 -.rvm* +.platformio .rustup +.rvm* .sliver .sqlite_history .thumbnails .virtualenvs .wine +.xsession-errors* .zcompdump .zcompdump* Audits Downloads SpiderOak Hive +Unity VirtualBox VMs tmp tools -.minikube -.config/unity3d/cache -.xsession-errors* -.config/google-chrome-beta -.config/google-chrome -Unity diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 5af5cfc..f9f6c22 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -154,7 +154,7 @@ nnoremap :SyntasticCheck :Errors " Currently only works on debian-based systems... " It also does not play nicely with virtual envs, so we skip it then if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV) - let g:ycm_gopls_binary_path='gopls' + "let g:ycm_gopls_binary_path='gopls' let g:ycm_autoclose_preview_window_after_insertion=1 set runtimepath+=/usr/share/vim-youcompleteme endif From 25a91944807282fefbc7223b563a78de7f9c440d Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 26 Nov 2022 13:06:16 -0800 Subject: [PATCH 07/11] Replace go get with go install --- bin/install_tool | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/install_tool b/bin/install_tool index d6e3faf..4c0aefd 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -370,7 +370,7 @@ EOF ;; gf) install_pkgs golang-go silversearcher-ag - go get -u github.com/tomnomnom/gf + go install github.com/tomnomnom/gf@latest mkdir -p ${HOME}/.config if test -d ${HOME}/.config/gf ; then git -C ${HOME}/.config/gf pull @@ -379,19 +379,19 @@ EOF fi ;; gron) - go get -u github.com/tomnomnom/gron + go install github.com/tomnomnom/gron@latest ;; httprobe) - go get -u github.com/tomnomnom/httprobe + go install github.com/tomnomnom/httprobe@latest ;; ffuf) - go get -u github.com/ffuf/ffuf + go install github.com/ffuf/ffuf@latest ;; gobuster) - go get -u github.com/OJ/gobuster + go install github.com/OJ/gobuster@latest ;; amass) - go get -u github.com/OWASP/Amass/v3/... + go install github.com/OWASP/Amass/v3/... ;; cht.sh) install_pkgs rlwrap @@ -401,8 +401,8 @@ EOF add_bin_symlink cht.sh ;; age) - go get -u filippo.io/age/cmd/age - go get -u filippo.io/age/cmd/age-keygen + go install filippo.io/age/cmd/age@latest + go install filippo.io/age/cmd/age-keygen@latest ;; docker-compose) mkdir -p ${DESTDIR} From 12b2ed211bf3ea0a9ab90ee56ffdd8dda421e25e Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 26 Nov 2022 15:30:18 -0800 Subject: [PATCH 08/11] deb_only marking --- bin/install_tool | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/install_tool b/bin/install_tool index 4c0aefd..cc6c17e 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -110,6 +110,14 @@ function makedest_or_die { makedest || die "Aborting." } +function deb_only { + # Error if not on a debian or derivative + if ! test -f /etc/debian_version ; then + echo "This tool only available for debian." >&2 + exit 1 + fi +} + # Begin main tool selection case ${TOOL} in john) @@ -323,6 +331,7 @@ case ${TOOL} in add_bin_symlink "Cura.AppImage" cura ;; rr) + deb_only ver=$(python3 -c 'from urllib import request; import json; print(json.load(request.urlopen("https://api.github.com/repos/mozilla/rr/releases/latest"))["name"])') echo "Latest rr is ${ver}" download \ @@ -433,7 +442,8 @@ EOF cargo install bottom ;; delta) - if !check_sudo ; then + deb_only + if ! check_sudo ; then echo "Must be able to run as sudo." exit 1 fi From b7353bd34e74541c1306b1e8fec4cc993be29aed Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 2 Dec 2022 17:23:36 -0800 Subject: [PATCH 09/11] Setup rust paths for ycm --- dotfiles/vimrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/vimrc b/dotfiles/vimrc index f9f6c22..f57d429 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -157,6 +157,12 @@ 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 + " 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 endif " Enable vim-bracketed-paste mode From 193b22e0d11a195a7bee05d50bedda43c26778e7 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 29 Dec 2022 20:37:22 -0800 Subject: [PATCH 10/11] Bump skel --- dotfiles/aliases | 3 +++ dotfiles/profile | 5 +++++ dotfiles/vimrc | 15 +++++++-------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dotfiles/aliases b/dotfiles/aliases index e1fbcb2..e92104b 100755 --- a/dotfiles/aliases +++ b/dotfiles/aliases @@ -56,3 +56,6 @@ alias dfh="df -h -x tmpfs -x devtmpfs" # Clear the GPG agent alias clear-gpg-agent="echo RELOADAGENT | gpg-connect-agent" + +# Battery details +alias bat-details='upower -i $(upower -e | grep battery)' diff --git a/dotfiles/profile b/dotfiles/profile index b829cb7..c4c39fe 100755 --- a/dotfiles/profile +++ b/dotfiles/profile @@ -34,4 +34,9 @@ if [ -z "${LIBVIRT_DEFAULT_URI}" ] ; then 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" diff --git a/dotfiles/vimrc b/dotfiles/vimrc index f57d429..7370fda 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -154,16 +154,15 @@ nnoremap :SyntasticCheck :Errors " Currently only works on debian-based systems... " It also does not play nicely with virtual envs, so we skip it then if isdirectory("/usr/share/vim-youcompleteme") && empty($VIRTUAL_ENV) - "let g:ycm_gopls_binary_path='gopls' - let g:ycm_autoclose_preview_window_after_insertion=1 set runtimepath+=/usr/share/vim-youcompleteme - " 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 endif +let g:ycm_autoclose_preview_window_after_insertion=1 +" Add rust settings +let g:tmp_rust_path=trim(system("rustc --print sysroot")) +if isdirectory(g:tmp_rust_path) + let g:ycm_rust_toolchain_root=g:tmp_rust_path +endif +unlet! g:tmp_rust_path " Enable vim-bracketed-paste mode " From From ba9534577a7de63349d7dee147b22b309292a983 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 13 Jan 2023 11:05:25 -0800 Subject: [PATCH 11/11] Add igrep, rustup to install_tool --- bin/install_tool | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/install_tool b/bin/install_tool index cc6c17e..f8f032d 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -502,6 +502,17 @@ EOF tar -C "${DESTDIR}" -zxf /tmp/doctl.tar.gz "doctl" add_bin_symlink doctl ;; + rustup) + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- --no-modify-path -y + ;; + igrep) + if ! command -v cargo >/dev/null 2>&1 ; then + echo "This needs cargo (for rust)!" >/dev/stderr + exit 1 + fi + cargo install igrep + ;; *) echo "Unknown tool: ${TOOL}" >/dev/stderr list_tools