kRHYME7 / Hyde-cli

A HyDE CLI, wrapper, tweaks , workarounds, and more!
https://github.com/prasanthrangan/hyprdots
GNU General Public License v3.0
56 stars 4 forks source link

Pastebin rofi theme error & Auto waybar kill on pasting #22

Closed Enigma1309 closed 2 months ago

Enigma1309 commented 3 months ago

Theme error on command 'Hyprdots show pastebin {flag}'


Normally it cliphist.sh works but not the Hyprdots one

image

Enigma1309 commented 3 months ago

Also this happens with emoji keyboard too

kRHYME7 commented 3 months ago

Can you try to update it first yay -Sy hyprdots-ctl-git

Enigma1309 commented 3 months ago

Thanks..it works now, but kills the waybar when choosing the emoji or escaping it.

kRHYME7 commented 3 months ago

can you provide logs for both while executing on the terminal?

Enigma1309 commented 3 months ago

it shows no logs in terminal, also i forgot to mention this happens on emoji pallet

kRHYME7 commented 3 months ago

@Enigma1309

image

I can't replicate it.

Enigma1309 commented 3 months ago

i found that this usually happens when the firefox/librewolf are in focus. 😩 Here's a recording,

https://github.com/kRHYME7/Hyprdots-ctl/assets/94917588/521ab833-0bc3-4574-875b-9407f5672af0

kRHYME7 commented 3 months ago

@Enigma1309 I think this is due to killing of wtype (the one that makes pasting possible)

Does the issue exist if you use the Pastebin also? (I disabled killing wtype on pastebin)

Enigma1309 commented 3 months ago

yes it happens there too 😅

kRHYME7 commented 3 months ago

Hmm I tried it on 2 different systems and I can't replicate it.

I recently removed all the funtion to kill wtype, Please try it. yay -Sy hyprdots-ctl-git

Enigma1309 commented 3 months ago

no luck here :(

kRHYME7 commented 3 months ago

can you try to run waybar on the terminal too. see the errors waybar might output

Enigma1309 commented 3 months ago

it just kill it after choosing emoji image

kRHYME7 commented 3 months ago
local/waybar 0.10.0-3
    Highly customizable Wayland bar for Sway and Wlroots based compositors

This is my waybar version. Can't really replicate this, so I will wait for more info/symptoms.

All I know for now is waybar receives and exits status same as killall waybar

I'll try to review the script later

Enigma1309 commented 3 months ago

i'm on the same version too , hope it gets refactored soon

kRHYME7 commented 3 months ago

If you have some time, please try to test other rofi launchers. Thanks

kRHYME7 commented 3 months ago

Can you try to run this? wtype -M ctrl v -m ctrl

try the latest commit please

Enigma1309 commented 3 months ago

i'm on latest version of hyprdors-ctl-git and wtype -M ctrl v -m ctrl kill waybar instantly without any log

kRHYME7 commented 3 months ago

Okay actually this wtype -M ctrl v -m ctrl is the reason we can paste (simulate pasting ). Do you happen to have a key bind similar to ctrl + v ?

Did this happen only recently?

Let's try to see if it can be fixed with some arguments. can you try them 1 by 1?

 wtype -M ctrl v -m ctrl

 wtype -M ctrl V -m ctrl  

 wtype -M ctrl v -m ctrl -d 2000 

 wtype -M ctrl V -m ctrl -d 2000
Enigma1309 commented 3 months ago

Do you happen to have a key bind similar to ctrl + v ?

Nope, i don't

Did this happen only recently?

Nah i've been experiencing this for a long time, it usually happens on firefox/librewolf, but the following commands kill them despite being on such browser.

wtype -M ctrl v -m ctrl wtype -M ctrl V -m ctrl
wtype -M ctrl v -m ctrl -d 2000 wtype -M ctrl V -m ctrl -d 2000

All of them kills waybar instantly :(

so it mean it's an issue with wtype..


Hyprdots show pastebin c also shows the same behaviour but $scrDir/cliphist.sh don't..

kRHYME7 commented 3 months ago

Hyprdots show pastebin c also shows the same behaviour but $scrDir/cliphist.sh don't..

Because we are attempting to paste it using virtual keys.

This happens every time ?

How about we use other keystrokes? wtype -M ctrl c -m ctrl this one emulates ctrl + c

how about this wtype -M ctrl V

I can't actually replicate the issue, though. Ping me at discord so we can ha a real-time discussion khing0v0

Enigma1309 commented 3 months ago

wtype -M ctrl c -m ctrl and wtype -M ctrl V

Still kills waybar..

This happens every time ?

Unfortunately, yes (in firefox and it's derivates) but i can't reproduce it in brave..

Ping me at discord

ok, i'll do when i'll be free

kRHYME7 commented 3 months ago

I see! So basically it works on others except Firefox derivatives?

For now should we disable the pasting on firefox/librewolf ?

Enigma1309 commented 3 months ago

For now should we disable the pasting on firefox/librewolf ?

that would be okay :D

kRHYME7 commented 3 months ago

image

@Enigma1309 run only once

Hyprdots show pastebin -c --ignore=LibreWolf

This is share with 'pastebin' 'emoji' and glyph so just invoke this once.

Enigma1309 commented 3 months ago

I've updated to latest version and still i think it didn't ran correctly image

kRHYME7 commented 3 months ago

My bad Hyprdots show pastebin c --ignore=LibreWolf

remove '-'

Once is enough.

the list will be saved in this file image

Enigma1309 commented 3 months ago

okay thanks, it worked, although i have to manually paste emojis but it's better than relaunching waybar and pasting, closing this as completed thanks

Enigma1309 commented 2 months ago

hey i found out that it's killing way-bar on a lot of other apps too, i can technically add them to ignore list but that won't be a good solution to problem, can we change the source code of emoji pasting to wtype <text> since it's not killing the way-bar anymore.. i found this out when looking at the source code of wofi-emoji it's using the same approach... and it's not killing the way-bar on any apps fortunately :)

kRHYME7 commented 2 months ago

Sure! But wtype got some more problem though. It is not suited to paste some codes(especial characters), that's why I resort to emulating the keyboard shortcut. Will try to use wtype . I'm just too clueless on why I don't get this issues.

Will change this later

Enigma1309 commented 2 months ago

if wofi-emoji was using it then i guess it should be fine for pasting emojis or maybe we can pass extra argument to use wtpe explicitly like :- hyde show emoji --wtype

kRHYME7 commented 2 months ago

if wofi-emoji was using it then i guess it should be fine for pasting emojis or maybe we can pass extra argument to use wtpe explicitly like :- hyde show emoji --wtype

For emojis will use wtype <TEXT> as the especial characters are at minimum

For full string, I will test it again if it's really safe, I tried to paste a full code on browser ending up crashing my system.

kRHYME7 commented 2 months ago

BTW, can you confirm if it crashes way bar when you paste text inside code editor too? Would still want to emulate pasting if I'm using code editor as it wouldn't break the text

Enigma1309 commented 2 months ago

i've been using cliphist.sh c for pastebin and it works everywhere , i don't really use Hyde show pastebin c but after trying it i found that it crashes the waybar too like Code-OSS, it doesn't affect nvim as there's yanking and putting keybinding (makes sense)


My real concern is emoji keyboard as it's crashing waybar on a lot of applications

kRHYME7 commented 2 months ago

can you try it now?

Enigma1309 commented 2 months ago

tysm it's working now ❤️

kRHYME7 commented 2 months ago

@Enigma1309 Hello, I have a favor to ask. Can you try to emulate pasting using this command hyprctl dispatch exec 'wtype -M ctrl v -m ctrl' this way it is run through hyprland's envs. You should probably add it as a key bind to work

Enigma1309 commented 2 months ago

i just found out that instead of killing way-bar it's toggling way-bar

hyprctl dispatch exec 'wtype -M ctrl v -m ctrl'

this command also do the same thing

here's a screen recording just in case

https://github.com/kRHYME7/Hyde-cli/assets/94917588/d180f75a-dd14-47e4-ba53-bbabdb7bb32f

kRHYME7 commented 2 months ago

So strange why waybar receives those Signals

In my case I don't have this as I do have custom keybindings.

image

image

Can you try to disable any waybar related keybindings? To check if you totally unset it run keybinds_hint.sh -j | grep waybar it should return nothing

This is the wtype repo https://github.com/atx/wtype

Enigma1309 commented 2 months ago

image

after disabling the ctrl+escape keybind... i found that it no longer despawns the waybar.... (this was the default binding in hyprdots)

image

does it means that somehow wtype is emulating ctrl+escape..?


after researching a bit i found out that it doesn't work the same way.... image

it clearly types ctrl+v i don't get the actual issue here..


anyways, i think it should work well without that keybind being enabled. also should we address this issue to hyprdots/tittu ? or maybe create a pr?

kRHYME7 commented 2 months ago

Thanks! Can you do the PR on the main repo?

This PR is added by a contributor, so I hope Tittu will be fine with it changing it to something. image

What actually triggers it is the Press ctrl press anykey this triggers the same as Press ctrl Press escape. Maybe it's either hyprland or wtype bug I guess. ( e.g some keys can trigger the lid switch which in the past is linked to a keybind that locks and suspends the system ).

This means setting ctrl + esc might be not a good Idea.

Enigma1309 commented 2 months ago

This means setting ctrl + esc might be not a good Idea.

okay i'm creating a pr and will be linking this issue.