1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

[rofi-theme-selector] prepend newline before specifying new theme (#1791)

* [rofi-theme-selector] prepend newline before specifying new theme

If the EOF is not a newline, new theme setting will fail.

* make sed substitution more readable

* simplify sed substitution
This commit is contained in:
Amith Mohanan 2023-01-30 16:14:28 +05:30 committed by GitHub
parent 96633031db
commit e65b90757f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,8 +198,10 @@ set_theme()
then
touch "${get_link}"
fi
${SED} -i 's/^\s*\(@theme\s\+".*"\)/\/\/\1/' "${get_link}"
echo "@theme \"${1}\"" >> "${get_link}"
# Comment old base theme, not replace as it may be modified after the line
${SED} -i '/^\s*@theme/ s,^,//,' "${get_link}"
echo -e "\n@theme \"${1}\"" >> "${get_link}"
}
############################################################################################################