Skip to content

Instantly share code, notes, and snippets.

View kaem-e's full-sized avatar
💭
a

Kaem kaem-e

💭
a
View GitHub Profile
@kaem-e
kaem-e / HP Spectre x360 (2018 Whiskey Lake) - Synaptics Touchpad Libinput Gestures Fix Linux.md
Last active February 28, 2026 10:24
This just details how to overeride the default PS2 interface for the touchpad and force it to use RMI4. Not as good as having proper I2C but it makes gestures in gnome and niri SIGNIFICANTLY better on this piece of shit laptop

The Synaptics touchpad on this laptop defaults to a shit basic ps/2 interface on Linux. HP in their infinite wisdom decided to not use an I2C touchpad even though the touchscreen does use i2c (hence why its consistently better feeling in both windows 11 and on linux). And perhaps worse is that by default the legacy ps/2 drivers fight with the RMI4 Protocol from working, so you get absolutely abhorrent trackpad behaviour

The best solution is to override the basic ps/2 fallback and force the kernel to use the RMI4 protocol over SMBus (InterTouch). Still not as good as a native I2C connection but this drastically reduces lag and makes multi-touch gestures in libinput-based compositors (like GNOME and Niri) SIGNIFICANTLY better.

Steps

For GRUB:

  1. Open GRUB config file: sudo micro /etc/default/grub
  2. Find the line starting with GRUB_CMDLINE_LINUX= and append the flags inside the quotes. It should look something like this:
@kaem-e
kaem-e / .vimrc
Last active January 11, 2026 18:48
Minimal .vimrc that can be fetched via curl/wget or scp on a remote machine
" Minimal .vimrc that can be fetched via curl/wget or scp on a remote machine
" • curl -fLOsS https://gist.githubusercontent.com/kaem-e/3539c743d4c2e3c9446f47aa29243927/raw/.vimrc
" • wget -c https://gist.githubusercontent.com/kaem-e/3539c743d4c2e3c9446f47aa29243927/raw/.vimrc -O ~/.vimrc
" • (for ssh remotes, via scp): scp ./.vimrc madoka@_HOST_:~/.vimrc
" ---- Options -----
set nocompatible
set t_Co=16 " limit to ansi-16
set notermguicolors
@-moz-document domain("docs.rs"),
regexp("^file:///.*\\.rustup/toolchains/[^/]+/share/doc/rust/html(/.*)?$"),
regexp("^file:///.*?/target/doc(/.*)?$"),
domain("doc.rust-lang.org"),
domain("nih-plug.robbertvanderhelm.nl"),
url-prefix("https://docs.slint.dev/latest/docs/rust/slint"),
url-prefix("https://rust-unofficial.github.io/too-many-lists/"),
url-prefix("https://rust-lang.github.io/api-guidelines"),
url-prefix("http://localhost:65114/"),
url-prefix("https://jorel.dev/mdBook-pagetoc/"),
@kaem-e
kaem-e / tasks.jsonc
Created June 16, 2025 18:47
Run msbuild.exe (or cl.exe) from zed's tasks.json
{
"label": "Build Visual Studio Project (Debug)",
"command": "| Out-Null;cd $env:ZED_WORKTREE_ROOT;msbuild.exe",
"args": [
"(Split-Path $env:ZED_WORKTREE_ROOT -Leaf).sln",
"/p:Configuration=Debug",
"/p:Platform=x64",
"/m",
"/v:m",
@kaem-e
kaem-e / mount_qcow2.md
Created May 12, 2023 23:23 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8