Files
glassMxrph/scripts/glassmxrph
T
mxandClaude Opus 5.5 74b6ad50ec Refine notch mode: own island modules, Super+N, fuller pages, header strip
- Notch islands and a header strip in the open notch take their own module
  lists (Settings → Notch → Modules); the strip scrolls sideways on wheel.
- `glassmxrph notch mode` swaps notch mode and the full bar.
- The left column fills its space: large media player (streams show LIVE),
  a full-height Performance card and a clock over the calendar.
- A cog edits the tiles in the Control Center editor, then the notch returns.
- The launcher uses the notch shape and keeps its mode pills inside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:57:23 +01:00

84 lines
3.5 KiB
Bash
Executable File

#!/bin/sh
set -eu
project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
case "${1:-run}" in
doctor)
exec python3 "$project_dir/scripts/doctor.py"
;;
run)
for glassmxrph_dependency in quickshell python3; do
command -v "$glassmxrph_dependency" >/dev/null 2>&1 || { echo "glassMxrph requires $glassmxrph_dependency on PATH" >&2; exit 127; }
done
# Qt may need the database root when /etc/localtime points outside /usr/share.
# Honor an explicit TZDIR and derive only from an existing zoneinfo symlink.
if [ -z "${TZDIR:-}" ]; then
glassmxrph_timezone_path=$(readlink -f /etc/localtime 2>/dev/null || true)
case "$glassmxrph_timezone_path" in
*/zoneinfo/*) TZDIR="${glassmxrph_timezone_path%/zoneinfo/*}/zoneinfo"; export TZDIR ;;
esac
fi
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/glassMxrph" "${XDG_STATE_HOME:-$HOME/.local/state}/glassMxrph"
# Portable Omarchy helper commands that shell plugins call.
export PATH="$project_dir/quickshell/compat/omarchy/bin:$PATH"
exec quickshell --no-duplicate --path "$project_dir/quickshell"
;;
wallpaper)
exec quickshell ipc --path "$project_dir/quickshell" call wallpaper picker
;;
controlcenter)
exec quickshell ipc --path "$project_dir/quickshell" call controlcenter toggle
;;
launcher)
exec quickshell ipc --path "$project_dir/quickshell" call launcher toggle
;;
overview)
exec quickshell ipc --path "$project_dir/quickshell" call overview toggle
;;
clipboard|emoji)
exec quickshell ipc --path "$project_dir/quickshell" call launcher "$1"
;;
plugin)
# glassmxrph plugin [list|install SOURCE|remove ID|enable ID|disable ID|summon ID|toggle ID]
action=${2:-list}
case "$action" in
summon|toggle) exec quickshell ipc --path "$project_dir/quickshell" call plugins "$action" "${3:?plugin id}" "${4:-}" ;;
list|status) exec quickshell ipc --path "$project_dir/quickshell" call plugins "$action" ;;
*) exec quickshell ipc --path "$project_dir/quickshell" call plugins "$action" "${3:?argument required}" ;;
esac
;;
dashboard)
# glassmxrph dashboard [dashboard|media|performance|power]
exec quickshell ipc --path "$project_dir/quickshell" call dashboard toggle "${2:-}"
;;
notch)
# glassmxrph notch [toggle|open|close|mode]; mode swaps notch mode and the full bar
action=${2:-toggle}
[ "$action" = mode ] && action=toggleMode
exec quickshell ipc --path "$project_dir/quickshell" call notch "$action"
;;
lock)
exec quickshell ipc --path "$project_dir/quickshell" call lock lock
;;
widgets)
exec quickshell ipc --path "$project_dir/quickshell" call widgets toggle
;;
osd)
# glassmxrph osd [volumeUp|volumeDown|mute|micMute|brightnessUp|brightnessDown|open KIND]
action=${2:-open}
if [ "$action" = open ] || [ "$action" = show ]; then
exec quickshell ipc --path "$project_dir/quickshell" call osd open "${3:-volume}"
fi
exec quickshell ipc --path "$project_dir/quickshell" call osd "$action"
;;
notifications)
# glassmxrph notifications [dismiss|clear|dnd|status]
action=${2:-status}
[ "$action" = dnd ] && action=toggleDnd
exec quickshell ipc --path "$project_dir/quickshell" call notifications "$action"
;;
settings|close|status)
exec quickshell ipc --path "$project_dir/quickshell" call shell "$1"
;;
*) echo 'Usage: glassmxrph [run|wallpaper|launcher|overview|clipboard|emoji|dashboard [TAB]|notch [toggle|mode]|plugin ACTION|controlcenter|lock|widgets|osd ACTION|notifications ACTION|settings|close|status|doctor]' >&2; exit 2 ;;
esac