fix(popup): popup script was inconsistent, removed temp
This commit is contained in:
Executable
+44
@@ -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
|
||||
Reference in New Issue
Block a user