From dede796c1af41a193b1df994c1b70b52ad9be2c0 Mon Sep 17 00:00:00 2001 From: Alexander Leonhardt Date: Fri, 14 Aug 2026 09:23:13 +0200 Subject: Unified the tab policy. Tabs (new windows) are strictly opened by the window manager instead of surf. --- config.def.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/config.def.h b/config.def.h index 7b10d04..9d66e81 100644 --- a/config.def.h +++ b/config.def.h @@ -65,9 +65,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | WEBKIT_FIND_OPTIONS_WRAP_AROUND; #define PROMPT_GO "Go:" -#define PROMPT_GO_TAB "Go(TAB):" #define PROMPT_SEARCH "Search:" -#define PROMPT_SEARCH_TAB "Search(TAB):" #define PROMPT_FIND "Find:" /* SETPROP(command, current value, prompt) */ @@ -94,19 +92,6 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | } \ } -/* GO_TAB(prompt) */ -/* Prompts for a URI, offering the current one first and then the history - * ranked by visit count. Drop the sort pipeline for a plain prompt. */ -#define GO_TAB(prompt) { \ - .v = (const char *[]){ "/bin/sh", "-c", \ - "val=\"$({ printf '%s\\n' \"$1\"; " \ - "sort " HISTFILE " | uniq -c | sort -rn | sed 's/^ *[0-9]* //'; } " \ - "| awk '!seen[$0]++' | wmenu -bi -l 25 -S aa00aa -s 000000 -M aa00aa -m 000000 -p \"$2\")\" " \ - "&& surf \"$val\"", \ - "surf", winuri, prompt, NULL \ - } \ -} - /* DOWNLOAD(URI, referer) */ #define DOWNLOAD(u, r) { \ @@ -142,15 +127,6 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | } \ } -#define SEARCH_TAB(u) {\ - .v = (const char *[]){ "/bin/sh", "-c", \ - "val=\"$(echo \"\" | wmenu -bi -S aa00aa -s 000000 -M aa00aa -m 000000 -p \"$4\")\" " \ - "&& surf \"https://www.google.com/search?q=$val\"", \ - "surf", winid, "uri", winuri, u, NULL \ - } \ -} - - /* VIDEOPLAY(URI) */ #define VIDEOPLAY(u) {\ @@ -194,7 +170,6 @@ static Key keys[] = { { 0, GDK_KEY_Escape, stop, { 0 } }, { MODKEY, GDK_KEY_e, spawn, COPYURL() }, { MODKEY, GDK_KEY_s, spawn, SEARCH(PROMPT_SEARCH) }, - { MODKEY|GDK_SHIFT_MASK, GDK_KEY_s, spawn, SEARCH_TAB(PROMPT_SEARCH_TAB) }, { MODKEY|GDK_SHIFT_MASK, GDK_KEY_r, reload, { .i = 1 } }, { MODKEY, GDK_KEY_r, reload, { .i = 0 } }, @@ -224,7 +199,6 @@ static Key keys[] = { { MODKEY|GDK_SHIFT_MASK, GDK_KEY_n, find, { .i = -1 } }, { MODKEY|GDK_SHIFT_MASK, GDK_KEY_p, print, { 0 } }, - { MODKEY|GDK_SHIFT_MASK, GDK_KEY_g, spawn, GO_TAB(PROMPT_GO_TAB) }, { MODKEY|GDK_SHIFT_MASK, GDK_KEY_a, togglecookiepolicy, { 0 } }, { 0, GDK_KEY_F11, togglefullscreen, { 0 } }, -- cgit