commit ecaaf48005de06b4fc18f2b327d12e46c47027cd
parent 0aaf5d48428d3311a763e884bf1b1ea4f0d759d4
Author: Alex Balgavy <alex@balgavy.eu>
Date: Tue, 21 Mar 2023 21:43:03 +0100
sioyek: config
Diffstat:
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dot.map b/dot.map
@@ -68,6 +68,9 @@ bitmonero: ~/.config/bitmonero
sioyek:
- keys_user.config: ~/Library/Application Support/sioyek/keys_user.config
- prefs_user.config: ~/Library/Application Support/sioyek/prefs_user.config
+- light.config: ~/Library/Application Support/sioyek/light.config
+- dark.config: ~/Library/Application Support/sioyek/dark.config
+
# Config: X server (Linux)
xinitrc: ~/.xinitrc
xprofile: ~/.xprofile
diff --git a/scripts/set-theme b/scripts/set-theme
@@ -50,6 +50,14 @@ set_gtk() {
[ -f ~/.dotfiles/gtk-3.0/"$1".ini ] && ln -sf ~/.dotfiles/gtk-3.0/"$1".ini ~/.config/gtk-3.0/settings.ini
}
+set_sioyek() {
+ if [ -f ~/Library/ApplicationSupport/sioyek/prefs_user.config ]; then
+ sioyek_config="$(realpath "$HOME/Library/ApplicationSupport/sioyek/prefs_user.config")"
+ sed "/source .*\.config/s!\./.*\.config!./$1.config!" "${sioyek_config}" > "${sioyek_config}.new" \
+ && mv "${sioyek_config}.new" "${sioyek_config}"
+ fi
+}
+
set_emacs() {
pgrep emacsclient >/dev/null 2>&1 \
&& emacsclient -nw -e "(progn (za/$1-theme) (kill-terminal))"
diff --git a/sioyek/keys_user.config b/sioyek/keys_user.config
@@ -187,7 +187,7 @@ goto_bookmark_g g<S-b>
# ---------- HIGHLIGHTS ----------
# You can select a piece of text and press the `add_highlight` shortcut followed by a symbol (a character from a-z) to highlight
# the text
-# add_highlight h
+add_highlight H
# Search in highlights of current document
goto_highlight gh
# Search in highlights of all documents
diff --git a/sioyek/prefs_user.config b/sioyek/prefs_user.config
@@ -1,4 +1,4 @@
-source ./light.config
+source ./dark.config
# (can be 0 or 1) if set, shows a notification on startup if a new version of sioyek is available
check_for_updates_on_startup 0