]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/bindings
bindings: Improve titlebar mouse bindings.
[fvwmconf.git] / common / bindings
index f87c13609aa14ea79c2b77873ed5c4a2239300da..ff0d4e766dc0f20606b701e684f3e99ac5137a7f 100644 (file)
@@ -27,6 +27,15 @@ Key 6 A CM GotoPage 5 0
 Mouse 5 R A GotoPage wrapx +1p 0p
 Mouse 4 R A GotoPage wrapx -1p 0p
 
+# Window titlebar bindings
+DestroyFunc Title_M1Func
+AddToFunc   Title_M1Func
+ + C Raise
+ + M Move
+
+Mouse 1 T N Title_M1Func
+Mouse 2 T N Menu MenuWindow
+Mouse 3 T N Lower
 Mouse 4 T N Windowshade True
 Mouse 5 T N Windowshade False
 
@@ -35,8 +44,20 @@ Key grave A C  Exec exec $[TERMINAL]
 Key grave A CM Exec exec $[TERMINAL] -e zsh -f
 Key F3 A M  Module FvwmConsole -terminal urxvt
 
-# Screen locking
-Key Scroll_Lock A A Exec exec xscreensaver-command -lock
+# Screen locking.  Since a double scroll lock is used to communicate with the
+# KVM, take some care to only lock the screen if the scroll lock key is pressed
+# once.
+DestroyFunc FinishLock
+AddToFunc   FinishLock
+ + I Key Scroll_Lock A A LockScreen
+ + I $*
+
+DestroyFunc LockScreen
+AddToFunc   LockScreen
+ + I Schedule 750 FinishLock Exec exec xscreensaver-command -lock
+ + I Key Scroll_Lock A A FinishLock Deschedule $[schedule.last]
+
+Key Scroll_Lock A A LockScreen
 
 DestroyFunc DoPageMove
 AddToFunc   DoPageMove