Skip to main content

One post tagged with "linux"

View All Tags

Building a cosmic-desktop plugin in rust

· 17 min read

This blog post is the story of me creating cosmic-monitor-positiond and the things I learned along the way.

Background: What is this all about?

I recently updated my linux desktop from Pop!_OS 22.04 (which was released over 3 years ago) to the latest (beta) Pop!_OS 24.04. This release comes with an entirely new custom wayland-based desktop environment called cosmic-epoch. Overall, I have loved the cosmic desktop environment better than gnome and I am excited that the system 76 team is working on something so ambitious.

But, I have noticed one particularly annoying problem: my persistent monitor configuration is not actually very persistent. I have 2 monitors side by side and about half of time when the system wakes up from idle, the monitors are positioned backwards (the left monitor is configured to be on the right). While it is an easy fix: just open settings and re-arange the screens; it happens multiple times a day and really gets on my nerves.

Attempt 1: systemd to the rescue

So cosmic-epoch is fully open source on Github, so I was hopeful that I would be able to find some people with the same problem as me and maybe a work-around. Lucky me, someone else had the same problem #2102. But unlucky me, it's from 3 months ago with no comments or interactions.