aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/config
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-10-22 23:19:37 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2010-10-22 23:19:37 -0600
commita7b2e7453120d05548253996e9fcf723ccaab5e5 (patch)
tree2c96a8902e0a0e9ba287edab2d0ba4e52c474093 /examples/config
parentebb4bb31a0e43ede227419ecd8855f2a0b364f9d (diff)
parent87b0c1fde07859f01424eea1abde930ad91b151e (diff)
Merge branch 'dev/scroll-percentage-by-scrollbars'
Diffstat (limited to 'examples/config')
-rw-r--r--examples/config/config3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/config/config b/examples/config/config
index ef5c122..7c3a950 100644
--- a/examples/config/config
+++ b/examples/config/config
@@ -80,6 +80,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