Last active
January 13, 2019 13:45
-
-
Save lheckemann/a613f7eaf19b5fdd8b490ff7019de134 to your computer and use it in GitHub Desktop.
nice cursors for urxvt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nix-build -E 'with import <nixpkgs> {}; rxvt_unicode.overrideAttrs (o: {patches = [(builtins.fetchurl https://gist.githubusercontent.com/lheckemann/a613f7eaf19b5fdd8b490ff7019de134/raw/bae5dccf7c5fdf20bec44ad337f0f20ebcd91495/urxvt-nice-cursors.patch)] ++ o.patches or []; buildInputs = [xorg.libXcursor] ++ o.buildInputs or []; nativeBuildInputs = [autoreconfHook] ++ o.nativeBuildInputs or [];})' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configure.ac b/configure.ac | |
index 0da3b59..df0f69a 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -469,6 +469,12 @@ if test x$support_frills = xyes; then | |
], [:]) | |
fi | |
+RXVT_CHECK_MODULES([XCURSOR], [xcursor], [ | |
+ X_LIBS="$XCURSOR_LIBS $X_LIBS" | |
+ CPPFLAGS="$CPPFLAGS $XCURSOR_CFLAGS" | |
+ AC_DEFINE(HAVE_XCURSOR, 1, Define to enable Xcursor support) | |
+], [:]) | |
+ | |
dnl# -------------------------------------------------------------------------- | |
dnl# CHECKING FOR HEADER FILES | |
dnl# -------------------------------------------------------------------------- | |
diff --git a/src/init.C b/src/init.C | |
index 5a96603..91ae5c3 100644 | |
--- a/src/init.C | |
+++ b/src/init.C | |
@@ -49,6 +49,10 @@ | |
# include <X11/Xmu/CurUtil.h> | |
#endif | |
+#ifdef HAVE_XCURSOR | |
+# include <X11/Xcursor/Xcursor.h> | |
+#endif | |
+ | |
#ifdef HAVE_XSETLOCALE | |
# define X_LOCALE | |
# include <X11/Xlocale.h> | |
@@ -1421,7 +1425,11 @@ rxvt_term::create_windows (int argc, const char *const *argv) | |
} | |
#endif | |
- TermWin_cursor = XCreateFontCursor (dpy, shape); | |
+#ifdef HAVE_XCURSOR | |
+ TermWin_cursor = XcursorLibraryLoadCursor (dpy, "xterm"); | |
+#else | |
+ TermWin_cursor = XCreateFontCursor(dpy, shape); | |
+#endif | |
/* the vt window */ | |
vt = XCreateSimpleWindow (dpy, top, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment