{"id":467,"date":"2020-01-09T00:26:05","date_gmt":"2020-01-09T00:26:05","guid":{"rendered":"https:\/\/stuff.tamius.net\/sacred-texts\/?p=467"},"modified":"2020-01-09T18:36:45","modified_gmt":"2020-01-09T18:36:45","slug":"fixing-spectacles-offset-bug-on-hi-dpi-screens","status":"publish","type":"post","link":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/","title":{"rendered":"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/kde.org\/applications\/utilities\/org.kde.spectacle\">Spectacle<\/a> is <a href=\"https:\/\/kde.org\/\">KDE<\/a>&#8216;s screenshot utility. Since the beginning of time (but only reported <a href=\"https:\/\/bugs.kde.org\/show_bug.cgi?id=385885\">years ago<\/a>), it has a bug that annoys people using multiple high or mixed PPI monitors. For example, consider my desktop. It looks like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-scaled.jpg\" alt=\"\" class=\"wp-image-468\" width=\"2560\" height=\"477\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-scaled.jpg 2560w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-300x56.jpg 300w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-1024x191.jpg 1024w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-768x143.jpg 768w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-1536x286.jpg 1536w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-2048x382.jpg 2048w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/desktop-all-1200x224.jpg 1200w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption>~11.5k x 2160 \u2014 it was resized to something more in-line for an online blog.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">5120&#215;2160 at 34&#8243; gives us a PPI (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pixel_density\">pixels per inch<\/a>) of about 160. This has its benefits, but also some drawbacks \u2014 especially on Linux. Wayland solves some of the issues in that regard as it allows you to set scaling factor on per-display basis. Unfortunately, there are show-stoppers that prevent me from going that way. <br><br>This leaves us with Xorg. Xorg doesn&#8217;t do mixed PPI setups at all, but there&#8217;s workarounds. You can tell Xorg to pretend your low PPI monitors run at a higher resolution than they actually are. This has downsides (blurred image), but it beats the alternative. So you set your scaling factor to your highest PPI monitor and &#8220;supersample&#8221; other monitors appropriately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8216;scaling factor&#8217; is set by your desktop environment \u2014 in my case, KDE (which uses Qt). If you set this scaling factor above 1, you will sometimes into a bug (in Qt). It pops up in a few different places, most annoying of which is when you want to take a screenshot of a rectangular region.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-scaled.jpg\" alt=\"\" class=\"wp-image-469\" width=\"2560\" height=\"477\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-scaled.jpg 2560w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-300x56.jpg 300w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-1024x191.jpg 1024w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-768x143.jpg 768w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-1536x286.jpg 1536w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-2048x382.jpg 2048w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/screenshot-offset-1200x224.jpg 1200w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><figcaption>Compare to the first screenshot. Notice the extra offset.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The unwelcome offset and duplication of the screenshot area renders some parts of the screen impossible to screenshot using rectangular selection. This is annoying. Let&#8217;s fix it.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg\" alt=\"\" class=\"wp-image-470\" width=\"480\" height=\"720\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg 480w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick-200x300.jpg 200w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><figcaption>Oh why, what a jolly good idea.<\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"> Window-herding<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">KDE&#8217;s window manager, kwin, is pretty nice thing. Among other things, it allows us to tell windows and programs how to behave. We can force windows to stay always on top, we can force windows to open on a specific monitor, we can prevent windows from being closed. We can make windows transparent and tons of other things, but most importantly: we can make windows appear at exact location we want them.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image.png\" alt=\"\" class=\"wp-image-471\" width=\"921\" height=\"942\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image.png 921w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-293x300.png 293w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-768x786.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><figcaption>Lots and lots and lots of options.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The still frame of our screen on which we select is technically a full screen window covering all three screens. We only need to tell kwin how to recognize that window and move it to where we want. In order to that, we need to know two things: window class and window title.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-1.png\" alt=\"\" class=\"wp-image-472\" width=\"888\" height=\"919\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-1.png 888w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-1-290x300.png 290w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-1-768x795.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><figcaption>&#8230; both of which are helpfully marked with question marks.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">We don&#8217;t know them yet, but the &#8216;Detect Window Properties&#8217; button looks inviting \u2014 except it doesn&#8217;t work when we try to detect properties of our &#8220;draw rectangle for screenshot here&#8221; window. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Okay then, we&#8217;ll run xprop in the terminal while the window for drawing rectangular selection is active and click it.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-2.png\" alt=\"\" class=\"wp-image-473\" width=\"855\" height=\"148\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-2.png 855w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-2-300x52.png 300w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-2-768x133.png 768w\" sizes=\"auto, (max-width: 855px) 100vw, 855px\" \/><figcaption>&#8230; get ready for a whole lot of this.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Fine, clicking the window is not the only way to coax data we want out of xprop. We can give it the window id, like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>xprop -id $(xdotool search --pid `pidof spectacle`)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This works. We set this command to run while rectangular selection for spectacle is active, we get what we want:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-3.png\" alt=\"\" class=\"wp-image-474\" width=\"901\" height=\"326\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-3.png 901w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-3-300x109.png 300w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-3-768x278.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><figcaption>To be honest \u2014 seeing the &#8216;user specified location: -864px&#8217; bit is what gave me the idea of trying to only move the window. My original idea was much more contrived (trying to convince spectacle to start on the leftmost screen, which would also solve the issue)<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Window class: <code>spectacle<\/code>. Window title: <code>Spectacle<\/code> (as opposed to <code>filename \u2014 Spectacle<\/code> of the regular window). This is enough for us to only move the rectangular selection window, while keeping the spectacle window that appears after we&#8217;ve taken a screenshot where it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kwin rule is thus written. Another screenshot is taken. The issue persists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How to waste an hour.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where there&#8217;s a whip, there&#8217;s a way<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">But we&#8217;re not giving up quite yet. The good thing about Linux is that you can do a lot of things via terminal \u2014 such as, move windows around. <code>xdotool<\/code> can do that. The command looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>xdotool windowmove &lt;window id> &lt;x> &lt;y><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And we already know how to get window id. We put what we know together and paste our command to the terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sleep 5; xdotool windowmove $(xdotool search --pid `pidof spectacle` | tail -n 1) 0 0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">During the five seconds of grace, we try to screenshot a rectangular selection of the screen. We get the first real success of the evening \u2014 after the five seconds are up, the rectangular selection window moves to where it should be.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s try to launch spectacle&#8217;s rectangular selection and the code that corrects its position at the same time:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>spectacle --region &amp; sleep 1; xdotool windowmove $(xdotool search --pid `pidof spectacle` | tail -n 1) 0 0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230; and now, it suddenly doesn&#8217;t work anymore. Spectacle launches, but the rectangular selection window remains offset. Of course, we can swap positions of spectacle and commands that correct the offset of rectangular selection window, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$(sleep 5; xdotool windowmove $(xdotool search --pid `pidof spectacle` | tail -n 1) 0 0) &amp; spectacle --region<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This works, but:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wouldn&#8217;t be nice if this would happen when I pressed &#8216;print screen&#8217;?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, actually, yes it would. So we open the custom shortcuts settings, provide a key shortcut, paste our command into the command box.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4.png\" alt=\"\" class=\"wp-image-475\" width=\"1499\" height=\"508\" srcset=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4.png 1499w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4-300x102.png 300w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4-1024x347.png 1024w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4-768x260.png 768w, https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/image-4-1200x407.png 1200w\" sizes=\"auto, (max-width: 1499px) 100vw, 1499px\" \/><figcaption>Visual representation.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We click okay. We try to take a screenshot. Nothing happens.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fuck.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But let&#8217;s not give up. Files with bash scripts also counts as a command. We thus take this command and paste it into a file (and take care to not forget to put the <code>#!\/bin\/bash<\/code> in the topmost line), save, make it executable and jot down the path to the file in our custom keyboard shortcut.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And it finally works \u2014 after about two hours of experimenting. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The end.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spectacle is KDE&#8216;s screenshot utility. Since the beginning of time (but only reported years ago), it has a bug that annoys people using multiple high or mixed PPI monitors. For example, consider my desktop. It looks like this: 5120&#215;2160 at 34&#8243; gives us a PPI (pixels per inch) of about 160. This has its benefits, but also some drawbacks \u2014 especially on Linux. Wayland<span class=\"more-dots\">&#8230;<\/span> <span class=\"more-tag d-block mt-05\"><a class=\"more-link\" href=\"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/\">Continue Reading...<span class=\"screen-reader-text\"> \"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens\"<\/span><\/a><\/span><!-- .more-tag --><\/p>\n","protected":false},"author":1,"featured_media":470,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[35,34],"tags":[],"class_list":["post-467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kde","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>&quot;Fixing&quot; spectacle&#039;s offset bug on Hi-DPI screens - Tamius&#039; sacred texts<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"&quot;Fixing&quot; spectacle&#039;s offset bug on Hi-DPI screens - Tamius&#039; sacred texts\" \/>\n<meta property=\"og:description\" content=\"Spectacle is KDE&#8216;s screenshot utility. Since the beginning of time (but only reported years ago), it has a bug that annoys people using multiple high or mixed PPI monitors. For example, consider my desktop. It looks like this: 5120&#215;2160 at 34&#8243; gives us a PPI (pixels per inch) of about 160. This has its benefits, but also some drawbacks \u2014 especially on Linux. Wayland...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/\" \/>\n<meta property=\"og:site_name\" content=\"Tamius&#039; sacred texts\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-09T00:26:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-09T18:36:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"480\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tamius Han\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tamius Han\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/\"},\"author\":{\"name\":\"Tamius Han\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/#\\\/schema\\\/person\\\/4677d05a4f45974f27cd21481c561c21\"},\"headline\":\"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens\",\"datePublished\":\"2020-01-09T00:26:05+00:00\",\"dateModified\":\"2020-01-09T18:36:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/\"},\"wordCount\":917,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/patrick.jpg\",\"articleSection\":[\"KDE\",\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/\",\"url\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/\",\"name\":\"\\\"Fixing\\\" spectacle's offset bug on Hi-DPI screens - Tamius&#039; sacred texts\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/patrick.jpg\",\"datePublished\":\"2020-01-09T00:26:05+00:00\",\"dateModified\":\"2020-01-09T18:36:45+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/#\\\/schema\\\/person\\\/4677d05a4f45974f27cd21481c561c21\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#primaryimage\",\"url\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/patrick.jpg\",\"contentUrl\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/patrick.jpg\",\"width\":480,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/2020\\\/01\\\/09\\\/fixing-spectacles-offset-bug-on-hi-dpi-screens\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/#website\",\"url\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/\",\"name\":\"Tamius&#039; sacred texts\",\"description\":\"... containing one of the weirdest mix of pointless topics.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/#\\\/schema\\\/person\\\/4677d05a4f45974f27cd21481c561c21\",\"name\":\"Tamius Han\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg\",\"caption\":\"Tamius Han\"},\"url\":\"https:\\\/\\\/stuff.tamius.net\\\/sacred-texts\\\/author\\\/tamius-han\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\"Fixing\" spectacle's offset bug on Hi-DPI screens - Tamius&#039; sacred texts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/","og_locale":"en_US","og_type":"article","og_title":"\"Fixing\" spectacle's offset bug on Hi-DPI screens - Tamius&#039; sacred texts","og_description":"Spectacle is KDE&#8216;s screenshot utility. Since the beginning of time (but only reported years ago), it has a bug that annoys people using multiple high or mixed PPI monitors. For example, consider my desktop. It looks like this: 5120&#215;2160 at 34&#8243; gives us a PPI (pixels per inch) of about 160. This has its benefits, but also some drawbacks \u2014 especially on Linux. Wayland...","og_url":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/","og_site_name":"Tamius&#039; sacred texts","article_published_time":"2020-01-09T00:26:05+00:00","article_modified_time":"2020-01-09T18:36:45+00:00","og_image":[{"width":480,"height":720,"url":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg","type":"image\/jpeg"}],"author":"Tamius Han","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tamius Han","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#article","isPartOf":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/"},"author":{"name":"Tamius Han","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/#\/schema\/person\/4677d05a4f45974f27cd21481c561c21"},"headline":"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens","datePublished":"2020-01-09T00:26:05+00:00","dateModified":"2020-01-09T18:36:45+00:00","mainEntityOfPage":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/"},"wordCount":917,"commentCount":0,"image":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#primaryimage"},"thumbnailUrl":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg","articleSection":["KDE","Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/","url":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/","name":"\"Fixing\" spectacle's offset bug on Hi-DPI screens - Tamius&#039; sacred texts","isPartOf":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/#website"},"primaryImageOfPage":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#primaryimage"},"image":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#primaryimage"},"thumbnailUrl":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg","datePublished":"2020-01-09T00:26:05+00:00","dateModified":"2020-01-09T18:36:45+00:00","author":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/#\/schema\/person\/4677d05a4f45974f27cd21481c561c21"},"breadcrumb":{"@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#primaryimage","url":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg","contentUrl":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-content\/uploads\/2020\/01\/patrick.jpg","width":480,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/2020\/01\/09\/fixing-spectacles-offset-bug-on-hi-dpi-screens\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/stuff.tamius.net\/sacred-texts\/"},{"@type":"ListItem","position":2,"name":"&#8220;Fixing&#8221; spectacle&#8217;s offset bug on Hi-DPI screens"}]},{"@type":"WebSite","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/#website","url":"https:\/\/stuff.tamius.net\/sacred-texts\/","name":"Tamius&#039; sacred texts","description":"... containing one of the weirdest mix of pointless topics.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/stuff.tamius.net\/sacred-texts\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/stuff.tamius.net\/sacred-texts\/#\/schema\/person\/4677d05a4f45974f27cd21481c561c21","name":"Tamius Han","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce12569905c4aff5d48778af8527565f1175c254ad56cc5e5221666ff1e222b?s=96&d=blank&r=pg","caption":"Tamius Han"},"url":"https:\/\/stuff.tamius.net\/sacred-texts\/author\/tamius-han\/"}]}},"_links":{"self":[{"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/posts\/467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/comments?post=467"}],"version-history":[{"count":2,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/posts\/467\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/posts\/467\/revisions\/477"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/media\/470"}],"wp:attachment":[{"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/media?parent=467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/categories?post=467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stuff.tamius.net\/sacred-texts\/wp-json\/wp\/v2\/tags?post=467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}