mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Move Obsidian launch flags to user config (#5488)
* Move Obsidian flags to user config * Preserve Obsidian flags during migration * Keep existing Obsidian launch flags * Copy default Obsidian flags in migration
This commit is contained in:
@@ -10,7 +10,7 @@ bindd = SUPER SHIFT, M, Music, exec, omarchy-launch-or-focus spotify
|
|||||||
bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor
|
bindd = SUPER SHIFT, N, Editor, exec, omarchy-launch-editor
|
||||||
bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker
|
bindd = SUPER SHIFT, D, Docker, exec, omarchy-launch-tui lazydocker
|
||||||
bindd = SUPER SHIFT, G, Signal, exec, omarchy-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"
|
bindd = SUPER SHIFT, G, Signal, exec, omarchy-launch-or-focus ^signal$ "uwsm-app -- signal-desktop"
|
||||||
bindd = SUPER SHIFT, O, Obsidian, exec, omarchy-launch-or-focus ^obsidian$ "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"
|
bindd = SUPER SHIFT, O, Obsidian, exec, omarchy-launch-or-focus ^obsidian$ "uwsm-app -- obsidian"
|
||||||
bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime
|
bindd = SUPER SHIFT, W, Typora, exec, uwsm-app -- typora --enable-wayland-ime
|
||||||
bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- 1password
|
bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- 1password
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Obsidian reads this file through the Arch package wrapper.
|
||||||
|
-disable-gpu
|
||||||
|
--enable-wayland-ime
|
||||||
@@ -8,7 +8,7 @@ bindd = SUPER, N, Neovim, exec, $terminal -e nvim
|
|||||||
bindd = SUPER, T, Top, exec, $terminal -e btop
|
bindd = SUPER, T, Top, exec, $terminal -e btop
|
||||||
bindd = SUPER, D, Lazy Docker, exec, $terminal -e lazydocker
|
bindd = SUPER, D, Lazy Docker, exec, $terminal -e lazydocker
|
||||||
bindd = SUPER, G, Messenger, exec, $messenger
|
bindd = SUPER, G, Messenger, exec, $messenger
|
||||||
bindd = SUPER, O, Obsidian, exec, obsidian -disable-gpu
|
bindd = SUPER, O, Obsidian, exec, obsidian
|
||||||
bindd = SUPER, SLASH, Password manager, exec, $passwordManager
|
bindd = SUPER, SLASH, Password manager, exec, $passwordManager
|
||||||
|
|
||||||
source = ~/.local/share/omarchy/default/hypr/bindings/media.conf
|
source = ~/.local/share/omarchy/default/hypr/bindings/media.conf
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
echo "Move Obsidian flags from Hyprland binding to Obsidian user flags"
|
||||||
|
|
||||||
|
OBSIDIAN_FLAGS_FILE="$HOME/.config/obsidian/user-flags.conf"
|
||||||
|
OBSIDIAN_DEFAULT_FLAGS_FILE="$OMARCHY_PATH/config/obsidian/user-flags.conf"
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$OBSIDIAN_FLAGS_FILE")"
|
||||||
|
|
||||||
|
if [[ ! -f $OBSIDIAN_FLAGS_FILE ]]; then
|
||||||
|
cp "$OBSIDIAN_DEFAULT_FLAGS_FILE" "$OBSIDIAN_FLAGS_FILE"
|
||||||
|
else
|
||||||
|
missing_flags=$(grep -vE '^(#|$)' "$OBSIDIAN_DEFAULT_FLAGS_FILE" | grep -vxFf "$OBSIDIAN_FLAGS_FILE" || true)
|
||||||
|
|
||||||
|
if [[ -n $missing_flags ]]; then
|
||||||
|
{
|
||||||
|
echo
|
||||||
|
echo "# Added by Omarchy migration 1776434586: Obsidian launch flags moved from Hyprland binding."
|
||||||
|
printf "%s\n" "$missing_flags"
|
||||||
|
} >>"$OBSIDIAN_FLAGS_FILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f ~/.config/hypr/bindings.conf ]]; then
|
||||||
|
sed -i '/Obsidian, exec/ {
|
||||||
|
s/ -disable-gpu//g
|
||||||
|
s/ --disable-gpu//g
|
||||||
|
s/ --enable-wayland-ime//g
|
||||||
|
s/"uwsm app -- obsidian/"uwsm-app -- obsidian/g
|
||||||
|
}' ~/.config/hypr/bindings.conf
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user