diff options
author | Kornelije Sajler <xajler@gmail.com> | 2018-04-25 22:15:11 +0200 |
---|---|---|
committer | Kornelije Sajler <xajler@gmail.com> | 2018-04-25 22:15:11 +0200 |
commit | 0ad3d4eddfb0c260791dc3a6383f3a1047c972ab (patch) | |
tree | c81743be2dea80003bd04ba3708c39956d474efb /patches/st-scrollback-mouse-20161020-6e79e83.diff | |
parent | efad574780975ee22f2826900ac2a62883b02c40 (diff) |
Updated st 0.8.1. Used new patches, scrollblock and alpha fixed.
Created run-patches.sh, runs all patches on clean st 0.8.1 code.
All old patches remvoed, including trasparency diff.
Not including solarized theme, don't see value of it.
Commented colornames array with color indexs from 0-15, includes index 255, and afterwards bg, fg and cursor, change those for background, foreground and cursor color. Seems better than solarized toggle.
Updated README.
Diffstat (limited to 'patches/st-scrollback-mouse-20161020-6e79e83.diff')
-rw-r--r-- | patches/st-scrollback-mouse-20161020-6e79e83.diff | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/patches/st-scrollback-mouse-20161020-6e79e83.diff b/patches/st-scrollback-mouse-20161020-6e79e83.diff deleted file mode 100644 index 05b8b45..0000000 --- a/patches/st-scrollback-mouse-20161020-6e79e83.diff +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index eae969e..34ebb44 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -152,8 +152,14 @@ static unsigned int defaultunderline = 7; - */ - static MouseShortcut mshortcuts[] = { - /* button mask string */ -- { Button4, XK_ANY_MOD, "\031" }, -- { Button5, XK_ANY_MOD, "\005" }, -+ { Button4, XK_NO_MOD, "\031" }, -+ { Button5, XK_NO_MOD, "\005" }, -+}; -+ -+static MouseKey mkeys[] = { -+ /* button mask function argument */ -+ { Button4, ShiftMask, kscrollup, {.i = 1} }, -+ { Button5, ShiftMask, kscrolldown, {.i = 1} }, - }; - - /* Internal keyboard shortcuts. */ -diff --git a/st.c b/st.c -index 233d301..c71b6e7 100644 ---- a/st.c -+++ b/st.c -@@ -299,6 +299,13 @@ typedef union { - const void *v; - } Arg; - -+typedef struct { -+ uint b; -+ uint mask; -+ void (*func)(const Arg *); -+ const Arg arg; -+} MouseKey; -+ - typedef struct { - uint mod; - KeySym keysym; -@@ -953,6 +960,7 @@ bpress(XEvent *e) - { - struct timespec now; - MouseShortcut *ms; -+ MouseKey *mk; - - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - mousereport(e); -@@ -967,6 +975,14 @@ bpress(XEvent *e) - } - } - -+ for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) { -+ if (e->xbutton.button == mk->b -+ && match(mk->mask, e->xbutton.state)) { -+ mk->func(&mk->arg); -+ return; -+ } -+ } -+ - if (e->xbutton.button == Button1) { - clock_gettime(CLOCK_MONOTONIC, &now); - |