Replace bar-settings with unified settings plugin
Consolidates bar-settings into a single 'settings' plugin with sidebar categories: Defaults, Style, Bar, System, Plugins. Updates supporting commands (omarchy-launch-settings, omarchy-style-corners-quickshell, omarchy-theme-list-with-previews, omarchy-hyprland-monitor-scaling-set) and refreshes sidebar glyphs to Nerd Font icons.
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set or toggle corner radius for the omarchy-shell menu and settings panel
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy style corners quickshell toggle | omarchy style corners quickshell round | omarchy style corners quickshell sharp
|
||||
|
||||
STYLE_FILE="$HOME/.local/state/omarchy/toggles/quickshell-menu.json"
|
||||
|
||||
current_radius() {
|
||||
[[ -f $STYLE_FILE ]] || { echo 0; return; }
|
||||
local r
|
||||
r=$(grep -oE '"radius"[[:space:]]*:[[:space:]]*[0-9]+' "$STYLE_FILE" | grep -oE '[0-9]+$')
|
||||
echo "${r:-0}"
|
||||
}
|
||||
|
||||
set_radius() {
|
||||
local radius="$1"
|
||||
mkdir -p "$(dirname "$STYLE_FILE")"
|
||||
printf '{ "radius": %s }\n' "$radius" >"$STYLE_FILE"
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
round) set_radius 6 ;;
|
||||
sharp) set_radius 0 ;;
|
||||
toggle)
|
||||
if (( $(current_radius) > 0 )); then
|
||||
set_radius 0
|
||||
else
|
||||
set_radius 6
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-style-corners-quickshell [toggle|sharp|round]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user