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:
parent
96633031db
commit
e65b90757f
1 changed files with 4 additions and 2 deletions
|
@ -198,8 +198,10 @@ set_theme()
|
||||||
then
|
then
|
||||||
touch "${get_link}"
|
touch "${get_link}"
|
||||||
fi
|
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}"
|
||||||
}
|
}
|
||||||
|
|
||||||
############################################################################################################
|
############################################################################################################
|
||||||
|
|
Loading…
Reference in a new issue