Skip to content

Script variables are off by one #7

@fuzxi

Description

@fuzxi

Hi,

The module didn't work out of the box. The menu would show up, but none of the options did anything. I could still receive pings from my paired device and send pings via shell commands.

I took a look at the code and all the numbered bash variables ($1, $2, etc.) are off by one., e.g. the script uses $2 for the deviceid variable instead of $3. I believe this is because in line 41:
devices+="%{A1:. $DIR/polybar-kdeconnect.sh; show_menu $devicename $deviceid $battery:}$icon%{A}$SEPERATOR"
$DIR/polybar-kdeconnect.sh is being treated as a variable.

I'm not sure why this is, or how to escape it properly. My workaround was to increment all the numbered variables, but I'd be happy to know a better way to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions