[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:
@@ -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}"
|
||||
}
|
||||
|
||||
############################################################################################################
|
||||
|
Reference in New Issue
Block a user