diff options
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..e625f71 --- /dev/null +++ b/install.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +# eSheep installer for Linux/Wayland +set -e + +INSTALL_DIR="$HOME/.local/share/esheep" +BIN_DIR="$HOME/.local/bin" + +echo "=== eSheep Wayland installer ===" + +# Detect distro +if command -v apt-get &>/dev/null; then + echo "Installing system dependencies (apt)..." + sudo apt-get install -y \ + python3 \ + python3-gi \ + python3-gi-cairo \ + python3-pil \ + gir1.2-gtk-3.0 \ + gir1.2-gtklayershell-0.1 \ + python3-pip + + echo "Installing Python packages..." + pip3 install --user numpy wayfire --break-system-packages 2>/dev/null || \ + pip3 install --user numpy wayfire + +elif command -v pacman &>/dev/null; then + echo "Installing system dependencies (pacman)..." + sudo pacman -S --needed python python-gobject python-pillow gtk3 gtk-layer-shell python-numpy + + echo "Installing Python packages..." + pip install --user wayfire + +elif command -v dnf &>/dev/null; then + echo "Installing system dependencies (dnf)..." + sudo dnf install -y python3 python3-gobject python3-pillow gtk3 gtk-layer-shell python3-numpy + pip3 install --user wayfire + +else + echo "WARNING: Unknown distro. Install manually:" + echo " - python3, python3-gi (PyGObject), python3-pil (Pillow), numpy" + echo " - GTK 3.0 GObject introspection" + echo " - gtk-layer-shell GObject introspection (gir1.2-gtklayershell-0.1)" + echo " - pip install wayfire" +fi + +echo "Installing eSheep to $INSTALL_DIR..." +mkdir -p "$INSTALL_DIR" "$BIN_DIR" + +cp "$(dirname "$0")/esheep.py" "$INSTALL_DIR/" +cp "$(dirname "$0")/animations.xml" "$INSTALL_DIR/" + +# Launcher script +cat > "$BIN_DIR/esheep" << EOF +#!/usr/bin/env bash +exec python3 "$INSTALL_DIR/esheep.py" --xml "$INSTALL_DIR/animations.xml" "\$@" +EOF +chmod +x "$BIN_DIR/esheep" + +# Desktop entry +mkdir -p "$HOME/.local/share/applications" +cat > "$HOME/.local/share/applications/esheep.desktop" << EOF +[Desktop Entry] +Name=eSheep +Comment=Desktop sheep for Wayland +Exec=$BIN_DIR/esheep +Icon=application-x-executable +Type=Application +Categories=Amusement; +Keywords=sheep;pet;desktop; +EOF + +echo "" +echo "=== Installation complete! ===" +echo "" +echo "Run: esheep" +echo "Run with multiple sheep: esheep --count 3" +echo "" +echo "Make sure Wayfire's 'ipc' plugin is enabled for window walking:" +echo " Add 'ipc' to the 'plugins' line in ~/.config/wayfire.ini" +echo "" |
