Bringing DWM up to par

I've gotten the dwm version working smoothly on the pro, but there were some hiccups involved which raise some questions as to how it should be patched.

  1. The pinephone pro's touchscreen xinput ID is 7, not 8. This is a simple fix, but could there be a way of automating this? Do touchscreens have some common identifier somewhere that could be found to create a script? This might help with other devices if such a common factor could be found. If the SXMO_SCREEN is set to 8, that's actually the power button, so when the user locks, sxmo turns off the power button, so they can't unlock.

  2. The primary monitor on the pro is DP-1, not DSI-1. This breaks the orientation on sxmo_hook_lisgdstart.sh. My current fix is just adding xrandr --output DSI-1 --primary in the dwm section of sxmo_hook_start.sh. So we could have a custom start hook just for the pinephonepro, or we could add another variable in deviceprofiles like $SXMO_MONITOR, and have sxmo_hook_start.sh run xrandr --output $SXMO_MONITOR --primary, which I don't think would break anything?

  3. Battery monitoring on the pro is a nightmare, with 3-4 different things under /sys/class/power_supply/ that create conflicting information. At minimum, the battery itself is always shown as charging, so the default status is only good for percentage, not state. I'm still trying to pick it apart, and have state working, but not in a way that easily fits in with the way that the battery monitoring works now. Basically just checking /sys/class/rk818-usb/present and setting status with a case statement. Could use more brainpower here.

This ticket is just a measure twice/cut once conversation before I try submitting a patch.

Assigned to
2 years ago
2 years ago
No labels applied.

~phartman 2 years ago

My two cents based on working on the pinenote:

Re: (1) - I looked into this when working on the pinenote and I was not able to come up with a simple solution to automatically detect input ids (as we can in sway). Fortunately, these ids are static, so we can just hard code them. If someone has a better solution, then that'd be fantastic.

Re: (2) - I think you can rename the monitor in xorg.conf. Not ideal though. But that's what we were doing before.

Not sure about batteries.

~mungfusensei 2 years ago

While we're at it, if the status gets too long, it stops displaying entirely. Wonder if it might be worth applying the notitle patch for dwm to free up some space, since it's basically useless to have window titles while undocked at least (I don't even have them on my desktop).


On top of that, might be worth it to have the lock state displayed as icons rather than text, to free up even more real estate for status icons.

~phartman REPORTED FIXED 2 years ago

The first 2 are fixed with the latest patch in git head. Let's start a new thread for #3.

Register here or Log in to comment, or comment via email.