mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos.git
synced 2026-11-03 04:24:27 +00:00
nixos config
This commit is contained in:
commit
5dc9fb020e
46 changed files with 6194 additions and 0 deletions
23
modules/scripts/hypr-theme-set.sh
Normal file
23
modules/scripts/hypr-theme-set.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
# Applies Hyprland's active/inactive window border colors immediately AND
|
||||
# persists them into ~/.config/hypr/display.conf's sibling, theme.conf
|
||||
# (sourced by hyprland.conf after the static general{} block, so it
|
||||
# overrides those hardcoded defaults) — without that file, a config
|
||||
# reload/restart would silently revert to whatever's hardcoded in
|
||||
# hyprland.conf, same class of bug as the display-settings one.
|
||||
set -euo pipefail
|
||||
|
||||
accent="${1:?usage: hypr-theme-set <accent_hex_no_hash> <border_hex_no_hash>}"
|
||||
border="${2:?border required}"
|
||||
|
||||
hyprctl keyword general:col.active_border "rgba(${accent}ff)" > /dev/null
|
||||
hyprctl keyword general:col.inactive_border "rgba(${border}ff)" > /dev/null
|
||||
|
||||
conf="$HOME/.config/hypr/theme.conf"
|
||||
mkdir -p "$(dirname "$conf")"
|
||||
cat > "$conf" <<EOF
|
||||
general {
|
||||
col.active_border = rgba(${accent}ff)
|
||||
col.inactive_border = rgba(${border}ff)
|
||||
}
|
||||
EOF
|
||||
Loading…
Reference in a new issue