almost finaly
This commit is contained in:
Executable
+171
@@ -0,0 +1,171 @@
|
||||
#!/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 │"
|
||||
echo "│ welcome to installer labwc-opensuse │"
|
||||
echo "│ by s13bby │"
|
||||
echo "└──────────────────────────────────────┘"
|
||||
|
||||
|
||||
# 2. Update and upgrade system
|
||||
|
||||
info "updating system & distro repositories..."
|
||||
sudo zypper refresh
|
||||
sudo zypper dup
|
||||
success "system & distro repositories are up-to-date"
|
||||
|
||||
|
||||
# 3. Install needed packages
|
||||
|
||||
info "installing needed packages..."
|
||||
|
||||
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
|
||||
sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.rep
|
||||
|
||||
# power-profiles-daemon -- FOR NOTEBOOK ONLY
|
||||
|
||||
sudo zypper in \
|
||||
opi \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
git \
|
||||
polkit \
|
||||
polkit-gnome \
|
||||
curl \
|
||||
cmake \
|
||||
libcurl-devel \
|
||||
opencv \
|
||||
opencv-devel \
|
||||
waybar \
|
||||
mako \
|
||||
swaybg \
|
||||
wofi \
|
||||
google-noto-fonts \
|
||||
dejavu-fonts \
|
||||
wl-clipboard \
|
||||
xdg-desktop-portal \
|
||||
xdg-desktop-portal-gtk \
|
||||
pipewire \
|
||||
wireplumber \
|
||||
alsa-utils \
|
||||
NetworkManager \
|
||||
NetworkManager-applet \
|
||||
pcmanfm \
|
||||
firefox \
|
||||
playerctl \
|
||||
jetbrains-mono-fonts \
|
||||
power-profiles-daemon \
|
||||
brightnessctl \
|
||||
pavucontrol \
|
||||
bluez \
|
||||
sublime-text \
|
||||
v2ray-core \
|
||||
grim \
|
||||
ristretto
|
||||
|
||||
success "all packages installed (without swaylock-effects. install this package manualy"
|
||||
|
||||
|
||||
# 4. Configure NetworkManager & power-profiles-daemon & bluetooth
|
||||
|
||||
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"
|
||||
|
||||
|
||||
# 5. Copy configs
|
||||
|
||||
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"
|
||||
|
||||
|
||||
# 6. Copy backgrounds
|
||||
|
||||
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"
|
||||
|
||||
|
||||
# 7. Done
|
||||
|
||||
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"
|
||||
|
||||
success ">>after install swaylock-effects:"
|
||||
success " >>please reboot system<<"
|
||||
Reference in New Issue
Block a user