<?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: Prateek Sharma</title>
    <description>The latest articles on DEV Community by Prateek Sharma (@prateek_sharma_623e24351b).</description>
    <link>https://dev.to/prateek_sharma_623e24351b</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4264098%2Fd4b502e9-fe2f-4269-b8cd-4bdf84096518.png</url>
      <title>DEV Community: Prateek Sharma</title>
      <link>https://dev.to/prateek_sharma_623e24351b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prateek_sharma_623e24351b"/>
    <language>en</language>
    <item>
      <title>Why Migrating from Waybar to Quickshell Hurts—and How waybar2qs Automates the Boring 80%</title>
      <dc:creator>Prateek Sharma</dc:creator>
      <pubDate>Wed, 25 Nov 2026 09:50:07 +0000</pubDate>
      <link>https://dev.to/prateek_sharma_623e24351b/why-migrating-from-waybar-to-quickshell-hurts-and-how-waybar2qs-automates-the-boring-80-4io6</link>
      <guid>https://dev.to/prateek_sharma_623e24351b/why-migrating-from-waybar-to-quickshell-hurts-and-how-waybar2qs-automates-the-boring-80-4io6</guid>
      <description>&lt;p&gt;Wayland desktop tooling is consolidating fast. &lt;strong&gt;Omarchy v4 ("Quattro")&lt;/strong&gt; retired Waybar, Mako, and Walker in favor of a unified &lt;strong&gt;Quickshell&lt;/strong&gt; shell (&lt;code&gt;omarchy-shell&lt;/code&gt;), while community shells like &lt;strong&gt;DankMaterialShell&lt;/strong&gt; and &lt;strong&gt;Noctalia&lt;/strong&gt; have popularized Qt 6 / QML desktop shells across &lt;strong&gt;Hyprland&lt;/strong&gt; and &lt;strong&gt;Niri&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Yet if you have a carefully tuned Waybar &lt;code&gt;config.jsonc&lt;/code&gt; and &lt;code&gt;style.css&lt;/code&gt;, migrating to Quickshell still means rewriting everything from scratch in QML. When I looked around GitHub, there wasn't a single automated Waybar-to-Quickshell converter.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;code&gt;waybar2qs&lt;/code&gt;&lt;/strong&gt;—a pure Python standard-library transpiler that converts your Waybar config and CSS into modular, readable Quickshell QML components, validates them with Qt 6 &lt;code&gt;qmllint&lt;/code&gt;, and gives you an honest &lt;code&gt;--report&lt;/code&gt; for everything that still needs manual QML polish.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Prateek-squadron" rel="noopener noreferrer"&gt;
        Prateek-squadron
      &lt;/a&gt; / &lt;a href="https://github.com/Prateek-squadron/waybar2qs" rel="noopener noreferrer"&gt;
        waybar2qs
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;waybar2qs&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Transpile Waybar configurations (&lt;code&gt;config.jsonc&lt;/code&gt; + &lt;code&gt;style.css&lt;/code&gt;) into modular &lt;a href="https://quickshell.outfoxxed.me/" rel="nofollow noopener noreferrer"&gt;Quickshell&lt;/a&gt; (&lt;code&gt;shell.qml&lt;/code&gt;) projects, accompanied by an honest migration audit report.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why &lt;code&gt;waybar2qs&lt;/code&gt;?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Wayland desktop ecosystems such as &lt;strong&gt;Omarchy&lt;/strong&gt;, &lt;strong&gt;Noctalia&lt;/strong&gt;, and &lt;strong&gt;DankMaterialShell&lt;/strong&gt; are increasingly moving from Waybar + GTK CSS toward &lt;strong&gt;Quickshell&lt;/strong&gt; (Qt 6 / QML) for native compositor IPC, smooth animations, and unified shell surfaces. Rebuilding an existing Waybar setup in QML from scratch means manually porting JSONC module layouts, &lt;code&gt;@define-color&lt;/code&gt; palettes, interval/event scripts, and compositor bindings.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;waybar2qs&lt;/code&gt; bridges that gap:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parses Waybar &lt;code&gt;config.jsonc&lt;/code&gt; (including &lt;code&gt;//&lt;/code&gt; / &lt;code&gt;/* */&lt;/code&gt; comments, trailing commas, &lt;code&gt;include&lt;/code&gt; directives, and multi-bar arrays).&lt;/li&gt;
&lt;li&gt;Extracts mappable GTK CSS design tokens (&lt;code&gt;@define-color&lt;/code&gt;, colors, radii, fonts, padding, margins, state styles) into a centralized &lt;code&gt;Theme.qml&lt;/code&gt; singleton.&lt;/li&gt;
&lt;li&gt;Generates modular QML components (&lt;code&gt;qmldir&lt;/code&gt;, &lt;code&gt;shell.qml&lt;/code&gt;, &lt;code&gt;Theme.qml&lt;/code&gt;, and &lt;code&gt;components/*.qml&lt;/code&gt;) tailored for &lt;strong&gt;Hyprland&lt;/strong&gt; or &lt;strong&gt;Niri&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Produces an explicit migration report (…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Prateek-squadron/waybar2qs" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  Why a 1:1 Waybar -&amp;gt; Quickshell Converter Didn't Exist
&lt;/h2&gt;

&lt;p&gt;Waybar and Quickshell live in completely different paradigms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Waybar&lt;/strong&gt; is a GTK-based bar configured declaratively with JSONC and styled with GTK CSS (&lt;code&gt;@define-color&lt;/code&gt;, &lt;code&gt;:hover&lt;/code&gt;, &lt;code&gt;@keyframes&lt;/code&gt;, &lt;code&gt;box-shadow&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quickshell&lt;/strong&gt; is a reactive QtQuick/QML Wayland shell framework built on layer-shell windows (&lt;code&gt;PanelWindow&lt;/code&gt;), compositor IPC (&lt;code&gt;Quickshell.Hyprland&lt;/code&gt;), and D-Bus/system service singletons (&lt;code&gt;Pipewire&lt;/code&gt;, &lt;code&gt;UPower&lt;/code&gt;, &lt;code&gt;SystemTray&lt;/code&gt;, &lt;code&gt;Networking&lt;/code&gt;, &lt;code&gt;SystemClock&lt;/code&gt;, &lt;code&gt;Process&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On top of the paradigm shift, Quickshell QML has several non-obvious gotchas if you're writing it by hand for the first time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;PipeWire nodes are unbound by default.&lt;/strong&gt; Reading or mutating &lt;code&gt;Pipewire.defaultAudioSink.audio.volume&lt;/code&gt; silently fails unless you attach a &lt;code&gt;PwObjectTracker&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight qml"&gt;&lt;code&gt;&lt;span class="nc"&gt;PwObjectTracker&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Pipewire&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaultAudioSink&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;Pipewire&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaultAudioSink&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;UPower battery percentage is normalized to &lt;code&gt;0.0–1.0&lt;/code&gt;.&lt;/strong&gt; &lt;code&gt;UPower.displayDevice.percentage&lt;/code&gt; isn't &lt;code&gt;0–100&lt;/code&gt;—you have to multiply by &lt;code&gt;100&lt;/code&gt; for display.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Process&lt;/code&gt; has no &lt;code&gt;exitCode&lt;/code&gt; property.&lt;/strong&gt; In &lt;code&gt;Quickshell.Io.Process&lt;/code&gt;, exit status arrives via the &lt;code&gt;onExited: (exitCode, exitStatus) =&amp;gt; ...&lt;/code&gt; signal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qt hex alpha is &lt;code&gt;#AARRGGBB&lt;/code&gt;, not &lt;code&gt;#RRGGBBAA&lt;/code&gt;.&lt;/strong&gt; GTK CSS &lt;code&gt;rgba(30, 30, 46, 0.85)&lt;/code&gt; or &lt;code&gt;#1e1e2ed9&lt;/code&gt; has to be flipped to &lt;code&gt;#d91e1e2e&lt;/code&gt; for QML &lt;code&gt;color&lt;/code&gt; properties.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qt 5 vs Qt 6 &lt;code&gt;qmllint&lt;/code&gt;.&lt;/strong&gt; On Arch/Omarchy, &lt;code&gt;/usr/bin/qmllint&lt;/code&gt; can be Qt 5 (&lt;code&gt;qmllint 1.0&lt;/code&gt;), which chokes on Qt 6 QML syntax—you need &lt;code&gt;/usr/lib/qt6/bin/qmllint&lt;/code&gt; (with &lt;code&gt;--uncreatable-type disable&lt;/code&gt; for &lt;code&gt;PanelWindow&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  How &lt;code&gt;waybar2qs&lt;/code&gt; Works
&lt;/h2&gt;

&lt;p&gt;Instead of dumping a monolithic 1,000-line &lt;code&gt;shell.qml&lt;/code&gt;, &lt;code&gt;waybar2qs&lt;/code&gt; runs a clean compiler pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;JSONC Parser (&lt;code&gt;jsonc.py&lt;/code&gt;)&lt;/strong&gt;: Strips &lt;code&gt;//&lt;/code&gt; and &lt;code&gt;/* ... */&lt;/code&gt; comments outside string literals (so URLs and shell commands stay intact), strips trailing commas, handles multi-bar arrays, and resolves &lt;code&gt;"include"&lt;/code&gt; directives with cycle detection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GTK CSS Token Extractor &amp;amp; Auditor (&lt;code&gt;css_parser.py&lt;/code&gt;)&lt;/strong&gt;: Resolves &lt;code&gt;@define-color&lt;/code&gt; chains and functions (&lt;code&gt;alpha()&lt;/code&gt;, &lt;code&gt;shade()&lt;/code&gt;, &lt;code&gt;lighter()&lt;/code&gt;, &lt;code&gt;darker()&lt;/code&gt;, &lt;code&gt;mix()&lt;/code&gt;), extracts bar geometry, radii, fonts, padding/margin, and state selectors (&lt;code&gt;.active&lt;/code&gt;, &lt;code&gt;.urgent&lt;/code&gt;, &lt;code&gt;.muted&lt;/code&gt;, &lt;code&gt;.warning&lt;/code&gt;, &lt;code&gt;.critical&lt;/code&gt;) into a &lt;code&gt;Theme.qml&lt;/code&gt; singleton.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modular QML Codegen (&lt;code&gt;codegen.py&lt;/code&gt;)&lt;/strong&gt;: Emits &lt;code&gt;qmldir&lt;/code&gt;, &lt;code&gt;Theme.qml&lt;/code&gt;, &lt;code&gt;shell.qml&lt;/code&gt; (&lt;code&gt;ShellRoot&lt;/code&gt; -&amp;gt; &lt;code&gt;Variants&lt;/code&gt; over &lt;code&gt;Quickshell.screens&lt;/code&gt; -&amp;gt; &lt;code&gt;PanelWindow&lt;/code&gt; + &lt;code&gt;WlrLayershell&lt;/code&gt;), and only the &lt;code&gt;components/*.qml&lt;/code&gt; files your bar actually uses:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Waybar Module&lt;/th&gt;
&lt;th&gt;Quickshell Backend&lt;/th&gt;
&lt;th&gt;Support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hyprland/workspaces&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Hyprland&lt;/code&gt; (&lt;code&gt;Hyprland.workspaces&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;clock&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.SystemClock&lt;/code&gt; + &lt;code&gt;Qt.formatDateTime&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;pulseaudio&lt;/code&gt; / &lt;code&gt;wireplumber&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Services.Pipewire&lt;/code&gt; + &lt;code&gt;PwObjectTracker&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;battery&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Services.UPower&lt;/code&gt; (&lt;code&gt;UPower.displayDevice&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;network&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Networking&lt;/code&gt; (&lt;code&gt;WifiDevice&lt;/code&gt; / &lt;code&gt;WiredDevice&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Native / Partial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tray&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Services.SystemTray&lt;/code&gt; + &lt;code&gt;IconImage&lt;/code&gt; + &lt;code&gt;QsMenuAnchor&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;niri/workspaces&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Io.Process&lt;/code&gt; (&lt;code&gt;niri msg --json&lt;/code&gt; + &lt;code&gt;event-stream&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Process-backed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;custom/*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Quickshell.Io.Process&lt;/code&gt; (&lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;interval&lt;/code&gt;, &lt;code&gt;return-type: json&lt;/code&gt;, clicks &amp;amp; scroll)&lt;/td&gt;
&lt;td&gt;Process-backed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Any other module&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;StubModuleWidget.qml&lt;/code&gt; placeholder with original config metadata&lt;/td&gt;
&lt;td&gt;Stub&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Honest &lt;code&gt;--report&lt;/code&gt; Flag
&lt;/h2&gt;

&lt;p&gt;CSS animations, gradients, and pseudo-selectors don't translate 1:1 to QML. Instead of silently dropping them, &lt;code&gt;waybar2qs --report&lt;/code&gt; gives you a line-by-line audit with concrete QML equivalents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Unsupported CSS Features Needing Manual QML Polish
### Animations &amp;amp; Transitions (2)
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Line 57**&lt;/span&gt; &lt;span class="sb"&gt;`#custom-update`&lt;/span&gt; (animation): &lt;span class="sb"&gt;`animation: pulse-update 2s ease-in-out infinite;`&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;QML hint: Use QML Behavior on &amp;lt;property&amp;gt; { NumberAnimation / ColorAnimation }.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Line 76**&lt;/span&gt; &lt;span class="sb"&gt;`@keyframes pulse-update`&lt;/span&gt; (@keyframes): &lt;span class="sb"&gt;`@keyframes pulse-update { ... }`&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;QML hint: Use QML SequentialAnimation / NumberAnimation instead of CSS @keyframes.

&lt;span class="gu"&gt;### Pseudo-Selectors (1)
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Line 43**&lt;/span&gt; &lt;span class="sb"&gt;`#workspaces button:hover`&lt;/span&gt; (:hover): &lt;span class="sb"&gt;`#workspaces button:hover { ... }`&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;QML hint: Use QML HoverHandler or MouseArea { hoverEnabled: true } with Behavior on color.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;waybar2qs&lt;/code&gt; requires &lt;strong&gt;Python 3.10+&lt;/strong&gt; and has &lt;strong&gt;zero third-party runtime dependencies&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Prateek-squadron/waybar2qs.git
&lt;span class="nb"&gt;cd&lt;/span&gt; waybar2qs
pip install -e .

&lt;span class="c"&gt;# Auto-discovers ~/.config/waybar/config.jsonc + style.css,&lt;/span&gt;
&lt;span class="c"&gt;# validates with Qt 6 qmllint, and prints the migration audit&lt;/span&gt;
waybar2qs -o ./quickshell-bar --lint --report

&lt;span class="c"&gt;# Launch your new bar&lt;/span&gt;
quickshell -p ./quickshell-bar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also preview a conversion without writing files (&lt;code&gt;--dry-run&lt;/code&gt;), export JSON reports (&lt;code&gt;--report-json&lt;/code&gt;), or target a specific compositor (&lt;code&gt;--compositor hyprland|niri&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Right now the transpiler covers the core Hyprland, Niri, Omarchy, and custom JSON script workflows (tested with 37 automated &lt;code&gt;pytest&lt;/code&gt; cases, Qt 6 &lt;code&gt;qmllint&lt;/code&gt;, and Quickshell &lt;code&gt;0.3.2&lt;/code&gt; QML engine load checks). Next up are first-class native components for modules like &lt;code&gt;mpris&lt;/code&gt;, &lt;code&gt;backlight&lt;/code&gt;, &lt;code&gt;bluetooth&lt;/code&gt;, and &lt;code&gt;cpu&lt;/code&gt;/&lt;code&gt;memory&lt;/code&gt; so fewer bars ever hit &lt;code&gt;StubModuleWidget.qml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you're migrating from Waybar to Quickshell—or you have a gnarly &lt;code&gt;config.jsonc&lt;/code&gt; / &lt;code&gt;style.css&lt;/code&gt; edge case—drop a comment or open an issue on GitHub: &lt;a href="https://github.com/Prateek-squadron/waybar2qs" rel="noopener noreferrer"&gt;Prateek-squadron/waybar2qs&lt;/a&gt;! Which Waybar modules do you rely on most?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>wayland</category>
      <category>quickshell</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Migrating from mypy &amp; pyright to Astral's ty in One Command</title>
      <dc:creator>Prateek Sharma</dc:creator>
      <pubDate>Wed, 25 Nov 2026 07:33:25 +0000</pubDate>
      <link>https://dev.to/prateek_sharma_623e24351b/migrating-from-mypy-pyright-to-astrals-ty-in-one-command-4c4b</link>
      <guid>https://dev.to/prateek_sharma_623e24351b/migrating-from-mypy-pyright-to-astrals-ty-in-one-command-4c4b</guid>
      <description>&lt;p&gt;Python tooling has consolidated fast around &lt;strong&gt;Astral's stack&lt;/strong&gt;: &lt;code&gt;uv&lt;/code&gt; for packages, &lt;code&gt;ruff&lt;/code&gt; for linting and formatting, and &lt;strong&gt;&lt;code&gt;ty&lt;/code&gt;&lt;/strong&gt; for Rust-speed static type checking.&lt;/p&gt;

&lt;p&gt;While &lt;code&gt;migrate-to-uv&lt;/code&gt; handles moving away from Poetry/Pipenv, moving an existing codebase from &lt;strong&gt;&lt;code&gt;mypy&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;pyright&lt;/code&gt;&lt;/strong&gt;, or &lt;strong&gt;&lt;code&gt;basedpyright&lt;/code&gt;&lt;/strong&gt; to &lt;strong&gt;&lt;code&gt;ty&lt;/code&gt;&lt;/strong&gt; still had a tedious manual step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Translating &lt;code&gt;mypy.ini&lt;/code&gt;, &lt;code&gt;setup.cfg&lt;/code&gt;, &lt;code&gt;pyrightconfig.json&lt;/code&gt;, or &lt;code&gt;[tool.mypy]&lt;/code&gt; / &lt;code&gt;[tool.pyright]&lt;/code&gt; into &lt;code&gt;[tool.ty.*]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Converting per-module overrides (&lt;code&gt;[mypy-tests.*]&lt;/code&gt;, &lt;code&gt;executionEnvironments&lt;/code&gt;) into &lt;code&gt;[[tool.ty.overrides]]&lt;/code&gt; or &lt;code&gt;allowed-unresolved-imports&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Rewriting dozens or hundreds of &lt;code&gt;# type: ignore[arg-type]&lt;/code&gt; and &lt;code&gt;# pyright: ignore[reportAttributeAccessIssue]&lt;/code&gt; comments to &lt;code&gt;# ty: ignore[...]&lt;/code&gt; without breaking strings or docstrings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;code&gt;ty-migrate&lt;/code&gt;&lt;/strong&gt; — a zero-dependency Python 3.11+ CLI published on PyPI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Without Installing
&lt;/h2&gt;

&lt;p&gt;Preview what would change on your project without modifying any files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvx ty-migrate --rewrite-ignores --dry-run --diff --report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the migration and immediately verify with &lt;code&gt;ty check&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvx ty-migrate --rewrite-ignores --report --verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foa8e11hg2fbs8rf0b8ha.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foa8e11hg2fbs8rf0b8ha.png" alt="ty-migrate diff and audit report" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Automates
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Multi-Format Config Discovery &amp;amp; Parsing
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ty-migrate&lt;/code&gt; discovers and normalizes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mypy:&lt;/strong&gt; &lt;code&gt;mypy.ini&lt;/code&gt;, &lt;code&gt;.mypy.ini&lt;/code&gt;, &lt;code&gt;setup.cfg&lt;/code&gt; (&lt;code&gt;[mypy]&lt;/code&gt; + &lt;code&gt;[mypy-*]&lt;/code&gt;), and &lt;code&gt;pyproject.toml&lt;/code&gt; (&lt;code&gt;[tool.mypy]&lt;/code&gt; + &lt;code&gt;[[tool.mypy.overrides]]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pyright / Basedpyright:&lt;/strong&gt; &lt;code&gt;pyrightconfig.json&lt;/code&gt; (JSONC-safe — strips &lt;code&gt;//&lt;/code&gt;, &lt;code&gt;/* */&lt;/code&gt;, and trailing commas without breaking URLs in strings) and &lt;code&gt;pyproject.toml&lt;/code&gt; (&lt;code&gt;[tool.pyright]&lt;/code&gt;, &lt;code&gt;[tool.basedpyright]&lt;/code&gt;, and &lt;code&gt;executionEnvironments&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Idiomatic &lt;code&gt;[tool.ty.*]&lt;/code&gt; Generation
&lt;/h3&gt;

&lt;p&gt;Instead of naive key renaming, it maps settings into &lt;code&gt;ty&lt;/code&gt;'s actual structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;python_version&lt;/code&gt; / &lt;code&gt;pythonVersion&lt;/code&gt; → &lt;code&gt;[tool.ty.environment].python-version&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mypy_path&lt;/code&gt; / &lt;code&gt;extraPaths&lt;/code&gt; → &lt;code&gt;[tool.ty.environment].extra-paths&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pure &lt;code&gt;ignore_missing_imports = True&lt;/code&gt; module sections (like &lt;code&gt;[mypy-vendor_missing.*]&lt;/code&gt;) → &lt;code&gt;[tool.ty.analysis].allowed-unresolved-imports&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;disable_error_code&lt;/code&gt; / &lt;code&gt;report*&lt;/code&gt; → &lt;code&gt;[tool.ty.rules]&lt;/code&gt; validated against &lt;code&gt;ty&lt;/code&gt;'s official 163-rule catalog (&lt;code&gt;ignore&lt;/code&gt; / &lt;code&gt;warn&lt;/code&gt; / &lt;code&gt;error&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Safely updates existing &lt;code&gt;pyproject.toml&lt;/code&gt; files without touching &lt;code&gt;[project]&lt;/code&gt; or &lt;code&gt;[tool.ruff]&lt;/code&gt;, or writes a standalone &lt;code&gt;ty.toml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Tokenizer-Safe Inline Ignore Rewriting
&lt;/h3&gt;

&lt;p&gt;Regex find-and-replace over Python source files inevitably corrupts docstrings, test fixtures, or string literals mentioning &lt;code&gt;# type: ignore&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ty-migrate&lt;/code&gt; uses Python's standard-library &lt;code&gt;tokenize&lt;/code&gt; module so &lt;strong&gt;only real &lt;code&gt;COMMENT&lt;/code&gt; tokens&lt;/strong&gt; are rewritten:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="s2"&gt;"""Docstring mentioning # type: ignore[arg-type] stays untouched."""&lt;/span&gt;

&lt;span class="c1"&gt;# Before:&lt;/span&gt;
&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"bad"&lt;/span&gt;  &lt;span class="c1"&gt;# type: ignore[assignment]  # legacy fixture&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;       &lt;span class="c1"&gt;# pyright: ignore[reportAttributeAccessIssue]&lt;/span&gt;

&lt;span class="c1"&gt;# After:&lt;/span&gt;
&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"bad"&lt;/span&gt;  &lt;span class="c1"&gt;# ty: ignore[invalid-assignment]  # legacy fixture&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;       &lt;span class="c1"&gt;# ty: ignore[missing-attribute, invalid-attribute-access]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, bare &lt;code&gt;# type: ignore&lt;/code&gt; and unmapped plugin error codes are left untouched (&lt;code&gt;--unmapped-strategy keep&lt;/code&gt;) rather than silently widening ignores.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Honest Audit Reporting (&lt;code&gt;--report&lt;/code&gt; &amp;amp; &lt;code&gt;--check&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ty&lt;/code&gt; has real behavioral differences from &lt;code&gt;mypy&lt;/code&gt; and &lt;code&gt;pyright&lt;/code&gt; — for instance, &lt;code&gt;ty&lt;/code&gt; checks unannotated function bodies unconditionally (&lt;code&gt;check_untyped_defs&lt;/code&gt; is always on), has no single &lt;code&gt;strict = True&lt;/code&gt; flag, and does not run mypy plugins.&lt;/p&gt;

&lt;p&gt;Rather than silently ignoring those keys, &lt;code&gt;--report&lt;/code&gt; breaks every option down into &lt;strong&gt;Translated&lt;/strong&gt;, &lt;strong&gt;Guidance / Implicit in ty&lt;/strong&gt;, and &lt;strong&gt;Unmapped&lt;/strong&gt;, and &lt;code&gt;--check&lt;/code&gt; returns exit code &lt;code&gt;3&lt;/code&gt; in CI if anything needs manual review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Prateek-squadron/ty-migrate" rel="noopener noreferrer"&gt;https://github.com/Prateek-squadron/ty-migrate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPI:&lt;/strong&gt; &lt;a href="https://pypi.org/project/ty-migrate/" rel="noopener noreferrer"&gt;https://pypi.org/project/ty-migrate/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try it on a real codebase and hit an unmapped error code or edge case, open an issue or PR!&lt;/p&gt;

</description>
      <category>automation</category>
      <category>python</category>
      <category>rust</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
