No description
  • C 66.2%
  • CMake 30.9%
  • Shell 2.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-08-25 18:26:11 +02:00
protocol first commit 2023-08-25 17:53:17 +02:00
.gitignore first commit 2023-08-25 17:53:17 +02:00
CMakeLists.txt first commit 2023-08-25 17:53:17 +02:00
crosshair.png first commit 2023-08-25 17:53:17 +02:00
main.c first commit 2023-08-25 17:53:17 +02:00
README.md add toggle-crosshair script 2023-08-25 18:26:11 +02:00
shm.c first commit 2023-08-25 17:53:17 +02:00
shm.h first commit 2023-08-25 17:53:17 +02:00
toggle-crosshair add toggle-crosshair script 2023-08-25 18:26:11 +02:00

Wayland-Crosshair

A simple crosshair overlay for wayland using wlroots zwlr_layer_shell_v1. This code is an adaptation of wlroots examples/layer-shell.c and hello-wayland.

Requirements

Build: cmake pkgconf imagemagick wayland wayland-protocols wlroots

Run: wayland wlroots

Building

mkdir cmake-build
cd cmake-build
cmake ..
make

Installation

Copy wayland_crosshair and toggle-crosshair into the PATH, e.g. ~/bin.

On KDE, go to System Settings -> Shortcuts -> Add Command, enter toggle-crosshair and add a custom shortcut.

Note

I only tested this on KDE Plasma 5. For me, the crosshair is always in the center of the currently active screen. I don't know how it behaves on different window managers or scaling options.