diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2010-10-10 22:50:53 -0400 |
---|---|---|
committer | Brendan Taylor <whateley@gmail.com> | 2010-10-22 23:15:02 -0600 |
commit | 87b0c1fde07859f01424eea1abde930ad91b151e (patch) | |
tree | e7e0767fe37afa307a549d8edb783b662cfb8650 /examples/config | |
parent | bd67a4f3d033e7198dce2f570b58a7fbdb95e43e (diff) |
Use SCROLL_VERT event to handle scroll percentage
Diffstat (limited to 'examples/config')
-rw-r--r-- | examples/config/config | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/config/config b/examples/config/config index 622f859..5656664 100644 --- a/examples/config/config +++ b/examples/config/config @@ -79,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 |