srss
srss copied to clipboard
make "srss open" always active in terminal while open URL in browser
when run srss open, it will open the tui, and press enter, will open the URL in browser and exit in terminal. I would like it always there until press Ctr-C.
So far below is a work-around in .zshrc or .bashrc. But if srss itself can leave the terminal TUI open, it will be great then.
$ which .srss
.srss () {
local keep_running=true
handle_ctrl_c () {
echo -e "\nCtrl+C detected. Exiting loop..."
keep_running=false
}
srss u
trap handle_ctrl_c INT
while "$keep_running"
do
echo "Press Ctrl+C to exit."
sleep 1
srss open
done
trap - INT
}