summaryrefslogtreecommitdiff
path: root/surf-menu
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-03 13:56:05 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-03 13:56:05 +0100
commita5559dceb037457b1ceaee02132d59812864ed98 (patch)
tree8428a2be79847070b384b06ff64a384998049096 /surf-menu
parent4dfc020240646cd5990086d74c02cf710338baa8 (diff)
downloadsurf-a5559dceb037457b1ceaee02132d59812864ed98.tar.gz
surf-a5559dceb037457b1ceaee02132d59812864ed98.tar.bz2
surf-a5559dceb037457b1ceaee02132d59812864ed98.zip
Embed go to windowv2.0.2
Diffstat (limited to 'surf-menu')
-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