Shell: moved winefps function to a separate script.

master
Pierre Neidhardt 2013-03-10 23:23:25 +01:00
parent 47f5b774d4
commit a658244ab0
2 changed files with 22 additions and 24 deletions

22
.scripts/winefps Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
## Wine FPS monitor
if [ $# -lt 1 ]; then
echo "Usage: ${0##*/} WIN32EXE PARAMS"
exit
fi
if [ -z "$(command -v osd_cat)" ]; then
echo "You must have osd_cat."
exit
fi
if [ -z "$(sed --version | grep "GNU")" ]; then
echo "You must have GNU sed."
exit
fi
WINEDEBUG=fps wine "$@" 2>&1 | tee /dev/stderr | \
sed -un '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
osd_cat -l1 -f "-*-*-*-*-*-*-32-*-*-*-*-*-*-*" -O1 -c "yellow"

View File

@ -403,30 +403,6 @@ webdl ()
movgrab -f webm:$RES "$2"
}
## Wine FPS monitor
winefps ()
{
if [ $# -ne 1 ]; then
echo "Usage: ${0##*/} WIN32EXE"
return
fi
if [ -z "$(command -v osd_cat)" ]; then
echo "You must have osd_cat."
return
fi
if [ -z "$(sed --version | grep "GNU")" ]; then
echo "You must have GNU sed."
return
fi
WINEDEBUG=fps wine "$1" 2>&1 | tee /dev/stderr | \
sed -un '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
osd_cat -l1 -f "-*-*-*-*-*-*-32-*-*-*-*-*-*-*" -O1 -c "yellow"
}
##==============================================================================
## Pacman functions
##==============================================================================