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 452 forks source link

window mode and sway/i3wm specific mode #803

Closed qqwa closed 1 year ago

qqwa commented 1 year ago

First thanks for providing a linux version out of the box. As a few others (#476, #788, #627, #548) I too have issues to get the overlay to work on my linux system and as you mentioned in #507 you can't support every combination of distro, desktop environment, etc...

So I would suggest to add an --windowed flag to the command line. Which will start awakened-poe-trade as a normal window. And if you press Ctrl+D in Path of Exile the window doesn't move nor makes anything fancy, it just shows the informations related to the item. For tilling window managers this would be preferable to an overlay (at least for me). And for others it could at least be used as a fallback if the overlay isn't working for them.

What do you think? I can work on it, just want to make sure you would be interested in a feature like that and maybe discuss some details how you would want it to behave.

xbc1 commented 1 year ago

A windowed mode would be nice, most linux issues i've seen here over the years were due to overlay misbehavior with different distros.

SnosMe commented 1 year ago

For tilling window managers

So when you price-check, window appears side by side, and PoE resizes. I know that resizing poe window is quite laggy

qqwa commented 1 year ago

No I meant that when you start poe-trade that the window would appear immediately and from that point of time poe-trade doesn't manipulate the window anymore, so no moving around.

Then when you price-check nothing would happen other than that the window that was created the moment you started poe-trade now shows information about that new item. If you placed the window before hand so that you can see it, you have nothing to do but to price check. But if you placed the window on another desktop for example you have to press the price-check shortcut and switch the desktop to actually see it.

I hope that clarifies it

errantmind commented 1 year ago

This would be great. I've spent a couple hours trying to get APT working on my pretty customized Linux setup (Arch + DWM + Picom) and can't get the overlay to behave properly. I can activate the overlay after ensuring POE and APT are floating, and it looks normal, but when it is not visible (shift + SPACE) I can't click anything in game, like the overlay is still there after hiding it.

I would greatly prefer just to have APT in a separate window on my other monitor with no overlay... just need whatever is required to push price info to it when I ctrl+d an item.

xbc1 commented 1 year ago

Got the same problem on ubuntu, let me know when you got a solution :D

SnosMe commented 1 year ago

I'm currently reworking IPC system, this will help to open tool as a web page. Maybe in early January it will be ready.

SnosMe commented 1 year ago

I've found so far one sad thing. If you're blocked by CAPTCHA you won't be able to complete it (in overlay version of app you can do this in builtin browser).

errantmind commented 1 year ago

I've found so far one sad thing. If you're blocked by CAPTCHA you won't be able to complete it (in overlay version of app you can do this in builtin browser).

Why's that?

NINNiT commented 1 year ago

A windowed mode would be really nice! Capturing the global `ctrl+d shortcut should work without problems on X11 based desktops/window managers. However i think that it won't be that easy on wayland (e.g. sway) due to its various security features. As far as i know, such global shortcuts must be set on the compositor itself but feel free to correct me...

I think that the option to launch awakened-poe-trade in its own (electron) window, combined with the ability to manually copy-paste stuff into it would still be a huge profit for wayland gamers.

Edit: btw, thanks for supporting us Linux exiles, wanted to say that for a long time lol

errantmind commented 1 year ago

A windowed mode would be really nice! Capturing the global `ctrl+d shortcut should work without problems on X11 based desktops/window managers. However i think that it won't be that easy on wayland (e.g. sway) due to its various security features. As far as i know, such global shortcuts must be set on the compositor itself but feel free to correct me...

I think that the option to launch awakened-poe-trade in its own (electron) window, combined with the ability to manually copy-paste stuff into it would still be a huge profit for wayland gamers.

Edit: btw, thanks for supporting us Linux exiles, wanted to say that for a long time lol

Ideally, for me anyway, would be to support a solution without the compositor requirement, even if that meant repeatedly polling the clipboard with no other shortcut.

That said, I'm definitely grateful there is any effort to support Linux clients given it is a relatively small number of players.

SnosMe commented 1 year ago

Some progress, app is now usable from browser, nicely sticks to side close to PoE. Currently still requires overlay window, which is not used.

image

nullagit commented 1 year ago

Want to express my gratitude like others in this thread for supporting Linux users. I too am using DWM and can't get the tool to work, at all - floating mode or otherwise. It opens, and I see it's running, but ctrl+d doesn't do anything. Has anyone managed to find a work around?

SnosMe commented 1 year ago

I released version with one piece not solved yet: overlay window is still created and visible. You can open browser version of tool in tray menu. Let me know what it doesn't solve for you yet, any issues.

nullagit commented 1 year ago

So with the changes I made in this thread (https://github.com/SnosMe/awakened-poe-trade/issues/185) I can no longer see the APT menu options (settings and such). It's just a gray screen, but ctrl+d work for basic price checking. Unfortunately when I remove my cursor from the item (in POE), APT disappears and I'm back to staring at a gray window so I can't really interact with APT at all outside of basic price checks with ctrl+d.

How do I access the browser version?

Edit: I can see the settings now. I don't have a tray menu (there's no system tray in dwm). Is there another way to access the browser version?

xbc1 commented 1 year ago

So for me the problem persists as described in #788 nothing changed. The app just "eats" all input until you press shift + space once or twice This behaviour gets triggered again by clicking outside of the poe window or switching zones ingame.

Thanks for your hard work! And a happy new year :)

NINNiT commented 1 year ago

I just found this project, which seems to be a customized (and outdated) awakened-poe-trade web version. https://trade-helper.github.io/

As far as i can see, that's the customized apt fork : https://github.com/trade-helper/awakened-poe-trade-web-version Seems to skip the whole overlay-window/electron part and extends the vite config to build/bundle the vue frontend.

Edit: It's blocked now.. (?)

errantmind commented 1 year ago

Edit: It's blocked now.. (?)

Hmm, didn't have a chance to check it out before it broke. I'm guessing the functionality was similar to what @SnosMe is adding here.

I released version with one piece not solved yet: overlay window is still created and visible. You can open browser version of tool in tray menu. Let me know what it doesn't solve for you yet, any issues.

I'm in the same boat as @nullagit. There is no system tray in DWM so I can't edit the settings that way to properly test it. I think the best general solution would be an editable config file for anyone that doesn't use a system tray.

For right now, I pulled the code and edited the default configuration value for builtinBrowser and set it to true. Then I followed all the build steps and produced an AppImage. Afterwards, I ran the app image and nothing happened. I'm not sure what is supposed to happen though with this setting enabled. Is a browser window supposed to open automatically? If the tray is required to launch it? I tried manually navigating to the link in your screenshot http://localhost:5173/ and it didn't load.

Lastly, I tried running APT in 'dev' mode and got a price checker open in my browser. I think it may not be working properly in this mode as when I paste in items it misses some or all the mods on the item after parsing it. I tried maybe 20 different items and most of the time many or all mods were missing. There are no errors in the console and I didn't look into it further. It is able to fetch data on the item though.

SnosMe commented 1 year ago

configuration value for builtinBrowser

builtin != external, we're talking about external here.

I will add the flag latter that will disable creating overlay window and will open page in browser on launch.

it misses some or all the mods

You're pasting item text without mods, need to hold extra button when copying.

errantmind commented 1 year ago

configuration value for builtinBrowser

builtin != external, we're talking about external here.

Ah ok, seems I misunderstood this part.

I will add the flag latter that will disable creating overlay window and will open page in browser on launch.

Very nice.

it misses some or all the mods

You're pasting item text without mods, need to hold extra button when copying.

What I did was ctrl+c the item in game, which produces:

Item Class: Belts
Rarity: Rare
Rage Snare
Heavy Belt
--------
Requirements:
Level: 61
--------
Item Level: 79
--------
+32 to Strength (implicit)
--------
+87 to maximum Life
Regenerate 6.9 Life per second
+35% to Cold Resistance
+34% to Lightning Resistance
36% increased Flask Mana Recovery rate
--------
Note: ~price 10 chaos

When I paste this into the dev mode none of the affixes are displayed. Maybe I'm doing it wrong though. I'll wait until your update and try it out. Thanks again!

cf8 commented 1 year ago

@errantmind i think you need to do ctrl+alt+c, at least its what you have to do when importing an item on craftofexile

Doix commented 1 year ago

Hey, is there a way to stop the creation of the overlay window? The system tray + open browser works fine, but the overlay window messes things up for me. I read the comments in the thread, but couldn't figure out what state we're in.

SnosMe commented 1 year ago

Not possible yet. I'm rewriting that code, have some progress on windows, linux is next

Holyverz commented 1 year ago

Thanks @SnosMe For the last minute update, --no-overlay is POG :hot_face: everything works fine on my end

NINNiT commented 1 year ago

Big thanks from me too, @SnosMe! Saving my league start.

xbc1 commented 1 year ago

@SnosMe Thanks for saving mine as well <3

errantmind commented 1 year ago

Not possible yet. I'm rewriting that code, have some progress on windows, linux is next

Thanks! I'm waiting for the linux update then

area commented 1 year ago

Overjoyed to finally see this feature make it in.