Include 1: Desktop.rc Thread last updated on 2004-06-11 12:51:38

Posted by member 7223 on 2004-06-11 09:04:27

Store these files in "$configdir$".
Then, add this line to your theme.rc:
include "$configdir$desktop.rc"

and !recycle.

;------------------------------------------------------------------------------
; desktop.rc-1.0
;------------------------------------------------------------------------------

; This trick extends a little bit the possibilities of desktop clicks:
; - it's gets rid of the delay introduced by jDeskDoubleClickTime,
; - it allow you to define a "long-click action",
; - it allow borders specific actions.
;
; You need theses modules:
; - jDesk
; - Timer
; - mzScript-0.9-beta_12
;
;
;
; It uses the following $evar$:

clickdelay 250 ; double-click max. delay or after which $desktopclicklong$ is fired
desktopclick !none ; left-click action
desktopclickdouble "$filemanager$" ; double-click action
desktopclicklong !popuptheme ; long-click action (hold button down during $clickdelay$)
desktopclickonleft !vwmleft ; borders' click action
desktopclickonright !vwmright
desktopclickontop !vwmup
desktopclickonbottom !vwmdown



; Note:
; ------
; - theses $evar$ can contain spaces if surrounded by double-quotes (")
; - theses $evar$ can contain double-quotes (") if surrounded by quotes (')
; - double-clicking on a border doesn't works: it calls $DesktopClickOn[Border]$ two times
; - double-clicking anywhere else calls $DesktopClick$, then $DesktopClickDouble$ :(



*mzscriptfile "$configdir$desktop.mz"

jdeskdisabledoubleclick
*jdeskmbutton1 [.none;!desk_clickexec;!varset desk_clickexec !none]
*timer desk_resetclick $clickdelay$ '!execute [!varset desk_clickcount 0][!exec %{desk_clickexec}]'



;------------------------------------------------------------------------------
; desktop.mz
;------------------------------------------------------------------------------

*script start !varset desk_clickcount 0



; !desk_clickexec
;
; modified vars:
; - %{desk_clickcount}
; - %{desk_clickexec}
; - %{desk_clicktmp}

*script bang !desk_clickexec
*script exec !varset desk_clickexec '%#desktopclicklong%#'
*script exec !varset desk_clicktmp .none
*script exec !ifeq mousex "0" !varset desk_clicktmp onleft
*script exec !ifeq mousey "0" !varset desk_clicktmp ontop
*script exec !ifeq mousex "$resolutionx-1$" !varset desk_clicktmp onright
*script exec !ifeq mousey "$resolutiony-1$" !varset desk_clicktmp onbottom
*script gotoif ("%{desk_clicktmp}" = ".none") desk_click
*script exec !exec %#desktopclick%{desk_clicktmp}%#
*script exit
*script label desk_click
*script exec !varadd desk_clickcount 1
*script exec !timerkill desk_resetclick
*script exec !timerstart desk_resetclick
*script gotoif ("%{desk_clickcount}" = "2") desk_clickdbl
*script exec !exec %#desktopclick%#
*script exit
*script label desk_clickdbl
*script exec !exec %#desktopclickdouble%#
*script ~bang

Posted by member 37809 on 2004-06-11 12:51:38 link

Well done :)