<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Blog • Rosen Kanev</title><description>Rosen Kanev&apos;s digital home</description><link>https://rkunev.com</link><item><title>The Elbetitsa</title><link>https://rkunev.com/posts/elbetitsa</link><guid isPermaLink="true">https://rkunev.com/posts/elbetitsa</guid><description>Drawing inspiration for my website&apos;s logo from a cheese box.</description><pubDate>Tue, 03 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Coming up with the website logo wasn’t very easy. Putting my face there felt cringy and having just my initials was a safe fallback in case I didn’t come up with anything better. I used to be the type of person who would lose sleep over such things and would halt all progress on the website until I got it right. It sounds like a big deal at first: something that needs to be very well thought out, original, significant, personal, linked to my identity, timeless. This time I went with the flow. It’s just a dumb picture that nobody will spend even a fraction of the energy I spent thinking about it. The internet was &lt;a href=&quot;https://en.wikipedia.org/wiki/Dead_Internet_theory&quot;&gt;proclaimed dead&lt;/a&gt; a while ago and practically nobody&lt;sup&gt;&lt;a href=&quot;https://rkunev.com/posts/elbetitsa#user-content-fn-1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; reads anything. On the off chance that a real person is actually on my website, the logo is most likely a filler that people don’t care about as long as it’s not completely missing.&lt;/p&gt;
&lt;p&gt;I was preparing lunch, the same kind of salad that I have had for the past 8 years. By now I don’t think about the process, which gives me some quiet 15 minutes where I let my mind wander. I just think about… nothing and everything at the same time. That’s when the bright red label on the plastic cheese box caught my eye:&lt;/p&gt;
&lt;a href=&quot;https://rkunev.com/_astro/cheesebox.XXlEkEzs.jpeg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://rkunev.com/_astro/cheesebox.XXlEkEzs_t9fn.jpg&quot; alt=&quot;Plastic cheese box with a repeating pattern of white-outlined squares forming flowers, with dark squares forming arrows between them, placed on a bright red background, printed on the front label.&quot; width=&quot;1344&quot; height=&quot;896&quot; /&gt;&lt;/a&gt;
&lt;p&gt;This is a pattern from Bulgaria, where I’m from. People have been using it for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;garment and tablecloth embroidery&lt;/li&gt;
&lt;li&gt;trinket box lid decoration&lt;/li&gt;
&lt;li&gt;front door or gateway decoration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s not only a Bulgarian thing though. You’ll find similar motifs and patterns in Croatia, Estonia, Mongolia, Tibet, and many more. It’s like a tattoo but for your clothes or your home. So I decided that my website is getting a tattoo!&lt;/p&gt;
&lt;p&gt;The neurons and synapses that lit up in my brain quickly progressed through:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Symbolic patterns&lt;/em&gt; → &lt;em&gt;handcrafted&lt;/em&gt; → &lt;em&gt;pixel art!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The Shevitsa being an embroidery lends itself well to pixel art. It’s one of the OG forms of pixel art made of threads 🧵.&lt;/p&gt;
&lt;p&gt;I did some light research on which shapes and colors were predominantly used in my area and their symbolic meaning and picked the ones that vibed well. The first version looked like this:&lt;/p&gt;
&lt;div&gt;&lt;div&gt;&lt;img src=&quot;https://rkunev.com/_astro/v1.Rh9dqyrK.svg&quot; width=&quot;160&quot; alt=&quot;First version of the Elbetitsa logo: a red, green and black pixel-art double star, surrounded by white and black pixels along the edges.&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The symbol is called Elbetitsa or simply a double-star shape and it’s one of the symbols associated with the cult of the sun. It stands for harmony and amity and its name roughly means The eight directions of the world. Black and green are for Mother earth and stand for solidity, security, and eternal life. Red symbolizes blood and new life, and as I’m told it would protect my blog from bad magic and being cursed. As a secondary precaution, I’ve turned on SSL in case the symbols don’t…&lt;/p&gt;
&lt;p&gt;Fast-forward a couple of weeks to when Googlebot finally crawled the homepage, I checked out how my website is displayed in Google Search and much to my dismay the extra padding that I included in the canvas wasn’t enough and the pixels near the four edges were right on the masked image border. This is what you get when you design a square logo for a round mask. So I made some tweaks and as of Oct 29, 2026, it looks like this:&lt;/p&gt;
&lt;div&gt;&lt;div&gt;&lt;img src=&quot;https://rkunev.com/_astro/icon-min.BRgETTBH.svg&quot; width=&quot;160&quot; alt=&quot;Second version of the Elbetitsa logo: the same pixel-art double star, with the white edge pixels removed.&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;First, I removed the white pixels around the edges and in the center, less is more! If you happen to visit this post from social media or a chat app, chances are you also saw the OpenGraph image, which puts the logo on a nice soft-looking fabric background generated with a &lt;a href=&quot;https://shaders.paper.design/&quot;&gt;Paper shader&lt;/a&gt;:&lt;/p&gt;
&lt;a href=&quot;https://rkunev.com/_astro/og-oct-2026.CCDGwglr.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://rkunev.com/_astro/og-oct-2026.CCDGwglr_2h1dXb.jpg&quot; alt=&quot;The Elbetitsa logo centered on a light gray, fabric-textured background, as shown in link previews.&quot; width=&quot;1200&quot; height=&quot;630&quot; /&gt;&lt;/a&gt;
&lt;p&gt;After that, I made a favicon with just the center piece which renders better in a 32x32 box.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/elbetitsa#mission-successful&quot;&gt;Mission successful?&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It took me a few days of actual work which includes coming up with the idea, drawing it on an SVG canvas, further refinements, and finally shipping it. A website logo is a fertile ground for procrastination and obsession, eating up precious free time I ought to spend on the real goal: writing. I’d score this 4/5. It would have been 5/5 if I had spent 15 minutes with a pen and paper before hand-coding the &lt;code&gt;&amp;lt;rect&amp;gt;&lt;/code&gt; elements and only then discovering that the symmetry is off.&lt;/p&gt;
&lt;p&gt;On the earlier list of features I reckon the logo isn’t very original, because these patterns are slapped on practically half of the produce I see on the shelf in my local grocery store. Nor is it significant or linked to my identity… Well kind of - the more I look at it and the more I talk about it the more it starts to feel just right and “mine”. You could say it’s growing on me. Will it be my forever logo? Hard to tell right now, but it’s here to stay for the foreseeable future.&lt;/p&gt;
&lt;hr /&gt;
&lt;section&gt;&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/elbetitsa#footnote-label&quot;&gt;Footnotes&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Except you! Thank you, kind reader! &lt;a href=&quot;https://rkunev.com/posts/elbetitsa#user-content-fnref-1&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item><item><title>Using AppleScript in 2026</title><link>https://rkunev.com/posts/using-apple-script-in-2026</link><guid isPermaLink="true">https://rkunev.com/posts/using-apple-script-in-2026</guid><description>It&apos;s clunky and ancient, but still great glue. Here&apos;s how I used it to catch visual regressions in my Zed theme.</description><pubDate>Thu, 08 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Yes, a relic from the past frozen in time. There are better scripting languages out there, but this one
ships with macOS and can tell other apps what to do. With its clunky syntax and awkward editor it’s hard
to make a case for it, but I found it very handy for automated visual regression testing.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#sweating-the-details-is-only-fun-once&quot;&gt;Sweating the details is only fun once&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Back in early 2024 I finally switched to &lt;a href=&quot;https://zed.dev/&quot;&gt;Zed&lt;/a&gt; as my main editor and the one thing I missed from Sublime Text
was the theme, Oceanic Next. A Zed theme is, a bit oversimplified, a JSON file full of tokens. So I
&lt;a href=&quot;https://github.com/rkunev/oceanic-next&quot;&gt;ported it myself&lt;/a&gt;, cross-referencing the first party themes until it worked.&lt;/p&gt;
&lt;a href=&quot;https://rkunev.com/_astro/oceanic-next.C3t7J_qE.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://rkunev.com/_astro/oceanic-next.C3t7J_qE_1nsUu9.png&quot; alt=&quot;Zed in the Oceanic Next dark theme.&quot; width=&quot;1344&quot; height=&quot;806&quot; /&gt;&lt;/a&gt;
&lt;p&gt;While I was neck deep in tokens I could tell you which key-value pair affected which part of
the editor. For instance, the &lt;code&gt;border&lt;/code&gt; token is used for the lines between panels, but also for the square
outline of a checkbox. Oceanic Next is minimalistic and uses borders sparingly, so I tried making them
transparent. Only later, while testing by hand, did I notice that unchecked checkboxes had become
completely invisible. No bueno.&lt;/p&gt;
&lt;p&gt;Making the theme was a very rewarding process of sweating the little details. Lightly updating it a
year later was less so! Zed moves fast, and I underestimated how much contextual knowledge would be lost,
even with the 7 screenshots in the &lt;code&gt;README&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;This year I added a light variant and polished some rough edges in the dark one. This time I also wanted
to catch visual regressions without relying on my memory of how everything should look. The idea is to take
a screenshot as a baseline whenever I publish the theme, then compare it with a new one after every change.&lt;/p&gt;
&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#applescript-take-the-wheel&quot;&gt;AppleScript, take the wheel&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Manually taking app screenshots is tedious. You need to carefully open the app at the exact same
window size, with the exact same panels, in the exact same project. Sometimes you even have to move the
cursor to exact XY coords and wait for a popover to appear. Multiply that by every screen and state
worth keeping as baseline evidence. So how do you automate that?&lt;/p&gt;
&lt;p&gt;AppleScript has shipped with macOS since the early ’90s, making it literally older than the name “macOS”
itself. It’s Apple’s attempt at a script language that reads like English. You run it from the terminal
with &lt;code&gt;osascript&lt;/code&gt;, so there’s nothing to install. What sets it apart from a shell script is that it can
talk to other apps and the OS itself: bring a window forward, click a menu item by name, then hand
off to the shell with &lt;code&gt;do shell script&lt;/code&gt;. Its &lt;a href=&quot;https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP40000983-CH208-SW1&quot;&gt;documentation&lt;/a&gt;
is short enough to read start to finish in a day.&lt;/p&gt;
&lt;p&gt;And it looks like I’m not the only one still reaching for it. Ghostty, a modern terminal, added &lt;a href=&quot;https://ghostty.org/docs/features/applescript&quot;&gt;AppleScript support&lt;/a&gt;
in v1.3 which feels pretty validating.&lt;/p&gt;
&lt;p&gt;AppleScript was really a hidden gem and saved me a huge chunk of third party dependencies. The other pieces:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;screencapture&lt;/code&gt; for taking the screenshots themselves (macOS built-in)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://imagemagick.org/&quot;&gt;ImageMagick&lt;/a&gt; for computing the image diff&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/BlueM/cliclick&quot;&gt;cliclick&lt;/a&gt; for moving the cursor around&lt;sup&gt;&lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#user-content-fn-1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For each screen, the process looks roughly like this:&lt;/p&gt;
&lt;figure&gt;&lt;figcaption&gt;visual-regression.applescript&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;tell&lt;/span&gt;&lt;span&gt; application&lt;/span&gt;&lt;span&gt; process &lt;/span&gt;&lt;span&gt;&quot;Zed&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    set&lt;/span&gt;&lt;span&gt; frontmost &lt;/span&gt;&lt;span&gt;to&lt;/span&gt;&lt;span&gt; true&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    -- move the mouse cursor away from the screencapture area&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    tell&lt;/span&gt;&lt;span&gt; me&lt;/span&gt;&lt;span&gt; to&lt;/span&gt;&lt;span&gt; do shell script&lt;/span&gt;&lt;span&gt; &quot;cliclick m:75,75&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    -- wait for macOS animations to complete&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    delay&lt;/span&gt;&lt;span&gt; 0.2&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    click menu &lt;/span&gt;&lt;span&gt;item&lt;/span&gt;&lt;span&gt; &quot;Project Panel&quot;&lt;/span&gt;&lt;span&gt; of&lt;/span&gt;&lt;span&gt; menu &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; of&lt;/span&gt;&lt;span&gt; menu bar &lt;/span&gt;&lt;span&gt;item&lt;/span&gt;&lt;span&gt; &quot;View&quot;&lt;/span&gt;&lt;span&gt; of&lt;/span&gt;&lt;span&gt; menu bar &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    tell&lt;/span&gt;&lt;span&gt; me&lt;/span&gt;&lt;span&gt; to&lt;/span&gt;&lt;span&gt; do shell script&lt;/span&gt;&lt;span&gt; &quot;screencapture -x -R683,301,1577,939 ./target/01-empty-project.png&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;    tell&lt;/span&gt;&lt;span&gt; me&lt;/span&gt;&lt;span&gt; to&lt;/span&gt;&lt;span&gt; do shell script&lt;/span&gt;&lt;span&gt; &quot;magick compare &quot;&lt;/span&gt;&lt;span&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;./baseline/01-empty-project.png &quot;&lt;/span&gt;&lt;span&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;./target/01-empty-project.png &quot;&lt;/span&gt;&lt;span&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;-compose Src ./diff/01-empty-project.png &quot;&lt;/span&gt;&lt;span&gt; &amp;amp;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;        &quot;2&amp;gt;&amp;amp;1 || true&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;end tell&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/rkunev/oceanic-next/blob/b4b74218c5fb7152ddaa29943e6b4084addc4eb8/scripts/visual-regression.applescript&quot;&gt;full script&lt;/a&gt;
is about 100 lines of AppleScript doing crude automated visual regression testing. Zed draws its UI on
the GPU instead of using native widgets, but I’m not querying inside the window! It turns out that the
menu bar is a convinient portal to the apps internals. Is it brittle and a bit finicky? A little, but
so are all end-to-end tests.&lt;/p&gt;
&lt;p&gt;When I run the script ImageMagick reports the comparison stats, which I treat as a probabilistic boolean
indicator. Any number at or near 0 means the difference is negligible and I can consider
the new screenshot equal to the baseline. Higher than that - needs my attention.&lt;/p&gt;
&lt;p&gt;To demonstrate, I swapped the token &lt;code&gt;ghost_element.hover&lt;/code&gt; from &lt;span&gt;&lt;/span&gt;
&lt;code&gt;#1b3a40&lt;/code&gt; to &lt;span&gt;&lt;/span&gt; &lt;code&gt;#4b6f7b&lt;/code&gt;. Both are colors I use elsewhere in the
theme so nothing looks obviously broken, but the command palette’s hover background no longer matches
the one in the sidebar file tree.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;11-command-palette-hover.png&lt;/code&gt; immediately stands out when I run the visual regression script:&lt;/p&gt;
&lt;figure&gt;&lt;figcaption&gt;Terminal&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;span&gt;&lt;span&gt;$&lt;/span&gt;&lt;span&gt; osascript&lt;/span&gt;&lt;span&gt; scripts/visual-regression.applescript&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;span&gt; column&lt;/span&gt;&lt;span&gt; -t&lt;/span&gt;&lt;span&gt; -s&lt;/span&gt;&lt;span&gt; &quot;,&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;name&lt;/span&gt;&lt;span&gt;                                  diff&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;01-empty-project.png&lt;/span&gt;&lt;span&gt;                  0&lt;/span&gt;&lt;span&gt; (0)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;02-file-jsx.png&lt;/span&gt;&lt;span&gt;                       1.04321&lt;/span&gt;&lt;span&gt; (1.59184e-05)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;03-with-typescript-popover-error.png&lt;/span&gt;&lt;span&gt;  0.288008&lt;/span&gt;&lt;span&gt; (4.39473e-06)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;[...]&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span&gt;11-command-palette-hover.png&lt;/span&gt;&lt;span&gt;          1543.06&lt;/span&gt;&lt;span&gt; (0.0235456)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;And here’s the output of ImageMagick’s &lt;code&gt;compare&lt;/code&gt; command:&lt;/p&gt;
&lt;a href=&quot;https://rkunev.com/_astro/cmd-palette-diff-crop.Dgw4mY1A.png&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://rkunev.com/_astro/cmd-palette-diff-crop.Dgw4mY1A_214Rv5.png&quot; alt=&quot;ImageMagick diff of the command palette, with only the hovered row painted red where it differs from the baseline.&quot; width=&quot;1344&quot; height=&quot;293&quot; /&gt;&lt;/a&gt;
&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#good-enough&quot;&gt;Good enough&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Nothing here is clever. The shell does the heavy lifting: &lt;code&gt;screencapture&lt;/code&gt; takes the pictures and
ImageMagick compares them. AppleScript is the product photography assistant that ensures the same
angle and lighting for every shot.&lt;/p&gt;
&lt;p&gt;Granted, this plan doesn’t help when Zed changes its UI. The diff will light up and I still
have to judge whether it matters. It also can’t cover every panel and state, which is a tradeoff between
coverage and practicality I’m willing to make.&lt;/p&gt;
&lt;p&gt;I fully expect this setup to break in creative ways a year from now and it’s macOS only. Everything
feels like a dirty hack and that’s exactly why I love it! In my day job, this would never see the
light of day, but this is an open-source side project that I’m running solo. I don’t need the perfect
setup for this. I just need it to work well enough and to have some fun, otherwise what’s the point?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;P.S.&lt;/em&gt; Apple, I’m begging you. If you really intend to make Shortcuts a successor and a full
replacement of AppleScript and Automator, would you consider getting it to at least 80% feature parity?
I get that AppleScript is a security nightmare, but I’m sure you can come up with an adequate replacement
for it. Thanks!&lt;/p&gt;
&lt;hr /&gt;
&lt;section&gt;&lt;h2&gt;&lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#footnote-label&quot;&gt;Footnotes&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I experimented with &lt;code&gt;CGWarpMouseCursorPosition&lt;/code&gt; and while I did manage to move the cursor I just couldn’t get it to click on the target coords. &lt;a href=&quot;https://rkunev.com/posts/using-apple-script-in-2026#user-content-fnref-1&quot;&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded></item></channel></rss>