Start hinting to download hinted links into configured download directory.
.TP
.BI "hint-push [" QUERY "]"
-Start hinting to push hinted URI into the read it later queue.
+Start hinting to push hinted URI into the read it later queue. If PROJECT hab
+been compiled with QUEUE feature.
.SS Yank
.TP
.SS Queue
The queue allows to mark URLs for later reding (something like a read it later
-list). This list is shared between the single instances of PROJECT.
+list). This list is shared between the single instances of PROJECT. Only
+available if PROJECT has been compiled with QUEUE feature.
.TP
.BI "push [" URI ]
-Push \fIURI\fP or if not given current URI into the queue.
+Push \fIURI\fP or if not given
+current URI into the queue.
.TP
.B pop
-Open the oldest queue entry in current browser window and remove it from the
-queue.
+Open the oldest queue entry
+in current browser window and remove it from the queue.
.SS Misc
.TP
Start hinting to download the linkes resource.
.TP
.B ;\-p
-Start hinting to push hinted URI into queue.
+If PROJECT has been compiled with QUEUE feature. Start hinting to push hinted
+URI into queue.
.TP
.B y
Yank the URI or current page into clipboard.
.RE
.I $XDG_CONFIG_HOME/PROJECT/queue
.RS
-Holds the read it later queue filled by `hint-push' or `push'.
+Holds the read it later queue filled by `hint-push' or `push' if PROJECT has
+been compiled with QUEUE feature.
.RE
.I $XDG_CONFIG_HOME/PROJECT/scripts.js
.RS
return found;
}
+#ifdef FEATURE_QUEUE
/**
* Push a uri to the end of the queue.
*
}
return uri;
}
+#endif /* FEATURE_QUEUE */
static GList *load(const char *file)
{
gboolean bookmark_add(const char *uri, const char *title, const char *tags);
gboolean bookmark_remove(const char *uri);
gboolean bookmark_fill_completion(GtkListStore *store, const char *input);
+#ifdef FEATURE_QUEUE
gboolean bookmark_queue_push(const char *uri);
char *bookmark_queue_pop(void);
+#endif
#endif /* end of include guard: _BOOKMARK_H */
{"hint-image-tabopen", NULL, command_hints, {HINTS_TYPE_IMAGE | HINTS_PROCESS_OPEN | HINTS_OPEN_NEW}},
{"hint-editor", NULL, command_hints, {HINTS_TYPE_EDITABLE}},
{"hint-save", NULL, command_hints, {HINTS_TYPE_LINK | HINTS_PROCESS_SAVE}},
+#ifdef FEATURE_QUEUE
{"hint-push", NULL, command_hints, {HINTS_TYPE_LINK | HINTS_PROCESS_PUSH}},
+#endif
{"yank-uri", "yu", command_yank, {VB_CLIPBOARD_PRIMARY | VB_CLIPBOARD_SECONDARY | COMMAND_YANK_URI}},
{"yank-selection", "ys", command_yank, {VB_CLIPBOARD_PRIMARY | VB_CLIPBOARD_SECONDARY | COMMAND_YANK_SELECTION}},
{"search-forward", NULL, command_search, {VB_SEARCH_FORWARD}},
{"descent!", NULL, command_descent, {1}},
{"save", NULL, command_save, {COMMAND_SAVE_CURRENT}},
{"shellcmd", NULL, command_shellcmd, {0}},
+#ifdef FEATURE_QUEUE
{"push", NULL, command_queue, {COMMAND_QUEUE_PUSH}},
{"pop", NULL, command_queue, {COMMAND_QUEUE_POP}},
+#endif
};
static void editor_resume(GPid pid, int status, OpenEditorData *data);
prefix = ";y";
} else if (mode & HINTS_PROCESS_SAVE) {
prefix = ";s";
- } else if (mode & HINTS_PROCESS_PUSH) {
+ }
+#ifdef FEATURE_QUEUE
+ else if (mode & HINTS_PROCESS_PUSH) {
prefix = ";p";
}
+#endif
break;
case HINTS_TYPE_IMAGE:
return false;
}
+#ifdef FEATURE_QUEUE
gboolean command_queue(const Arg *arg)
{
gboolean res = false;
}
return res;
}
+#endif
gboolean command_editor(const Arg *arg)
{
COMMAND_SAVE_URI
};
+#ifdef FEATURE_QUEUE
enum {
COMMAND_QUEUE_PUSH,
COMMAND_QUEUE_POP
};
+#endif
typedef gboolean (*Command)(const Arg *arg);
gboolean command_descent(const Arg *arg);
gboolean command_save(const Arg *arg);
gboolean command_shellcmd(const Arg *arg);
+#ifdef FEATURE_QUEUE
gboolean command_queue(const Arg *arg);
+#endif
#endif /* end of include guard: _COMMAND_H */
#define FEATURE_NO_SCROLLBARS
/*#define FEATURE_GTK_PROGRESSBAR*/
#define FEATURE_TITLE_IN_COMPLETION
+#define FEATURE_QUEUE
/* time in seconds after that message will be removed from inputbox if the
"nmap ;I=hint-image-tabopen",
"nmap ;e=hint-editor",
"nmap ;s=hint-save",
+#ifdef FEATURE_QUEUE
"nmap ;p=hint-push",
+#endif
"nmap y=yank-uri",
"nmap Y=yank-selection",
"nmap p=open-clipboard",
a.s = v;
a.i = COMMAND_SAVE_URI;
command_save(&a);
- } else if (mode & HINTS_PROCESS_PUSH) {
+ }
+#ifdef FEATURE_QUEUE
+ else if (mode & HINTS_PROCESS_PUSH) {
a.s = v;
a.i = COMMAND_QUEUE_PUSH;
command_queue(&a);
- } else {
+ }
+#endif
+ else {
a.i = VB_CLIPBOARD_PRIMARY | VB_CLIPBOARD_SECONDARY;
a.s = v;
command_yank(&a);
HINTS_PROCESS_SAVE = (1 << 5),
/* additional flag for HINTS_PROCESS_OPEN */
HINTS_OPEN_NEW = (1 << 6),
+#ifdef FEATURE_QUEUE
HINTS_PROCESS_PUSH = (1 << 7),
+#endif
};
void hints_init(WebKitWebFrame *frame);
vb.files[FILES_BOOKMARK] = g_build_filename(path, "bookmark", NULL);
util_create_file_if_not_exists(vb.files[FILES_BOOKMARK]);
+#ifdef FEATURE_QUEUE
vb.files[FILES_QUEUE] = g_build_filename(path, "queue", NULL);
util_create_file_if_not_exists(vb.files[FILES_QUEUE]);
+#endif
vb.files[FILES_SCRIPT] = g_build_filename(path, "scripts.js", NULL);
FILES_COMMAND,
FILES_SEARCH,
FILES_BOOKMARK,
+#ifdef FEATURE_QUEUE
FILES_QUEUE,
+#endif
FILES_USER_STYLE,
FILES_LAST
} VbFile;