diff options
Diffstat (limited to 'src/plugins/Ui/skinned')
| -rw-r--r-- | src/plugins/Ui/skinned/scripts/kwin.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/Ui/skinned/scripts/kwin.sh b/src/plugins/Ui/skinned/scripts/kwin.sh index 5f18badf8..0d64c90d0 100644 --- a/src/plugins/Ui/skinned/scripts/kwin.sh +++ b/src/plugins/Ui/skinned/scripts/kwin.sh @@ -2,30 +2,36 @@ #This script adds kwin rules for qmmp windows -if ! type kreadconfig5 &> /dev/null; then +if ! type kreadconfig5 > /dev/null; then exit 1 fi -if ! type kwriteconfig5 &> /dev/null; then +if ! type kwriteconfig5 > /dev/null; then exit 1 fi # get count of rules count=`kreadconfig5 --file kwinrulesrc --group General --key count` i=1 -found=0; +found=0 + +if [ -z $count ]; then + count=0 +fi while [ $i -le $count ]; do # find qmmp window rule in KWin match=`kreadconfig5 --file kwinrulesrc --group $i --key wmclass` - if [[ "${match,,}" = *"qmmp"* ]]; then + if [ "${match}" = "qmmp" ]; then found=$i break fi i=$((i+1)) done +echo $found + qmmp_create_rule(){ id=$1 |
