aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/config
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2010-11-30 14:30:53 +0100
committerGravatar keis <keijser@gmail.com>2010-11-30 14:30:53 +0100
commitdd205a34dd66cd6e9c29050f319e8eb065c6cdcc (patch)
treea275a98ec2ca1bcb954aeba2cc7ebb6d3cbc6edd /examples/config
parent831e1cc3233227ac7a36f73474931e9579e7e991 (diff)
parent518004933b6d110d2a6d140f86c759dd4e713607 (diff)
Merge branch 'master' of git://github.com/Dieterbe/uzbl into history
Diffstat (limited to 'examples/config')
-rw-r--r--examples/config/config43
-rw-r--r--examples/config/cookies22
2 files changed, 34 insertions, 31 deletions
diff --git a/examples/config/config b/examples/config/config
index ceec02e..fe08a41 100644
--- a/examples/config/config
+++ b/examples/config/config
@@ -34,7 +34,7 @@ set set_mode = set mode =
set set_status = set status_message =
# Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable"
-set scripts_dir = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data:scripts
+set scripts_dir = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data:scripts
# === Hardcoded handlers =====================================================
@@ -47,7 +47,7 @@ set authentication_handler = sync_spawn @scripts_dir/auth.py
# === Dynamic event handlers =================================================
# Open link in new window
-@on_event NEW_WINDOW sh 'uzbl-browser -u "$8"' %r
+@on_event NEW_WINDOW sh 'uzbl-browser ${8:+-u "$8"}' %r
# Open in current window
#@on_event NEW_WINDOW uri %s
# Open in new tab
@@ -64,6 +64,9 @@ set authentication_handler = sync_spawn @scripts_dir/auth.py
# Load commit handlers
@on_event LOAD_COMMIT @set_status <span foreground="green">recv</span>
+# Userscript support. Add all scripts to $XDG_DATA_HOME/uzbl/userscripts
+#@on_event LOAD_COMMIT spawn @scripts_dir/userscripts.sh
+
# Load finish handlers
@on_event LOAD_FINISH @set_status <span foreground="gold">done</span>
@on_event LOAD_FINISH spawn @scripts_dir/history.sh
@@ -76,6 +79,9 @@ set authentication_handler = sync_spawn @scripts_dir/auth.py
# Example CONFIG_CHANGED event handler
#@on_event CONFIG_CHANGED print Config changed: %1 = %2
+# Scroll percentage calculation
+@on_event SCROLL_VERT set scroll_message = \@<(function(){var a='%1'.split(' ');var p='--';if(a[2]!=a[1]){p=(a[0]/(a[2]-a[3]));p=Math.round(10000*p)/100;};return p+'%';})()>\@
+
# === Behaviour and appearance ===============================================
set show_status = 1
@@ -121,6 +127,7 @@ set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}.@{WEBKIT_MI
@modmap <Control> <Ctrl>
@modmap <ISO_Left_Tab> <Shift-Tab>
@modmap <space> <Space>
+@modmap <KP_Enter> <Enter>
#modkey_addition <Key1> <Key2> <Result>
@modkey_addition <Shift> <Ctrl> <Meta>
@@ -130,6 +137,7 @@ set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}.@{WEBKIT_MI
#ignore_key <glob>
@ignore_key <ISO_*>
@ignore_key <Shift>
+@ignore_key <Multi_key>
# --- Bind aliases -----------------------------------------------------------
@@ -190,6 +198,9 @@ set ebind = @mode_bind global,-insert
# a colon.
@cbind :_ = %s
+# open a new window or a new tab (see the on_event NEW_WINDOW settings above)
+@cbind w = event NEW_WINDOW
+
# Page movement binds
@cbind j = scroll vertical 20
@cbind k = scroll vertical -20
@@ -197,8 +208,12 @@ set ebind = @mode_bind global,-insert
@cbind l = scroll horizontal 20
@cbind <Page_Up> = scroll vertical -100%
@cbind <Page_Down> = scroll vertical 100%
+@cbind <Ctrl>f = scroll vertical 100%
+@cbind <Ctrl>b = scroll vertical -100%
@cbind << = scroll vertical begin
@cbind >> = scroll vertical end
+@cbind <Home> = scroll vertical begin
+@cbind <End> = scroll vertical end
@cbind ^ = scroll horizontal begin
@cbind $ = scroll horizontal end
@cbind <Space> = scroll vertical end
@@ -262,8 +277,12 @@ set ebind = @mode_bind global,-insert
# Yanking & pasting binds
@cbind yu = sh 'echo -n $6 | xclip'
+@cbind yU = sh 'echo -n $8 | xclip' \@SELECTED_URI
@cbind yy = sh 'echo -n $7 | xclip'
+@cbind yY = sh 'echo -n $8 | xclip' \@SELECTED_URI
+# Clone current window
+@cbind c = sh 'uzbl-browser -u $6'
# Go the page from primary selection
@cbind p = sh 'echo "uri `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4'
# Go to the page in clipboard
@@ -274,7 +293,7 @@ set ebind = @mode_bind global,-insert
@bind <Shift-Insert> = sh 'echo "event INJECT_KEYCMD `xclip -o | sed s/\\\@/%40/g`" > $4'
# Bookmark inserting binds
-@cbind <Ctrl>b<tags:>_ = sh 'echo -e "$6 %s" >> $XDG_DATA_HOME/uzbl/bookmarks'
+@cbind <Ctrl>b<tags:>_ = sh 'echo `printf "$6 %s"` >> $XDG_DATA_HOME/uzbl/bookmarks'
# Or use a script to insert a bookmark.
@cbind B = spawn @scripts_dir/insert_bookmark.sh
@@ -288,7 +307,8 @@ set follow_hint_keys = 0123456789
#set follow_hint_keys = qwerty
#set follow_hint_keys = asdfghjkl;
#set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234
-@cbind fl* = script @scripts_dir/follow.js '@follow_hint_keys %s'
+@cbind fl* = spawn @scripts_dir/follow.sh "%s"
+@cbind gi = spawn @scripts_dir/go_input.sh
# Form filler binds
# This script allows you to configure (per domain) values to fill in form
@@ -308,7 +328,12 @@ 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`" > $4'
+@cbind gy = sh 'echo "event NEW_TAB `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4'
+@cbind gY = sh 'echo "event NEW_TAB_NEXT `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4'
+
+# Clone current tab
+@cbind gd = sh 'echo "event NEW_TAB $6" > $4'
+@cbind gD = sh 'echo "event NEW_TAB_NEXT $6" > $4'
# Closing / resting
@cbind gC = exit
@@ -362,13 +387,13 @@ set stack = @mode_config stack
@insert modcmd_updates = 0
# Multi-stage-binding mode config.
-@stack keycmd_events = 1
-@stack modcmd_updates = 1
-@stack forward_keys = 0
@stack keycmd_style = foreground="red"
-@stack prompt_style = foreground="#888" weight="light"
@stack status_background = #202020
@stack mode_indicator = Bnd
+@stack prompt_style = foreground="#888" weight="light"
+@stack keycmd_events = 1
+@stack modcmd_updates = 1
+@stack forward_keys = 0
set default_mode = command
diff --git a/examples/config/cookies b/examples/config/cookies
deleted file mode 100644
index 9b7374a..0000000
--- a/examples/config/cookies
+++ /dev/null
@@ -1,22 +0,0 @@
-# This file demonstrates how one *could* manage his cookies. this file is used by the example cookie handler script.
-# stick to this format.
-# trusted -> always store what we get, send what we have (TODO: by default, or when requested?)
-# deny -> deny storing + sending
-
-# if you don't like to edit this file manually, you could even write a script that adds/removes entries using sed, and call the script from uzbl with a keybind...
-
-
-TRUSTED
-bbs.archlinux.org
-archlinux.org
-linux.com
-
-
-
-
-DENY
-www.icanhascheezburger.com
-
-
-
-# rest -> ask \ No newline at end of file