ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.15k stars 58 forks source link

[Bug] buttons-grid relative paths to scripts to execute. #401

Open RoccoRakete opened 3 months ago

RoccoRakete commented 3 months ago

Describe the bug Passing a relative Path to buttons-gridresults in Run_Script Error: Failed to execute child process “~/.dots/scripts/blepower.sh” (No such file or directory)

passing an absolute Path works.

To Reproduce

      "actions": [
        {
          "label": "",
          "command": "~/.dots/scripts/blepower.sh"
        },
        {
          "label": "",
          "command": "/home/martin/.dots/scripts/blepower.sh"
        }
      ]
    }

The first example won't work the second does.

Expected behavior Relative paths should be possible

Desktop (please complete the following information):

rtgiskard commented 1 month ago

You need something like this: "command": "bash -c '~/path/to/the/script.sh'"


Or a patch like this: https://github.com/ErikReider/SwayNotificationCenter/pull/435/commits/8b8f7db793857823cde2be7b97c3af434de61ecf