fix(popup): popup script was inconsistent, removed temp

This commit is contained in:
kenji
2026-01-04 20:44:31 -06:00
parent 4bb65bd5ec
commit f20d6fbe83
2 changed files with 44 additions and 142 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
echo "-- initiate -- "
date
echo ""
tui_name=$1
if [[ -z ${tui_name} ]]; then
echo "Usage: $(basename "$0") [tui-name]"
exit 1
fi
# TODO:
# popup centered, dim-around using hypr, 70% size
# objective: on-click, open corresponding application
# must be a single-instance
# must be uwsm
# flow:
# * user clicks the icon on waybar
# * sh check for alive instance
# * if ANY INSTANCE ALIVE and INSTANCE IS SAME, focus using hyprctl
# * elif ANY INSTANCE ALIVE and INSTANCE IS DIFFERENT, exit the previous instance and launch the new one
# * else launch normally
launch() {
echo "[LOG: $(date)] launching..."
}
checker() {
echo "[LOG: $(date)] checking..."
}
wrapper() {
echo "[LOG: $(date)]"
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase."${tui_name}"
}
run() {
launch
checker
}
run