Files
labwc-opensuse/install.sh
T

160 lines
3.7 KiB
Bash
Raw Normal View History

2026-09-13 19:18:33 +06:00
#!/bin/bash
set -e
# colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m'
# helpers
info() {
printf '%b\n' "${BLUE}>>$1${NC}"
}
success() {
printf '%b\n' "${GREEN}>>$1${NC}"
}
error() {
printf '%b\n' "${RED}>>ERROR: $1${NC}" >&2
}
# 0. Check environment
if [ "$(id -u)" -eq 0 ]; then
error "do not run this installer as root"
exit 1
fi
if [ ! -d "$HOME/labwc-opensuse" ]; then
error "labwc-opensuse directory not found in $HOME"
printf '%b\n' "${RED}>>Please clone the repository first:${NC}"
printf '%b\n' "${RED}>>git clone https://zenithcode.duckdns.org/s13bby/labwc-opensuse.git${NC}"
exit 1
fi
if ! command -v sudo >/dev/null 2>&1; then
error "sudo is required"
exit 1
fi
# 1. Begin
echo "┌──────────────────────────────────────┐"
echo "│ zenithcode.duckdns.org │"
2026-09-14 21:06:52 +06:00
echo "│ welcome to installer labwc-openSUSE │"
2026-09-13 19:18:33 +06:00
echo "│ by s13bby │"
echo "└──────────────────────────────────────┘"
2026-09-13 20:50:12 +06:00
# 2. Install needed packages
2026-09-13 19:18:33 +06:00
info "installing needed packages..."
sudo zypper in \
opi \
2026-09-14 21:06:52 +06:00
cliphist \
ImageMagic \
xkb-switch \
2026-09-13 20:50:12 +06:00
htop \
2026-09-13 21:11:41 +06:00
blueman \
2026-09-13 19:18:33 +06:00
git \
polkit \
polkit-gnome \
waybar \
mako \
swaybg \
wofi \
google-noto-fonts \
dejavu-fonts \
wl-clipboard \
xdg-desktop-portal \
xdg-desktop-portal-gtk \
pipewire \
wireplumber \
alsa-utils \
NetworkManager \
2026-09-14 21:06:52 +06:00
NetworkManager-connection-editor \
2026-09-13 19:18:33 +06:00
pcmanfm \
firefox \
playerctl \
jetbrains-mono-fonts \
power-profiles-daemon \
brightnessctl \
pavucontrol \
bluez \
2026-09-14 21:06:52 +06:00
ristretto \
gnome-calcendar \
spotify-launcher \
telegram-desktop
2026-09-13 19:18:33 +06:00
success "all packages installed (without swaylock-effects. install this package manualy"
2026-09-13 20:50:12 +06:00
# 3. Configure NetworkManager & power-profiles-daemon & bluetooth
2026-09-13 19:18:33 +06:00
info "configuring NetworkManager & power-profiles-daemon..."
sudo systemctl enable --now NetworkManager
sudo systemctl enable --now power-profiles-daemon
sudo systemctl enable --now bluetooth
success "NetworkManager & power-profiles-daemon & bluetooth enabled and running"
2026-09-13 20:50:12 +06:00
# 4. Copy configs
2026-09-13 19:18:33 +06:00
info "creating config directory..."
mkdir -p "$HOME/.config"
info "copying dotfiles..."
for config in alacritty swaylock labwc waybar wofi; do
if [ -d "$HOME/labwc-opensuse/configs/$config" ]; then
cp -r "$HOME/labwc-opensuse/configs/$config" "$HOME/.config/"
else
error "config directory not found: $config"
exit 1
fi
done
success "dotfiles copied"
2026-09-13 20:50:12 +06:00
# 5. Copy backgrounds
2026-09-13 19:18:33 +06:00
info "creating backgrounds directory..."
mkdir -p "$HOME/backgrounds/"
if [ -d "$HOME/labwc-opensuse/backgrounds" ]; then
cp -r "$HOME/labwc-opensuse/backgrounds/"* "$HOME/backgrounds/"
else
error "backgrounds directory not found"
exit 1
fi
success "backgrounds copied"
2026-09-13 20:50:12 +06:00
# 6. Done
2026-09-13 19:18:33 +06:00
echo
echo "┌──────────────────────────────────────┐"
echo "│ zenithcode.duckdns.org │"
echo "│ thanks for use my dotfiles │"
echo "│ mail: qaws3623@gmail.com by s13bby │"
echo "└──────────────────────────────────────┘"
info "please. install swaylock-effcts manually"
info "write >> opi swaylock-effects"
2026-09-14 21:06:52 +06:00
echo
info "please. install grimshot manually"
info "write >> opi grimshot"
2026-09-13 19:18:33 +06:00
2026-09-14 21:06:52 +06:00
success ">>after install swaylock-effects and grimshot:"
2026-09-13 19:18:33 +06:00
success " >>please reboot system<<"