summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsurf-menu5
1 files changed, 3 insertions, 2 deletions
diff --git a/surf-menu b/surf-menu
index 59dcc30..975f0b1 100755
--- a/surf-menu
+++ b/surf-menu
@@ -93,13 +93,14 @@ done
# If XID is given then as first one add current uri
if [ -n "$XID" ]; then
- ADDCH="$(xprop -id "$XID" _SURF_URI | sed 's/.*= "\(.*\)"/\1/')"
+ ADDCH="$(xprop -id "$XID" _SURF_URI | sed -n 's/.*(STRING) = "\(.*\)"/\1/p')"
+ DMENU_ARGS="-w $XID -p Go:"
fi
# Note: Bookmarks starts with '* '
CHOOSE="$ADDCH
$(sed -n 's/\* //p' "$BOOKMARDS")"
-echo "$CHOOSE" | sed '/^\s*$/d' | dmenu -p 'surf' | while read L; do
+echo "$CHOOSE" | sed '/^\s*$/d' | dmenu -p 'surf' $DMENU_ARGS | while read L; do
run "$L"
done