SnosMe / awakened-poe-trade

:heavy_dollar_sign: :hammer: Path of Exile trading app for price checking
https://snosme.github.io/awakened-poe-trade/download
MIT License
2.08k stars 451 forks source link

Awakened Poe Trade on Wayland(Hyprland) #1137

Open endh94 opened 1 year ago

endh94 commented 1 year ago

Been trying to adapt APT to work on Wayland(Hyprland).

Managed to get kind of working with the following rules:

 windowrule = float, ^(awakened-poe-trade)
 windowrule = noblur, ^(awakened-poe-trade)
 windowrule = noborder, ^(awakened-poe-trade)
 windowrule = float, ^(steam_app_238960)
 windowrule = fullscreen, ^(steam_app_238960)

Also passed the keybindings to APT with these:

bind = SHIFT,Space,pass,^(awakened-poe-trade)$
bind = CTRL,D,pass,^(awakened-poe-trade)$
bind = CTRL ALT,D,pass,^(awakened-poe-trade)$

The current behaviour is the following:

In my understanding this behaviour is because APT is rendered via XWayland and it is threated as a whole window.

Is there a way to achive the correct behaviour?

SnosMe commented 1 year ago

There are some extensions, but I don't think it's possible of right now to port from X11, Can't suggest anything other than to try browser version of APT. https://wayland.app/protocols/ext-foreign-toplevel-list-v1 https://wayland.app/protocols/xdg-foreign-unstable-v2

botagar commented 11 months ago

I just started exploring Wayland to see what's up with it but the Awakened PoE overlay capturing keystrokes killed that exploration flat :sweat_smile: I cant play PoE without this tool, and I cant NOT play PoE.

Out of curiosity, what's preventing this amazing tool from porting over? Is it the Electron framework itself?

SnosMe commented 11 months ago

Electron is fine I think, it's about two other dependency in package.json

fruitchewy commented 7 months ago

As a compromise, would it be possible to get an option that spawns an electron window of what would normally be the overlay? It's obviously possible to use a browser but it would be nice to have it as a separate application window.

ziomek64 commented 4 months ago

For me it's working on wayland , I hover on item then ctrl+d , then I open overlay with shift+space and price is visible. Is this correct or should overlay open upon ctrl+d ?

iMithrellas commented 3 months ago

Hi guys, I cant seem to get it working on Hyprland. It just creates a see through window over the PoE window and I cant interact with the game. Is there anyone who got it working and would be willing to share his insights with me? I got PoB working nicely, but this would be great too before the new league starts.

Tree0716 commented 3 months ago

Got it mostly working with these rules

windowrule = float, ^(awakened-poe-trade)$
windowrule = noblur, ^(awakened-poe-trade)$
windowrule = noborder, ^(awakened-poe-trade)$
windowrule = float, ^(Awakened-poe-trade)$
windowrule = noblur, ^(Awakened-poe-trade)$
windowrule = noborder, ^(Awakened-poe-trade)$
windowrule = float, ^(Awakened PoE Trade)$
windowrule = noblur, ^(Awakened PoE Trade)$
windowrule = noborder, ^(Awakened PoE Trade)$
windowrule = pin, ^(Awakened PoE Trade)$
windowrule = pin, ^(awakened-poe-trade)$
windowrule = pin, ^(Awakened-poe-trade)$

windowrule = float, ^(steam_app_238960)$
windowrule = fullscreen, ^(steam_app_238960)$
windowrule = stayfocused, ^(steam_app_238960)$

bind = SHIFT,Space,pass,^(awakened-poe-trade)$
bind = CTRL,D,pass,^(awakened-poe-trade)$
bind = CTRL ALT,D,pass,^(awakened-poe-trade)$
bind=SUPER,B,fullscreen,
iMithrellas commented 3 months ago

I tried it, it helps a bit with the unability to interact with PoE, but it still doesnt do anything on any keystroke and it looks like this. Guess I ll have to live without it. But thanks a lot anyway. image

DaBultz commented 3 months ago

This is the config i'm using:

windowrulev2 = tag +apt, title:(Awakened PoE Trade)
windowrulev2 = float, tag:apt 
windowrulev2 = noblur, tag:apt
windowrulev2 = nofocus, tag:apt # Disable auto-focus
windowrulev2 = noshadow, tag:apt
windowrulev2 = noborder, tag:apt
windowrulev2 = size 100% 100%, tag:apt
windowrulev2 = center, tag:apt

The only downside i've experienced is:

careb0t commented 3 months ago

This is the config i'm using:

windowrulev2 = tag +apt, title:(Awakened PoE Trade)
windowrulev2 = float, tag:apt 
windowrulev2 = noblur, tag:apt
windowrulev2 = nofocus, tag:apt # Disable auto-focus
windowrulev2 = noshadow, tag:apt
windowrulev2 = noborder, tag:apt
windowrulev2 = size 100% 100%, tag:apt
windowrulev2 = center, tag:apt

The only downside i've experienced is:

  • Setting keybinds through SHIFT+Space doesn't work, for this i open the settings in the browser, this allows me to set the keybinds.
  • Path of Exile must be in windowed mode.

When you say Path of Exile must be in windowed mode, what precisely do you mean? That the game must be in window mode in the in-game settings, or that the game must not be fullscreened by Hyprland? Does the game need to be in float or tile mode? I've tried just about every window rule I can think of for APT and PoE but still am not able to make any keybind work or make any part of the overlay appear.

And to make things even worse --no-overlay mode doesn't seem to allow you to search the trade site with specific item mods/mode values, and seems like it only allows you to price check an item by its slot and base stats. For example, if I have a pair of Carnal Boots that have +50 life, +25 fire resistance, +30% movement speed, and + 30 energy shield, when I copy that item to the clipboard and paste it into APT in --no-overlay mode, it only allows me to search for other rare boots with no ability to decide if I want to include any of the mentioned mods in the search.

SnosMe commented 3 months ago

mode doesn't seem to allow you to search the trade site with specific item mods

Tou need to press third button (alt) to copy with mods

careb0t commented 3 months ago

mode doesn't seem to allow you to search the trade site with specific item mods

Tou need to press third button (alt) to copy with mods

Wow! I had no idea. I always suspected I was doing something wrong. Thanks a bunch for letting me know. :)

DaBultz commented 3 months ago

@careb0t

When you say Path of Exile must be in windowed mode,

The ingame setting must be windowed, this one worked most consistently for me.

I did encounter that sometimes APT would be behind PoE, i managed to fix it by setting PoE to be floating as well in hyprland

windowrulev2 = tag +poe, title:(Path of Exile)
windowrulev2 = tag +poe, class:(steam_app_238960)
windowrulev2 = float, tag:poe
b33slayer commented 3 months ago

@careb0t

When you say Path of Exile must be in windowed mode,

The ingame setting must be windowed, this one worked most consistently for me.

I did encounter that sometimes APT would be behind PoE, i managed to fix it by setting PoE to be floating as well in hyprland

windowrulev2 = tag +poe, title:(Path of Exile)
windowrulev2 = tag +poe, class:(steam_app_238960)
windowrulev2 = float, tag:poe

can you send me all the rules for the game and apt?

DaBultz commented 3 months ago

@b33slayer

# PoE
windowrulev2 = tag +poe, title:(Path of Exile)
windowrulev2 = tag +poe, class:(steam_app_238960)
windowrulev2 = float, tag:poe

windowrulev2 = tag +apt, title:(Awakened PoE Trade)
windowrulev2 = float, tag:apt 
windowrulev2 = noblur, tag:apt
windowrulev2 = nofocus, tag:apt # Disable auto-focus
windowrulev2 = noshadow, tag:apt
windowrulev2 = noborder, tag:apt
windowrulev2 = size 100% 100%, tag:apt
windowrulev2 = center, tag:apt

This is what i use, PoE can still decide to be in front of APT, but toggle floating on/off fixes it (for me)

b33slayer commented 2 months ago

@b33slayer

# PoE
windowrulev2 = tag +poe, title:(Path of Exile)
windowrulev2 = tag +poe, class:(steam_app_238960)
windowrulev2 = float, tag:poe

windowrulev2 = tag +apt, title:(Awakened PoE Trade)
windowrulev2 = float, tag:apt 
windowrulev2 = noblur, tag:apt
windowrulev2 = nofocus, tag:apt # Disable auto-focus
windowrulev2 = noshadow, tag:apt
windowrulev2 = noborder, tag:apt
windowrulev2 = size 100% 100%, tag:apt
windowrulev2 = center, tag:apt

This is what i use, PoE can still decide to be in front of APT, but toggle floating on/off fixes it (for me)

it doesn't work for me =\

Sarthak-Bhagat commented 2 months ago

+1 this does not work for me either. ~All the key inputs are being grabbed by Awakened PoE Trade instead of Path Of Exile.~

Toggling floating helps, but very, very rarely

Okay restarting fixed the issue with the key inputs being grabbed, but now Awakened PoE Trade just gets stuck in the foreground sometimes and there's no way to hide it.

Is there a way we could remove the nofocus rule while the ctrl is being held down?