mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
No quoting needed for bash 5
This commit is contained in:
@@ -37,7 +37,7 @@ hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto
|
||||
# Persist to monitors.conf if the user has a single generic catch-all line
|
||||
# (ignoring disabled monitors), so the scale survives reboots.
|
||||
MONITOR_CONF="$HOME/.config/hypr/monitors.conf"
|
||||
if [[ -f "$MONITOR_CONF" ]]; then
|
||||
if [[ -f $MONITOR_CONF ]]; then
|
||||
mapfile -t ACTIVE_LINES < <(grep -E '^[[:space:]]*monitor=' "$MONITOR_CONF" | grep -vE 'disable[[:space:]]*$')
|
||||
if [[ ${#ACTIVE_LINES[@]} -eq 1 ]] && [[ "${ACTIVE_LINES[0]}" =~ ^monitor=,preferred,auto, ]]; then
|
||||
sed -i -E "s|^(monitor=,preferred,auto,).*|\\1${NEW_SCALE}|" "$MONITOR_CONF"
|
||||
|
||||
Reference in New Issue
Block a user