From 53efc06a1795980665e436e88cdd507d58fe4f5a Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 3 Jun 2021 01:06:19 -0400 Subject: [PATCH 01/24] prezto changes --- prezto.zsh | 2 +- udeps.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/prezto.zsh b/prezto.zsh index 45c332f..a539428 100755 --- a/prezto.zsh +++ b/prezto.zsh @@ -14,7 +14,7 @@ for rcfile in "${ZDOTDIR:-$HOME}"/stevset/prezto/.zprezto/runcoms/^README.md(.N) #setup theme echo "remember to run p10k configure to configure the theme!" -ln -s $HOME/.zprezto/modules/prompt/external/powerlevel10k/prompt_powerlevel10k_setup $HOME/.zprezto/modules/prompt/functions/prompt_powerlevel10k_setup +#ln -s $HOME/.zprezto/modules/prompt/external/powerlevel10k/prompt_powerlevel10k_setup $HOME/.zprezto/modules/prompt/functions/prompt_powerlevel10k_setup #finally, fix permissions to avoid compaudit flag chmod -R go-w ~/.zprezto diff --git a/udeps.sh b/udeps.sh index ff8f5be..c6d3a0d 100755 --- a/udeps.sh +++ b/udeps.sh @@ -14,7 +14,10 @@ sudo apt-get -my install git \ curl \ aptitude \ nnn \ - ack + ack \ + fzf \ + ripgrep \ + fd-find read -n1 -p $'Does this system need ssh access?\n' REPLY if [[ $REPLY == [Yy] ]]; then From 751f36e537cea2d7aec67e23ab59fb2dec05ef35 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 3 Jun 2021 01:09:13 -0400 Subject: [PATCH 02/24] fixed fi --- udeps.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/udeps.sh b/udeps.sh index c6d3a0d..4e1ff10 100755 --- a/udeps.sh +++ b/udeps.sh @@ -2,7 +2,8 @@ #These are the programs I expect to find on any install echo "installing base dependencies" -sudo apt-get -my install git \ +sudo apt-get -my install \ + git \ stow \ etckeeper \ tmux \ @@ -19,14 +20,14 @@ sudo apt-get -my install git \ ripgrep \ fd-find -read -n1 -p $'Does this system need ssh access?\n' REPLY +read -n1 -p $'Does this system need a ssh server?\n' REPLY if [[ $REPLY == [Yy] ]]; then sudo apt-get install openssh-server fi read -n1 -p $'\nDoes this system have a GUI?\n' REPLY if [[ $REPLY == [Yy] ]]; then sudo apt-get install synaptic - # else - # sudo apt-get install emacs-nox - # fi + else + sudo apt-get install emacs-nox + fi From f1058f5fcc4b85708bf7f5862abba3b5ed9fc3cb Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 3 Jun 2021 01:13:52 -0400 Subject: [PATCH 03/24] created update script --- emacs_doom.zsh | 15 --------------- spacemacs.zsh | 17 +++++++++++++++++ update.zsh | 7 ++++--- 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100755 emacs_doom.zsh create mode 100644 spacemacs.zsh diff --git a/emacs_doom.zsh b/emacs_doom.zsh deleted file mode 100755 index 9318441..0000000 --- a/emacs_doom.zsh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/zsh -#This will install Doom for Emacs -#sudo add-apt-repository ppa:kelleyk/emacs -#cleanup old spacemacs -if [ -e ~/.emacs.d/spacemacs.mk ] - then - mv ~/.emacs.d ~/spacemacs.d -fi - -git clone https://github.com/hlissner/doom-emacs ~/.emacs.d - -#Install Dependencies -sudo apt install ripgrep markdown shellcheck fd-find - -~/.emacs.d/bin/doom install diff --git a/spacemacs.zsh b/spacemacs.zsh new file mode 100644 index 0000000..77b72b3 --- /dev/null +++ b/spacemacs.zsh @@ -0,0 +1,17 @@ +#!/bin/zsh +#This will install Spacemacs (again) +#cleanup +echo "Removing old emacs" +if [ -e ~/.emacs.d/] + then + mv ~/.emacs.d ~/doom.d +fi + +#Select Stable or Develop +read -p "Should we use the development version of emacs?" dist +if [[ $dist = y ]] then + git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d +else + git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d +fi + diff --git a/update.zsh b/update.zsh index 9059412..cbb4e31 100755 --- a/update.zsh +++ b/update.zsh @@ -1,4 +1,5 @@ #!/bin/zsh -echo "Remove Emacs" -sudo apt autoremove emacs emacs-nox ripgrep markdown shellcheck fd-find -rm -r --interactive=never $HOME/.emacs.d $HOME/.doom.d +#delete current zsh config +rm ~/.zshrc ~/.zpreztorc ~/.zlogin ~/.zlogout ~/.zprofile ~/.zshenv +./udeps.sh +./prezto.zsh From 3e8963859546280121c9f1f98127c2d703086dbc Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 3 Jun 2021 01:15:32 -0400 Subject: [PATCH 04/24] add symlink --- update.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.zsh b/update.zsh index cbb4e31..46fad43 100755 --- a/update.zsh +++ b/update.zsh @@ -1,5 +1,5 @@ #!/bin/zsh #delete current zsh config -rm ~/.zshrc ~/.zpreztorc ~/.zlogin ~/.zlogout ~/.zprofile ~/.zshenv +ln -s ~/stevset/prezto/.zprezto ~/.zprezto ./udeps.sh ./prezto.zsh From c09b531f831d2647fcb4354867e8cf1786592f45 Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 4 Jun 2021 22:35:40 -0400 Subject: [PATCH 05/24] define TERM as 256 colors --- tmux/.tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 60c842c..ec721b4 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,3 +1,7 @@ +# -- general ------------------------------------------------------------------- +set -g default-terminal "screen-256color" # colors! +set -g xterm-keys on + # remap prefix to Control + a set -g prefix C-a unbind C-b @@ -8,7 +12,6 @@ set -sg escape-time 0 set -g history-limit 100000 #setw -g mode-keys vi set-option -g mouse on -set -g xterm-keys on set-window-option -g xterm-keys on #set-option -g pane-active-border-fg yellow From ab002e27c596b6e7e83406098a0f84335ada9f12 Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 4 Jun 2021 23:42:09 -0400 Subject: [PATCH 06/24] script can be used on any git repo --- scripts/repo2ssh.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/repo2ssh.sh b/scripts/repo2ssh.sh index 573f64a..c1715dc 100755 --- a/scripts/repo2ssh.sh +++ b/scripts/repo2ssh.sh @@ -1,2 +1,7 @@ #this command changes the git repo from HTTPS to SSH so you can use the key instead of typing in your password all the time. -git remote set-url origin git@github.com:steveokard/stevset.git +USER=steveokard +if [ -n "$1" ] +then + git remote set-url origin git@github.com:$USER/$1.git + git remote -v +fi From b95248b8447b12f8dd358747417e1032562fb38b Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 4 Jun 2021 23:59:50 -0400 Subject: [PATCH 07/24] add prezto upstream script --- scripts/preztoUpstream.zsh | 1 + 1 file changed, 1 insertion(+) create mode 100644 scripts/preztoUpstream.zsh diff --git a/scripts/preztoUpstream.zsh b/scripts/preztoUpstream.zsh new file mode 100644 index 0000000..c8403b3 --- /dev/null +++ b/scripts/preztoUpstream.zsh @@ -0,0 +1 @@ +git remote add upstream https://github.com/sorin-ionescu/prezto.git From f7e6748cfe50574c2e43c33b863c6cc61442455a Mon Sep 17 00:00:00 2001 From: steveokard Date: Sun, 6 Jun 2021 22:41:20 -0400 Subject: [PATCH 08/24] minor edits --- spacemacs.zsh | 9 ++++----- udeps.sh | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) mode change 100644 => 100755 spacemacs.zsh diff --git a/spacemacs.zsh b/spacemacs.zsh old mode 100644 new mode 100755 index 77b72b3..9237c73 --- a/spacemacs.zsh +++ b/spacemacs.zsh @@ -1,14 +1,13 @@ #!/bin/zsh #This will install Spacemacs (again) #cleanup -echo "Removing old emacs" -if [ -e ~/.emacs.d/] - then - mv ~/.emacs.d ~/doom.d +if [ -d "$HOME/.emacs.d" ]; then + echo "Moved Doom Config" + mv ~/.emacs.d ~/doom.d fi #Select Stable or Develop -read -p "Should we use the development version of emacs?" dist +read -n1 -p $"Should we use the development version of emacs? \n" dist if [[ $dist = y ]] then git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d else diff --git a/udeps.sh b/udeps.sh index 4e1ff10..8389ba2 100755 --- a/udeps.sh +++ b/udeps.sh @@ -26,7 +26,7 @@ read -n1 -p $'Does this system need a ssh server?\n' REPLY fi read -n1 -p $'\nDoes this system have a GUI?\n' REPLY if [[ $REPLY == [Yy] ]]; then - sudo apt-get install synaptic + sudo apt-get install synaptic emacs else sudo apt-get install emacs-nox fi From ad36d17f239f8330b7560523bcfb07a2db45e731 Mon Sep 17 00:00:00 2001 From: steveokard Date: Mon, 7 Jun 2021 11:35:43 -0400 Subject: [PATCH 09/24] zsh read is weird --- spacemacs.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacemacs.zsh b/spacemacs.zsh index 9237c73..9bcbb93 100755 --- a/spacemacs.zsh +++ b/spacemacs.zsh @@ -7,8 +7,7 @@ if [ -d "$HOME/.emacs.d" ]; then fi #Select Stable or Develop -read -n1 -p $"Should we use the development version of emacs? \n" dist -if [[ $dist = y ]] then +if read -q "REPLY?Should we use the development version of emacs? \n"; then git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d else git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d From f520fce0f127bf07d025b9ab034c129fa701c12d Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 11 Jun 2021 23:10:50 -0400 Subject: [PATCH 10/24] tmux themes --- .gitignore | 1 + init.sh | 8 ++------ tmux/.tmux.conf | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8df2436..b76e8cf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ log/ *.zwc *.zwc.old prezto/ +tmux/t-theme/ diff --git a/init.sh b/init.sh index d45e6fe..fd7e695 100755 --- a/init.sh +++ b/init.sh @@ -28,6 +28,8 @@ fi mkdir ~/.ssh echo "Stowing Configs" stow tmux +#Add Tmux themes + git clone https://github.com/wfxr/tmux-power.git "$HOME/stevset/tmux/t-theme" stow vim stow prezto stow config @@ -55,12 +57,6 @@ then fi fi -# #install Emacs Doom -# echo "Install Emacs Doom now? y/n"; read -r answer -# if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then -# ./emacs_doom.sh -# fi -###Doom's requirements are outside the scope of Ubuntu 20.04LTS echo "*******************************" echo "* Restart your terminal *" echo "*******************************" diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index ec721b4..165206b 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -36,6 +36,9 @@ bind a send-prefix #Powerline Settings run-shell "powerline-daemon -q" source "/usr/share/powerline/bindings/tmux/powerline.conf" +#Themes +set -g @tmux_power_theme 'default' +run-shell "$HOME/stevset/tmux/t-theme/tmux-power.tmux" #Misc Enables set-option -g renumber-windows on From 14ca80e242b3ecb6bd14a7ca405fcbc0ceb977dc Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 16 Jun 2021 01:37:59 -0400 Subject: [PATCH 11/24] update script downloads tmux theme --- scripts/preztoUpstream.zsh | 0 udeps.sh | 1 + update.zsh | 3 +++ 3 files changed, 4 insertions(+) mode change 100644 => 100755 scripts/preztoUpstream.zsh diff --git a/scripts/preztoUpstream.zsh b/scripts/preztoUpstream.zsh old mode 100644 new mode 100755 diff --git a/udeps.sh b/udeps.sh index 8389ba2..4c83d7b 100755 --- a/udeps.sh +++ b/udeps.sh @@ -18,6 +18,7 @@ sudo apt-get -my install \ ack \ fzf \ ripgrep \ + grc \ fd-find read -n1 -p $'Does this system need a ssh server?\n' REPLY diff --git a/update.zsh b/update.zsh index 46fad43..c9dd278 100755 --- a/update.zsh +++ b/update.zsh @@ -3,3 +3,6 @@ ln -s ~/stevset/prezto/.zprezto ~/.zprezto ./udeps.sh ./prezto.zsh + +#Tmux Theme +git clone https://github.com/wfxr/tmux-power.git "$HOME/stevset/tmux/t-theme" From ec750164389d14dac4d3fb519f630148cc527275 Mon Sep 17 00:00:00 2001 From: steveokard Date: Mon, 21 Jun 2021 12:04:41 -0400 Subject: [PATCH 12/24] added layers --- vim/.spacevim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vim/.spacevim b/vim/.spacevim index b847a46..d5d91a3 100644 --- a/vim/.spacevim +++ b/vim/.spacevim @@ -11,11 +11,11 @@ let g:spacevim_plug_home = '~/.vim/plugged' " Enable the existing layers in space-vim. " Refer to https://github.com/liuchengxu/space-vim/blob/master/layers/LAYERS.md for all available layers. let g:spacevim_layers = [ - \ 'fzf', 'better-defaults', 'which-key', + \ 'fzf', 'better-defaults', 'which-key', 'better-motion', 'airline', 'ctrlp', 'git', \ ] " Uncomment the following line if your terminal(-emulator) supports true colors. -" let g:spacevim_enable_true_color = 1 +let g:spacevim_enable_true_color = 1 " If you want to have more control over the layer, try using Layer command. " if g:spacevim.gui @@ -41,6 +41,6 @@ function! UserConfig() " Adding extras. " Uncomment the following line If you have installed the powerline fonts. " It is good for airline layer. - " let g:airline_powerline_fonts = 1 + let g:airline_powerline_fonts = 1 endfunction From a8ada986e739a2a4f9e72e13264b5fc5be13bcba Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 23 Jun 2021 02:23:47 -0400 Subject: [PATCH 13/24] added programs outside of apt --- udeps.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/udeps.sh b/udeps.sh index 4c83d7b..7faff05 100755 --- a/udeps.sh +++ b/udeps.sh @@ -1,5 +1,15 @@ #!/bin/bash #These are the programs I expect to find on any install +function dpkg_url() { + local tmp_deb="$(mktemp)" + local src_url=$1 + local args=${@:2} + + wget -O $tmp_deb $src_url && + sudo dpkg -i $tmp_deb $args && + { rm -f $tmp_deb; true; } || # commands above succeeded, remove tmp file + { rm -f $tmp_deb; false; } # commands above failed, remove tmp file anyway +} echo "installing base dependencies" sudo apt-get -my install \ @@ -19,7 +29,8 @@ sudo apt-get -my install \ fzf \ ripgrep \ grc \ - fd-find + fd-find \ + bat read -n1 -p $'Does this system need a ssh server?\n' REPLY if [[ $REPLY == [Yy] ]]; then @@ -27,8 +38,17 @@ read -n1 -p $'Does this system need a ssh server?\n' REPLY fi read -n1 -p $'\nDoes this system have a GUI?\n' REPLY if [[ $REPLY == [Yy] ]]; then - sudo apt-get install synaptic emacs + sudo apt-get install synaptic emacs vim-gtk3 else sudo apt-get install emacs-nox fi +#This section installs software outside apt + +#select exa or lsd +dpkg_url http://mirrors.kernel.org/ubuntu/pool/universe/r/rust-exa/exa_0.9.0-4_amd64.deb +# wget https://github.com/Peltoche/lsd/releases/download/0.20.1/lsd_0.20.1_amd64.deb; sudo dpkg -i ./lsd_0.20.1_amd64.deb; rm lsd_0.20.1_amd64.deb +dpkg_url https://github.com/muesli/duf/releases/download/v0.6.2/duf_0.6.2_linux_amd64.deb +dpkg_url https://github.com/ClementTsang/bottom/releases/download/0.6.1/bottom_0.6.1_amd64.deb +#https://github.com/dandavison/delta/releases/download/0.8.0/delta-0.8.0-x86_64-unknown-linux-gnu.tar.gz + From d600ee8b79654803f4a1a8cdafadbd5de573eb40 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 23 Jun 2021 02:33:52 -0400 Subject: [PATCH 14/24] add ncdu --- udeps.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/udeps.sh b/udeps.sh index 7faff05..0464339 100755 --- a/udeps.sh +++ b/udeps.sh @@ -30,7 +30,8 @@ sudo apt-get -my install \ ripgrep \ grc \ fd-find \ - bat + bat \ + ncdu \ read -n1 -p $'Does this system need a ssh server?\n' REPLY if [[ $REPLY == [Yy] ]]; then From 7a3c9589c6e5bee26668a15d78d764066bfd7070 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 23 Jun 2021 10:48:12 -0400 Subject: [PATCH 15/24] added fail2ban for ssh server --- udeps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udeps.sh b/udeps.sh index 0464339..9475b3d 100755 --- a/udeps.sh +++ b/udeps.sh @@ -35,7 +35,7 @@ sudo apt-get -my install \ read -n1 -p $'Does this system need a ssh server?\n' REPLY if [[ $REPLY == [Yy] ]]; then - sudo apt-get install openssh-server + sudo apt-get install openssh-server fail2ban fi read -n1 -p $'\nDoes this system have a GUI?\n' REPLY if [[ $REPLY == [Yy] ]]; then From 1ca988fe2fe178799d76020f8c6ea4fe14de0b57 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 23 Jun 2021 21:15:18 -0400 Subject: [PATCH 16/24] use nerdfonts, not all of them are broken :) --- scripts/fonts.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/fonts.sh b/scripts/fonts.sh index 51836c1..608d2ea 100755 --- a/scripts/fonts.sh +++ b/scripts/fonts.sh @@ -1,9 +1 @@ -#!/bin/bash -# clone -git clone https://github.com/powerline/fonts.git --depth=1 -# install -cd fonts -./install.sh -# clean-up a bit -cd .. -rm -rf fonts +echo "visit https://github.com/ryanoasis/nerd-fonts" From 1f2487dc7224ce50e6dbfc4ca08c33fad2c145a1 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 24 Jun 2021 02:41:55 -0400 Subject: [PATCH 17/24] automated fix for rust issue --- udeps.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/udeps.sh b/udeps.sh index 9475b3d..704a55f 100755 --- a/udeps.sh +++ b/udeps.sh @@ -11,7 +11,7 @@ function dpkg_url() { { rm -f $tmp_deb; false; } # commands above failed, remove tmp file anyway } -echo "installing base dependencies" +# installing base dependencies sudo apt-get -my install \ git \ stow \ @@ -30,8 +30,7 @@ sudo apt-get -my install \ ripgrep \ grc \ fd-find \ - bat \ - ncdu \ + ncdu read -n1 -p $'Does this system need a ssh server?\n' REPLY if [[ $REPLY == [Yy] ]]; then @@ -43,6 +42,13 @@ read -n1 -p $'\nDoes this system have a GUI?\n' REPLY else sudo apt-get install emacs-nox fi +#Fix stupid Rust issue +sudo sed -i '/crates2/d' /var/lib/dpkg/info/ripgrep.list +sudo rm -f /usr/.crates2.json +sudo apt install bat +sudo sed -i '/crates2/d' /var/lib/dpkg/info/bat.list +sudo rm -f /usr/.crates2.json + #This section installs software outside apt From 524b06626d4e8fdb345b1631a59dbd5f7fc7536e Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 24 Jun 2021 02:48:32 -0400 Subject: [PATCH 18/24] check if rust file exists --- udeps.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/udeps.sh b/udeps.sh index 704a55f..41ee900 100755 --- a/udeps.sh +++ b/udeps.sh @@ -43,12 +43,13 @@ read -n1 -p $'\nDoes this system have a GUI?\n' REPLY sudo apt-get install emacs-nox fi #Fix stupid Rust issue -sudo sed -i '/crates2/d' /var/lib/dpkg/info/ripgrep.list -sudo rm -f /usr/.crates2.json -sudo apt install bat -sudo sed -i '/crates2/d' /var/lib/dpkg/info/bat.list -sudo rm -f /usr/.crates2.json - +if [ -f "/usr/.crates2.json" ] + sudo sed -i '/crates2/d' /var/lib/dpkg/info/ripgrep.list + sudo rm -f /usr/.crates2.json + sudo apt install bat + sudo sed -i '/crates2/d' /var/lib/dpkg/info/bat.list + sudo rm -f /usr/.crates2.json +fi #This section installs software outside apt From d5a446a07d523d5d1f9b02af927851bd679d6b64 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 24 Jun 2021 03:06:16 -0400 Subject: [PATCH 19/24] test statements --- udeps.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/udeps.sh b/udeps.sh index 41ee900..20066de 100755 --- a/udeps.sh +++ b/udeps.sh @@ -43,10 +43,11 @@ read -n1 -p $'\nDoes this system have a GUI?\n' REPLY sudo apt-get install emacs-nox fi #Fix stupid Rust issue -if [ -f "/usr/.crates2.json" ] +if [ -f "/usr/.crates2.json" ]; then + echo "crates" sudo sed -i '/crates2/d' /var/lib/dpkg/info/ripgrep.list sudo rm -f /usr/.crates2.json - sudo apt install bat + sudo apt-get -my install bat sudo sed -i '/crates2/d' /var/lib/dpkg/info/bat.list sudo rm -f /usr/.crates2.json fi @@ -54,9 +55,10 @@ fi #This section installs software outside apt #select exa or lsd +if [[ ! "which exa > /dev/null" ]]; then dpkg_url http://mirrors.kernel.org/ubuntu/pool/universe/r/rust-exa/exa_0.9.0-4_amd64.deb # wget https://github.com/Peltoche/lsd/releases/download/0.20.1/lsd_0.20.1_amd64.deb; sudo dpkg -i ./lsd_0.20.1_amd64.deb; rm lsd_0.20.1_amd64.deb dpkg_url https://github.com/muesli/duf/releases/download/v0.6.2/duf_0.6.2_linux_amd64.deb dpkg_url https://github.com/ClementTsang/bottom/releases/download/0.6.1/bottom_0.6.1_amd64.deb #https://github.com/dandavison/delta/releases/download/0.8.0/delta-0.8.0-x86_64-unknown-linux-gnu.tar.gz - +fi From f3d6cce4115479a6d6d5df1c5b79c9ee50f0f2e1 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 24 Jun 2021 03:14:07 -0400 Subject: [PATCH 20/24] removed debug statement --- udeps.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/udeps.sh b/udeps.sh index 20066de..7b7211f 100755 --- a/udeps.sh +++ b/udeps.sh @@ -44,7 +44,6 @@ read -n1 -p $'\nDoes this system have a GUI?\n' REPLY fi #Fix stupid Rust issue if [ -f "/usr/.crates2.json" ]; then - echo "crates" sudo sed -i '/crates2/d' /var/lib/dpkg/info/ripgrep.list sudo rm -f /usr/.crates2.json sudo apt-get -my install bat From 0abd0782692f6cfb6bccc2b956d82b46d014969b Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 8 Jul 2021 17:11:58 -0400 Subject: [PATCH 21/24] added Tmux Plugin Manager --- init.sh | 1 + tmux/.tmux.conf | 35 ++++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/init.sh b/init.sh index fd7e695..43b0d08 100755 --- a/init.sh +++ b/init.sh @@ -29,6 +29,7 @@ mkdir ~/.ssh echo "Stowing Configs" stow tmux #Add Tmux themes + git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm git clone https://github.com/wfxr/tmux-power.git "$HOME/stevset/tmux/t-theme" stow vim stow prezto diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 165206b..5e1c6cb 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,22 +1,22 @@ -# -- general ------------------------------------------------------------------- -set -g default-terminal "screen-256color" # colors! +#Tmux Plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'wfxr/tmux-power' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'CrispyConductor/tmux-copy-toolkit' +set -g @plugin 'tmux-plugins/tmux-pain-control' + +# -- general set -g xterm-keys on # remap prefix to Control + a set -g prefix C-a unbind C-b bind C-a send-prefix -set -sg escape-time 0 #Mouse/Scrollback Tweaks -set -g history-limit 100000 -#setw -g mode-keys vi set-option -g mouse on set-window-option -g xterm-keys on -#set-option -g pane-active-border-fg yellow - -#New Keybindings -bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" # split panes using | and - bind | split-window -h @@ -30,15 +30,9 @@ bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D -# For nested tmux'es -bind a send-prefix - #Powerline Settings run-shell "powerline-daemon -q" source "/usr/share/powerline/bindings/tmux/powerline.conf" -#Themes -set -g @tmux_power_theme 'default' -run-shell "$HOME/stevset/tmux/t-theme/tmux-power.tmux" #Misc Enables set-option -g renumber-windows on @@ -63,4 +57,15 @@ bind m \ bind M \ set-option -g mouse off \;\ display 'Mouse: OFF' +#plugin settings +# Prefix Highlight: 'L' for left only, 'R' for right only and 'LR' for both +set -g @tmux_power_prefix_highlight_pos 'LR' +run-shell "$HOME/.tmux/plugins/tmux-prefix-highlight/prefix_highlight.tmux" +#Themes +set -g @tmux_power_theme 'default' +run-shell "$HOME/.tmux/plugins/tmux-power/tmux-power.tmux" +#Pain Control +run-shell "$HOME/.tmux/plugins/tmux-pain-control/pain_control.tmux" +#init tmux plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' From 3349bd567a9fe27792ee0196024a7b80c41e0f24 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 8 Jul 2021 18:07:50 -0400 Subject: [PATCH 22/24] bash sensible --- bash.sh | 10 ++++++++++ bash/.bash_aliases | 35 +++++++++++++++++++++++++++++++++++ init.sh | 11 ++++++----- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100755 bash.sh create mode 100644 bash/.bash_aliases diff --git a/bash.sh b/bash.sh new file mode 100755 index 0000000..d5385d0 --- /dev/null +++ b/bash.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#download sensible bash if it doesnt exist +if [ ! -f ~/.sensible.bash ]; then + wget -O "$HOME/.sensible.bash" https://raw.githubusercontent.com/mrzool/bash-sensible/master/sensible.bash +fi + +#inject source line into bashrc +if ! grep -q ".sensible.bash" "$HOME/.bashrc"; then + echo "source \"\$HOME/.sensible.bash\"" >> "$HOME/.bashrc" +fi diff --git a/bash/.bash_aliases b/bash/.bash_aliases new file mode 100644 index 0000000..1d3a100 --- /dev/null +++ b/bash/.bash_aliases @@ -0,0 +1,35 @@ +#Readability aliases +if which exa > /dev/null; then + alias lss='exa -alh' +else + alias lss='ls -alh --color=auto' +fi +alias mount='mount |column -t' +alias df='df -H -x squashfs -x tmpfs -x devtmpfs' +alias bat=batcat +alias ncdu='ncdu --color dark' + +#Shell Function aliases +alias dirs="dirs -v" +alias h='history' +alias jb='jobs -l' +alias reload=". ~/.bashrc" + +#shortcuts aliases +alias please="sudo !!" +alias ping='ping -c 5' +alias ax="chmod a+x" +alias wmip="curl icanhazip.com" + +#git aliases +alias gitS='git status' +alias gitL='git log' +alias gitD='git diff' +alias gitC='git commit -a' + +#Apt aliases +alias aptup="sudo apt update && sudo apt full-upgrade" +alias aptrm="sudo apt autoremove && sudo apt autoclean" + +#ssh aliases +alias sagent="eval `ssh-agent`" diff --git a/init.sh b/init.sh index 43b0d08..72c6e92 100755 --- a/init.sh +++ b/init.sh @@ -10,16 +10,17 @@ else exit 1 fi -#setup prezto +#setup shell +bash bash.sh echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer if [[ $answer = "zsh" ]] || [[ $answer = "z" ]]; then echo "Initializing Prezto" zsh prezto.zsh - chsh -s /bin/zsh + chsh -s /usr/bin/zsh elif [[ $answer = "fish" ]] || [[ $answer = "f" ]]; then echo "Installing Oh-My-Fish" bash fish.sh - chsh -s /bin/fish + chsh -s /usr/bin/fish else echo "Guess we're sticking with default bash then..." fi @@ -27,10 +28,10 @@ fi #create symlinks using stow mkdir ~/.ssh echo "Stowing Configs" +stow bash stow tmux -#Add Tmux themes +#init TMP git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - git clone https://github.com/wfxr/tmux-power.git "$HOME/stevset/tmux/t-theme" stow vim stow prezto stow config From 408e572d43b363aadc9417ed40309391e893a2e7 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 8 Jul 2021 18:09:46 -0400 Subject: [PATCH 23/24] removed extra lines --- tmux/.tmux.conf | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 5e1c6cb..130bc09 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -8,7 +8,6 @@ set -g @plugin 'tmux-plugins/tmux-pain-control' # -- general set -g xterm-keys on - # remap prefix to Control + a set -g prefix C-a unbind C-b @@ -18,18 +17,6 @@ bind C-a send-prefix set-option -g mouse on set-window-option -g xterm-keys on -# split panes using | and - -bind | split-window -h -bind - split-window -v -unbind '"' -unbind % - -# switch panes using Alt-arrow without prefix -bind -n M-Left select-pane -L -bind -n M-Right select-pane -R -bind -n M-Up select-pane -U -bind -n M-Down select-pane -D - #Powerline Settings run-shell "powerline-daemon -q" source "/usr/share/powerline/bindings/tmux/powerline.conf" From aa27f2900e3f05ffa83ccae46a226343fbfe0375 Mon Sep 17 00:00:00 2001 From: steveokard Date: Thu, 8 Jul 2021 18:14:08 -0400 Subject: [PATCH 24/24] cleaned up for repetition --- init.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/init.sh b/init.sh index 72c6e92..c0b52f4 100755 --- a/init.sh +++ b/init.sh @@ -6,8 +6,7 @@ if [[ $answer = "U" ]] || [[ $answer = "u" ]]; then elif [[ $answer = "O" ]] || [[ $answer = "o" ]]; then bash odeps.sh else - echo "Aborting!" - exit 1 + echo "Skipping!" fi #setup shell @@ -37,7 +36,6 @@ stow prezto stow config chmod 0700 ~/.ssh chmod -R 0600 ~/.ssh/* -#cp "$HOME/stevset/mc" "$HOME/.config/mc" #Configure git user echo -n "Would you like to configure your git name and email? (y/n) => "; read -r answer @@ -49,12 +47,11 @@ if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then fi #install spacevim -if [ ! -e ~/.space-vim ] -then - mv "$HOME/.vim" "$HOME/vim_bk" - mv "$HOME/.vimrc" "$HOME/vimrc_bk" +if [ ! -e ~/.space-vim ]; then echo "Install SpaceVim now? y/n"; read -r answer if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then + mv "$HOME/.vim" "$HOME/vim_bk" + mv "$HOME/.vimrc" "$HOME/vimrc_bk" (curl -sLf https://spacevim.org/install.sh | bash) fi fi