The launcher gains an emoji mode like Clipboard History: >emoji switches in place without closing or animating, and glassmxrph emoji toggles it. Emoji show as a grid instead of named rows; the selected or hovered emoji's name is the section label. Search requires every term and ranks name matches before keyword matches; Enter copies with wl-copy. assets/emoji.tsv comes from Unicode 17 emoji-test.txt without skin-tone variants, with keywords from the rofi emopicker list (scripts/emoji-data). The test driver caps snapshot results, since IPC replies have a size limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75 lines
3.2 KiB
Bash
Executable File
75 lines
3.2 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
|
|
;;
|
|
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:-}"
|
|
;;
|
|
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|clipboard|emoji|dashboard [TAB]|plugin ACTION|controlcenter|lock|widgets|osd ACTION|notifications ACTION|settings|close|status|doctor]' >&2; exit 2 ;;
|
|
esac
|