EdenQwQ/home/programs/desktop/scripts/tofi/custom-command
2025-03-01 22:35:08 +08:00

18 lines
271 B
Bash
Executable file

#!/bin/sh
tmpfile=~/scripts/tofi/stored_commands
stored=$(cat $tmpfile)
command=$(echo "$stored" | tofi --require-match=false)
if [ -z "$command" ]; then
exit 1
fi
exec $command &
if grep -q "$command" "$tmpfile"; then
exit 1
fi
echo "$command" >> $tmpfile