Axarva / dotfiles-2.0

XMonad™️. Widgets go brr.
MIT License
1.76k stars 155 forks source link

Powermenu.sh functionality not working #83

Closed Shahab96 closed 2 years ago

Shahab96 commented 3 years ago

Describe the bug Currently when using eww, powermenu, or xmonad to log out, restart, shutdown, lock or sleep, the script does not succeed. Running the respective commands directly in the terminal, eg betterlockscreen -l, does work successfully though. The failure occurs when using the eww/xmonad provided guis

To Reproduce Steps to reproduce the behavior:

  1. Hit Mod+p
  2. Click on any of the logout/shutdown/etc buttons
  3. Provide y/yes response to the "Are you sure?" prompt
  4. There is no error logged

Expected behavior Expected behavior is for the command inside the switch case in powermenu.sh to succeed.

Screenshots Not really sure how to post a screenshot of these commands not succeeding since they don't produce any readable outputs.

Desktop (please complete the following information):

Additional context Attached neofetch output. neofetch.txt

Shahab96 commented 3 years ago

Strangely enough, the $logout case doesn't even work in the terminal directly.

image

Edit: It looks like the command needs to be changed. On my end the process name is not "xmonad" but rather "xmonad-x86_64-linux" I hope I'm not the only one seeing this. image

Edit of the Edit: killall xmonad-x86_64-linux made it work. If this is not just me, then we should patch the command.

Axarva commented 3 years ago

Even though the command is fixed, would the menu work with eww?

Shahab96 commented 3 years ago

Nope it isn't working with eww

Kellegram commented 3 years ago

Ahhh this is the issue I described in the discord, I troubleshooted this with TheEvilSkeleton for a whole day and it is at the end of the day fault of eww, specifically some update broke it. I don't remember if I ever found a way to resolve it.

Vassili-Dev commented 3 years ago

I found the source of this issue.

The button handling in eww(lines 29-35) kills the process of the event handler script if it doesn't resolve in 200 milliseconds.

The nature of the confirmation dialogue means the script is going to be terminated before the user can type "yes".

You can even test this out by pressing a button that requires confirmation and typing "yes" REALLY REALLY fast.

Issue can be resolved by forking EWW and changing that behaviour. Either that or remove the confirmation dialogue altogether.

Shahab96 commented 3 years ago

It may be possible to modify the prompt to be shown before the script is invoked, I'll look into that.

Vassili-Dev commented 3 years ago

What worked for me is pulling eww and changing the 200 in this line to 20000, then rebuilding and replacing the binary in ~/bin. It's not the most elegant solution, but it did the trick

Kellegram commented 3 years ago

Ahhh, great find, this only happened after a while, which means that eww dev must have changed the timer to be very low, weird decision, should probably open an issue regarding this.

CyberBishop commented 3 years ago

What worked for me is pulling eww and changing the 200 in this line to 20000, then rebuilding and replacing the binary in ~/bin. It's not the most elegant solution, but it did the trick

this worked for me

Axarva commented 3 years ago

This will be fixed once the config migrates to yuck (It might take some time.)

Axarva commented 2 years ago

Fixed in 2df67e4