tStrip leading 'URL:' from http links - sacc - [fork] customized build of sacc,… | |
git clone git://src.adamsgaard.dk/sacc | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 195cee5e061cad475b897bd2e1c407f753153ae7 | |
parent d7e905dedb831d22fbf27eda019e6e5dd545dfb8 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 18 Jun 2020 07:24:14 +0200 | |
Strip leading 'URL:' from http links | |
Diffstat: | |
M ui_ti.c | 5 ++++- | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/ui_ti.c b/ui_ti.c | |
t@@ -268,7 +268,10 @@ yankuri(Item *item) | |
itemuri(item); | |
if ((clip = popen(xselcmd, "w"))) { | |
- fprintf(clip, "%s", bufout); | |
+ if (!strncmp(bufout, "URL:", 4)) | |
+ fprintf(clip, "%s", bufout + 4); | |
+ else | |
+ fprintf(clip, "%s", bufout); | |
pclose(clip); | |
} | |
} |