diff options
author | Hermann Mayer | 2017-10-26 14:51:54 +0200 |
---|---|---|
committer | Hermann Mayer | 2017-10-26 14:51:54 +0200 |
commit | 986f9aedff890d9ee0809a7b790454b3260ce281 (patch) | |
tree | 73c707ec161b7574d7145ec5f700956fcf24d5bd | |
download | aur-986f9aedff890d9ee0809a7b790454b3260ce281.tar.gz |
Initial commit.
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 72 | ||||
-rw-r--r-- | clear.patch | 62 | ||||
-rw-r--r-- | rxvt-unicode.desktop | 9 | ||||
-rw-r--r-- | secondaryWheel.patch | 119 |
5 files changed, 292 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9c770fdcc06b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = rxvt-unicode-better-wheel-scrolling-unicode3 + pkgdesc = An unicode enabled rxvt-clone terminal emulator (urxvt) w/ better wheel scrolling (VTE-like) (& no utmp/wtmp support) + pkgver = 9.22 + pkgrel = 4 + url = http://software.schmorp.de/pkg/rxvt-unicode.html + arch = i686 + arch = x86_64 + license = GPL + depends = rxvt-unicode-terminfo + depends = gcc-libs + depends = libxft + depends = gdk-pixbuf2 + optdepends = perl: lots of utilities + provides = rxvt-unicode + conflicts = rxvt-unicode + source = http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.22.tar.bz2 + source = rxvt-unicode.desktop + source = clear.patch + source = secondaryWheel.patch + md5sums = 93782dec27494eb079467dacf6e48185 + md5sums = af8e6ad4cd2d33c26f8df6a838685332 + md5sums = edeed8f00d5917bc002b2e10ba7e900c + md5sums = c73b3a470a02da0bf19ad6e9b83d0696 + sha1sums = e575b869782fbfed955f84f48b204ec888d91ba1 + sha1sums = 9a31b46324c0be44fb97be0828e1ead2311b3f9f + sha1sums = fc77f75bd2d51baa4abef81983dab044d7f498ce + sha1sums = e50503f786deb6d6c2b6b8bcf486bf509c14af71 + +pkgname = rxvt-unicode-better-wheel-scrolling-unicode3 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b580456b9955 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: jjacky +# Contributor: Angel Velasquez <angvp@archlinux.org> +# Contributor: tobias <tobias@archlinux.org> +# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org +# Contributor: Hermann Mayer <hermann.mayer92@gmail.com> + +# clear.patch based on patch by rlblaster: https://bbs.archlinux.org/viewtopic.php?id=129302 + +_pkgname=rxvt-unicode +pkgname=${_pkgname}-better-wheel-scrolling-unicode3 +pkgver=9.22 +pkgrel=4 +pkgdesc="An unicode enabled rxvt-clone terminal emulator (urxvt) w/ better wheel scrolling (VTE-like) (& no utmp/wtmp support)" +arch=('i686' 'x86_64') +url="http://software.schmorp.de/pkg/rxvt-unicode.html" +license=('GPL') +depends=('rxvt-unicode-terminfo' 'gcc-libs' 'libxft' 'gdk-pixbuf2') +optdepends=('perl: lots of utilities') # 'gtk2-perl: to use the urxvt-tabbed') +provides=($_pkgname) +conflicts=($_pkgname) +source=(http://dist.schmorp.de/rxvt-unicode/${_pkgname}-${pkgver}.tar.bz2 \ + ${_pkgname}.desktop + clear.patch secondaryWheel.patch) +md5sums=('93782dec27494eb079467dacf6e48185' + 'af8e6ad4cd2d33c26f8df6a838685332' + 'edeed8f00d5917bc002b2e10ba7e900c' + 'c73b3a470a02da0bf19ad6e9b83d0696') +sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1' + '9a31b46324c0be44fb97be0828e1ead2311b3f9f' + 'fc77f75bd2d51baa4abef81983dab044d7f498ce' + 'e50503f786deb6d6c2b6b8bcf486bf509c14af71') + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}" + patch -p1 -i ../clear.patch + patch -p1 -i ../secondaryWheel.patch +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + ./configure --prefix=/usr \ + --enable-256-color \ + --enable-font-styles \ + --enable-xim \ + --enable-keepscrolling \ + --enable-selectionscrolling \ + --enable-smart-resize \ + --enable-pixbuf \ + --enable-transparency \ + --disable-utmp \ + --disable-wtmp \ + --enable-lastlog \ + --enable-unicode3 \ + --enable-frills + make alldoc + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + export TERMINFO=/dev/null + make DESTDIR="${pkgdir}" install +# # for utmp/wtmp support +# chgrp utmp $pkgdir/usr/bin/urxvt +# chmod g+s $pkgdir/usr/bin/urxvt +# # 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" + # install freedesktop menu + install -Dm644 ../${_pkgname}.desktop \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" +} diff --git a/clear.patch b/clear.patch new file mode 100644 index 000000000000..69167d0f3438 --- /dev/null +++ b/clear.patch @@ -0,0 +1,62 @@ +diff --git a/src/command.C b/src/command.C +index d212764..b1a5ab1 100644 +--- a/src/command.C ++++ b/src/command.C +@@ -2913,6 +2913,10 @@ rxvt_term::process_csi_seq () + return; + } + ++ /* remember the current row on position change, in case there's a clear screen ++ * right after, so that we can add "preserve" the buffer (e.g. on ^L) */ ++ static int old_row = -1, was_moved = 0; ++ + switch (ch) + { + /* +@@ -2976,6 +2980,12 @@ rxvt_term::process_csi_seq () + + case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */ + case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */ ++ /* if moving to row 1, remember current row in case a clear screen comes next */ ++ if (nargs == 1 && arg[0] == 1 && current_screen == 0) ++ { ++ was_moved = 1; ++ old_row = screen.cur.row; ++ } + scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0); + break; + +@@ -2987,6 +2997,16 @@ rxvt_term::process_csi_seq () + break; + + case CSI_ED: /* 8.3.40: (0) ERASE IN PAGE */ ++ if (was_moved) ++ { ++ /* this is most likely a ^L, so we'll go back to where we where before ++ * the position change, add a screen of empty lines, then move back ++ * on top. that way the (scrolling) buffer will be preserved */ ++ scr_gotorc (old_row, 0, 0); ++ for (int i = nrow - 1; i > 0; --i) ++ scr_add_lines (L"\r\n", 2); ++ scr_gotorc (0, 0, 0); ++ } + scr_erase_screen (arg[0]); + break; + +@@ -3135,6 +3155,16 @@ rxvt_term::process_csi_seq () + default: + break; + } ++ if (was_moved > 0) ++ { ++ if (was_moved > 1) ++ { ++ was_moved = 0; ++ old_row = -1; ++ } ++ else ++ ++was_moved; ++ } + } + /*}}} */ + diff --git a/rxvt-unicode.desktop b/rxvt-unicode.desktop new file mode 100644 index 000000000000..067d62eda081 --- /dev/null +++ b/rxvt-unicode.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=rxvt-unicode +Comment=An Unicode capable rxvt clone +Exec=urxvt +Icon=utilities-terminal +Terminal=false +Type=Application +Categories=System;TerminalEmulator; diff --git a/secondaryWheel.patch b/secondaryWheel.patch new file mode 100644 index 000000000000..ebb0e1af41bd --- /dev/null +++ b/secondaryWheel.patch @@ -0,0 +1,119 @@ +diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod +index 169e104..4bb13b3 100644 +--- a/doc/rxvt.1.pod ++++ b/doc/rxvt.1.pod +@@ -427,6 +427,11 @@ B<secondaryScreen>. + Turn on/off secondary screen scroll (default enabled); resource + B<secondaryScroll>. + ++=item B<-ssw>|B<+ssw> ++ ++Turn on/off secondary screen wheel support (default disabled); resource ++B<secondaryWheel>. ++ + =item B<-hold>|B<+hold> + + Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ +@@ -1044,6 +1049,13 @@ option is enabled, scrolls on the secondary screen will change the + scrollback buffer and, when secondaryScreen is off, switching + to/from the secondary screen will instead scroll the screen up. + ++=item B<secondaryWheel:> I<boolean> ++ ++Turn on/off secondary wheel (default disabled). If enabled, when on ++secondary screen, using the mouse wheel will not scroll in the buffer ++but instead send 3 "fake" keystrokes (Up/Down arrow) to the running ++application (allows e.g. natural scrolling in B<man>, B<less>, etc). ++ + =item B<hold>: I<boolean> + + Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ +diff --git a/src/command.C b/src/command.C +index d212764..3b7e266 100644 +--- a/src/command.C ++++ b/src/command.C +@@ -2237,10 +2237,46 @@ rxvt_term::button_release (XButtonEvent &ev) + } + else + # endif ++#ifndef NO_SECONDARY_SCREEN + { +- scr_page (dirn, lines); +- scrollBar.show (1); ++ /* on SECONDARY screen, we send "fake" UP/DOWN keys instead ++ * (this allows to scroll within man, less, etc) */ ++ if (option (Opt_secondaryWheel) && current_screen != PRIMARY) ++ { ++ XKeyEvent event; ++ event.display = ev.display; ++ event.window = ev.window; ++ event.root = ev.root; ++ event.subwindow = ev.subwindow; ++ event.time = ev.time; ++ event.x = ev.x; ++ event.y = ev.y; ++ event.x_root = ev.x_root; ++ event.y_root = ev.y_root; ++ event.same_screen = ev.same_screen; ++ event.state = 0; ++ event.keycode = XKeysymToKeycode(ev.display, ++ (dirn == UP) ? XK_Up : XK_Down); ++ for ( ; lines > 0; --lines) ++ { ++ event.type = KeyPress; ++ XSendEvent (event.display, event.window, True, ++ KeyPressMask, (XEvent *) &event); ++ event.type = KeyRelease; ++ XSendEvent (event.display, event.window, True, ++ KeyPressMask, (XEvent *) &event); ++ } ++ } ++ /* on PRIMARY screen, we scroll in the buffer */ ++ else ++#endif ++ { ++ scr_page (dirn, lines); ++ scrollBar.show (1); ++ } ++#ifndef NO_SECONDARY_SCREEN + } ++#endif + } + break; + #endif +diff --git a/src/optinc.h b/src/optinc.h +index 09f9a26..c79a5be 100644 +--- a/src/optinc.h ++++ b/src/optinc.h +@@ -27,6 +27,7 @@ + def(cursorBlink) + def(secondaryScreen) + def(secondaryScroll) ++ def(secondaryWheel) + def(pastableTabs) + def(cursorUnderline) + #if ENABLE_FRILLS +diff --git a/src/rsinc.h b/src/rsinc.h +index 682322c..6325057 100644 +--- a/src/rsinc.h ++++ b/src/rsinc.h +@@ -104,6 +104,7 @@ + #ifndef NO_SECONDARY_SCREEN + def (secondaryScreen) + def (secondaryScroll) ++ def (secondaryWheel) + #endif + #if OFF_FOCUS_FADING + def (fade) +diff --git a/src/xdefaults.C b/src/xdefaults.C +index 2308844..0f5d2d0 100644 +--- a/src/xdefaults.C ++++ b/src/xdefaults.C +@@ -264,6 +264,7 @@ optList[] = { + #ifndef NO_SECONDARY_SCREEN + BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, 0, "enable secondary screen"), + BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, 0, "enable secondary screen scroll"), ++ BOOL (Rs_secondaryWheel, "secondaryWheel", "ssw", Opt_secondaryWheel, 0, "enable secondary screen wheel"), + #endif + #if ENABLE_PERL + RSTRG (Rs_perl_lib, "perl-lib", "string"), //, "colon-separated directories with extension scripts"),TODO |