Skip to content

Update installation script and README for Debian/Ubuntu support #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


```bash
curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/SufremOak/Ax-Shell/main/install.sh | bash
```

### Manual Installation
Expand Down Expand Up @@ -147,17 +147,4 @@ curl -fsSL https://raw.githubusercontent.com/Axenide/Ax-Shell/main/install.sh |

---

<table align="center">
<tr>
<td align="center"><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Telegram-Animated-Emojis/main/Activity/Sparkles.webp" alt="Sparkles" width="16" height="16" /><sup> sᴜᴘᴘᴏʀᴛ ᴛʜᴇ ᴘʀᴏᴊᴇᴄᴛ </sup><img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Telegram-Animated-Emojis/main/Activity/Sparkles.webp" alt="Sparkles" width="16" height="16" /></td>
</tr>
<tr>
<td align="center">
<a href='https://ko-fi.com/Axenide' target='_blank'>
<img style='border:0px;height:128px;'
src='https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExc3N4NzlvZWs2Z2tsaGx4aHgwa3UzMWVpcmNwZTNraTM2NW84ZDlqbiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/PaF9a1MpqDzovyqVKj/giphy.gif'
border='0' alt='Support me on Ko-fi!' />
</a>
</td>
</tr>
</table>
Ported to Debian/Ubuntu by [OakyMacintosh](https://gh.io/SufremOak)
130 changes: 64 additions & 66 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@
#!/bin/bash

set -e # Exit immediately if a command fails
set -u # Treat unset variables as errors
set -o pipefail # Prevent errors in a pipeline from being masked
# Ax-Shell Installation Script
# Ported by:

# ________ ________ ___ __ ___ ___ _____ ______ ________ ________
#|\ __ \|\ __ \|\ \|\ \ |\ \ / /|\ _ \ _ \|\ __ \|\ ____\
#\ \ \|\ \ \ \|\ \ \ \/ /|_ \ \ \/ / | \ \\\__\ \ \ \ \|\ \ \ \___|
# \ \ \\\ \ \ __ \ \ ___ \ \ \ / / \ \ \\|__| \ \ \ __ \ \ \
# \ \ \\\ \ \ \ \ \ \ \\ \ \ \/ / / \ \ \ \ \ \ \ \ \ \ \ \____
# \ \_______\ \__\ \__\ \__\\ \__\__/ / / \ \__\ \ \__\ \__\ \__\ \_______\
# \|_______|\|__|\|__|\|__| \|__|\___/ / \|__| \|__|\|__|\|__|\|_______|
# \|___|/
# https://gh.io/SufremOak
# https://youtube.com/@OakyMac


set -e
set -u
set -o pipefail

REPO_URL="https://github.com/Axenide/Ax-Shell.git"
INSTALL_DIR="$HOME/.config/Ax-Shell"
PACKAGES=(
brightnessctl
cava
cliphist
fabric-cli-git
gnome-bluetooth-3.0
gobject-introspection
gpu-screen-recorder
hypridle
hyprlock
hyprpicker
hyprshot
hyprsunset
imagemagick
libnotify
matugen-bin
noto-fonts-emoji
nvtop
playerctl
python-fabric-git
python-gobject
python-ijson
python-numpy
python-pillow
python-psutil
python-pywayland
python-requests
python-setproctitle
python-toml
python-watchdog
swappy
swww-git
tesseract
tmux
ttf-nerd-fonts-symbols-mono
unzip
upower
uwsm
vte3
webp-pixbuf-loader
wl-clipboard
brightnessctl
cava
gnome-bluetooth
gir1.2-gtk-3.0
imagemagick
libnotify-bin
fonts-noto-color-emoji
nvtop
playerctl
python3
python3-gi
python3-numpy
python3-pil
python3-psutil
python3-requests
python3-toml
python3-venv
python3-watchdog
tesseract-ocr
tmux
unzip
upower
webp
wl-clipboard
curl
git
)

# Prevent running as root
Expand All @@ -55,18 +56,12 @@ if [ "$(id -u)" -eq 0 ]; then
exit 1
fi

aur_helper="yay"

# Check if paru exists, otherwise use yay
if command -v paru &>/dev/null; then
aur_helper="paru"
elif ! command -v yay &>/dev/null; then
echo "Installing yay-bin..."
tmpdir=$(mktemp -d)
git clone --depth=1 https://aur.archlinux.org/yay-bin.git "$tmpdir/yay-bin"
(cd "$tmpdir/yay-bin" && makepkg -si --noconfirm)
rm -rf "$tmpdir"
fi
# Update and install required packages
echo "Updating package lists..."
sudo apt update

echo "Installing required packages..."
sudo apt install -y "${PACKAGES[@]}"

# Clone or update the repository
if [ -d "$INSTALL_DIR" ]; then
Expand All @@ -77,20 +72,12 @@ else
git clone --depth=1 "$REPO_URL" "$INSTALL_DIR"
fi

# Install required packages using the detected AUR helper (only if missing)
echo "Installing required packages..."
$aur_helper -Syy --needed --devel --noconfirm "${PACKAGES[@]}" || true

echo "Installing gray-git..."
yes | $aur_helper -Syy --needed --devel --noconfirm gray-git || true

echo "Installing required fonts..."

FONT_URL="https://github.com/zed-industries/zed-fonts/releases/download/1.2.0/zed-sans-1.2.0.zip"
FONT_DIR="$HOME/.fonts/zed-sans"
TEMP_ZIP="/tmp/zed-sans-1.2.0.zip"

# Check if fonts are already installed
if [ ! -d "$FONT_DIR" ]; then
echo "Downloading fonts from $FONT_URL..."
curl -L -o "$TEMP_ZIP" "$FONT_URL"
Expand All @@ -109,14 +96,25 @@ fi
if [ ! -d "$HOME/.fonts/tabler-icons" ]; then
echo "Copying local fonts to $HOME/.fonts/tabler-icons..."
mkdir -p "$HOME/.fonts/tabler-icons"
cp -r "$INSTALL_DIR/assets/fonts/"* "$HOME/.fonts"
cp -r "$INSTALL_DIR/assets/fonts/." "$HOME/.fonts/tabler-icons"
else
echo "Local fonts are already installed. Skipping copy."
fi

python "$INSTALL_DIR/config/config.py"
# Update font cache
fc-cache -fv

echo "Starting Python Enviroment Configuration..."
python3 -m venv $INSTALL_DIR/venv
source $INSTALL_DIR/venv/bin/activate
pip install --upgrade pip
pip install git+https://github.com/Fabric-Development/fabric.git

python3 "$INSTALL_DIR/config/config.py"
echo "Starting Ax-Shell..."
killall ax-shell 2>/dev/null || true
uwsm app -- python "$INSTALL_DIR/main.py" > /dev/null 2>&1 & disown
# 'uwsm' is not available on Debian/Ubuntu, so we run directly
python3 "$INSTALL_DIR/main.py" > /dev/null 2>&1 & disown

echo "Installation complete."