From feed3ebf98b0d40be9544e22f958518ee3c4255a Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Mon, 28 Oct 2024 18:22:51 -0400 Subject: [PATCH 1/4] - reorganized 2 sections - use apt instead of apt-get - updated manual URLs --- udeps.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/udeps.sh b/udeps.sh index 25e19b0..43dcca6 100755 --- a/udeps.sh +++ b/udeps.sh @@ -12,7 +12,7 @@ function dpkg_url() { } # installing base dependencies -sudo apt-get -my install \ +sudo apt -my install \ git \ vim \ stow \ @@ -40,16 +40,6 @@ sudo apt-get -my install \ shellcheck \ lua5.2 -read -n1 -p $'Does this system need a ssh server?\n' REPLY - if [[ $REPLY == [Yy] ]]; then - sudo apt-get install openssh-server fail2ban - fi -read -n1 -p $'\nDoes this system have a GUI?\n' REPLY - if [[ $REPLY == [Yy] ]]; then - sudo apt-get install synaptic flatpak - flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo - fi - release=`lsb_release -cs` if [[ $release == jammy || $release == noble ]]; then sudo apt install \ @@ -58,9 +48,19 @@ if [[ $release == jammy || $release == noble ]]; then btop fi +read -n1 -p $'Does this system need a ssh server?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo apt install openssh-server fail2ban + fi +read -n1 -p $'\nDoes this system have a GUI?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo apt install synaptic flatpak + flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + fi + #This section installs software outside apt -dpkg_url https://github.com/dandavison/delta/releases/download/0.18.0/git-delta_0.18.0_amd64.deb -dpkg_url https://github.com/bootandy/dust/releases/download/v1.0.0/du-dust_1.0.0-1_amd64.deb -dpkg_url https://github.com/charmbracelet/glow/releases/download/v1.5.1/glow_1.5.1_amd64.deb +dpkg_url https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb +dpkg_url https://github.com/bootandy/dust/releases/download/v1.1.1/du-dust_1.1.1-1_amd64.deb +dpkg_url https://github.com/charmbracelet/glow/releases/download/v2.0.0/glow_2.0.0_amd64.deb dpkg_url https://github.com/ClementTsang/bottom/releases/download/0.10.2/bottom_0.10.2-1_amd64.deb From 580b1cf2669b371b89c7d37b3038c39fc86f399f Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Mon, 28 Oct 2024 18:40:42 -0400 Subject: [PATCH 2/4] misc changes --- ddeps.sh | 9 +++++---- init.sh | 2 +- spacevim.sh | 8 +++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ddeps.sh b/ddeps.sh index 40f9a4a..bce3672 100755 --- a/ddeps.sh +++ b/ddeps.sh @@ -51,9 +51,10 @@ read -n1 -p $'\nDoes this system have a GUI?\n' REPLY fi #This section installs software outside apt +dpkg_url https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb +dpkg_url https://github.com/bootandy/dust/releases/download/v1.1.1/du-dust_1.1.1-1_amd64.deb +dpkg_url https://github.com/charmbracelet/glow/releases/download/v2.0.0/glow_2.0.0_amd64.deb +dpkg_url https://github.com/ClementTsang/bottom/releases/download/0.10.2/bottom_0.10.2-1_amd64.deb + dpkg_url https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_amd64.deb dpkg_url https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb -dpkg_url https://github.com/dandavison/delta/releases/download/0.17.0/git-delta_0.17.0_amd64.deb -dpkg_url https://github.com/bootandy/dust/releases/download/v1.0.0/du-dust_1.0.0-1_amd64.deb -dpkg_url https://github.com/charmbracelet/glow/releases/download/v1.5.1/glow_1.5.1_amd64.deb -dpkg_url https://github.com/ClementTsang/bottom/releases/download/0.9.6/bottom_0.9.6_amd64.deb diff --git a/init.sh b/init.sh index 6dd1c11..b5cebd3 100755 --- a/init.sh +++ b/init.sh @@ -30,7 +30,7 @@ chmod 0700 ~/.ssh chmod -R 0600 ~/.ssh/* #setup shell -stow home +#stow home <-- what is this for?? echo "Select which shell to configure and use: zsh/fish/bash"; read -r answer case $answer in z | zsh) diff --git a/spacevim.sh b/spacevim.sh index 3ba3e45..c330985 100755 --- a/spacevim.sh +++ b/spacevim.sh @@ -7,9 +7,7 @@ curl -sLf https://spacevim.org/install.sh | bash -s -- --install vim echo "Install Neovim" trash ~/.local/share/nvim ~/.config/nvim #removes spacevim's symlink mkdir -v ~/bin - -release=`lsb_release -cs` -if [[ $release != noble ]]; then +if [[ $(lsb_release -cs) != noble ]]; then trash ~/bin/nvim curl -L https://github.com/neovim/neovim/releases/latest/download/nvim.appimage -o ~/bin/nvim chmod u+x ~/bin/nvim @@ -20,6 +18,6 @@ fi echo "Install NvChad" git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 -echo "Install Lunar Vim" +#echo "Install Lunar Vim" #source: https://www.lunarvim.org/docs/installation -LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh) +#LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh) From ce7968e934e2dbc75aa0beb3b9b1b29f40e7f0bf Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Sun, 17 Nov 2024 22:27:29 -0500 Subject: [PATCH 3/4] script to swap command and opt on a mac --- scripts/apple_swapopt.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 scripts/apple_swapopt.sh diff --git a/scripts/apple_swapopt.sh b/scripts/apple_swapopt.sh new file mode 100755 index 0000000..890b2c2 --- /dev/null +++ b/scripts/apple_swapopt.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# https://askubuntu.com/a/919096 +echo options hid_apple swap_opt_cmd=1 | sudo tee -a /etc/modprobe.d/hid_apple.conf +sudo update-initramfs -u -k all From c3da9e3a321ddb191582fc27a3e5bcf51ca32bcd Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Fri, 22 Nov 2024 21:50:29 -0500 Subject: [PATCH 4/4] added line to enable it now --- scripts/apple_swapopt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/apple_swapopt.sh b/scripts/apple_swapopt.sh index 890b2c2..b591527 100755 --- a/scripts/apple_swapopt.sh +++ b/scripts/apple_swapopt.sh @@ -1,4 +1,5 @@ #!/bin/bash # https://askubuntu.com/a/919096 +echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd echo options hid_apple swap_opt_cmd=1 | sudo tee -a /etc/modprobe.d/hid_apple.conf sudo update-initramfs -u -k all