mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-27 02:44:58 +08:00
18 lines
271 B
Bash
Executable file
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
|