diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 10:02:53 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 10:02:53 +0000 |
| commit | 1537f9d48b08f4c27d33b5c9a2b5416d00866ba7 (patch) | |
| tree | 0d7017e272a8436c11ef1aa667e56a67b45ad0a1 /src/plugins | |
| parent | 0f262e26cf742b3c4ff3b1a0782718e867ea5959 (diff) | |
| download | qmmp-1537f9d48b08f4c27d33b5c9a2b5416d00866ba7.tar.gz qmmp-1537f9d48b08f4c27d33b5c9a2b5416d00866ba7.tar.bz2 qmmp-1537f9d48b08f4c27d33b5c9a2b5416d00866ba7.zip | |
kwin.sh: fixed dash support (#1058)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9467 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -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 |
