script: refactor change-colortheme

This commit is contained in:
2025-10-18 02:50:22 +02:00
parent f7fe2b00b5
commit 6f8b7431f9
49 changed files with 360 additions and 1668 deletions

25
hypr/apply-color Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
path=$(dirname "$(readlink -f "$0")")
. "$path"/../.utils/apply-color-parse-arg
file="$path"/hyprland/colors.conf
sed -i -E "s/^(\s*col\.active_border\s*=\s*rgba\()([0-9A-Fa-f]{6})([0-9A-Fa-f]{2}\))$/\1${colorHex}\3/" "$file" || {
log_error "Failed to edit ${file} for entry col.active_border"
exit 1
}
sed -i -E "s/^(\s*col\.inactive_border\s*=\s*rgba\()([0-9A-Fa-f]{6})([0-9A-Fa-f]{2}\))$/\1${colorHex}\3/" "$file" || {
log_error "Failed to edit ${file} for entry col.active_border"
exit 1
}
if pgrep -x "hyprland" -u "$USER" > /dev/null; then
hyprctl reload || {
log_error "Failed to reload Hyprland"
exit 1
}
fi
log_success "hyprland"

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
sleep 4
killall -e xdg-desktop-portal-hyprland
killall xdg-desktop-portal
/usr/lib/xdg-desktop-portal-hyprland &
sleep 4
/usr/lib/xdg-desktop-portal &

View File

@@ -1,7 +1,7 @@
# exec = export SLURP_ARGS='-d -c BFE9F8BB -b 214C5844 -s 00000000'
general {
col.active_border = rgba(89b4faFF)
col.active_border = rgba(89b4faff)
col.inactive_border = rgba(89b4fa80)
}

View File

@@ -1,12 +0,0 @@
# exec = export SLURP_ARGS='-d -c BFE9F8BB -b 214C5844 -s 00000000'
general {
col.active_border = rgba(<FLAVOR_HEX>FF)
col.inactive_border = rgba(<FLAVOR_HEX>80)
}
misc {
background_color = rgba(181825FF)
}
windowrulev2 = bordercolor rgba(00DCE3AA) rgba(00DCE377),pinned:1