diff --git a/README.md b/README.md index c157c1b..d9eb824 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # labwc-opensuse +in opensuse installer choose >> generic desktop + +sudo zypper install labwc git +sudo systemctl disable display-manager +sudo systemctl set-default multi-user.target + +git clone https://zenithcode.duckdns.org/s13bby/labwc-opensuse.git + +bash ~/labwc-opensuse/install.sh \ No newline at end of file diff --git a/backgrounds/fuji_dark.jpg b/backgrounds/fuji_dark.jpg new file mode 100644 index 0000000..03461fd Binary files /dev/null and b/backgrounds/fuji_dark.jpg differ diff --git a/backgrounds/fuji_light.jpg b/backgrounds/fuji_light.jpg new file mode 100644 index 0000000..b266078 Binary files /dev/null and b/backgrounds/fuji_light.jpg differ diff --git a/configs/alacritty/alacritty.toml b/configs/alacritty/alacritty.toml new file mode 100644 index 0000000..cb4637d --- /dev/null +++ b/configs/alacritty/alacritty.toml @@ -0,0 +1,27 @@ +# Default Colors +[colors.primary] +background = "#0b0b0b" +foreground = "#acacac" +bright_foreground = "#e3e3e3" + +# Normal colors +[colors.normal] +black = "#0b0b0b" +red = "#f08778" +green = "#53bf97" +yellow = "#fdcc60" +blue = "#60b8d6" +magenta = "#ec7171" +cyan = "#98e6ca" +white = "#fafafa" + +# Bright colors +[colors.bright] +black = "#747474" +red = "#f58c7d" +green = "#58c49c" +yellow = "#ffd165" +blue = "#65bddb" +magenta = "#f17676" +cyan = "#9debcf" +white = "#ffffff" \ No newline at end of file diff --git a/configs/labwc/autostart b/configs/labwc/autostart new file mode 100644 index 0000000..1e86dc2 --- /dev/null +++ b/configs/labwc/autostart @@ -0,0 +1,14 @@ +# базовые сервисы +waybar & +mako & + +swaybg \ + -m fill \ + -i "$HOME/backgrounds/fuji_light.jpg" & + +# буфер обмена +wl-paste --type text --watch cliphist store & +wl-paste --type image --watch cliphist store & + +# polkit authentication agent +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & diff --git a/configs/labwc/environment b/configs/labwc/environment new file mode 100644 index 0000000..b18d313 --- /dev/null +++ b/configs/labwc/environment @@ -0,0 +1,5 @@ +# раскладка и ее порядок +XKB_DEFAULT_LAYOUT=us,ru + +# смена раскладки на сочетание клавиш +XKB_DEFAULT_OPTIONS=grp:ctrl_space_toggle \ No newline at end of file diff --git a/configs/labwc/menu.xml b/configs/labwc/menu.xml new file mode 100644 index 0000000..b4681f3 --- /dev/null +++ b/configs/labwc/menu.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/configs/labwc/rc.xml b/configs/labwc/rc.xml new file mode 100644 index 0000000..966042a --- /dev/null +++ b/configs/labwc/rc.xml @@ -0,0 +1,195 @@ + + + + + + 1 + 2 + 3 + 4 + + + + + + yes + no + + + + + labwc-s13bby + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + 2 + + + + + + + 3 + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sh -c 'grim -g "$(slurp)" - | wl-copy' + + + + + + + ~/.config/wofi/cliphist-img.sh + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/labwc/shutdown b/configs/labwc/shutdown new file mode 100644 index 0000000..4fa5332 --- /dev/null +++ b/configs/labwc/shutdown @@ -0,0 +1,2 @@ +# очистка clipboard +cliphist wipe & \ No newline at end of file diff --git a/configs/labwc/themerc-override b/configs/labwc/themerc-override new file mode 100644 index 0000000..766df96 --- /dev/null +++ b/configs/labwc/themerc-override @@ -0,0 +1,18 @@ +# цвет рамки active и inactive +window.active.border.color: #98309c +window.inactive.border.color: #0b0b0b + +# цвет фона заголовка active и inactive +window.active.title.bg.color: #e3e3e3 +window.inactive.title.bg.color: #b8b8b8 + +# цвет текста заголовка окна +window.active.label.text.color: #0b0b0b +window.inactive.label.text.color: #0b0b0b + +# цвет иконок кнопок для окна +window.active.button.unpressed.image.color: #0b0b0b +window.inactive.button.image.color: #0b0b0b + +window.active.border.radius: 0 +window.inactive.border.radius: 0 diff --git a/configs/swaylock/config b/configs/swaylock/config new file mode 100644 index 0000000..beae581 --- /dev/null +++ b/configs/swaylock/config @@ -0,0 +1,123 @@ +# ~/.config/swaylock/config + + +# ============================================ +# BACKGROUND +# ============================================ + +# Снимок текущего экрана +screenshots + +# Размытие: <радиус>x<проходы> +effect-blur=7x3 + +# Виньетка (затемнение по краям) +# effect-vignette=0.5:0.5 + +# Заполнять экран скриншотом +scaling=fill + + +# ============================================ +# FONT +# ============================================ + +font=JetBrainsMono Nerd Font +font-size=18 + + +# ============================================ +# CLOCK / DATE +# ============================================ + +clock + +# Часы +#timestr=%H:%M + + +# ============================================ +# INDICATOR +# ============================================ + +indicator + +# Радиус кольца +indicator-radius=75 + +# Толщина кольца +indicator-thickness=10 + +# Позиция индикатора. +# По умолчанию — по центру. +# Если нужна ручная позиция — раскомментируй: +#indicator-x-position=960 +#indicator-y-position=540 + + +# ============================================ +# COLORS +# ============================================ + +text-color=fefefeff + +inside-color=090909a8 + +ring-color=acacacff + + +# ============================================ +# PASSWORD CHECK +# ============================================ + +inside-ver-color=090909a8 + +ring-ver-color=dadadaff + +text-ver-color=fefefeff + + +# ============================================ +# WRONG PASSWORD +# ============================================ + +inside-wrong-color=090909a8 + +ring-wrong-color=acacacff + +text-wrong-color=fefefeff + + +# ============================================ +# CLEAR +# ============================================ + +inside-clear-color=090909a8 + +ring-clear-color=acacacff + +text-clear-color=fefefeff + + +# ============================================ +# SEPARATOR +# ============================================ + +separator-color=090909ff + + +# ============================================ +# KEY HIGHLIGHT +# ============================================ + +key-hl-color=dadadaff + +bs-hl-color=acacacff + + +# ============================================ +# PASSWORD / BEHAVIOUR +# ============================================ + +# Показывать количество неудачных попыток +show-failed-attempts \ No newline at end of file diff --git a/configs/waybar/config.jsonc b/configs/waybar/config.jsonc new file mode 100644 index 0000000..a730184 --- /dev/null +++ b/configs/waybar/config.jsonc @@ -0,0 +1,65 @@ +{ + "layer": "top", + "position": "top", + "height": 25, + "spacing": 0, + "modules-left": ["wlr/taskbar"], + "modules-center": ["clock"], + "modules-right": ["network", "custom/spotify", "custom/language", "pulseaudio", "cpu", "memory", "tray"], + + "wlr/taskbar": { + "format": "{icon}", + "icon-size": 15, + "tooltip-format": "{title}", + "on-click": "activate" + }, + "custom/language": { + "exec": "xkblayout-state print %s | tr 'a-z' 'A-Z'", + "interval": 1, + "format": " {} " + }, + "custom/spotify": { + "format": "[{}] ", + "exec": "playerctl metadata --format '{{artist}} - {{title}}' spotify 2>/dev/null || echo ''", + "restart-interval": 1, + "on-click": "spotify", + "max-length": 50 + }, + // "custom/v2raya": { + // "format": "PROXY{}", + // "return-type": "json", + // "interval": 2, + // "exec": "sh -c '~/.config/waybar/v2raya-toggle.sh toggle'", + // "on-click": "sh -c '~/.config/waybar/v2raya-toggle.sh toggle'", + // "signal": 10 + // }, + "clock": { + "format": "{:%H:%M}", + "format-alt": "{:%d-%m-%Y}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": false, + "on-click": "alacritty -e htop" + }, + "memory": { + "format": " {}%" + }, + "network": { + "min-length": 10, + "format-wifi": " {bandwidthDownBytes}", + "format-ethernet": " {bandwidthDownBytes}", + "format-disconnected": "⚠ DONT", + "interval": 1 + }, + "pulseaudio": { + "format": " {volume}%", + "format-muted": " Muted", + "on-click": "pavucontrol" + }, + "tray": { + "icon-size": 10, + "spacing": 15 + } +} + diff --git a/configs/waybar/style.css b/configs/waybar/style.css new file mode 100644 index 0000000..7bbcccf --- /dev/null +++ b/configs/waybar/style.css @@ -0,0 +1,43 @@ +* { + font-family: "JetBrainsMono Nerd Font", "Font Awesome 7 Free", "Font Awesome 7 Free Solid", "Font Awesome 7 Brands", sans-serif; + font-size: 12px; + border: none; + border-radius: 0; +} + +window#waybar { + background: alpha(#e3e3e3, 0.75); + color: #0b0b0b; + min-height: 28px; +} + +#clock, +#cpu, +#memory, +#network, +#pulseaudio, +#taskbar, +#custom-spotify, +#tray { + padding: 0 10px; + color: #0b0b0b; +} + +#taskbar button { + color: alpha(#0b0b0b, 0.6); + padding: 0 8px; +} + +#taskbar button.active { + background-color: alpha(#0b0b0b, 0.2); + box-shadow: inset 0 -2px 0 0 #0b0b0b; + color: #0b0b0b; +} + +/*#custom-v2raya.enabled { + color: #0b0b0b; +} + +#custom-v2raya.disabled { + color: #747474; +}*/ \ No newline at end of file diff --git a/configs/waybar/v2raya-toggle.sh b/configs/waybar/v2raya-toggle.sh new file mode 100755 index 0000000..cc9903b --- /dev/null +++ b/configs/waybar/v2raya-toggle.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if pgrep -x "v2raya" > /dev/null; then + if [ "$1" = "toggle" ]; then + sudo systemctl stop v2raya.service 2>/dev/null || sudo killall v2raya + echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}" + else + echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}" + fi +else + if [ "$1" = "toggle" ]; then + sudo systemctl start v2raya.service 2>/dev/null || sudo v2raya --daemon & + echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}" + else + echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}" + fi +fi + diff --git a/configs/wofi/cliphist-img.sh b/configs/wofi/cliphist-img.sh new file mode 100755 index 0000000..16d8082 --- /dev/null +++ b/configs/wofi/cliphist-img.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +export WAYLAND_DISPLAY=wayland-0 +export XDG_RUNTIME_DIR=/run/user/$(id -u) + +thumb_dir="${XDG_CACHE_HOME:-$HOME/.cache}/cliphist/thumbs" +mkdir -p "$thumb_dir" + +make_thumb() { # $1 - исходник, $2 - результат + if command -v gdk-pixbuf-thumbnailer >/dev/null 2>&1; then + gdk-pixbuf-thumbnailer -s 256 "$1" "$2" 2>/dev/null + elif command -v magick >/dev/null 2>&1; then + magick "$1" -resize '256x256>' "$2" 2>/dev/null + elif command -v convert >/dev/null 2>&1; then + convert "$1" -resize '256x256>' "$2" 2>/dev/null + fi + # если тулза нет/ошибка — отдаём оригинал, wofi сам смасштабирует + [ -s "$2" ] || cp -f "$1" "$2" +} + +wofi_input="" + +while read -r line; do + [[ "$line" == *" "$tmp" 2>/dev/null + [ -s "$tmp" ] && make_thumb "$tmp" "$thumb_path" + rm -f "$tmp" + fi + + if [ -s "$thumb_path" ]; then + wofi_input+="img:${thumb_path}\n" + else + wofi_input+="${line}\n" + fi + else + wofi_input+="${line}\n" + fi +done <<< "$(cliphist list)" + +choice="$(printf '%b' "$wofi_input" | wofi -I --dmenu --cache-file=/dev/null \ + -Dimage_size=100 -Dynamic_lines=true --prompt "Буфер обмена")" + +[ -z "$choice" ] && exit 0 + +if [[ "$choice" == img:* ]]; then + f="${choice#img:}" + id="$(basename "$f" .png)" + printf '%s\t' "$id" | cliphist decode | wl-copy +else + printf '%s\n' "$choice" | cliphist decode | wl-copy +fi \ No newline at end of file diff --git a/configs/wofi/style.css b/configs/wofi/style.css new file mode 100644 index 0000000..6c75ac4 --- /dev/null +++ b/configs/wofi/style.css @@ -0,0 +1,51 @@ +#img { + padding: 5px; + width: 120px; + height: 120px; +} + +#entry { + padding: 10px; +} + + +window { + background-color: #090909; + border: 2px solid #fefefe; +} + +input { + background-color: #090909; + color: #fefefe; + border: 1px solid #62605a; +} + +input:selected { + background-color: @gray1; + color: #fcfcfc; +} + +#entry { + color: #fefefe; + background-color: #090909; + padding: 5px; + margin: 2px; +} + +#entry:selected { + background-color: #c3c3c3; + color: #fcfcfc; +} + +scrollbar { + background-color: #090909; +} + +scrollbar slider { + background-color: #62605a; + border-radius: 5px; +} + +scrollbar slider:hover { + background-color: #808080; +} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..9c1489e --- /dev/null +++ b/install.sh @@ -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<<"