Check your posts (notes, articles, etc.) are marked up with h-entry:

Success!

We found the following post h-entry on your site:

Name

Locking mouse to monitor for linux dual monitor gaming: when gamescope isn't an option

Author

Add a photo!

<img class="u-photo" src="…" />

superkuh

Content

I wanted to play Age of Empires 2: Definite Edition on my Debian 11 machine using amdgpu with an RX 580 8GB gpu and dual monitors. It works fine on steam but when I move my mouse to the right side of that monitor's screen to 'push' the map around in the RTS game the mouse instead slides off the game monitor and onto my second monitor. All of the online comments said to use gamescope like 'gamescope --force-grab-cursor -f -- %command% ' for this. But unfortunately gamescope is literally an entire wayland environment that requires a dozen bleeding edge deps with tens of thousands of lines of code. For me it looked infeasible and I quickly gave up after my meson was too old. But mostly because of the hundreds of MB of source code for all the deps I knew would never compile. superkuh@janus:~/app_installs/gamescope$ meson setup build/ The Meson build system Version: 0.56.2 Source dir: /home/superkuh/app_installs/gamescope Build dir: /home/superkuh/app_installs/gamescope/build Build type: native build meson.build:1:0: ERROR: Meson version is 0.56.2 but project requires >=0.58.0 So I looked for other, less involved options. Brute forcing it with xdotool was my first thought. Another I found was https://github.com/QQuark/WGrab which is very simple but it involves manually setting the window span with the mouse each time. So I went with xdotool. This 24 line perl script completely solved my problem. And it's video card agnostic, unlike gamescope which only works with amdgpu. #!/usr/bin/perl use strict; use warnings; my $X_MIN = 0; my $X_MAX = 1919; # 1920px my $Y_MIN = 0; my $Y_MAX = 1079; # 1080px while (1) { my $loc = `xdotool getmouselocation`; my ($x) = $loc =~ /x:(\d+)/; my ($y) = $loc =~ /y:(\d+)/; my $nx = $x < $X_MIN ? $X_MIN : ($x > $X_MAX ? $X_MAX : $x); my $ny = $y < $Y_MIN ? $Y_MIN : ($y > $Y_MAX ? $Y_MAX : $y); if ($nx != $x || $ny != $y) { system("xdotool mousemove $nx $ny"); } select(undef, undef, undef, 0.02); # 20ms polling }

Published

URL

Add a URL! <a class="u-url" href="…">…</a>

Syndicated Copies

Add URLs of POSSEd copies!

<a rel="syndication" class="u-syndication" href="…">…</a>

Categories

Add some categories! <a class="p-category" href="…">…</a>

Your h-entries should have, at minimum, the following properties:

  • e-content — the main content of the post
  • p-name — if your post is an article with a name, use this classname.
  • dt-published — the datetime the post was published at, in ISO8601 format, with a timezone
  • u-url — the canonical URL of the post, especially important on pages listing multiple posts

It’s a common convention for the published datetime to be a link to the post itself, but they can be separate if you want.

There should also be some way to discover the author of the post — either link to your homepage (which should have your h-card on it) from anywhere within the body of the page with rel=author, or optionally embed a p-author h-card in the h-entry.

The web is an expressive medium, and as such there are many other properties which you can add to your posts. Check out the h-entry documentation for a full list.

Want to be able to use h-entry data in your code? Check out the open-source implementations.

Previous Step | Home | Next Step