Skip to content

Commit

Permalink
Update Keys.ahk
Browse files Browse the repository at this point in the history
  • Loading branch information
Ven0m0 authored Feb 23, 2025
1 parent ba66c94 commit 49d26df
Showing 1 changed file with 8 additions and 58 deletions.
66 changes: 8 additions & 58 deletions AHK/Keys.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -65,62 +65,6 @@ $*F24::Media_Play_Pause
;Always on top, Alt+t
$*!t::WinSet, AlwaysOnTop, Toggle, A

; Fullscreen Single Key
ToggleFakeFullscreen()
{
CoordMode Screen, Window
static WINDOW_STYLE_UNDECORATED := -0xC40000
static savedInfo := Object() ;; Associative array!
WinGet, id, ID, A
if (savedInfo[id])
{
inf := savedInfo[id]
WinSet, Style, % inf["style"], ahk_id %id%
WinMove, ahk_id %id%,, % inf["x"], % inf["y"], % inf["width"], % inf["height"]
savedInfo[id] := ""
}
else
{
savedInfo[id] := inf := Object()
WinGet, ltmp, Style, A
inf["style"] := ltmp
WinGetPos, ltmpX, ltmpY, ltmpWidth, ltmpHeight, ahk_id %id%
inf["x"] := ltmpX
inf["y"] := ltmpY
inf["width"] := ltmpWidth
inf["height"] := ltmpHeight
WinSet, Style, %WINDOW_STYLE_UNDECORATED%, ahk_id %id%
mon := GetMonitorActiveWindow()
SysGet, mon, Monitor, %mon%
WinMove, A,, %monLeft%, %monTop%, % monRight-monLeft, % monBottom-monTop
}
}

GetMonitorAtPos(x,y)
{
;; Monitor number at position x,y or -1 if x,y outside monitors.
SysGet monitorCount, MonitorCount
i := 0
while(i < monitorCount)
{
SysGet area, Monitor, %i%
if ( areaLeft <= x && x <= areaRight && areaTop <= y && y <= areaBottom )
{
return i
}
i := i+1
}
return -1
}

GetMonitorActiveWindow(){
;; Get Monitor number at the center position of the Active window.
WinGetPos x,y,width,height, A
return GetMonitorAtPos(x+width/2, y+height/2)
}

$*End::ToggleFakeFullscreen()

;----------------------------------------------------------------------------
; Add date to selected file, Win+j
$*#j::
Expand Down Expand Up @@ -258,17 +202,23 @@ Gui, Add, Text,, Win + Down Restores the active window to the position before th
Gui, Tab, 2
Gui, Add, Text,, The script sets the calculator to always on top.
Gui, Tab, 3
Gui, Add, Button, gTLink, LinkTree
Gui, Add, Button, gGLink, Github
Gui, Add, Button, gYLink, Youtube
Gui, Add, Edit, ReadOnly, Email: ven0m0.wastaken@gmail.com
Gui, Add, Text, x25 y125, Email:
Gui, Add, Edit, x55 y120 ReadOnly, ven0m0.wastaken@gmail.com
Gui, Tab
Gui, Show, Center, Documentation
return

TLink:
Run, https://linktr.ee/Ven0m0
return

GLink:
Run, https://github.com/Ven0m0
return

YLink:
Run, https://www.youtube.com/channel/UCgRZ6y1F3uDF9UR3LFRgFXg
Run, https://www.youtube.com/@ven0m017
return

0 comments on commit 49d26df

Please sign in to comment.