summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBennyYip2017-04-06 19:34:29 +0800
committerBennyYip2017-04-06 19:37:13 +0800
commit9a423e93625f1dcf256f475cbaabd141ca721405 (patch)
treeb7bd5bdad3b63324e7ef14a252269cbc725a6570
downloadaur-rxvt-unicode-ben.tar.gz
fork from aur/rxvt-unicode-patched
add pixbuf support
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD99
-rwxr-xr-xfix-smart-resize-with-x11-frame-borders.patch54
-rwxr-xr-xfont-width-fix.patch26
-rwxr-xr-xline-spacing-fix.patch25
-rw-r--r--sgr-mouse-mode.patch90
-rwxr-xr-xurxvt-tabbed.desktop10
-rw-r--r--urxvt.desktop10
-rwxr-xr-xurxvtc.desktop10
9 files changed, 358 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a260b8592eca
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = rxvt-unicode-ben
+ pkgdesc = Unicode enabled rxvt-clone terminal emulator (urxvt) with fixed font spacing
+ pkgver = 9.22
+ pkgrel = 1
+ url = http://software.schmorp.de/pkg/rxvt-unicode.html
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libxft
+ depends = perl
+ depends = startup-notification
+ depends = rxvt-unicode-terminfo
+ optdepends = gtk2-perl: to use the urxvt-tabbed
+ provides = rxvt-unicode
+ conflicts = rxvt-unicode
+ source = http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.22.tar.bz2
+ source = urxvt.desktop
+ source = urxvtc.desktop
+ source = urxvt-tabbed.desktop
+ source = font-width-fix.patch
+ source = line-spacing-fix.patch
+ source = sgr-mouse-mode.patch
+ source = fix-smart-resize-with-x11-frame-borders.patch
+ sha1sums = e575b869782fbfed955f84f48b204ec888d91ba1
+ sha1sums = b5a4507f85ebb7bac589db2e07d9bc40106720d9
+ sha1sums = 62c4ffecfce6967def394dd4d418b68652372ea2
+ sha1sums = cd204d608d114d39c80331efe0af0231ad6b7e18
+ sha1sums = 01ee8f212add79a158dcd4ed78d0ea1324bdc59b
+ sha1sums = b7fde1c46af45e831828738874f14b092b1e795f
+ sha1sums = dfbc8729c545105eff21e20ef3a4a3841a68a192
+ sha1sums = 6dfa49a211c48193c8d87fb9993ed459b2b4387b
+
+pkgname = rxvt-unicode-ben
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..502094a45b95
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Daniel Hahler <archlinux+aur@thequod.de>
+# Contributor: Florian Bruhin (The-Compiler) <archlinux.org@the-compiler.org>
+# Contributor: Daniel Micay <danielmicay@gmail.com>
+# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+# Contributor: tobias <tobias@archlinux.org>
+# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
+# Contributor: bennyyip <yebenmy@protonmail.com>
+
+_pkgname=rxvt-unicode
+pkgname=rxvt-unicode-ben
+pkgver=9.22
+pkgrel=1
+pkgdesc='Unicode enabled rxvt-clone terminal emulator (urxvt) with fixed font spacing'
+arch=('i686' 'x86_64')
+url='http://software.schmorp.de/pkg/rxvt-unicode.html'
+license=('GPL')
+depends=('libxft' 'perl' 'startup-notification' 'rxvt-unicode-terminfo')
+optdepends=('gtk2-perl: to use the urxvt-tabbed')
+provides=(rxvt-unicode)
+conflicts=(rxvt-unicode)
+source=(http://dist.schmorp.de/rxvt-unicode/$_pkgname-$pkgver.tar.bz2
+ 'urxvt.desktop'
+ 'urxvtc.desktop'
+ 'urxvt-tabbed.desktop'
+ 'font-width-fix.patch'
+ 'line-spacing-fix.patch'
+ 'sgr-mouse-mode.patch'
+ 'fix-smart-resize-with-x11-frame-borders.patch' # will be in 9.22+
+ )
+sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1'
+ 'b5a4507f85ebb7bac589db2e07d9bc40106720d9'
+ '62c4ffecfce6967def394dd4d418b68652372ea2'
+ 'cd204d608d114d39c80331efe0af0231ad6b7e18'
+ '01ee8f212add79a158dcd4ed78d0ea1324bdc59b'
+ 'b7fde1c46af45e831828738874f14b092b1e795f'
+ 'dfbc8729c545105eff21e20ef3a4a3841a68a192'
+ '6dfa49a211c48193c8d87fb9993ed459b2b4387b')
+
+prepare() {
+ cd $_pkgname-$pkgver
+
+ patch -p0 -i ../font-width-fix.patch
+ patch -p0 -i ../line-spacing-fix.patch
+ patch -p0 -i ../sgr-mouse-mode.patch
+ patch -p1 -i ../fix-smart-resize-with-x11-frame-borders.patch
+}
+
+build() {
+ cd $_pkgname-$pkgver
+
+ # do not specify --with-terminfo (FS#46424)
+ ./configure \
+ --prefix=/usr \
+ --enable-256-color \
+ --enable-combining \
+ --enable-fading \
+ --enable-font-styles \
+ --enable-iso14755 \
+ --enable-keepscrolling \
+ --enable-lastlog \
+ --enable-mousewheel \
+ --enable-next-scroll \
+ --enable-perl \
+ --enable-pixbuf \
+ --enable-pointer-blank \
+ --enable-rxvt-scroll \
+ --enable-selectionscrolling \
+ --enable-slipwheeling \
+ --enable-smart-resize \
+ --enable-startup-notification \
+ --enable-transparency \
+ --enable-unicode3 \
+ --enable-utmp \
+ --enable-wtmp \
+ --enable-xft \
+ --enable-xim \
+ --enable-xterm-scroll
+ make
+}
+
+package() {
+
+ # install freedesktop menu
+ for _f in urxvt urxvtc urxvt-tabbed; do
+ install -Dm644 $_f.desktop "$pkgdir/usr/share/applications/$_f.desktop"
+ done
+
+ cd $_pkgname-$pkgver
+
+ # workaround terminfo installation
+ export TERMINFO="$srcdir/terminfo"
+ install -d "$TERMINFO"
+ make DESTDIR="$pkgdir" install
+
+ # install the tabbing wrapper ( requires gtk2-perl! )
+ sed -i 's/\"rxvt\"/"urxvt"/' doc/rxvt-tabbed
+ install -Dm 755 doc/rxvt-tabbed "$pkgdir/usr/bin/urxvt-tabbed"
+}
diff --git a/fix-smart-resize-with-x11-frame-borders.patch b/fix-smart-resize-with-x11-frame-borders.patch
new file mode 100755
index 000000000000..9311f9d70d8d
--- /dev/null
+++ b/fix-smart-resize-with-x11-frame-borders.patch
@@ -0,0 +1,54 @@
+commit bec3f19
+Author: Emanuele Giaquinta <e.giaquinta@glauco.it>
+Date: Tue Jun 28 21:56:17 2016 +0000
+
+ Fix invalid moves when smart resize is enabled and the wm uses X11 borders for the frame windows.
+
+ Patch by Uli Schlachter.
+---
+ src/main.C | 25 +++++++++++++++++++++++--
+ 1 file changed, 23 insertions(+), 2 deletions(-)
+
+diff --git a/src/main.C b/src/main.C
+index 39aa5ec..5fa605e 100644
+--- a/src/main.C
++++ b/src/main.C
+@@ -1054,6 +1054,25 @@ rxvt_term::alias_color (int dst, int src)
+ pix_colors[dst].set (this, rs[Rs_color + dst] = rs[Rs_color + src]);
+ }
+
++#ifdef SMART_RESIZE
++static unsigned int
++get_parent_bw (Display *dpy, Window w)
++{
++ int idummy;
++ unsigned int udummy;
++ Window wdummy, parent;
++ Window *children;
++ unsigned int nchildren, border_width;
++
++ XQueryTree (dpy, w, &wdummy, &parent, &children, &nchildren);
++ XFree (children);
++ XGetGeometry (dpy, parent, &wdummy, &idummy, &idummy,
++ &udummy, &udummy, &border_width, &udummy);
++
++ return border_width;
++}
++#endif
++
+ /* -------------------------------------------------------------------- *
+ * - WINDOW RESIZING - *
+ * -------------------------------------------------------------------- */
+@@ -1098,8 +1117,10 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in
+ */
+ if (x1 != x || y1 != y)
+ {
+- x -= x1;
+- y -= y1;
++ unsigned int border_width = get_parent_bw (dpy, parent);
++
++ x -= x1 + border_width;
++ y -= y1 + border_width;
+ }
+
+ x1 = (DisplayWidth (dpy, display->screen) - old_width ) / 2;
diff --git a/font-width-fix.patch b/font-width-fix.patch
new file mode 100755
index 000000000000..811d9e615ab4
--- /dev/null
+++ b/font-width-fix.patch
@@ -0,0 +1,26 @@
+--- src/rxvtfont.C.bukind 2007-11-30 14:36:33.000000000 +0600
++++ src/rxvtfont.C 2007-11-30 14:39:29.000000000 +0600
+@@ -1171,12 +1171,21 @@
+ XGlyphInfo g;
+ XftTextExtents16 (disp, f, &ch, 1, &g);
+
++/*
++ * bukind: don't use g.width as a width of a character!
++ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial
++
+ g.width -= g.x;
+
+ int wcw = WCWIDTH (ch);
+ if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
+
+ if (width < g.width ) width = g.width;
++ */
++ int wcw = WCWIDTH (ch);
++ if (wcw > 1) g.xOff = g.xOff / wcw;
++ if (width < g.xOff) width = g.xOff;
++
+ if (height < g.height ) height = g.height;
+ if (glheight < g.height - g.y) glheight = g.height - g.y;
+ }
+
+
diff --git a/line-spacing-fix.patch b/line-spacing-fix.patch
new file mode 100755
index 000000000000..8431c4fa0cb4
--- /dev/null
+++ b/line-spacing-fix.patch
@@ -0,0 +1,25 @@
+--- src/rxvtfont.C.orig 2011-07-20 22:19:29.878012201 -0300
++++ src/rxvtfont.C 2011-07-20 22:19:33.634671723 -0300
+@@ -1237,11 +1237,22 @@
+
+ FT_Face face = XftLockFace (f);
+
++/*
++ * use ascent, descent and height from XftFont *f instead of FT_Face face.
++ * this somehow reproduces the behaviour of the line height as seen on xterm.
++
+ ascent = (face->size->metrics.ascender + 63) >> 6;
+ descent = (-face->size->metrics.descender + 63) >> 6;
+ height = max (ascent + descent, (face->size->metrics.height + 63) >> 6);
+ width = 0;
+
++ */
++
++ ascent = f->ascent;
++ descent = f->descent;
++ height = max (ascent + descent, f->height);
++ width = 0;
++
+ bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE;
+
+ XftUnlockFace (f);
diff --git a/sgr-mouse-mode.patch b/sgr-mouse-mode.patch
new file mode 100644
index 000000000000..186e8fdb74f8
--- /dev/null
+++ b/sgr-mouse-mode.patch
@@ -0,0 +1,90 @@
+--- src/command.C 2014-12-13 13:22:09.000000000 +0100
++++ src/command.C 2016-01-13 04:50:39.161862513 +0100
+@@ -1280,6 +1280,8 @@
+ int x, y;
+ int code = 32;
+
++ if (priv_modes & PrivMode_ExtMouseSgr) code = 0;
++
+ x = Pixel2Col (ev.x) + 1;
+ y = Pixel2Row (ev.y) + 1;
+
+@@ -1293,11 +1295,18 @@
+ code += 32;
+ }
+
+- if (MEvent.button == AnyButton)
++ if (!(priv_modes & PrivMode_ExtMouseSgr) && MEvent.button == AnyButton)
+ button_number = 3;
+ else
+ {
+- button_number = MEvent.button - Button1;
++ if (ev.type == MotionNotify) {
++ if (ev.state & Button1Mask) button_number = 0;
++ else if (ev.state & Button2Mask) button_number = 1;
++ else if (ev.state & Button3Mask) button_number = 2;
++ else return;
++ } else {
++ button_number = ev.button - Button1;
++ }
+ /* add 0x3D for wheel events, like xterm does */
+ if (button_number >= 3)
+ button_number += 64 - 3;
+@@ -1347,16 +1356,22 @@
+ #endif
+
+ #if ENABLE_FRILLS
++ if (priv_modes & PrivMode_ExtMouseSgr)
++ tt_printf ("\033[<%d;%d;%d%c",
++ code + button_number + key_state,
++ x,
++ y,
++ (ev.type == ButtonRelease ? 'm' : 'M'));
+- if (priv_modes & PrivMode_ExtMouseRight)
++ else if (priv_modes & PrivMode_ExtMouseRight)
+ tt_printf ("\033[%d;%d;%dM",
+ code + button_number + key_state,
+ x,
+ y);
+ else if (priv_modes & PrivMode_ExtModeMouse)
+ tt_printf ("\033[M%c%lc%lc",
+ code + button_number + key_state,
+ wint_t (32 + x),
+ wint_t (32 + y));
+ else
+ #endif
+ tt_printf ("\033[M%c%c%c",
+@@ -2908,7 +2913,7 @@
+ scr_soft_reset ();
+
+ static const int pm_h[] = { 7, 25 };
+- static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1005, 1015, 1049 };
++ static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1002, 1003, 1005, 1006, 1015, 1049 };
+
+ process_terminal_mode ('h', 0, ecb_array_length (pm_h), pm_h);
+ process_terminal_mode ('l', 0, ecb_array_length (pm_l), pm_l);
+@@ -3713,13 +3718,14 @@
+ { 1002, PrivMode_MouseBtnEvent },
+ { 1003, PrivMode_MouseAnyEvent },
+ #if ENABLE_FRILLS
+ { 1005, PrivMode_ExtModeMouse },
++ { 1006, PrivMode_ExtMouseSgr },
+ #endif
+ { 1010, PrivMode_TtyOutputInh }, // rxvt extension
+ { 1011, PrivMode_Keypress }, // rxvt extension
+ #if ENABLE_FRILLS
+ { 1015, PrivMode_ExtMouseRight }, // urxvt extension of 1005
+ #endif
+ // 1035 enable modifiers for alt, numlock NYI
+ // 1036 send ESC for meta keys NYI
+ // 1037 send DEL for keypad delete NYI
+--- src/rxvt.h 2014-12-17 16:33:08.000000000 +0100
++++ src/rxvt.h 2016-01-13 03:42:31.508911380 +0100
+@@ -644,6 +644,7 @@
+ #define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack
+ #define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in non-utf-8-locales
+ #define PrivMode_BlinkingCursor (1UL<<25)
++#define PrivMode_ExtMouseSgr (1UL<<26) // sgr mouse extension
+
+ #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
+
diff --git a/urxvt-tabbed.desktop b/urxvt-tabbed.desktop
new file mode 100755
index 000000000000..f3efdc9b9e37
--- /dev/null
+++ b/urxvt-tabbed.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=urxvt (tabbed)
+Comment=An unicode capable and tabbed rxvt clone
+Exec=urxvt-tabbed
+Icon=terminal
+Terminal=false
+Type=Application
+Categories=Application;System;TerminalEmulator;
diff --git a/urxvt.desktop b/urxvt.desktop
new file mode 100644
index 000000000000..0a9baf7dfcce
--- /dev/null
+++ b/urxvt.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=urxvt
+Comment=An unicode capable rxvt clone
+Exec=urxvt
+Icon=terminal
+Terminal=false
+Type=Application
+Categories=Application;System;TerminalEmulator;
diff --git a/urxvtc.desktop b/urxvtc.desktop
new file mode 100755
index 000000000000..e39a418f6522
--- /dev/null
+++ b/urxvtc.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=urxvt (client)
+Comment=An unicode capable rxvt clone client for urxvtd
+Exec=urxvtc
+Icon=terminal
+Terminal=false
+Type=Application
+Categories=Application;System;TerminalEmulator;