Give every OSD card exact padding on all four sides
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LfqzqpU1T6pQRsmpbGxBs5
This commit is contained in:
co-authored by
Claude Opus 5
parent
1e152b0d9e
commit
248659de5a
+3
-6
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Show the Omarchy Quickshell on-screen display
|
||||
# omarchy:args=[-i|--icon <icon>] [-m|--message <text>] [-p|--progress <0-100>] [-d|--duration <ms>] [-f|--fit]
|
||||
# omarchy:examples=omarchy osd -i brightness -p 50 | omarchy osd -m "Hello" | omarchy osd -m "Done" --fit
|
||||
# omarchy:args=[-i|--icon <icon>] [-m|--message <text>] [-p|--progress <0-100>] [-d|--duration <ms>]
|
||||
# omarchy:examples=omarchy osd -i brightness -p 50 | omarchy osd -m "Hello"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -12,7 +12,6 @@ progress=""
|
||||
progress_text=""
|
||||
max="100"
|
||||
duration=""
|
||||
fit=0
|
||||
|
||||
while (($#)); do
|
||||
case $1 in
|
||||
@@ -20,7 +19,6 @@ while (($#)); do
|
||||
-m|--message) message="${2:-}"; shift 2 ;;
|
||||
-p|--progress) progress="${2:-}"; shift 2 ;;
|
||||
-d|--duration) duration="${2:-}"; shift 2 ;;
|
||||
-f|--fit) fit=1; shift ;;
|
||||
-h|--help) omarchy osd --help; exit 0 ;;
|
||||
*) echo "Unknown OSD option: $1" >&2; exit 1 ;;
|
||||
esac
|
||||
@@ -37,7 +35,6 @@ payload=$(jq -cn \
|
||||
--arg progressText "$progress_text" \
|
||||
--arg max "$max" \
|
||||
--arg duration "$duration" \
|
||||
--argjson fit "$fit" \
|
||||
'{icon:$icon,message:$message,value:$value,progressText:$progressText,max:$max,duration:$duration,fit:$fit}')
|
||||
'{icon:$icon,message:$message,value:$value,progressText:$progressText,max:$max,duration:$duration}')
|
||||
|
||||
omarchy-shell -q osd show "$payload"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 &
|
||||
|
||||
omarchy-osd -i logout -m "Logging out…" -d 5000 --fit
|
||||
omarchy-osd -i logout -m "Logging out" -d 5000
|
||||
|
||||
# Now close all windows
|
||||
omarchy-hyprland-window-close-all
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# scope cannot terminate it before it runs.
|
||||
systemd-run --user --collect --quiet --on-active="2s" --timer-property=AccuracySec=100ms systemctl reboot --no-wall || exit 1
|
||||
|
||||
omarchy-osd -i reboot -m "Rebooting…" -d 5000 --fit
|
||||
omarchy-osd -i reboot -m "Rebooting" -d 5000
|
||||
|
||||
omarchy-state clear re*-required
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# scope cannot terminate it before it runs.
|
||||
systemd-run --user --collect --quiet --on-active="2s" --timer-property=AccuracySec=100ms systemctl poweroff --no-wall || exit 1
|
||||
|
||||
omarchy-osd -i shutdown -m "Shutting down…" -d 5000 --fit
|
||||
omarchy-osd -i shutdown -m "Shutting down" -d 5000
|
||||
|
||||
omarchy-state clear re*-required
|
||||
|
||||
|
||||
Reference in New Issue
Block a user