davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.24k stars 613 forks source link

[BUG] Scripts Segfault #1138

Closed progfolio closed 4 years ago

progfolio commented 4 years ago

Version

Version: 1.5.4-126-gdb308d2e (makepkg)

Configuration

https://gist.github.com/progfolio/6791432af761a06a4d6341cd07d00242

Launch Command

rofi -config "" -modi 'Select Workspace':rofiWorkspaceSelector -show 'Select Workspace'

Steps to reproduce

  1. Launch rofi with the above command and the following script available on one's PATH:

rofiWorkspaceSelector:

#!/bin/bash
if [ -z "$@" ]; then
  gen_workspaces() {
      i3-msg -t get_workspaces \
        | jq '.[].name'
  }

  gen_workspaces
else
    workspace=$@

    [ -n "${workspace}" ] \
      && i3-msg workspace "${workspace}" >/dev/null
fi
  1. Enter the name of an i3 workspace that does not currently exist

What behaviour you see

What behaviour you expect to see

Additional details:

progfolio commented 4 years ago

I've just tried adding https://github.com/davatorium/rofi-scripts/blob/master/i3_switch_workspace.sh to my path and launching rofi with: rofi -config "" -modi "switch workspace":i3_switch_workspace.sh -show "switch workspace" and I get a new workspace named Do not launch rofi from inside rofi.

DaveDavenport commented 4 years ago

crash should be fixed.

About the comment: Nesting is not supported in rofi.

progfolio commented 4 years ago

Confirmed that this does indeed fix the crash for me. Thank you.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.