-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Shellcheck support via GitHub Actions. Fixes all violations.
- Loading branch information
Showing
67 changed files
with
230 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Run ShellCheck | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' # Run on all branches | ||
pull_request: | ||
branches: | ||
- '*' # Run on all branches | ||
|
||
jobs: | ||
shellcheck: | ||
name: Run ShellCheck | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install ShellCheck | ||
run: sudo apt-get install -y shellcheck | ||
|
||
- name: Run ShellCheck | ||
run: | | ||
# Find all shell scripts and run shellcheck | ||
find . -name "*.sh" -print0 | xargs -0 shellcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
ascii_art=' | ||
________ __ ___. | ||
\_____ \ _____ _____ | | ____ _\_ |__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[ -f "~/.bashrc" ] && mv ~/.bashrc ~/.bashrc.bak | ||
cp ~/.local/share/omakub/configs/bashrc ~/.bashrc | ||
source ~/.local/share/omakub/defaults/bash/shell | ||
#!/usr/bin/env bash | ||
|
||
[ -f "~/.inputrc" ] && mv ~/.inputrc ~/.inputrc.bak | ||
cp ~/.local/share/omakub/configs/inputrc ~/.inputrc | ||
[ -f "$HOME/.bashrc" ] && mv ~/.bashrc ~/.bashrc.bak | ||
cp "$HOME/.local/share/omakub/configs/bashrc" ~/.bashrc | ||
# shellcheck disable=SC1091 | ||
source "$HOME/.local/share/omakub/defaults/bash/shell" | ||
|
||
[ -f "$HOME/.inputrc" ] && mv ~/.inputrc ~/.inputrc.bak | ||
cp "$HOME/.local/share/omakub/configs/inputrc" "$HOME/.inputrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd ~/Downloads || exit | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
sudo apt install -y ./google-chrome-stable_current_amd64.deb | ||
rm google-chrome-stable_current_amd64.deb | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch | ||
sudo apt update | ||
sudo apt install -y fastfetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Flameshot is a nice step-up over the default Gnome screenshot tool | ||
sudo apt install -y flameshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y gnome-tweak-tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Gum is used for the Omakub commands for tailoring Omakub after the initial install | ||
cd /tmp | ||
cd /tmp || exit | ||
GUM_VERSION="0.14.1" # Use known good version | ||
wget -O gum.deb "https://github.com/charmbracelet/gum/releases/latest/download/gum_${GUM_VERSION}_amd64.deb" | ||
sudo apt install -y ./gum.deb | ||
rm gum.deb | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
LAZYDOCKER_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazydocker/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') | ||
curl -sLo lazydocker.tar.gz "https://github.com/jesseduffield/lazydocker/releases/latest/download/lazydocker_${LAZYDOCKER_VERSION}_Linux_x86_64.tar.gz" | ||
tar -xf lazydocker.tar.gz lazydocker | ||
sudo install lazydocker /usr/local/bin | ||
rm lazydocker.tar.gz lazydocker | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') | ||
curl -sLo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" | ||
tar -xf lazygit.tar.gz lazygit | ||
sudo install lazygit /usr/local/bin | ||
rm lazygit.tar.gz lazygit | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
LOCALSEND_VERSION=$(curl -s "https://api.github.com/repos/localsend/localsend/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') | ||
wget -O localsend.deb "https://github.com/localsend/localsend/releases/latest/download/LocalSend-${LOCALSEND_VERSION}-linux-x86-64.deb" | ||
sudo apt install -y ./localsend.deb | ||
rm localsend.deb | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y neovim | ||
|
||
if [ ! -d "$HOME/.config/nvim" ]; then | ||
git clone https://github.com/LazyVim/starter ~/.config/nvim | ||
mkdir -p ~/.config/nvim/plugin/after | ||
cp ~/.local/share/omakub/configs/neovim/transparency.lua ~/.config/nvim/plugin/after/ | ||
cp ~/.local/share/omakub/themes/neovim/tokyo-night.lua ~/.config/nvim/lua/plugins/theme.lua | ||
cp "$HOME/.local/share/omakub/configs/neovim/transparency.lua" "$HOME/.config/nvim/plugin/after/" | ||
cp "$HOME/.local/share/omakub/themes/neovim/tokyo-night.lua" "$HOME/.config/nvim/lua/plugins/theme.lua" | ||
|
||
# Enable default extras | ||
cp ~/.local/share/omakub/configs/neovim/lazyvim.json ~/.config/nvim/lazyvim.json | ||
cp "$HOME/.local/share/omakub/configs/neovim/lazyvim.json" "$HOME/.config/nvim/lazyvim.json" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# FIXME: Get this out of snap | ||
sudo snap install pinta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y vlc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y xournalpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
wget -O zellij.tar.gz "https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz" | ||
tar -xf zellij.tar.gz zellij | ||
sudo install zellij /usr/local/bin | ||
rm zellij.tar.gz zellij | ||
cd - | ||
cd - || exit | ||
|
||
mkdir -p ~/.config/zellij/ | ||
[ ! -f "$HOME/.config/zellij/config.kdl" ] && cp ~/.local/share/omakub/configs/zellij.kdl ~/.config/zellij/config.kdl | ||
[ ! -L "$HOME/.config/zellij/themes" ] && ln -s ~/.local/share/omakub/themes/zellij ~/.config/zellij/themes | ||
mkdir -p "$HOME/.config/zellij/" | ||
[ ! -f "$HOME/.config/zellij/config.kdl" ] && cp "$HOME/.local/share/omakub/configs/zellij.kdl" "$HOME/.config/zellij/config.kdl" | ||
[ ! -L "$HOME/.config/zellij/themes" ] && ln -s "$HOME/.local/share/omakub/themes/zellij" "$HOME/.config/zellij/themes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
for script in ~/.local/share/omakub/web-apps/*.sh; do source $script; done | ||
#!/usr/bin/env bash | ||
|
||
# shellcheck disable=SC1090 | ||
for script in ~/.local/share/omakub/web-apps/*.sh; do source "$script"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Add the official Docker repo | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
sudo wget -qO /etc/apt/keyrings/docker.asc https://download.docker.com/linux/ubuntu/gpg | ||
sudo chmod a+r /etc/apt/keyrings/docker.asc | ||
# shellcheck disable=SC1091 | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt update | ||
|
||
# Install Docker engine and standard plugins | ||
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras | ||
|
||
# Give this user privileged Docker access | ||
sudo usermod -aG docker ${USER} | ||
sudo usermod -aG docker "${USER}" | ||
|
||
# Use local logging driver - it's more efficient and uses compression by default. | ||
echo '{"log-driver":"local","log-opts":{"max-size":"10m","max-file":"5"}}' | sudo tee /etc/docker/daemon.json > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
mkdir -p ~/.local/share/fonts | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp | ||
mkdir -p "$HOME/.local/share/fonts" | ||
|
||
cd /tmp || exit | ||
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/CascadiaMono.zip | ||
unzip CascadiaMono.zip -d CascadiaFont | ||
cp CascadiaFont/*.ttf ~/.local/share/fonts | ||
rm -rf CascadiaMono.zip CascadiaFont | ||
|
||
wget -O iafonts.zip https://github.com/iaolo/iA-Fonts/archive/refs/heads/master.zip | ||
unzip iafonts.zip -d iaFonts | ||
cp iaFonts/iA-Fonts-master/iA\ Writer\ Mono/Static/iAWriterMonoS-*.ttf ~/.local/share/fonts | ||
cp iaFonts/iA-Fonts-master/iA\ Writer\ Mono/Static/iAWriterMonoS-*.ttf "$HOME/.local/share/fonts" | ||
rm -rf iafonts.zip iaFonts | ||
|
||
fc-cache | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
wget https://downloads.1password.com/linux/debian/amd64/stable/1password-latest.deb | ||
sudo apt install -y ./1password-latest.deb | ||
rm 1password-latest.deb | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
sudo apt install -y nautilus-dropbox | ||
gtk-launch dropbox.desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Virtualbox allows you to run VMs for other flavors of Linux or even Windows | ||
# See https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview | ||
# for a guide on how to run Ubuntu inside it. | ||
sudo apt install -y virtualbox virtualbox-ext-pack | ||
sudo usermod -aG vboxusers ${USER} | ||
sudo usermod -aG vboxusers "${USER}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
cd /tmp | ||
#!/usr/bin/env bash | ||
|
||
cd /tmp || exit | ||
wget https://zoom.us/client/latest/zoom_amd64.deb | ||
sudo apt install -y ./zoom_amd64.deb | ||
rm zoom_amd64.deb | ||
cd - | ||
cd - || exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Install optional apps | ||
# shellcheck disable=SC2140 | ||
apps=$(gum choose "1password" "Spotify" "Zoom" "Dropbox" "VirtualBox" --no-limit --selected "1password","Spotify","Zoom" --height 7 --header "Select commercial apps") | ||
|
||
for app in $apps; do | ||
# shellcheck disable=SC1090 | ||
source "$OMAKUB_PATH/install/optional/app-${app,,}.sh" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Favorite apps for dock | ||
apps=( | ||
"google-chrome.desktop" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
cp ~/.local/share/omakub/configs/xcompose ~/.XCompose | ||
#!/usr/bin/env bash | ||
|
||
cp "$HOME/.local/share/omakub/configs/xcompose" ~/.XCompose | ||
ibus restart | ||
gsettings set org.gnome.desktop.input-sources xkb-options "['compose:caps']" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.