aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/config/config
diff options
context:
space:
mode:
Diffstat (limited to 'examples/config/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