kiu
Joined: 18 Dec 2005 Posts: 229 Location: Italy - Galatro(RC)
|
Posted: Sun Feb 19, 2006 3:20 pm Post subject: winpack: make your desktop a big taskbar - by kiu |
|
|
This program let you place your windows as buttons in the desktop.
Look at the description in the code
If you use it, please send comments and suggestions
| Code: |
; ;
; author:Salvatore Agostino Romeo - romeo84@gmail.com
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/*
kiu-wincompact - It pack a window to make it like
a taskbar button, but the taskbar is now your desktop.
Simply make your desktop becomes a big taskbar.
Use WIN+c to make a window compact and WIN+r to restore it.
You can call a menu with all packed windows with WIN+w
There are also definied rocket gesture for these actions:
RButton+WheelDown -> pack
RButton+WheelUp -> unpack
RButton+MButton -> show menu
Version: 0.1
License:GPL
Note: sub-project of kiu-radialM
*/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;compact this win
~RButton & WheelDown::
#c::
MouseGetPos, , , id
WinGetPos , , , Width, Height, ahk_id %id%
dim%id%=%Width%|%Height%
WinMove, ahk_id %id%, , , , 150, 24
currentTaskedWins=%currentTaskedWins%%id%|
return
;restore this win
~RButton & WheelUp::
#r::
MouseGetPos, , , id
restoreWin(id)
return
;show mwnu of compacted windows
~RButton & MButton::
#w::
Menu,myTaskedWins,add
Menu,myTaskedWins,deleteall
StringSplit, mytask, currentTaskedWins, |
Loop,%mytask0%
{
current_mytask:=mytask%A_Index%
WinGetTitle, title, ahk_id %current_mytask%
if(title!="")
Menu,myTaskedWins,add,%A_Index%. %title%,restoreThisWin
}
MouseGetPos, x, y ;to disable right click for context menu
in_x:=x-8
in_y:=y-8
Menu,myTaskedWins,show,%in_x%,%in_y%
return
restoreThisWin:
id:=mytask%A_ThisMenuItemPos% ;this variable was set before
restoreWin(id)
return
;given the id, it will restore the window with previous dimensions
restoreWin(byRef id)
{
global
dim_this_win:=dim%id%
StringSplit, dim_this_win, dim_this_win, |
WinMove, ahk_id %id%, , , , %dim_this_win1%, %dim_this_win2%
WinActivate, ahk_id %id%
dim%id%=
StringReplace, currentTaskedWins, currentTaskedWins, %id%|, , All
return
}
|
and a screenshot:
 _________________ ____________________
______________________
kiu |
|