Skip to content

Instantly share code, notes, and snippets.

@vphantom
Last active July 1, 2018 16:35
Show Gist options
  • Save vphantom/97d67328b55a1f1a11370a748da4dc03 to your computer and use it in GitHub Desktop.
Save vphantom/97d67328b55a1f1a11370a748da4dc03 to your computer and use it in GitHub Desktop.
Override Xorg's black hand1 mouse cursor pointer with the white hand2
#!/bin/sh
#
# Create ~/.fonts/, add cursor.pcf.gz and tell Xorg to use it.
#
# The included modified-cursor.pcf.gz was taken from Xorg's own cursor.pcf.gz
# and modified so that hand1 contains the same white hand as hand2.
#
# With this work-around, programs such as Google Chrome 57-58 and possibly
# Opera 44+ will continue to use the well-known left-pointing white pointer
# when hovering above hyperlinks.
#
# If you need to rebuild the file manually, here's what I did:
#
# * Copied it from /usr/share/fonts/X11/misc/
# * Decompiled it with pcf2bdf
# * Edit: line 3, change "-1" into "16"
# * Edit: the COPYRIGHT line has unescaped double quotes, remove to fix
# * Recompile with bdftopcf
#
mkdir ~/.fonts
cp modified-cursor.pcf.gz ~/.fonts/cursor.pcf.gz
mkfontdir ~/.fonts
xset +fp ~/.fonts
xset fp rehash
@vphantom
Copy link
Author

vphantom commented Jul 1, 2018

Oh wow, sorry @houkensjtu I never was notified of your message! I assume you figured something out since, but for sake of documenting it here, on my Debian system the file was /usr/share/fonts/X11/misc/cursor.pcf.gz. Here's how I modified it:

  • Decompile it with pcf2bdf;
  • Modify line 3, the "-1" must become "16";
  • Modify the COPYRIGHT line to remove the double quotes which were not escaped;
  • Recompile with bdftopcf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment