commit 31d0d866c036cd44e06c4a4e5a05f871ab98e10b
parent dd9843d60a85707f100f02eec3d3376e65077d4d
Author: Matthew Bauer <mjbauer95@gmail.com>
Date: Mon, 5 Jul 2010 22:21:50 -0500
added auto open patch to surf
Diffstat:
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/surf.suckless.org/patches/autoopen.md b/surf.suckless.org/patches/autoopen.md
@@ -0,0 +1,28 @@
+AUTO OPEN DOWNLOADS
+===================
+
+Description
+-----------
+
+This patch uses xdg-open to open a download once it has finished.
+
+It simply replaces this:
+
+ "xterm -e \"wget --load-cookies ~/.surf/cookies.txt '$0';\"", \
+
+with this:
+
+ "ofile=\"$(xdg-user-dir DOWNLOAD)/$(basename \"$0\")\"; wget --load-cookies ~/.surf/cookies.txt -O \"$ofile\" \"$0\"; xdg-open \"$ofile\"", \
+
+in your config.def.h file.
+
+
+Download
+--------
+
+* [surf-0.3-autoopen.diff](surf-0.3-autoopen.diff) (.5k) (20100705)
+
+Author
+------
+
+* Matthew Bauer <[mjbauer95@gmail.com](mailto:mjbauer95@gmail.com)>
diff --git a/surf.suckless.org/patches/surf-0.3-autoopen.diff b/surf.suckless.org/patches/surf-0.3-autoopen.diff
@@ -0,0 +1,12 @@
+diff -r dbb565b8d61c config.def.h
+--- a/config.def.h Fri Jun 25 09:42:58 2010 +0200
++++ b/config.def.h Mon Jul 05 22:07:35 2010 -0500
+@@ -14,7 +14,7 @@
+ p, q, winid, NULL } }
+ #define DOWNLOAD(d) { \
+ .v = (char *[]){ "/bin/sh", "-c", \
+- "xterm -e \"wget --load-cookies ~/.surf/cookies.txt '$0';\"", \
++ "ofile=\"$(xdg-user-dir DOWNLOAD)/$(basename \"$0\")\"; wget --load-cookies ~/.surf/cookies.txt -O \"$ofile\" \"$0\"; xdg-open \"$ofile\"", \
+ d, NULL } }
+ #define MODKEY GDK_CONTROL_MASK
+ static Key keys[] = {