<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: piot5</title>
    <description>The latest articles on DEV Community by piot5 (@piot5).</description>
    <link>https://dev.to/piot5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3841943%2F25b73163-56be-4365-9b89-76b58cae6046.png</url>
      <title>DEV Community: piot5</title>
      <link>https://dev.to/piot5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piot5"/>
    <language>en</language>
    <item>
      <title>Is Microsoft's Xbox as a service just a simple wrapper?</title>
      <dc:creator>piot5</dc:creator>
      <pubDate>Wed, 01 Apr 2026 07:09:51 +0000</pubDate>
      <link>https://dev.to/piot5/is-microsofts-xbox-as-a-service-just-a-simple-wrapper-2l75</link>
      <guid>https://dev.to/piot5/is-microsofts-xbox-as-a-service-just-a-simple-wrapper-2l75</guid>
      <description>&lt;p&gt;MS wants us to believe that there's coming something great and new but just debugging the bloated Xbox app and the kiosk mode. There are open source solutions that work with less Overhead and not as fancy roadmap but just right now. &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>DisplayFlowCLI multi monitor tool for windows in rust</title>
      <dc:creator>piot5</dc:creator>
      <pubDate>Tue, 24 Mar 2026 17:12:36 +0000</pubDate>
      <link>https://dev.to/piot5/displayflowcli-multi-monitor-tool-for-windows-in-rust-16h2</link>
      <guid>https://dev.to/piot5/displayflowcli-multi-monitor-tool-for-windows-in-rust-16h2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbbibbknpnry511bhw03.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbbibbknpnry511bhw03.gif" alt=" " width="600" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;displayflow&lt;br&gt;
&lt;a href="https://github.com/piot5/displayflow_cli" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve ever tried to automate display layouts on Windows with command line tools, you know the frustration: GDI device indices are volatile. A reboot, a driver update, or simply unplugging a monitor can reassign \DISPLAY1 to a completely different physical screen.&lt;br&gt;
I built displayflow, a Rust-based utility that fixes this by creating a "Synthetic ID" mapping between live GDI data and the Windows Registry.&lt;br&gt;
The Problem: Why EnumDisplayDevices isn't enough&lt;br&gt;
Windows provides the GDI API to manage monitors, but it has two major flaws for automation:&lt;br&gt;
Volatile IDs: The names are logical, not physical.&lt;br&gt;
Missing Metadata: When a monitor is disconnected, GDI forgets its existence, making it impossible to "pre-configure" layouts for specific hardware combinations.&lt;br&gt;
The Solution: Synthetic Inventory Scrapping&lt;br&gt;
displayflow works by bridging two worlds:&lt;br&gt;
Live GDI Scan Using EnumDisplayDevicesW and EnumDisplaySettingsW to get current coordinates and refresh rates.&lt;br&gt;
Registry : Parsing SYSTEM\CurrentControlSet\Enum\DISPLAY to extract EDID data (Serial Numbers, Physical Dimensions).&lt;br&gt;
Key Code: The EDID Parser&lt;br&gt;
To uniquely identify a monitor, we have to manually parse the EDID block from the registry.&lt;/p&gt;

&lt;p&gt;fn parse_edid(bytes: &amp;amp;[u8]) -&amp;gt; (String, String, String) {&lt;br&gt;
    // We look for the Serial Number Descriptor (00 00 00 ff)&lt;br&gt;
    for offset in [54, 72, 90, 108] {&lt;br&gt;
        if offset + 18 &amp;lt;= bytes.len() &amp;amp;&amp;amp; &amp;amp;bytes[offset..offset+4] == b"\x00\x00\x00\xff" {&lt;br&gt;
            let sn = String::from_utf16_lossy(...) // &lt;/p&gt;

&lt;p&gt;Features:&lt;br&gt;
Force Registry Commits: Instead of flickering every time a setting changes, DisplayFlow stages configurations using CDS_NORESET and commits them all at once via ChangeDisplaySettingsExW.&lt;br&gt;
Daemon Mode with Hotkeys: A background listener using RegisterHotKey that triggers layout "Suites" stored in the registry. I want to include more &lt;br&gt;
event triggers (like hot plug based on port) in future versions &lt;br&gt;
How to use it&lt;br&gt;
I designed the CLI to be "Pipe-First". You can scan your current setup, pipe it into a profile, and re-apply it later:&lt;br&gt;
Save current layout as a suite named 'Gaming'&lt;br&gt;
df --save Gaming --hotkey&lt;br&gt;
Re-apply it anywhere&lt;br&gt;
df --apply-suite Gaming&lt;/p&gt;

&lt;p&gt;df 1:3840:2160:0:0:1:144:90:100:75:up --save Cinema --hotkey&lt;/p&gt;

&lt;p&gt;I included Res position primary rotation hz Ddc contrast Ddc brightness and animation .the last statement is a transition Animation whos direction you choose per monitor &lt;/p&gt;

&lt;p&gt;Why Rust?&lt;br&gt;
Handling Win32 API calls (especially the DEVMODEW struct with its nested unions) is unsafe in C++. Rust’s windows-rs crate allowed me to wrap these unsafe calls in a way that ensures memory safety while dealing with raw pointers and byte-level registry parsing.&lt;/p&gt;

&lt;p&gt;Check out the code on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/piot5/displayflow_cli" rel="noopener noreferrer"&gt;https://github.com/piot5/displayflow_cli&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  rust #windows #cpp #programming #automation
&lt;/h1&gt;

</description>
      <category>productivity</category>
      <category>rust</category>
      <category>cli</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
