<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bash on Wimpy's World</title><link>https://blog.wimpys.world/tags/bash/</link><description>Recent content in Bash on Wimpy's World</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>martin@wimpress.com (Martin Wimpress)</managingEditor><webMaster>martin@wimpress.com (Martin Wimpress)</webMaster><lastBuildDate>Tue, 15 Apr 2025 13:37:42 +0100</lastBuildDate><atom:link href="https://blog.wimpys.world/tags/bash/rss.xml" rel="self" type="application/rss+xml"/><item><title>Fuzzel Colour Picker</title><link>https://blog.wimpys.world/posts/fuzzel-hyprpicker/</link><pubDate>Tue, 15 Apr 2025 13:37:42 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/fuzzel-hyprpicker/</guid><description>&lt;p&gt;We&amp;rsquo;ve all been there - you&amp;rsquo;re knee-deep in customizing your desktop, tweaking configs, perfecting that theme, and suddenly you need to grab a specific colour from somewhere on screen.
If you&amp;rsquo;re like me and recently made the jump to &lt;a href="https://hyprland.org/"&gt;Hyprland&lt;/a&gt; (or other contemporary Wayland compositor), you might have found yourself missing some of those handy X11 utilities that &lt;em&gt;&amp;ldquo;just worked&amp;rdquo;&lt;/em&gt; ️™️&lt;/p&gt;
&lt;h2 id="the-wayland-colour-picker-problem"&gt;The Wayland Colour Picker Problem&lt;/h2&gt;
&lt;p&gt;When I switched my daily driver to Hyprland back in August 2024, I was chuffed with the smooth animations, efficient tiling, and general polish.
But as with any big change, there were a few splinters in my workflow that needed sorting.&lt;/p&gt;
&lt;p&gt;One particular rough edge was the lack of a proper GUI colour picker.
On X11, I&amp;rsquo;d been spoiled by my mate &lt;a href="https://mastodon.social/@sil"&gt;Stuart Langridge&lt;/a&gt;&amp;rsquo;s excellent tool &lt;strong&gt;&lt;a href="https://www.kryogenix.org/code/pick/"&gt;Pick&lt;/a&gt;&lt;/strong&gt; - a proper colour picker that did exactly what it said on the tin.
But in Wayland? Well, I was left running &lt;a href="https://github.com/hyprwm/hyprpicker"&gt;&lt;code&gt;hyprpicker&lt;/code&gt;&lt;/a&gt; from the terminal like some kind of savage! 😅&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./hyprpicker.png" class="img-fluid" alt="hyprpicker in the terminal "/&gt;
&lt;br /&gt;
&lt;em&gt;hyprpicker in the terminal&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t get me wrong - &lt;code&gt;hyprpicker&lt;/code&gt; works brilliantly for what it is.
But after seeing how well my recent integrations of &lt;a href="https://github.com/e-tho/bzmenu"&gt;&lt;strong&gt;bzmenu&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://github.com/e-tho/iwmenu"&gt;&lt;strong&gt;iwmenu&lt;/strong&gt;&lt;/a&gt; worked with &lt;a href="https://codeberg.org/dnkl/fuzzel"&gt;Fuzzel&lt;/a&gt;, a lightbulb moment hit me: why not create a proper Fuzzel-based front-end for &lt;code&gt;hyprpicker&lt;/code&gt;? 💡&lt;/p&gt;
&lt;h2 id="birth-of-fuzzel-hyprpicker"&gt;Birth of fuzzel-hyprpicker&lt;/h2&gt;
&lt;p&gt;After my second coffee one morning (the optimal programming fuel ☕💪), I decided to tackle this problem head-on.
If I was going to spend hours staring at my &lt;a href="https://catppuccin.com/"&gt;Catppuccin Mocha&lt;/a&gt; themed desktop, I needed proper tools to maintain it! ‍🐈‍⬛🎨&lt;/p&gt;
&lt;p&gt;The goal was simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a Fuzzel-based UI for &lt;code&gt;hyprpicker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Maintain persistent colour history&lt;/li&gt;
&lt;li&gt;Make it keyboard-friendly&lt;/li&gt;
&lt;li&gt;Automatcially copy selected colours to clipboard&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The result is &lt;a href="https://github.com/wimpysworld/nix-config/blob/main/home-manager/_mixins/desktop/hyprland/fuzzel/fuzzel-hyprpicker.sh"&gt;&lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt;&lt;/a&gt; - a little script that brings together the power of &lt;code&gt;hyprpicker&lt;/code&gt; with the elegant UI of Fuzzel.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;img src="./fuzzel-hyprpicker.png" class="img-fluid" alt="fuzzel-hyprpicker colour selection menu "/&gt;
&lt;br /&gt;
&lt;em&gt;fuzzel-hyprpicker showing the colour selection menu&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="how-it-works"&gt;How It Works&lt;/h2&gt;
&lt;p&gt;The magic behind &lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt; is surprisingly straightforward.
Let me walk you through the key bits:&lt;/p&gt;
&lt;h3 id="setting-up-the-basics"&gt;Setting Up the Basics&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/usr/bin/env bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# A tool to pick colours from the screen using hyprpicker and fuzzel&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;set&lt;/span&gt; +u &lt;span class="c1"&gt;# Disable nounset&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;fuzzel-hyprpicker&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;NOTIFY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;notify-desktop --app-name=&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt; --icon=org.gnome.design.Palette&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Set up the storage directory and file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CONFIG_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.config&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HISTORY_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$CONFIG_DIR&lt;/span&gt;&lt;span class="s2"&gt;/colours.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ICONS_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$CONFIG_DIR&lt;/span&gt;&lt;span class="s2"&gt;/icons&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing fancy here - we&amp;rsquo;re just setting up our environment, defining where we&amp;rsquo;ll store our colour history, and setting up notifications.
Note that I properly follow the XDG spec here - it&amp;rsquo;s the little things! 😉&lt;/p&gt;
&lt;h3 id="the-clever-bit-svg-icons"&gt;The Clever Bit: SVG Icons&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s where things get interesting.
Fuzzel supports icons in its menus, but I needed a way to show colour swatches.
The solution? Dynamically generated SVG files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;function&lt;/span&gt; generate_svg_icon&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;colour&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;icon_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Create an SVG for the colour if it doesn&amp;#39;t exist&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; ! -f &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$icon_path&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; cat &amp;gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$icon_path&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;&amp;lt;svg width=&amp;#34;128&amp;#34; height=&amp;#34;128&amp;#34; xmlns=&amp;#34;http://www.w3.org/2000/svg&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; &amp;lt;rect width=&amp;#34;128&amp;#34; height=&amp;#34;128&amp;#34; fill=&amp;#34;#$colour&amp;#34; /&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;&amp;lt;/svg&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;m rather pleased with myself for this solution.
Each time you pick a colour, it generates a tiny SVG file that&amp;rsquo;s just a coloured square.
Fuzzel then displays this next to the hex code in the menu. Well done brain! 🧠&lt;/p&gt;
&lt;h3 id="menu-building"&gt;Menu Building&lt;/h3&gt;
&lt;p&gt;The menu itself is built dynamically, showing an eyedropper icon for picking a new colour followed by your colour history:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;function&lt;/span&gt; build_menu&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;#34;Pick a colour\0icon\x1f&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/eyedropper.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Add history items if they exist&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -s &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HISTORY_FILE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r colour&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# If the preview icon doesn&amp;#39;t exist, generate it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; ! -e &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; generate_svg_icon &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;# Display the colour with a preview&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;#34;#&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;\0icon\x1f&lt;/span&gt;&lt;span class="nv"&gt;$ICONS_DIR&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;$colour&lt;/span&gt;&lt;span class="s2"&gt;.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;done&lt;/span&gt; &amp;lt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HISTORY_FILE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This uses the &lt;a href="https://github.com/davatorium/rofi"&gt;&lt;code&gt;rofi&lt;/code&gt;&lt;/a&gt; &amp;ldquo;protocol&amp;rdquo; for menu items, something Fuzzel has built-in support for 💖
The &lt;code&gt;\0icon\x1f&lt;/code&gt; bit is how you tell Fuzzel &lt;em&gt;&amp;ldquo;hey, use this icon for this menu item&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id="putting-it-all-together"&gt;Putting It All Together&lt;/h3&gt;
&lt;p&gt;The full workflow goes like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;Alt&lt;/kbd&gt; + &lt;kbd&gt;K&lt;/kbd&gt; to open the picker&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;&amp;ldquo;Pick a colour&amp;rdquo;&lt;/strong&gt; or choose one from your history&lt;/li&gt;
&lt;li&gt;If picking a new colour, &lt;code&gt;hyprpicker&lt;/code&gt; does it&amp;rsquo;s thing and click anywhere on screen&lt;/li&gt;
&lt;li&gt;The colour gets automatically copied to your clipboard&lt;/li&gt;
&lt;li&gt;A notification appears showing the selected colour&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="text-center"&gt;
&lt;img src="./hyprpicker-select.png" class="img-fluid" alt="hyprpicker colour selection "/&gt;
&lt;br /&gt;
&lt;em&gt;hyprpicker colour selection&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="integrating-it-with-your-setup"&gt;Integrating It With Your Setup&lt;/h2&gt;
&lt;p&gt;Want to give this a try yourself?
Here&amp;rsquo;s how to adapt it to your wlroots-compatible desktop:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First, make sure you have the following installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hyprpicker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fuzzel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bugaevc/wl-clipboard"&gt;&lt;code&gt;wl-clipboard&lt;/code&gt;&lt;/a&gt; (for clipboard management)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nowrep/notify-desktop"&gt;&lt;code&gt;notify-desktop&lt;/code&gt;&lt;/a&gt; (for notifications)
&lt;ul&gt;
&lt;li&gt;Although I&amp;rsquo;m planning on switching to &lt;a href="https://codeberg.org/dnkl/fyi"&gt;&lt;code&gt;fyi&lt;/code&gt;&lt;/a&gt; soon&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Save the script somewhere in your path (I&amp;rsquo;ve got mine as part of &lt;a href="https://github.com/wimpysworld/nix-config"&gt;my Nix configuration&lt;/a&gt;) ️❄️&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make it executable:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chmod +x fuzzel-hyprpicker.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="4"&gt;
&lt;li&gt;Bind it to a keyboard shortcut in your Hyprland config:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;bind = CTRL ALT, K, exec, fuzzel-hyprpicker.sh
&lt;/code&gt;&lt;/pre&gt;&lt;ol start="5"&gt;
&lt;li&gt;Give it a whirl!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It should work with any wlroots-compatible compositor, not just Hyprland.&lt;/p&gt;
&lt;h2 id="possible-enhancements"&gt;Possible Enhancements&lt;/h2&gt;
&lt;p&gt;This is very much a v1 and there&amp;rsquo;s plenty of room for improvement:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add support for different colour formats (RGB, HSL, etc.)&lt;/li&gt;
&lt;li&gt;Implement colour name lookup&lt;/li&gt;
&lt;li&gt;Create a proper project rather than just a script wedged in my Nix configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But for a morning hack, it&amp;rsquo;s been surprisingly useful!
Reaching for &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;Alt&lt;/kbd&gt; + &lt;kbd&gt;K&lt;/kbd&gt; brings a smile to my face 😀&lt;/p&gt;
&lt;h2 id="the-joy-of-keyboard-driven-workflows"&gt;The Joy of Keyboard-Driven Workflows&lt;/h2&gt;
&lt;p&gt;What I love about tools like this is how they contribute to a cohesive, keyboard-driven workflow.
Between Hyprland&amp;rsquo;s tiling, Waybar&amp;rsquo;s status info, and Fuzzel-based menus for everything from launching apps to picking colours, my fingers rarely stray from the keyboard these days.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s something deeply satisfying about crafting your own tools to scratch your own itches.
It&amp;rsquo;s a long held Linux desktop tradition, isn&amp;rsquo;t it?
Taking what works, improving what doesn&amp;rsquo;t, and sharing the results with others.&lt;/p&gt;
&lt;p class="text-center"&gt;
&lt;a href="https://linuxmatters.sh" target="_blank"&gt;&lt;img src="./hyprland-desktop.png" class="img-fluid" alt="hyprland desktop with fuzzel-hyprpicker "/&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;em&gt;My hyprland desktop with fuzzel-hyprpicker in action&lt;/em&gt;
&lt;/p&gt;
&lt;h2 id="more-fuzzel-based-tools"&gt;More Fuzzel-Based Tools?&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve created several other Fuzzel menus that integrate with my Hyprland desktop.
I should probably post about those as well - emoji picker and screenshot and screen recording being among my most useful.
Let me know in the comments if you&amp;rsquo;d be interested in seeing those! 👇&lt;/p&gt;
&lt;p&gt;In the meantime, give &lt;code&gt;fuzzel-hyprpicker.sh&lt;/code&gt; a try and let me know what you think.
&lt;strong&gt;And if you improve upon it, &lt;em&gt;please do share your changes!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The full script is available in my Nix config repository: &lt;a href="https://github.com/wimpysworld/nix-config/blob/main/home-manager/_mixins/desktop/hyprland/fuzzel/fuzzel-hyprpicker.sh"&gt;fuzzel-hyprpicker.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Happy colour picking! 🎨🤏&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Have you created any custom tools for your Wayland desktop? Are there any X11 utilities you miss since switching? Let me know in the comments below!&lt;/em&gt;&lt;/p&gt;</description><summary>Creating a Proper Colour Picker for Hyprland with Fuzzel</summary></item><item><title>Arch Linux Angel</title><link>https://blog.wimpys.world/posts/arch-linux-angel/</link><pubDate>Tue, 15 May 2012 11:12:13 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/arch-linux-angel/</guid><description>&lt;p&gt;I&amp;rsquo;ve been working a shell script for Arch Linux that automatically configures
my preferred GNOME 3 setup on my netbook, laptops and workstations. The main
features are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quickly deploys Arch Linux to my specifications&lt;/li&gt;
&lt;li&gt;Supports i686 and x64_64.&lt;/li&gt;
&lt;li&gt;Detects ATI/AMD, Intel and Nvidia chipsets and configures the Open Source video drivers and enables early KMS.&lt;/li&gt;
&lt;li&gt;Hardware and location aware. Installation and configuration can be different for Home vs Work or Desktop vs Netbook.&lt;/li&gt;
&lt;li&gt;Detects and correctly configures some device specific hardware, such as touch screens and wireless drivers.&lt;/li&gt;
&lt;li&gt;Automatically configures DAEMONS array.&lt;/li&gt;
&lt;li&gt;Includes custom power management hooks for pm-utils.&lt;/li&gt;
&lt;li&gt;Designed to safely run multiple times so that it can be used as a tool for keeping all systems consistent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;ve dubbed this script Arch Angel. I&amp;rsquo;m undecided if I&amp;rsquo;ll release it publicly
since it is very much my personal preferences and to some extent my colleagues
at work. I suppose the real reason for this post is that I&amp;rsquo;ve been wanting to
take &lt;a href="http://shelr.tv/"&gt;Shelr&lt;/a&gt; for a test drive, so click the Play button
below to see an example run of Arch Angel.&lt;/p&gt;
&lt;!--
&lt;iframe border='0' height='684'
id='shelr_record_4fb2223c96608047be00010e' scrolling='no'
src='http://shelr.tv/records/4fb2223c96608047be00010e/embed' style='border: 0'
width='634' /&gt;
--&gt;</description><summary>Automated scripted installs of Arch Linux</summary></item><item><title>Install Sun Java 6 JRE and JDK from .deb packages</title><link>https://blog.wimpys.world/posts/install-sun-java-6-jre-and-jdk-from-deb-packages/</link><pubDate>Mon, 16 Jan 2012 13:20:05 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/install-sun-java-6-jre-and-jdk-from-deb-packages/</guid><description>&lt;p&gt;&lt;a href="https://canonical.com"&gt;Canonical&lt;/a&gt; disabled my Java PPA at the end of last week.
So I&amp;rsquo;ve developed another solution for installing Java on Ubuntu which doesn&amp;rsquo;t
infringe any copyrights, licenses, terms of use or CoC&amp;rsquo;s. However, by running
this script to download Java you acknowledge that you have read and accepted the
terms of the Oracle end user license agreement.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/terms/license/"&gt;http://www.oracle.com/technetwork/java/javase/terms/license/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My script is an automated wrapper for &lt;a href="https://github.com/rraptorr/sun-java6"&gt;Janusz Dziemidowicz Debian packaging
scripts for Java 6&lt;/a&gt;. My new script
simply downloads the Java binary installers from Oracle, builds the .deb
packages locally on your computer and creates a local &amp;lsquo;apt&amp;rsquo; repository for
them. Once my script has been executed you can then &amp;lsquo;apt-get&amp;rsquo; install/upgrade
Java 6 from your local repository. Packages are compatible with &amp;ldquo;official&amp;rdquo;
Ubuntu ones and pre-existing Java 6 packages will upgrade cleanly. You can
find the script and full usage instructions on github.&lt;/p&gt;
&lt;div class="text-center"&gt;
&lt;iframe src="http://ghbtns.com/github-btn.html?user=flexiondotorg&amp;repo=oab-java6&amp;type=watch&amp;count=true&amp;size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="260px" height="30px"&gt;&lt;/iframe&gt;
&lt;iframe src="http://ghbtns.com/github-btn.html?user=flexiondotorg&amp;repo=oab-java6&amp;type=fork&amp;count=true&amp;size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="260px" height="30px"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Please read the &lt;a href="https://github.com/flexiondotorg/oab-java6/blob/master/README.rst"&gt;README&lt;/a&gt;
file for a more detailed explanation of how the script works and how to use it.
If anyone has any problems, then please submit a ticket on my
&lt;a href="https://github.com/flexiondotorg/oab-java6/issues"&gt;Issue Tracker&lt;/a&gt;.&lt;/p&gt;</description><summary>An alternative approach to install Sun Java 6 on Ubuntu</summary></item><item><title>Bash script to retrieve Ubuntu codenames and versions</title><link>https://blog.wimpys.world/posts/bash-script-to-retrieve-ubuntu-codenames-and-versions/</link><pubDate>Wed, 16 Mar 2011 13:44:54 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/bash-script-to-retrieve-ubuntu-codenames-and-versions/</guid><description>&lt;p&gt;I&amp;rsquo;m working a script to automatically backport &lt;a href="http://www.debian.org"&gt;Debian&lt;/a&gt;
packages to Ubuntu. I needed a way to get a list of currently supported/active
Ubuntu releases by codename or version. Here is how I do it.&lt;/p&gt;
&lt;h2 id="get-a-list-of-ubuntu-codenames"&gt;Get a list of Ubuntu codenames&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget -q http://cdimage.ubuntu.com/releases/ -O - &lt;span class="p"&gt;|&lt;/span&gt; sed -e :a -e &lt;span class="s1"&gt;&amp;#39;s/&amp;lt;[^&amp;gt;]*&amp;gt;//g;/&amp;lt;/N;//ba&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; grep &lt;span class="s1"&gt;&amp;#39;^[[:space:]][a-z]&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;&amp;#39;s/\///g&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="get-a-list-of-ubuntu-versions"&gt;Get a list of Ubuntu versions&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget -q http://cdimage.ubuntu.com/releases/ -O - &lt;span class="p"&gt;|&lt;/span&gt; sed -e :a -e &lt;span class="s1"&gt;&amp;#39;s/&amp;lt;[^&amp;gt;]*&amp;gt;//g;/&amp;lt;/N;//ba&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; grep &lt;span class="s1"&gt;&amp;#39;^[[:space:]][1-9]&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;&amp;#39;s/\///g&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><summary>Get a list of Ubuntu codename and version with wget</summary></item><item><title>DVD to MPEG2-TS Ripper for Linux</title><link>https://blog.wimpys.world/posts/dvd-to-mpeg2-ts-ripper-for-linux/</link><pubDate>Fri, 04 Dec 2009 07:53:58 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/dvd-to-mpeg2-ts-ripper-for-linux/</guid><description>&lt;p&gt;A while back I released a script that rips a DVD to MPEG-2 PS allowing the
user to select one audio stream and one subtitle stream. Optionally the video
can be requantised, using M2VRequantiser and an ISO image created. If creating
an ISO image the chapters are also preserved from the original DVD. You can
see the original post below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="2009-04-dvd-mpeg2ps-ripper-linux.html"&gt;DVD to MPEG-2 PS Ripper for Linux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;ve just released an update to that original script which fixes subtitles in
the original MPEG-2 PS mode but now adds the capability to rip MPEG-2 TS. The
video stream can still be shrunk and in MPEG-2 PS mode the video is still
requantised but in MPEG-2 TS mode the video is re-encoded as H.264.&lt;/p&gt;
&lt;p&gt;Requantising is faster but can introduce artifacting. H.264 encoding is
slower, but produces very good quality. I am currently re-importing my entire
DVD collection, using this script, to my DLNA server using MPEG-2 TS and
re-encoding the video to H.264. This gives me high quality rips at relatively
small size (~3Gb) whilst preserving Dolby Digital 5.1 audio. Perfect for
playback via DLNA on the PS3. Some things to be aware of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Subtitles are only supported in MPEG-2 PS mode.&lt;/li&gt;
&lt;li&gt;MPEG-2 PS files created by this script are DVD compliant.&lt;/li&gt;
&lt;li&gt;ISO files created by this script will preserve the chapters from the original DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can only play DTS audio in MPEG-2 PS streams when they have been authored to DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can only play subtitles in MPEG-2 PS streams when they have been authored to DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can&amp;rsquo;t play DTS audio in MPEG-2 TS streams therefore this script will transcode DTS to AC3 when in MPEG-2 TS mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To download the script and find out how to make full use of it visit the
release page below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/DVD-to-MPG"&gt;DVD-to-MPG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Ripping DVDs to MPEG-2 Transport Streams for DLNA streaming</summary></item><item><title>MKV to MPEG-4 conversion script</title><link>https://blog.wimpys.world/posts/mkv-to-mpeg-4-conversion-script/</link><pubDate>Thu, 27 Aug 2009 20:48:58 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/mkv-to-mpeg-4-conversion-script/</guid><description>&lt;p&gt;The PlayStation 3 can&amp;rsquo;t play MKV files. Therefore I&amp;rsquo;ve written a script that
creates a PlayStation 3 or Xbox 360 compatible MPEG-4 from Matroska providing
the video is H.264 and audio is AC3 or DTS.&lt;/p&gt;
&lt;p&gt;Xbox 360 compatibility requires that audio is forcibly downmixed to stereo
with &lt;code&gt;--stereo&lt;/code&gt;. AAC 5.1 audio will have the correct channel assignments when
transcoding from AC3 5.1 and DTS 5.1. If &lt;code&gt;neroAacEnc&lt;/code&gt; is installed then it is
used in preference to &lt;code&gt;faac&lt;/code&gt; for encoding the AAC audio, as it produces better
quality output. &lt;code&gt;neroAacEnc&lt;/code&gt; is optional.&lt;/p&gt;
&lt;p&gt;The script does as little re-encoding as possible, only the audio and
subtitles are re-encoded or converted. The script can detect profile 5.1 H.264
and patch it to 4.1 in under a second. Any subtitles in the Matroska are
preserved. If &lt;code&gt;mp4creator&lt;/code&gt; is used the subtitles are extracted stored in a
seperate file. If &lt;code&gt;MP4Box&lt;/code&gt; is used (default) the subtitles are converted to
GPAC Timed Text and muxed into the resulting MPEG-4. The PlayStation 3 can&amp;rsquo;t
display these subtitles but some software players can.&lt;/p&gt;
&lt;p&gt;The script can optionally split the Matroska if it is greater than 4GB to ensure
PlayStation 3, Xbox 360 and FAT32 compatibility. This script works on Ubuntu and
should work on any other Linux/Unix flavour and possibly Mac OS X providing you
have the required tools installed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MKV-to-MP4"&gt;MKV-to-MP4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Creating PlayStation 3 and Xbox 360 compatible MPEG-4 videos</summary></item><item><title>MP3Gainer - Apply ReplayGain to your entire music library</title><link>https://blog.wimpys.world/posts/mp3gainer-apply-replaygain-to-your-entire-music-library/</link><pubDate>Fri, 14 Aug 2009 15:25:45 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/mp3gainer-apply-replaygain-to-your-entire-music-library/</guid><description>&lt;p&gt;Work has been crazy. We&amp;rsquo;re moving house. Hence, not much time for geeky stuff
recently. I&amp;rsquo;ve been putting this off for ages, I need to &amp;ldquo;normalise&amp;rdquo; the
volume of my MP3 music music library. Not all CDs sound equally loud. Whilst
different musical moods require that some tracks should sound louder than
others, the loudness of a given CD has more to do with the year of issue or
the whim of the producer than the intended emotional effect. This difference
carries over when you rip the CD to MP3 and random play through my music
collection requires constant manual volume adjustment. This has been bugging
me for a while now, but when it started to bug my wife I knew it was time to
find a solution. My main concerns with applying some sort of audio
normalisation were&amp;hellip;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My MP3s should not be irretrievably changed into something I end up hating.&lt;/li&gt;
&lt;li&gt;The method used should be free of the application used for music playback,
given that I play my music on iPod Nano, iPod Shuffle, PSP, PS3, Linux desktops,
TomTom 720T FM streaming and in car MP3 player.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After some research &lt;a href="http://mp3gain.sourceforge.net"&gt;mp3gain&lt;/a&gt; seems to be the
tool for the job which provides an implementation of
&lt;a href="http://www.replaygain.org/"&gt;ReplayGain&lt;/a&gt;. However, as of today my entire CD
collection is ripped, which is very large, so I needed a way to process my
whole music collection in an automated fashion. I found some examples of how
to script this, but there are caveats with the solutions I found. Therefore I
have created my own script, MP3Gainer, to apply ReplayGain using &lt;code&gt;mp3gain&lt;/code&gt;
which overcomes these common limitations. MP3Gainer recursively applies
ReplayGain to a MP3 music collection of any size and directory depth.
ReplayGain can be applied in &amp;rsquo;track&amp;rsquo; or &amp;lsquo;album&amp;rsquo; mode and if ReplayGain has
previously been applied it can also be undone. It is important to understand
that MP3Gainer &amp;lsquo;album&amp;rsquo; mode really is per album, which is what you want. Trust
me! This script works on Ubuntu, should work on any other Linux/Unix
flavour and possibly Mac OS X providing you have the required tools installed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MP3Gainer"&gt;MP3Gainer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Volume normalise an entire MP3 library the right way</summary></item><item><title>PlayStation 3 compatible MPEG-4 container repacker</title><link>https://blog.wimpys.world/posts/playstation-3-compatible-mpeg-4-container-repacker/</link><pubDate>Thu, 23 Apr 2009 17:09:11 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/playstation-3-compatible-mpeg-4-container-repacker/</guid><description>&lt;p&gt;Some of my mobile phones have been able to record video clips in MPEG-4
format. Sadly some of these clips don&amp;rsquo;t play on the PlayStation 3 and those
that do stutter terribly. I use &lt;a href="http://po-ru.com/projects/iplayer-downloader/"&gt;iplayer-dl&lt;/a&gt;
to download content from BBC iPlayer. Sadly the files are in a Quicktime
container and are not playable on the PlayStation 3.&lt;/p&gt;
&lt;p&gt;In order to address both these issues I created a script which extracts the
audio and video from an existing MPEG-4 or ISO Media Apple QuickTime container
and repacks them in a new MPEG-4 container with optional splitting of the
resulting MPEG-4 to maintain FAT32 compatibility. The new MPEG-4 files play
just fine on my PlayStation 3. This script works on Ubuntu, should work on any
other Linux/Unix flavour and possibly Mac OS X providing you have the required
tools installed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MP4-Packer"&gt;MP4-Repacker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Automatically repack MPEG-4 video files for PlayStation 3 compatibility</summary></item><item><title>MKV to M2TS conversion script</title><link>https://blog.wimpys.world/posts/mkv-to-m2ts-conversion-script/</link><pubDate>Thu, 23 Apr 2009 17:00:58 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/mkv-to-m2ts-conversion-script/</guid><description>&lt;p&gt;The PlayStation 3 can&amp;rsquo;t play MKV files. Therefore I&amp;rsquo;ve written a
script that creates a PlayStation 3 compatible M2TS from a MKV,
assuming video is H.264 and audio is AC3 or DTS with as little
re-encoding as possible. Any subtitles in the MKV are preserved
in the M2TS although the PlayStation 3 can&amp;rsquo;t display subtitles in M2TS
containers. Optionally splits the M2TS, if it is greater than 4GB,
to maintain FAT32 compatibility. Unlike other MKV to M2TS solutions,
this script doesn&amp;rsquo;t create any intermediate files during the conversion.&lt;/p&gt;
&lt;p&gt;The PlayStation 3 can&amp;rsquo;t play DTS audio streams in M2TS containers, therefore
DTS audio is transcoded to AC3.&lt;/p&gt;
&lt;p&gt;This script works on Ubuntu, should work on any other Linux/Unix flavour and
possibly Mac OS X providing you have the required tools installed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MKV-to-M2TS"&gt;MKV-to-M2TS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Convert Matroska file to MPEG2-TS for PlayStation 3 compatibility</summary></item><item><title>DVD to MPEG2-PS Ripper for Linux</title><link>https://blog.wimpys.world/posts/dvd-to-mpeg2-ps-ripper-for-linux/</link><pubDate>Thu, 23 Apr 2009 16:50:31 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/dvd-to-mpeg2-ps-ripper-for-linux/</guid><description>&lt;p&gt;Every so often I find myself in looking through the ex-rental DVD &lt;em&gt;&amp;ldquo;bargain
bin&amp;rdquo;&lt;/em&gt;. Quite often I find something I consider a bargain. However, the
experience of watching an ex-rental DVD is typically ruined by the various
trailers and marketing guff at the start which you can&amp;rsquo;t skip. My wife hates
that stuff, and I love my wife, so I routinely rip the main feature of newly
acquired ex-rental DVD movies so we can avoid that crap.&lt;/p&gt;
&lt;p&gt;I run a Mediatomb DLNA server and I want to load it with all my DVDs. Ripping
them helps reduce the amount of storage I require. MPEG2-PS files are
compatible with my PlayStation 3 which is the client to my Mediatomb DLNA server.
As a solution to the above I created a script, which can extract the main feature
from a DVD video, allowing the user to select one audio stream and one subtitle
stream. Optionally the video can be requantised, using M2VRequantiser, and an ISO
image created. If creating an ISO image the chapters are also preserved from
the original DVD. I&amp;rsquo;ve lobbed my code into GitHub.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/DVD-to-MPG"&gt;DVD-to-MPG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Ripping DVDs to MPEG2-PS for streaming via UPnP</summary></item><item><title>Converting Matroska to M2TS for PS3 and Mediatomb</title><link>https://blog.wimpys.world/posts/converting-matroska-to-m2ts-for-ps3-and-mediatomb/</link><pubDate>Wed, 15 Apr 2009 16:19:24 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/converting-matroska-to-m2ts-for-ps3-and-mediatomb/</guid><description>&lt;p&gt;It has been a while since I last posted, mainly due to not having Internet
access at home for a month. Anyway, I&amp;rsquo;m online again and I have been tinkering
with various projects the most recent of which is Matroska conversion (again).&lt;/p&gt;
&lt;h2 id="matroska-to-mp4"&gt;Matroska to MP4&lt;/h2&gt;
&lt;p&gt;For sometime I have been converting Martoska files to MPEG-4 with AAC 5.1 audio
so I can stream them via Mediatomb to my PlayStation 3. The conversion process
works well although there is some overhead in transcoding the audio and the
AAC 5.1 audio is not as good quality as the original AC3 or DTS.&lt;/p&gt;
&lt;p&gt;If you are interested I&amp;rsquo;ve put my code in GitHub, the script automates the
whole process.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MKV-to-MP4"&gt;MPV-to-MP4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="matroska-to-m2ts"&gt;Matroska to M2TS&lt;/h2&gt;
&lt;p&gt;A little while back I read it was possible to convert those same Matroska file
to M2TS files which, so long as the audio is AC3, so takes much less time to
convert. As the PlayStation 3 can&amp;rsquo;t play DTS audio streams inside a M2TS container
there is still a requirement to transcode DTS to AC3. That said the conversion to
M2TS requires less file I/O than converting to MPEG-4 and is therefore it is
generally a quicker conversion method, typically just 2 or 3 minutes on my
workstation at home.&lt;/p&gt;
&lt;p&gt;Plus the audio quality of the AC3 or transcoded DTS is better than that of
transcoded AAC 5.1. I&amp;rsquo;ve created my own script to fully automate the conversion
process. The script has been tested on Ubuntu 8.10 64-bit but there is an
outside chance it will work on Mac OS X if you can get the required tools
installed. Again, you can find my script on GitHub.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/MKV-to-M2TS"&gt;MPV-to-M2TS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Fast conversion of Matroska video to MPEG2-TS</summary></item></channel></rss>