sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit b315f3438127d6002e0cb39b619acbb5808687c8
parent ea7557ed48ee860d12bb2b6f742c073b258dfb65
Author: yasumori <ysmr@protonmail.com>
Date:   Tue,  2 Aug 2022 09:33:03 -0400

Modification of previous patch to allow plumbing by double clicking

Diffstat:
Mst.suckless.org/patches/right_click_to_plumb/index.md | 14++++++++++++++
Ast.suckless.org/patches/right_click_to_plumb/simple_plumb_double_click-0.8.5.diff | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/st.suckless.org/patches/right_click_to_plumb/index.md b/st.suckless.org/patches/right_click_to_plumb/index.md @@ -91,3 +91,17 @@ Authors * [dallin](https://dallinjdahl.github.io/) <dallinjdahl@gmail.com> * [Alexander Arkhipov](gopher://mineeyes.cyou/) (0.8.5 port) +Double click to plumb +===================== +Adds additional functionality to the simple_plumb patch that allows the user to plumb a selected word +via double clicking while a mask key is held down. + +This patch should be applied after simple_plumb. + +Download +-------- +* [simple\_plumb\_double\_click-0.8.5.diff](simple_plumb_double_click-0.8.5.diff) (2022-08-01) + +Author +------ +* yasumori <ysmr@protonmail.com> diff --git a/st.suckless.org/patches/right_click_to_plumb/simple_plumb_double_click-0.8.5.diff b/st.suckless.org/patches/right_click_to_plumb/simple_plumb_double_click-0.8.5.diff @@ -0,0 +1,53 @@ +From e2794629844c97ad4d39bf300e66ce3de0be7799 Mon Sep 17 00:00:00 2001 +From: yasumori <ysmr@protonmail.com> +Date: Mon, 1 Aug 2022 15:07:46 -0400 +Subject: [PATCH] allow plumbing with double click + +--- + config.def.h | 5 +++++ + x.c | 6 ++++++ + 2 files changed, 11 insertions(+) + +diff --git a/config.def.h b/config.def.h +index 548f76a..2a65fab 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -477,6 +477,11 @@ static char ascii_printable[] = + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; + ++/* ++ * PLUMBMASK runs plumb_cmd on the selected word when double clicking while held down ++ */ ++#define PLUMBMASK ShiftMask ++ + /* + * plumb_cmd is run on mouse button 3 click, with first NULL set to + * current selection and with cwd set to the cwd of the active shell +diff --git a/x.c b/x.c +index 35fca28..f0c7eda 100644 +--- a/x.c ++++ b/x.c +@@ -174,6 +174,7 @@ static void resize(XEvent *); + static void focus(XEvent *); + static uint buttonmask(uint); + static int mouseaction(XEvent *, uint); ++static void plumb(char *); + static void brelease(XEvent *); + static void bpress(XEvent *); + static void bmotion(XEvent *); +@@ -502,6 +503,11 @@ bpress(XEvent *e) + xsel.tclick1 = now; + + selstart(evcol(e), evrow(e), snap); ++ ++ if (snap == SNAP_WORD && match(PLUMBMASK, e->xbutton.state)) { ++ xsetsel(getsel()); ++ plumb(xsel.primary); ++ } + } + } + +-- +2.37.1 +