first test

This commit is contained in:
cnst
2024-09-21 23:22:22 +02:00
parent c647cea072
commit e212239e8c
36 changed files with 624 additions and 240 deletions

26
.scripts/bin/tuirun-toggle.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Path to the tuirun executable
TUIRUN_PATH="/etc/profiles/per-user/$USER/bin/tuirun"
LOGFILE="$HOME/tuirun_debug.log"
echo "Launching tuirun..." >>"$LOGFILE"
date >>"$LOGFILE"
if pgrep -f "alacritty --title tuirun" >/dev/null; then
echo "Terminating existing tuirun process" >>"$LOGFILE"
pkill -f "alacritty --title tuirun"
else
echo "Starting new tuirun process" >>"$LOGFILE"
if ! hyprctl dispatch exec "alacritty --title tuirun -e sh -c '$TUIRUN_PATH'"; then
echo "Failed to launch tuirun in foot terminal" >>"$LOGFILE"
exit 1
fi
sleep 1 # Give it a second to start
echo "Checking if tuirun process is still running..." >>"$LOGFILE"
if pgrep -f "$TUIRUN_PATH" >/dev/null; then
echo "tuirun is running" >>"$LOGFILE"
else
echo "tuirun exited prematurely" >>"$LOGFILE"
fi
fi