Pomodouroboros icon indicating copy to clipboard operation
Pomodouroboros copied to clipboard

Linux desktop version

Open glyph opened this issue 2 years ago • 12 comments

glyph avatar Aug 22 '21 21:08 glyph

Wayland? X? Both? Neither?

sigmavirus24 avatar Aug 24 '21 19:08 sigmavirus24

All the things!! Probably most toolkits do wayland or X pretty transparently to the application, though?

glyph avatar Aug 26 '21 01:08 glyph

I don't actually have the foggiest clue if they do. Based on discussions I've seen and my own troubles as a linux desktop user my best guess is "They don't"

sigmavirus24 avatar Aug 26 '21 11:08 sigmavirus24

"Linux desktop" is not a good abstraction here. It's better to think of desktop systems being macOS, Windows, GNOME, KDE, i3, X11 (?), and so on ad absurdum.

Toolkits generally handle cross-platform things pretty transparently, and/or support one of those systems well. The pain points here will be global keyboard shortcuts and "taskbar" integration. Every system does those differently enough that toolkits can't really paper over the differences.

encukou avatar Aug 26 '21 15:08 encukou

Happy to make some sub-tasks here if someone with more current/relevant experience would like to explain how it should be broken down. It’s been an epoch since I last wrote pygtk code

glyph avatar Aug 27 '21 01:08 glyph

I can't promise to help out, but I can explain how to help me if I do find the time :)

Without a Mac I can't try this out, and with only a foggy idea of what this thing does it's hard to start hacking. It would nice to separate the "backend" (logic) and "frontend" (stuff specific to Mac/Windows/...). IMO the best way to do it is to make a toy "frontend" (#10), so that there are multiple frontends and they need a clean common interface.

encukou avatar Aug 27 '21 08:08 encukou

@encukou Hey, this specification commentary is helping out already :).

glyph avatar Aug 29 '21 19:08 glyph

The "backend" is already separated out in the totally platform-agnostic pommodel.py, and the mac parts are in mac_gui.py and notifs.py (although probably there should be a bit more separation there, maybe a macos package where both of these can live)

glyph avatar Aug 29 '21 19:08 glyph

As far as what it does, I'll have to do a more thorough demonstration at some point, but @issackelly was kind enough to put together a quick YouTube video to give you a vague idea, here: https://twitter.com/issackelly/status/1429976930141446173

glyph avatar Aug 29 '21 19:08 glyph

Qt (for Python) works across Windows, Mac and Linux reasonably well, and would allow sharing at least some UI code (though not all of it, and it still generally needs different styling tweaks for different platforms even if the business logic is shared).

jaens avatar Oct 24 '21 18:10 jaens

Had to pull a mac out of a closet to actually get this thing going - I dig the conceit (I mean, I wrote my own pomodoro tool), especially with the transparent window just on top of everything.

One approach that could work for certain Linux desktops is to make a window that's just the full width of the screen - for tiling WMs like i3 it could hang out beneath/above some windows at full width or something.

I think the part I like the most about this is that you don't have to remember to set your intention and start for each pom, it just starts going and if you don't set your intention it just fails for you, and (IIUC) if you don't score your most recent pom quick enough it's considered a fail?

Also the scoring bit is very interesting - I haven't grokked exactly how it works yet, but I enjoy it.

waynew avatar Oct 28 '21 22:10 waynew

FWIW, Qt has flags to make a window translucent graphically and transparent to mouse events. I tried them on Linux but they might work reasonably well elsewhere as well. I used them here: https://github.com/encukou/pointout/blob/a8cd0c8cb304a11f93a54776ae2c3428f6ef7810/pointout.py#L212-L222

encukou avatar Oct 29 '21 10:10 encukou