Compare commits

..

2 Commits

Author SHA1 Message Date
382747ba9b fix: theme-Auswahl + SDDM-Theme-Correctness
Drei Probleme gefixt:

1. Theme-Auswahl waehrend Install
   - apply-theme.sh zeigt jetzt alle .theme-Files via tui_choose
   - Benutzer waehlt interaktiv (gum/whiptail/basic)
   - Bei nur einem Theme: auto-select

2. SDDM wendet falsches Theme an
   - sddm.sh erzeugt /var/lib/pascal-sddm-theme/ mit user chown
   - Liest current-theme.conf + hyprpaper.conf fuer aktuelle Farben
   - Schreibt theme.conf in /usr/share/sddm/themes/pascal-hypr/
   - Config heisst jetzt 90-pascal-hypr.conf (hoehere Priority)
   - apply-theme.sh erzeugt state dir VOR theme-menu.sh --apply

3. tui_choose basic mode fix
   - ${!choice} funktioniert nicht fuer numerische Indices
   - labels+=("$@") + ${labels[$choice]} statt Positional-Params
2026-05-27 23:23:55 +02:00
1aa8c7cf40 feat: system hyprland.conf übernommen + ags + wallpapers
- hyprland.conf von /home/pascal/.config/hypr/ auf System übernommen
  (Monitore eDP-1/DP-3, awww-Background-Set via autostart,
   lid-dock-handler, hyprpolkitagent, ai-command-center source,
   clipboard-manager.sh bind, togglefloating auf F)
- scripts/lid-dock-handler.sh von System kopiert
- wallpapers/forest.jpg + rose-pink.jpg ins Projekt aufgenommen
  (werden via dotfiles-Deployment nach ~/Bilder/Wallpaper/ kopiert,
   replace_home_paths passt den Pfad im Theme an)
- aylurs-gtk-shell (ags) + hyprpolkitagent zur hyprland-Gruppe
- chmod +x auch für hypr/scripts/ (lowercase)
2026-05-27 23:18:27 +02:00
7 changed files with 226 additions and 42 deletions

View File

@@ -22,8 +22,9 @@
################
# See https://wiki.hypr.land/Configuring/Monitors/
monitor=,preferred,auto,1
#monitor=,preferred,auto,1
monitor=eDP-1,preferred,auto,1
monitor=DP-3,preferred,auto,1
###################
### MY PROGRAMS ###
@@ -44,10 +45,13 @@ $menu = wofi
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
exec-once = sh -c 'if command -v awww-daemon >/dev/null 2>&1; then awww-daemon; elif command -v swww-daemon >/dev/null 2>&1; then swww-daemon; else hyprpaper; fi'
exec-once = sh -c 'if command -v awww-daemon >/dev/null 2>&1; then awww-daemon && awww img /home/pascal/Bilder/Wallpaper/forest.jpg; elif command -v swww-daemon >/dev/null 2>&1; then swww-daemon; else hyprpaper; fi'
exec-once = waybar
exec-once = swaync
exec-once = env WIDGET_PANEL_START_HIDDEN=1 ~/.config/hypr/Scripts/widget-panel.sh
exec-once = ~/.config/hypr/scripts/lid-dock-handler.sh
exec-once = /usr/lib/hyprpolkitagent
#############################
### ENVIRONMENT VARIABLES ###
@@ -63,7 +67,7 @@ env = QT_STYLE_OVERRIDE,Fusion
# https://wiki.hypr.land/Configuring/Variables/#general
general {
gaps_in = 6
gaps_out = 25
gaps_out = 15
border_size = 2
@@ -121,8 +125,8 @@ animations {
animation = fade, 1, 5, soft
animation = windows, 1, 6, smoothOut
animation = windowsIn, 1, 6, smoothOut, popin 85%
animation = windowsOut, 1, 5, smoothIn, popin 85%
animation = windowsIn, 1, 6, smoothOut, popin 60%
animation = windowsOut, 1, 5, smoothIn
animation = layers, 1, 5, smoothOut
animation = layersIn, 1, 5, smoothOut, fade
@@ -142,7 +146,7 @@ animations {
# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
# pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
@@ -203,7 +207,8 @@ bind = $mainMod, Q, killactive,
bind = $mainMod, M, exec, ~/.config/hypr/Scripts/main-menu.sh
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, N, exec, swaync-client -t
bind = $mainMod, V, togglefloating,
bind = $mainMod, F, togglefloating,
bind = $mainMod, V, exec, ~/.config/hypr/Scripts/clipboard-manager.sh
bind = $mainMod, R, exec, $menu
bind = $mainMod, W, exec, ~/.config/hypr/Scripts/widget-panel.sh
bind = $mainMod SHIFT, W, exec, ~/.config/hypr/Scripts/ags-switcher.sh wallpaper
@@ -274,6 +279,9 @@ bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
# AI Command Center
source = ~/.config/hypr/ai-command-center.conf
##############################
### WINDOWS AND WORKSPACES ###
##############################

View File

@@ -0,0 +1,74 @@
#!/bin/bash
LID_STATE_FILE="/proc/acpi/button/lid/LID/state"
DOCK_MONITOR="DP-3"
LAPTOP_MONITOR="eDP-1"
find_hypr_socket() {
local runtime_dir
runtime_dir="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
for d in "$runtime_dir"/hypr/*/; do
if [[ -S "${d}.socket.sock" ]]; then
echo "$(basename "$d")"
return 0
fi
done
return 1
}
ensure_hyprctl() {
if ! command -v hyprctl &>/dev/null; then
return 1
fi
if [[ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]]; then
local sig
sig=$(find_hypr_socket)
if [[ -n "$sig" ]]; then
export HYPRLAND_INSTANCE_SIGNATURE="$sig"
export HYPRLAND_INSTANCE_SIGNATURE="$sig"
else
return 1
fi
fi
return 0
}
hyprctl_wait() {
while ! ensure_hyprctl; do
sleep 1
done
}
is_docked() {
hyprctl monitors 2>/dev/null | grep -q "^Monitor $DOCK_MONITOR"
}
move_workspaces_to_dock() {
local workspaces
workspaces=$(hyprctl workspaces 2>/dev/null | grep -B1 "monitor: $LAPTOP_MONITOR" | grep "^workspace ID" | awk '{print $3}')
for ws in $workspaces; do
hyprctl dispatch moveworkspacetomonitor "$ws" "$DOCK_MONITOR" >/dev/null 2>&1
done
}
hyprctl_wait
prev_state=""
while true; do
if [[ -f "$LID_STATE_FILE" ]]; then
state=$(awk '{print $2}' < "$LID_STATE_FILE")
else
state="unknown"
fi
if [[ "$state" != "$prev_state" ]]; then
if [[ "$state" == "closed" ]] && is_docked; then
move_workspaces_to_dock
hyprctl keyword monitor "$LAPTOP_MONITOR,disable" >/dev/null 2>&1
elif [[ "$state" == "open" ]]; then
hyprctl keyword monitor "$LAPTOP_MONITOR,preferred,auto,1" >/dev/null 2>&1
fi
prev_state="$state"
fi
sleep 1
done

View File

@@ -71,13 +71,13 @@ tui_choose() {
done
whiptail --menu "$prompt" 20 60 10 "${items[@]}" 3>&1 1>&2 2>&3
else
local labels=("$@")
printf '\n==============================\n'
printf ' %s\n' "$(_strip_format "$prompt")"
printf '==============================\n'
local i=0
for item in "$@"; do
printf ' [%d] %s\n' "$i" "$item"
((i++))
local i
for i in "${!labels[@]}"; do
printf ' [%d] %s\n' "$i" "${labels[$i]}"
done
printf ' [x] Cancel\n'
printf '==============================\n'
@@ -86,8 +86,8 @@ tui_choose() {
if [[ "$choice" == "x" ]]; then
return 1
fi
if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice < ${#@})); then
printf '%s\n' "${!choice}"
if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice < ${#labels[@]})); then
printf '%s\n' "${labels[$choice]}"
fi
fi
}

View File

@@ -72,6 +72,7 @@ print(' '.join(items))
chmod +x "$HOME/.config/hypr/Scripts/"*.sh 2>/dev/null || true
chmod +x "$HOME/.config/hypr/Scripts/"*.py 2>/dev/null || true
chmod +x "$HOME/.config/hypr/scripts/"*.sh 2>/dev/null || true
chmod +x "$HOME/.config/waybar/scripts/"*.sh 2>/dev/null || true
replace_home_paths "$HOME/.config/hypr" "/home/pascal"

View File

@@ -133,7 +133,8 @@ get_group_packages() {
sddm \
brightnessctl playerctl \
grim slurp swappy hyprshot \
wl-clipboard libnotify sshpass
wl-clipboard libnotify sshpass \
hyprpolkitagent aylurs-gtk-shell
;;
gpu)

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
module_description() {
printf "SDDM Theme - install custom login theme\n"
printf "SDDM Theme - install custom login theme with current colors\n"
}
module_required() { return 1; }
@@ -38,8 +38,75 @@ module_main() {
sudo_run cp -a "$sddm_theme_dir/pascal-hypr" /usr/share/sddm/themes/
sudo_run mkdir -p /var/lib/pascal-sddm-theme
sudo_run chown "$(id -u):$(id -g)" /var/lib/pascal-sddm-theme
local current_theme_conf="$HOME/.config/hypr/current-theme.conf"
local current_wallpaper="$HOME/.config/hypr/current-wallpaper"
local hyprpaper_conf="$HOME/.config/hypr/hyprpaper.conf"
local wallpaper=""
local accent="#f38ba8"
local accent2="#cba6f7"
local background="#18141f"
local panel="#313244"
local foreground="#f5e0dc"
local muted="#cdd6f4"
local selected="#11111b"
local theme_name="Pascal Hypr"
if [[ -f "$current_wallpaper" ]]; then
wallpaper="$(< "$current_wallpaper")"
fi
if [[ -f "$current_theme_conf" ]]; then
local line
while IFS= read -r line; do
[[ "$line" =~ ^# ]] && continue
[[ "$line" =~ ^[[:space:]]*$ ]] && continue
if [[ "$line" =~ col\.active_border[[:space:]]*=[[:space:]]*(.*) ]]; then
local border="${BASH_REMATCH[1]}"
border="${border#rgba(}"
border="${border%ee)}"
accent="#${border:0:2}${border:2:2}${border:4:2}"
fi
done < "$current_theme_conf"
fi
if [[ -f "$hyprpaper_conf" ]]; then
if [[ -z "$wallpaper" ]]; then
local wl
wl="$(grep 'path' "$hyprpaper_conf" 2>/dev/null | head -1 | sed 's/.*=[[:space:]]*//' | tr -d ' "')"
[[ -n "$wl" ]] && wallpaper="$wl"
fi
if [[ "$wallpaper" == /home/pascal/* ]]; then
wallpaper="${wallpaper/#\/home\/pascal/$HOME}"
fi
fi
if [[ -n "$wallpaper" && -f "$wallpaper" ]]; then
local ext="${wallpaper##*.}"
[[ "$ext" == "$wallpaper" ]] && ext="jpg"
sudo_run cp "$wallpaper" "/var/lib/pascal-sddm-theme/wallpaper.$ext"
fi
local theme_conf="/usr/share/sddm/themes/pascal-hypr/theme.conf"
sudo_run tee "$theme_conf" >/dev/null <<SDDMEOF
[General]
background=/var/lib/pascal-sddm-theme/wallpaper.jpg
themeName=$theme_name
accent=$accent
accent2=$accent2
backgroundColor=$background
panelColor=$panel
foreground=$foreground
muted=$muted
selectedText=$selected
SDDMEOF
if [[ -f "$sddm_theme_dir/sddm.conf" ]]; then
sudo_run cp -a "$sddm_theme_dir/sddm.conf" /etc/sddm.conf.d/10-pascal-hypr.conf
sudo_run cp -a "$sddm_theme_dir/sddm.conf" /etc/sddm.conf.d/90-pascal-hypr.conf
fi
log_success "SDDM theme installed"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
module_description() {
printf "Apply Theme - set default Hyprland theme and restart services\n"
printf "Apply Theme - select and apply a Hyprland theme\n"
}
module_required() { return 1; }
@@ -22,36 +22,69 @@ module_main() {
return 1
fi
local default_theme="${OMERON_DEFAULT_THEME:-forest-neon}"
local theme_files=()
mapfile -t theme_files < <(find "$themes_dir" -name '*.theme' -type f | sort 2>/dev/null)
local theme_file=""
if [[ -f "$themes_dir/$default_theme.theme" ]]; then
theme_file="$themes_dir/$default_theme.theme"
elif [[ -f "$themes_dir/forest-neon.theme" ]]; then
theme_file="$themes_dir/forest-neon.theme"
elif [[ -f "$themes_dir/rose-night.theme" ]]; then
theme_file="$themes_dir/rose-night.theme"
else
local available
available="$(find "$themes_dir" -name '*.theme' -type f | head -1)"
if [[ -n "$available" ]]; then
theme_file="$available"
fi
fi
if [[ -z "$theme_file" ]]; then
if ((${#theme_files[@]} == 0)); then
log_warn "No theme files found in $themes_dir"
return 1
fi
if tui_confirm "Apply theme: $(basename "$theme_file" .theme).theme?"; then
log_info "Applying theme: $(basename "$theme_file")"
tui_spin "Applying theme..." bash "$theme_script" --apply "$theme_file"
local theme_names=()
local file
for file in "${theme_files[@]}"; do
theme_names+=("$(basename "$file" .theme)")
done
if have notify-send; then
notify-send "Omeron" "Theme applied: $(basename "$theme_file" .theme)" >/dev/null 2>&1 || true
tui_bold "Available themes:"
local i
for i in "${!theme_names[@]}"; do
tui_info "[$i] ${theme_names[$i]}"
done
printf '\n'
local choice
if ((${#theme_files[@]} == 1)); then
tui_info "Only one theme available, auto-selecting: ${theme_names[0]}"
choice="${theme_files[0]}"
else
choice="$(
local labels=()
for name in "${theme_names[@]}"; do
labels+=("$name")
done
tui_choose "Select a theme" "${labels[@]}"
)"
if [[ -z "$choice" ]]; then
log_info "No theme selected, skipping"
return 0
fi
local idx
for idx in "${!theme_names[@]}"; do
if [[ "$choice" == "${theme_names[$idx]}" ]]; then
choice="${theme_files[$idx]}"
break
fi
done
fi
log_success "Theme applied: $(basename "$theme_file" .theme)"
if [[ -z "$choice" || ! -f "$choice" ]]; then
log_warn "Invalid theme selection"
return 1
fi
log_info "Selected theme: $(basename "$choice" .theme)"
if ! tui_confirm "Apply theme: $(basename "$choice" .theme)?"; then
log_info "Theme application skipped"
return 0
fi
sudo_run mkdir -p /var/lib/pascal-sddm-theme 2>/dev/null || true
sudo_run chown "$(id -u):$(id -g)" /var/lib/pascal-sddm-theme 2>/dev/null || true
log_info "Applying theme..."
tui_spin "Applying theme..." bash "$theme_script" --apply "$choice"
log_success "Theme applied: $(basename "$choice" .theme)"
}