Skip to content

Instantly share code, notes, and snippets.

View Itsr1ght's full-sized avatar
🏠
Working from home

Bilal Jafar Itsr1ght

🏠
Working from home
View GitHub Profile
@Itsr1ght
Itsr1ght / main.zig
Last active January 24, 2026 14:21
Basic X11 Client without using xlib or xcb written in zig 0.15.2 based on CaitCatDev's code
// based on code of CaitCatDev : https://gist.github.com/CaitCatDev/93a53cd8b452d6c6bfe9bbb2c7e8b606
// To actually works you need to give access to all host in x11 using 'host +' command because no authentication is dont in code otherwise it will panic
// To run the code just use 'zig run main.zig' it will open a window with grey background
// Keymaps
const X_KEYCODE_Q = 24;
const X_EV_KEY_PRESS = 2;
// X protocol type defines
const CARD8 = u8;