glyph / Pomodouroboros

Pomodoro timer that acknowledges the inexorable, infinite passage of time
MIT License
189 stars 12 forks source link

Linux desktop version #11

Open glyph opened 3 years ago

sigmavirus24 commented 3 years ago

Wayland? X? Both? Neither?

glyph commented 3 years ago

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

sigmavirus24 commented 3 years ago

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"

encukou commented 3 years ago

"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.

glyph commented 3 years ago

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

encukou commented 3 years ago

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.

glyph commented 3 years ago

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

glyph commented 3 years ago

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 commented 3 years ago

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

jaens commented 2 years ago

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).

waynew commented 2 years ago

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.

encukou commented 2 years ago

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