SwayNotificationCenter icon indicating copy to clipboard operation
SwayNotificationCenter copied to clipboard

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

Open RoccoRakete opened this issue 11 months ago • 1 comments

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):

  • OS: NixOS 24.05

RoccoRakete avatar Mar 12 '24 19:03 RoccoRakete

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

rtgiskard avatar May 13 '24 17:05 rtgiskard