Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Nothing happens when run from sxhkd, but works as expected from terminal. #1882

Closed
2 tasks done
promitheas17j opened this issue Aug 5, 2023 · 5 comments
Closed
2 tasks done
Labels

Comments

@promitheas17j
Copy link

Rofi version (rofi -v)

Version: 1.7.5

Configuration

https://gist.github.com/promitheas17j/1922e8a43ac27101806df634ab780455

Theme

https://gist.github.com/promitheas17j/23fea21931c40b3c5c8b803836cdf9fb

Timing report

https://gist.github.com/promitheas17j/ed005b9206adf5538a7eb4345caa8578

Launch command

rofi -show drun

Step to reproduce

  • Step 1: In sxhkdrc have:
super + @space
      rofi -show drun
  • Step 2: Reload sxhkd
  • Step 3: Hit the required key combination

Expected behavior

A rofi menu should appear as when run manually from the terminal.

Actual behavior

No rofi menu appears. If I change the command that sxhkd should run to the following:

rofi -show drun -log ~/rofi.log

not only does no rofi menu pop up, but no log is created either. When trying to run from sxhkd there appears to be nothing happening.

Additional information

For further testing with sxhkd, I created a test shortcut. That being:

super + alt + t
      alacritty --hold -e echo "test"

which works as expected.

Furthermore, I commented that test shortcut out and replaced the super + @space command with this:

super + @space
       alacritty --hold -e echo "test"

In both cases, a new alacritty instance opens with the echoed text test, leading me to believe that there is no (immediate) issue with sxhkd but rather with rofi.

In addition, I changed the sxhkdrc file as follows:

super + @space
    $HOME/.bin/start_rofi.sh

The script in question is as such:

#!/bin/sh

rofi -show drun -log ~/rofi.log

Running it manually from the terminal spawns a rofi menu and creates a log file. Running it using the sxhkd keybind again produces no noticeable result.
Here is the log file produced when running command manually in a terminal: rofi.log

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@DaveDavenport
Copy link
Collaborator

Most of the time when rofi runs fine on terminal but not from keybinding via tool X, its an environment issue.

Can you get debug info from sxhkd?
maybe try?

rofi -show drun > ~/log.txt 2>&1 

@promitheas17j
Copy link
Author

No, that has no noticeable change from before i.e. no rofi and no log.

Also, while this isn't my first time using arch or linux by far, it most definitely is not excluded that it is something messed up with my setup. I'm on arch so everything had to be setup manually. This means for sure there could be something wrong, made more likely given its a completely new pc build as well so the hardware is new to me.

If you meant to run that command from the terminal instead let me know and I'll get it for you.

@DaveDavenport
Copy link
Collaborator

I don't know sxhkd, never used it, but if no file is created then it looks like that command is not even executed.
Can you get debug output from sxhkd? I am not sure this is a rofi bug.

@promitheas17j
Copy link
Author

Hey, it seems sxhkd doesn't have a logging/debug feature, only it can let you know what keys you have pressed. If that would help, or if there is anything else I can do to give you some more info to ensure its not a bug of rofi let me know.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants