Set mako corners round or sharp

This commit is contained in:
David Heinemeier Hansson
2026-05-10 11:50:19 +02:00
parent e099f47d53
commit 887c7e3751
4 changed files with 44 additions and 0 deletions
+1
View File
@@ -46,6 +46,7 @@ GROUP_DESCRIPTIONS[hw]="Hardware detection and controls"
GROUP_DESCRIPTIONS[hyprland]="Hyprland window, monitor, and toggle controls"
GROUP_DESCRIPTIONS[install]="Optional software installers"
GROUP_DESCRIPTIONS[launch]="Application launchers"
GROUP_DESCRIPTIONS[mako]="Mako notification controls"
GROUP_DESCRIPTIONS[menu]="Omarchy menu commands"
GROUP_DESCRIPTIONS[migrate]="Migration runner"
GROUP_DESCRIPTIONS[notification]="Notification helpers"
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
# omarchy:summary=Set or toggle rounded Mako notification corners
# omarchy:args=[toggle|sharp|round]
# omarchy:examples=omarchy mako corners toggle | omarchy mako corners round | omarchy mako corners sharp
TOGGLES_CONFIG="$HOME/.local/state/omarchy/toggles/mako.ini"
set_radius() {
local radius="$1"
mkdir -p "$(dirname "$TOGGLES_CONFIG")"
touch "$TOGGLES_CONFIG"
if grep -q '^border-radius=' "$TOGGLES_CONFIG"; then
sed -i "s/^border-radius=.*/border-radius=$radius/" "$TOGGLES_CONFIG"
else
echo "border-radius=$radius" >>"$TOGGLES_CONFIG"
fi
}
case "${1:-toggle}" in
round) set_radius 6 ;;
sharp) set_radius 0 ;;
toggle)
if [[ -f $TOGGLES_CONFIG ]] && grep -q '^border-radius=6$' "$TOGGLES_CONFIG"; then
set_radius 0
else
set_radius 6
fi
;;
*)
echo "Usage: omarchy-mako-corners [toggle|sharp|round]"
exit 1
;;
esac
makoctl reload
+1
View File
@@ -1,4 +1,5 @@
include=~/.local/share/omarchy/default/mako/core.ini
include=~/.local/state/omarchy/toggles/mako.ini
text-color={{ foreground }}
border-color={{ accent }}
+4
View File
@@ -0,0 +1,4 @@
echo "Create Mako toggle config"
mkdir -p ~/.local/state/omarchy/toggles
[[ -f ~/.local/state/omarchy/toggles/mako.ini ]] || touch ~/.local/state/omarchy/toggles/mako.ini