Fix qutebrowser quoting and formatting

This commit is contained in:
Marty Oehme 2022-01-16 14:51:05 +01:00
parent 3d45d759d8
commit 12474e85dd
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
1 changed files with 37 additions and 37 deletions

View File

@ -20,7 +20,7 @@ main() {
exit 1
fi
if [[ "$permanent" == "true" ]]; then save; fi
if [[ $permanent == "true" ]]; then save; fi
theme
dbg_msg $app "Processor Done"
@ -49,7 +49,7 @@ save() {
dbg_msg $app "Saving theme"
local qt_dir="${XDG_CONFIG_HOME:-/$HOME/.config}/qutebrowser"
if [[ -d "$qt_dir" ]]; then
if [[ -d $qt_dir ]]; then
cat "$tfile" >"$qt_dir/colorscheme.py"
dbg_msg $app "Saved theme to $qt_dir/colorscheme.py"
@ -70,7 +70,7 @@ include() {
dbg_msg $app "Including theme in configuration"
if file_exists "$qt_dir/config.py"; then
line_exists_or_append "$qt_dir/config.py" "config.source('colorscheme.py')"
line_exists_or_append "$qt_dir/config.py" 'config.source("colorscheme.py")'
dbg_msg $app "Successfully included theme in configuration"
else
dbg_msg $app "warn" "No default configuration file found"
@ -79,7 +79,7 @@ include() {
# Safe sourcing: https://stackoverflow.com/a/12694189
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
if [[ ! -d $DIR ]]; then DIR="$PWD"; fi
# shellcheck source=utilities.sh
. "$DIR/utilities.sh"
## Dependency Checker