ErikReider / SwayNotificationCenter

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

[Bug] slurp output seems captured when running command #393

Closed desdic closed 9 months ago

desdic commented 9 months ago

Hi,

I tried making a screenshot button like

    "buttons-grid": {
      "actions": [
        {
          "label": "screenshot",
          "command": "/sbin/grim -g \"$(/sbin/slurp)\" - | /sbin/swappy -f -"
        },

and without slurp it works but it seems that the output from slurp is captured somehow because the process is running (and hangs due to waiting for the user to choose a region) but its never output. If running it via hyprland it works

Desktop (please complete the following information):

desdic commented 9 months ago

You need to use a script for that. And you also need to close the control center after clicking on the screenshot button. Without it, slurp just hangs. you could try doing something like this.

    {
      "label": "screenshot",
      "command": "sh -c '/path/to/script/screenshot & swaync-client -cp'",
    },

this works perfectly, thanks!