Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Jul 27, 2024
2 parents fcb3e9c + 2245a99 commit 4a0c51d
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 52 deletions.
2 changes: 1 addition & 1 deletion applications/About.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/About.desktop
Version=1.0
Name=About
Comment=System information from Fastfetch
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e bash -c 'fastfetch; read -n 1 -s'
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml --class=About --title=About -e bash -c 'fastfetch; read -n 1 -s'
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/Ubuntu.png
Expand Down
2 changes: 1 addition & 1 deletion applications/Activity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/Activity.desktop
Version=1.0
Name=Activity
Comment=System activity from btop
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/btop.toml -e btop
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/btop.toml --class=Activity --title=Activity -e btop
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/Activity.png
Expand Down
2 changes: 1 addition & 1 deletion applications/Basecamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/Basecamp.desktop
Version=1.0
Name=Basecamp
Comment=Basecamp Project Management
Exec=google-chrome --app="https://launchpad.37signals.com" --name=Basecamp
Exec=google-chrome --app="https://launchpad.37signals.com" --name=Basecamp --class=Basecamp
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/Basecamp.png
Expand Down
2 changes: 1 addition & 1 deletion applications/Docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/Docker.desktop
Version=1.0
Name=Docker
Comment=Manage Docker containers with LazyDocker
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e lazydocker
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml --class=Docker --title=Docker -e lazydocker
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/Docker.png
Expand Down
2 changes: 1 addition & 1 deletion applications/HEY.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/HEY.desktop
Version=1.0
Name=HEY
Comment=HEY Email + Calendar
Exec=google-chrome --app="https://app.hey.com/" --name=HEY
Exec=google-chrome --app="https://app.hey.com/" --name=HEY --class=HEY
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/HEY.png
Expand Down
2 changes: 1 addition & 1 deletion applications/Neovim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/Neovim.desktop
Version=1.0
Name=Neovim
Comment=Edit text files
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e nvim %F
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml --class=Neovim --title=Neovim -e nvim %F
Terminal=false
Type=Application
Icon=nvim
Expand Down
2 changes: 1 addition & 1 deletion applications/Omakub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/Omakub.desktop
Version=1.0
Name=Omakub
Comment=Omakub Controls
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml -e omakub
Exec=alacritty --config-file /home/$USER/.local/share/omakub/defaults/alacritty/pane.toml --class=Omakub --title=Omakub -e omakub
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/Omakub.png
Expand Down
2 changes: 1 addition & 1 deletion applications/WhatsApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cat <<EOF >~/.local/share/applications/WhatsApp.desktop
Version=1.0
Name=WhatsApp
Comment=WhatsApp Messenger
Exec=google-chrome --app="https://web.whatsapp.com" --name=WhatsApp
Exec=google-chrome --app="https://web.whatsapp.com" --name=WhatsApp --class=Whatsapp
Terminal=false
Type=Application
Icon=/home/$USER/.local/share/omakub/applications/icons/WhatsApp.png
Expand Down
23 changes: 0 additions & 23 deletions boot-dev.sh

This file was deleted.

9 changes: 7 additions & 2 deletions boot.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ echo -e "\nBegin installation (or abort with ctrl+c)..."
sudo apt-get update >/dev/null
sudo apt-get install -y git >/dev/null

echo "Cloning stable Omakub..."
echo "Cloning Omakub..."
rm -rf ~/.local/share/omakub
git clone -b stable https://github.com/basecamp/omakub.git ~/.local/share/omakub >/dev/null
git clone https://github.com/basecamp/omakub.git ~/.local/share/omakub >/dev/null
if [[ $OMAKUB_REF != "master" ]]; then
cd ~/.local/share/omakub
git fetch origin "${OMAKUB_REF:-stable}" && git checkout FETCH_HEAD
cd -
fi

echo "Installation starting..."
source ~/.local/share/omakub/install.sh
29 changes: 16 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@ set -e
# Desktop software and tweaks will only be installed if we're running Gnome
RUNNING_GNOME=$([[ "$XDG_CURRENT_DESKTOP" == *"GNOME"* ]] && echo true || echo false)

# Check the distribution name and version and abort if incompatible
source ~/.local/share/omakub/install/check-version.sh

if $RUNNING_GNOME; then
# Ensure computer doesn't go to sleep or lock while installing
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.session idle-delay 0
# Ensure computer doesn't go to sleep or lock while installing
gsettings set org.gnome.desktop.screensaver lock-enabled false
gsettings set org.gnome.desktop.session idle-delay 0

echo "Get ready to make a few choices..."
source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null
source ~/.local/share/omakub/first_run_choices.sh
echo "Get ready to make a few choices..."
source ~/.local/share/omakub/install/terminal/required/app-gum.sh >/dev/null
source ~/.local/share/omakub/install/first-run-choices.sh

echo "Installing terminal and desktop tools.."
echo "Installing terminal and desktop tools.."
else
echo "Only installing terminal tools..."
echo "Only installing terminal tools..."
fi

# Install terminal tools
source ~/.local/share/omakub/install/terminal.sh

if $RUNNING_GNOME; then
# Install desktop tools and tweaks
source ~/.local/share/omakub/install/desktop.sh
# Install desktop tools and tweaks
source ~/.local/share/omakub/install/desktop.sh

# Revert to normal idle and lock settings
gsettings set org.gnome.desktop.screensaver lock-enabled true
gsettings set org.gnome.desktop.session idle-delay 300
# Revert to normal idle and lock settings
gsettings set org.gnome.desktop.screensaver lock-enabled true
gsettings set org.gnome.desktop.session idle-delay 300
fi
27 changes: 27 additions & 0 deletions install/check-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Function to check if running on Ubuntu 24.04 or higher
check_ubuntu_version() {
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "ubuntu" ]; then
if awk -v ver="$VERSION_ID" 'BEGIN {exit !(ver >= 24.04)}'; then
return 0
else
echo "Error: Ubuntu version must be 24.04 or higher. Current version: $VERSION_ID" >&2
return 1
fi
else
echo "Error: This script must be run on Ubuntu. Current OS: $ID" >&2
return 1
fi
else
echo "Error: Unable to determine OS. /etc/os-release file not found." >&2
return 1
fi
}

if ! check_ubuntu_version; then
echo "Script execution failed due to system requirements not being met." >&2
exit 1
fi
File renamed without changes.
2 changes: 1 addition & 1 deletion install/terminal/apps-terminal.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils fd-find
sudo apt install -y fzf ripgrep bat eza zoxide plocate btop apache2-utils fd-find tldr
8 changes: 4 additions & 4 deletions install/terminal/libraries.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo apt install -y \
build-essential pkg-config autoconf bison clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev
build-essential pkg-config autoconf bison clang rustc \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev libpq-dev postgresql-client postgresql-client-common
2 changes: 1 addition & 1 deletion install/terminal/required/app-gum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Gum is used for the Omakub commands for tailoring Omakub after the initial install
cd /tmp
GUM_VERSION="0.14.3" # Use known good version
wget -qO gum.deb "https://github.com/charmbracelet/gum/releases/latest/download/gum_${GUM_VERSION}_amd64.deb"
wget -qO gum.deb "https://github.com/charmbracelet/gum/releases/download/v${GUM_VERSION}/gum_${GUM_VERSION}_amd64.deb"
sudo apt-get install -y ./gum.deb
rm gum.deb
cd -
14 changes: 14 additions & 0 deletions migrations/1722091912.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sudo echo "Running upgrade migration..."

# Add rustc and pgsql client libs
source $OMAKUB_PATH/install/terminal/libraries.sh

# Set name and class for desktop files
source $OMAKUB_PATH/applications/About.sh
source $OMAKUB_PATH/applications/Activity.sh
source $OMAKUB_PATH/applications/Basecamp.sh
source $OMAKUB_PATH/applications/HEY.sh
source $OMAKUB_PATH/applications/Docker.sh
source $OMAKUB_PATH/applications/Neovim.sh
source $OMAKUB_PATH/applications/Omakub.sh
source $OMAKUB_PATH/applications/WhatsApp.sh

0 comments on commit 4a0c51d

Please sign in to comment.