mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-18 09:14:01 -04:00
qt: write real newlines in new qt5ct/qt6ct config
fixes #3457
port 1.6
(cherry picked from commit 49a639a358)
This commit is contained in:
@@ -22,6 +22,8 @@ apply_qt_colors() {
|
||||
local config_file="$1"
|
||||
|
||||
if [ -f "$config_file" ]; then
|
||||
sed -i 's/^\[Appearance\]\\ncustom_palette=.*/[Appearance]/' "$config_file"
|
||||
|
||||
if grep -q '^\[Appearance\]' "$config_file"; then
|
||||
if grep -q '^custom_palette=' "$config_file"; then
|
||||
sed -i 's/^custom_palette=.*/custom_palette=true/' "$config_file"
|
||||
@@ -43,7 +45,7 @@ apply_qt_colors() {
|
||||
} >>"$config_file"
|
||||
fi
|
||||
else
|
||||
printf '[Appearance]\\ncustom_palette=true\\ncolor_scheme_path=%s\\n' "$color_scheme_path" >"$config_file"
|
||||
printf '[Appearance]\ncustom_palette=true\ncolor_scheme_path=%s\n' "$color_scheme_path" >"$config_file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user