-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlwaysontop.ahk
143 lines (124 loc) · 2.53 KB
/
Alwaysontop.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#NoEnv
#KeyHistory 0
SendMode Input
SetWorkingDir %A_ScriptDir%
ListLines Off
Process, Priority, , L
SendMode Input
ScriptActive = 1
FileEncoding, UTF-8
DetectHiddenWindows, On
SetTitleMatchMode, 2 ;partial match
/*
^Numpad0:: Winset, Alwaysontop, , A
return
*/
/*
<#a::
mousegetpos,,,win
wingettitle, title, ahk_id %win%
winset, AlwaysOnTop,TOGGLE, ahk_id %Win%
return
*/
/* ALT TAB
XButton2::
send {blind}{Alt Down}
send {blind}{Tab}
DllCall("Sleep","UInt",20)
keywait,XButton2
DllCall("Sleep","UInt",20)
send {blind}{LButton}
send {blind}{Alt up}
return
^+c::
{ Sleep 30
Run, https://www.google.com/search?q=%clipboard%
}
Return
*/
<#a::
Winset, Alwaysontop,Toggle, A
return
;Transparency toggle, Scroll Lock
<#t::
toggle:=!toggle
if toggle=1
{
WinGetActiveTitle, OutputVar
WinSet, Transparent, 200, %OutputVar%
}
else
{
WinSet, Transparent, OFF, %OutputVar%
}
return
;obsidian
Numpad0::
Process, Exist, Obsidian.exe
If Not ErrorLevel ; errorlevel will = 0 if process doesn't exist
Run "**path to obsidian**"
elseIf (ErrorLevel != 0)
ifWinActive, vault - Obsidian v0.12.19
{
WinMinimize, vault - Obsidian v0.12.19
}
Else
{
WinActivate, vault - Obsidian v0.12.19
}
return
NumpadDot::
Run obsidian://advanced-uri?vault=vault&filepath=literature`%252Fpiece`%2520de`%2520stockage.md&data=-`%20%clipboard%&mode=append
return
Numpad1::
Run obsidian://open?vault=vault&file=literature`%2Fpiece`%20de`%20stockage
Return
Numpad2::
Run obsidian://advanced-uri?vault=vault&daily=true
sleep 50
return
/*
<#Tab::
If Tabbe
{
send {blind}{Ctrl down}
send {blind}{<# down}
send {blind}{left down}
sleep, 50
send {blind}{Ctrl up}
send {blind}{<# up}
send {blind}{left up}
}
Else
{
send {blind}{Ctrl down}
send {blind}{<# down}
send {blind}{right down}
sleep, 50
send {blind}{Ctrl up}
send {blind}{<# up}
send {blind}{right up}
}
Tabbe:= !Tabbe ;Toggle hidden
Return
<#o::
Process, Exist, Obsidian.exe
If Not ErrorLevel ; errorlevel will = 0 if process doesn't exist
Run "**path to obsidian**"
elseIf (ErrorLevel != 0)
If Hidden
{
WinShow, vault - Obsidian v0.12.19
WinActivate, vault - Obsidian v0.12.19
WinRestore, vault - Obsidian v0.12.19
WinMove,vault - Obsidian v0.12.19,,A_ScreenWidth-300, 0, 300, 475
Winset, Alwaysontop, , vault - Obsidian v0.12.19
}
Else
{
Winset, Bottom, , vault - Obsidian v0.12.19
;WinMaximize, vault - Obsidian v0.12.19
}
Hidden := !Hidden ;Toggle hidden
Return
*/