jluttine / rofi-power-menu

Configurable power menu mode for Rofi and dmenu
MIT License
422 stars 53 forks source link

rofi-power-menu works when launched from terminal but not from sxhkd keybind #17

Open jaamivstheworld opened 1 year ago

jaamivstheworld commented 1 year ago

When using the terminal, i run rofi-power-menu using the following command:

rofi -show power-menu -modi power-menu:rofi-power-menu

and it works just fine. However, the exact same command in sxhkd, when executed with a keybind, returns with the following error:

Failed to execute: 'rofi-power-menu'
Error: Failed to execute child process "rofi-power-menu" (no such file or directory)'

I have also added ./local/bin to my path in .zshrc:

PATH=$PATH:/home/jaami/.local/bin

I'm pretty confused on what is going on here...

tommitah commented 1 year ago

I have the same issue, but on hlwm. Can't use herbstluftclient keybinds to spawn the script. Checked that PATH has .local/bin and copied the script as in the instructions.

ACR-Jeff commented 1 year ago

I happened to get it working, The instructions aren't very clear, I made the script executable along with changing the name of the file to "rofi-power-menu.sh" Then to run the power-menu script you have to add the path to the rofi-power-menu script that you saved it in Example: rofi -show power-menu -modi power-menu: ~/script-path/rofi-power-menu.sh

You can also add it as a sidebar-mode item Example: rofi -modi run,drun,window,power-menu:'PathToScript/rofi-power-menu.sh' -show drun -sidebar-mode