aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/config
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2011-01-17 20:13:17 +0100
committerGravatar keis <keijser@gmail.com>2011-01-17 20:13:17 +0100
commit476b539f6c0513ce60bb3c2fafc64d6ca6f6899f (patch)
tree0ac3ae7131e0f005c7c7081e14d471896741e785 /examples/config
parent08b45348831fadadeaac4cefb03eb11538c7aa0c (diff)
parent835f5d8d09b429a4776192dbe00be5ae20704b16 (diff)
Merge branch 'experimental' of git://github.com/Dieterbe/uzbl into history
Diffstat (limited to 'examples/config')
-rw-r--r--examples/config/config36
1 files changed, 18 insertions, 18 deletions
diff --git a/examples/config/config b/examples/config/config
index ddeca7b..4934469 100644
--- a/examples/config/config
+++ b/examples/config/config
@@ -48,13 +48,19 @@ set download_handler = sync_spawn @scripts_dir/download.sh
# === Dynamic event handlers =================================================
+# What to do when a website wants to open a new window:
# Open link in new window
@on_event NEW_WINDOW sh 'uzbl-browser ${1:+-u "$1"}' %r
-# Open in current window
+# Open in current window (also see the REQ_NEW_WINDOW event handler below)
#@on_event NEW_WINDOW uri %s
-# Open in new tab
+# Open in new tab. Other options are NEW_TAB_NEXT, NEW_BG_TAB and NEW_BG_TAB_NEXT.
#@on_event NEW_WINDOW event NEW_TAB %s
+# What to do when the user requests a new window:
+# If your the NEW_WINDOW handler opens the uri in the current window, you'll
+# probably want to change this handler to open a new window or tab.
+@on_event REQ_NEW_WINDOW event NEW_WINDOW %s
+
# Load start handler
@on_event LOAD_START @set_status <span foreground="khaki">wait</span>
# Reset the keycmd on navigation
@@ -105,7 +111,8 @@ set selected_section = <span foreground="#606060">\@[\@SELECTED_URI]\@</span>
set download_section = <span foreground="white">\@downloads</span>
-set status_format = <span font_family="monospace">@mode_section @keycmd_section @progress_section @uri_section @name_section @status_section @scroll_section @selected_section @download_section</span>
+set status_format = <span font_family="monospace">@mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section</span>
+set status_format_right = <span font_family="monospace"><span foreground="#666">uri:</span> @uri_section</span>
set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI
@@ -119,7 +126,7 @@ set progress.pending =
# === Useragent setup ========================================================
-set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}.@{WEBKIT_MICRO}) (@(+uname -sm)@ [@ARCH_UZBL]) (Commit @COMMIT)
+set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}) (@(+uname -sm)@ [@ARCH_UZBL])
# === Configure cookie blacklist ========================================================
# Drop google analytics tracking cookies
@@ -196,7 +203,7 @@ set ebind = @mode_bind global,-insert
# === Mouse bindings =========================================================
# Middle click open in new window
-@bind <Button2> = sh 'if [ "$1" ]; then uzbl-browser -u "$1"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"; fi' '\@SELECTED_URI'
+@bind <Button2> = sh 'if [ "$1" ]; then echo "event REQ_NEW_WINDOW $1" > "$UZBL_FIFO"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"; fi' '\@SELECTED_URI'
# --- Keyboard bindings ------------------------------------------------------
@@ -205,7 +212,7 @@ set ebind = @mode_bind global,-insert
@cbind :_ = %s
# open a new window or a new tab (see the on_event NEW_WINDOW settings above)
-@cbind w = event NEW_WINDOW
+@cbind w = event REQ_NEW_WINDOW
# Page movement binds
@cbind j = scroll vertical 20
@@ -285,18 +292,17 @@ set ebind = @mode_bind global,-insert
@cbind yu = sh 'echo -n "$UZBL_URI" | xclip'
@cbind yU = sh 'echo -n "$1" | xclip' \@SELECTED_URI
@cbind yy = sh 'echo -n "$UZBL_TITLE" | xclip'
-@cbind yY = sh 'echo -n "$1" | xclip' \@SELECTED_URI
# Clone current window
-@cbind c = sh 'uzbl-browser -u "$UZBL_URI"'
+@cbind c = event REQ_NEW_WINDOW \@uri
# Go the page from primary selection
-@cbind p = sh 'echo "uri `xclip -selection primary -o | sed s/\\\@/%40/g`" > "$UZBL_FIFO"'
+@cbind p = sh 'echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
# Go to the page in clipboard
-@cbind P = sh 'echo "uri `xclip -selection clipboard -o | sed s/\\\@/%40/g`" > "$UZBL_FIFO"'
+@cbind P = sh 'echo "uri $(xclip -selection clipboard -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
# Start a new uzbl instance from the page in primary selection
-@cbind 'p = sh 'exec uzbl-browser --uri "$(xclip -o)"'
+@cbind 'p = sh 'echo "event REQ_NEW_WINDOW $(xclip -o)" > "$UZBL_FIFO"'
# paste primary selection into keycmd at the cursor position
-@bind <Shift-Insert> = sh 'echo "event INJECT_KEYCMD `xclip -o | sed s/\\\@/%40/g`" > "$UZBL_FIFO"'
+@bind <Shift-Insert> = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
# Bookmark inserting binds
@cbind <Ctrl>b<tags:>_ = sh 'echo `printf "$UZBL_URI %s"` >> "$XDG_DATA_HOME"/uzbl/bookmarks'
@@ -334,12 +340,6 @@ set formfiller = spawn @scripts_dir/formfiller.sh
@cbind gN = event NEW_TAB_NEXT
@cbind go<uri:>_ = event NEW_TAB %s
@cbind gO<uri:>_ = event NEW_TAB_NEXT %s
-@cbind gy = sh 'echo "event NEW_TAB `xclip -selection primary -o | sed s/\\\@/%40/g`" > "$UZBL_FIFO"'
-@cbind gY = sh 'echo "event NEW_TAB_NEXT `xclip -selection primary -o | sed s/\\\@/%40/g`" > "$UZBL_FIFO"'
-
-# Clone current tab
-@cbind gd = sh 'echo "event NEW_TAB $UZBL_URI" > "$UZBL_FIFO"'
-@cbind gD = sh 'echo "event NEW_TAB_NEXT $UZBL_URI" > "$UZBL_FIFO"'
# Closing / resting
@cbind gC = exit