You are not logged in.

#1 2018-10-21 20:38:24

LeaveAThousand
Member
Registered: 2014-04-11
Posts: 33

python-umonitor: Manage monitor configuration automatically

Hi guys,

I previously wrote a program called umonitor, which manages monitor configuration as the monitors are hotplugged. Using my experience from that project, I have rewritten umonitor in Python/Cython. Using a higher level language really allows me to cut development time, provide easier maintenance, and allows more potential contributors.

In comparison with the original umonitor, I have added more features such as automatically running scripts with an environment variable set to the name of the profile that you are loading. Installing python-umonitor will conflict with the original umonitor, and the configuration files are located in different locations with a slightly different format, so existing users will have to save their profiles again.

Github: https://github.com/rliou92/python-umonitor
AUR: https://aur.archlinux.org/packages/python-umonitor-git/

Debugging information can be obtained by adding '-vv' argument!

Offline

#2 2018-10-21 20:58:56

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,186

Re: python-umonitor: Manage monitor configuration automatically

I saw and noted your older thread but never got round to trying it, I possibly should now. It's not polling, is it? What signal does it latch on to to figure out if a monitor is being added/removed?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2018-10-21 23:06:47

LeaveAThousand
Member
Registered: 2014-04-11
Posts: 33

Re: python-umonitor: Manage monitor configuration automatically

I'm using xcb to communicate with the X11 server, and the X11 server will emit an event when a monitor is hotplugged. Right now the program is configured to poll for such an event using xcb_poll_for_event, but I have just added a command line option to use a blocking call xcb_wait_for_event instead. The problem with using the blocking call is that keyboard interrupts can't be handled due to some technical limitations with Python/Cython.

Offline

#4 2018-10-22 21:35:34

stanna
Member
From: melb.au
Registered: 2017-03-24
Posts: 76

Re: python-umonitor: Manage monitor configuration automatically

XFCE4-Settings-4.13 adds this exact feature finally. sadly i have no use for this program anymore LeaveAThousand but really appreciated all your work and assistance with the previous version, it made my life alot easier!

good luck with the new project! smile

Offline

Board footer

Powered by FluxBB