summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter2014-04-30 23:38:18 +0100
committerPeter2014-04-30 23:38:18 +0100
commit3aa993e18f565f4a7cb399e938f0d80909bbd529 (patch)
treed961957abafb22a8834884a69f4330d39c1ec1ed
parentc795444677d4aa1e4ac1c0e308e392d9e86ee96f (diff)
downloadahka-3aa993e18f565f4a7cb399e938f0d80909bbd529.tar.gz
ahka-3aa993e18f565f4a7cb399e938f0d80909bbd529.tar.bz2
ahka-3aa993e18f565f4a7cb399e938f0d80909bbd529.zip
Restructure and Software migration
Move includes to top of file Indent returns Inline Comments Complete Chromium > Firefox Migrate from Dropbox > Git-Annex
-rw-r--r--ahk-assistant.ahk124
-rw-r--r--appspecific.ahk49
2 files changed, 70 insertions, 103 deletions
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
index dc8d11d..fc42054 100644
--- a/ahk-assistant.ahk
+++ b/ahk-assistant.ahk
@@ -10,17 +10,19 @@ SetWinDelay,2
CoordMode,Mouse
SetWorkingDir %A_MyDocuments%\..\
-
;keystates
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff
SetNumLockState, AlwaysOn
+;includes
+#Include, %A_ScriptDir%\appspecific.ahk ;application specific hotkeys
+#Include, %A_ScriptDir%\secret.ahk ;physical and ip address completions
;hotkeys
#q::Run notepad
^q::Send !{F4} ;quit most programs
-#+q::Run notepad.exe "%A_MyDocuments%\Dropbox\docs\faulties.txt"
+#+q::Run notepad.exe "%A_MyDocuments%\Vault\docs\faulties.txt"
#w::Run firefox.exe
#+w::Run firefox.exe -private
#e:: ;launch documents directory
@@ -36,11 +38,11 @@ if A_OSVersion in WIN_XP
#+e:: ;launch dropbox directory
if A_OSVersion in WIN_XP
{
- Run explorer %A_MyDocuments%\Dropbox
+ Run explorer %A_MyDocuments%\Vault
}
Else
{
- Run explorer %A_MyDocuments%\..\Dropbox
+ Run explorer %A_MyDocuments%\..\Vault
}
Return
^!e::Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ;my computer
@@ -50,27 +52,27 @@ if A_OSVersion in WIN_XP
#p:: ;putty
if A_OSVersion in WIN_XP
{
- Run "%A_MyDocuments%\Dropbox\conf\putty.exe"
+ Run "%A_MyDocuments%\Vault\conf\putty.exe"
}
Else
{
- Run "%A_MyDocuments%\..\Dropbox\conf\putty.exe"
+ Run "%A_MyDocuments%\..\Vault\conf\putty.exe"
}
Return
^!k:: ;keepass
if A_OSVersion in WIN_XP
{
- Run "%A_MyDocuments%\Dropbox\docs\keepass\KeePass.exe"
+ Run "%A_MyDocuments%\Vault\docs\keepass\KeePass.exe"
}
Else
{
- Run "%A_MyDocuments%\..\Dropbox\docs\keepass\KeePass.exe"
+ Run "%A_MyDocuments%\..\Vault\docs\keepass\KeePass.exe"
}
Return
#c::Run calc
#\::SendMessage 0x112, 0xF170, 2, , Program Manager ;win+\ - screen standby
SC029::Send, 0 ;Backticks send zeroes
-^SC029::Send, `` ;Backticks send zeroes
+^SC029::Send, `` ;C-Backtick send backticks
RAlt & j::ShiftAltTab
RAlt & k::AltTab
Capslock::Backspace
@@ -78,10 +80,16 @@ Capslock::Backspace
!^9::SoundSet -5 ;volume down
^!+Up::run %A_ScriptDir%\resswitch.exe /WIDTH:1920 /HEIGHT:1080 ;1080p screen resolution
^!+Down::run %A_ScriptDir%\resswitch.exe /WIDTH:1280 /HEIGHT:720 ;720p screen resolution
-
-;remap logitech m570 buttons
-XButton1::Send {Click 2} ;double click
-XButton2::Send {MButton} ;wheel click
+XButton1::Send {Click 2} ;remap logitech m570 x1 to double click
+XButton2::Send {MButton} ;remap logitech m570 x2 to wheel click
+#Space:: ;date insert
+ FormatTime, CurrentDateTime,, yyyy-MM-dd
+ SendInput %CurrentDateTime%
+ return
+#+Space:: ;date and time insert
+ FormatTime, CurrentDateTime,, yyyy-MM-ddTHH:mm
+ SendInput %CurrentDateTime%
+ return
#k:: ;split active and previous 2 windows side by side.
{
Shift("R")
@@ -90,31 +98,24 @@ XButton2::Send {MButton} ;wheel click
Send {AltDown}{Tab}{AltUp}
return
}
-
-#Include, %A_ScriptDir%\appspecific.ahk ;application specific hotkeys
-#Include, %A_ScriptDir%\secret.ahk ;physical and ip address completions
-
-;hide/show taskbar toggle
-#x::
+Insert:: ;insert appends to clipboard
+ newclipboard = %clipboard%
+ Send, ^c
+ clipboard = %newclipboard%`r`n%clipboard%
+ return
+#x:: ;hide/show taskbar toggle
if toggle := !toggle
- {
- WinHide ahk_class Shell_TrayWnd
- WinHide, Start ahk_class Button
- }
- else
- {
- WinShow ahk_class Shell_TrayWnd
- WinShow, Start ahk_class Button
- }
-return
-
-:*:ytv::
- send,{end}{shift down}{home}{shift up}{del}
- send,https://www.youtube.com/watch?v={ctrl down}v{ctrl up}
-return
-
-;toggle between default audio output (http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/)
-^!Space::
+ {
+ WinHide ahk_class Shell_TrayWnd
+ WinHide, Start ahk_class Button
+ }
+ else
+ {
+ WinShow ahk_class Shell_TrayWnd
+ WinShow, Start ahk_class Button
+ }
+ return
+^!Space:: ;toggle between default audio output (http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/)
switch := !switch
If (switch)
usePlaybackDevice(1)
@@ -129,32 +130,11 @@ return
WinClose, Sound ahk_class #32770
}
-
;auto replace text with symbols
::(c)::©
::(r)::®
::(tm)::™
-
-;date/time insertion
-#Space::
- FormatTime, CurrentDateTime,, yyyy-MM-dd
- SendInput %CurrentDateTime%
-return
-#+Space::
- FormatTime, CurrentDateTime,, yyyy-MM-ddTHH:mm
- SendInput %CurrentDateTime%
-return
-
-
-;insert appends to clipboard
-Insert::
- newclipboard = %clipboard%
- Send, ^c
- clipboard = %newclipboard%`r`n%clipboard%
-return
-
-
;text replacements
::seperated::separated
::recieved::received
@@ -195,14 +175,18 @@ return
:*:btd`t::BT Diverse 7110+
;auto/tab completions
+:*:ytv:: ;create YT link from video ID
+ send,{end}{shift down}{home}{shift up}{del}
+ send,https://www.youtube.com/watch?v={ctrl down}v{ctrl up}
+ return
:*:gd`t::
if A_OSVersion in WIN_XP
{
- Send %A_MyDocuments%\Dropbox\docs\
+ Send %A_MyDocuments%\Vault\docs\
}
Else
{
- Send C:\Users\%A_UserName%\Dropbox\docs\
+ Send C:\Users\%A_UserName%\Vault\docs\
}
Return
:*:md`t::
@@ -218,18 +202,18 @@ if A_OSVersion in WIN_XP
:*:db`t::
if A_OSVersion in WIN_XP
{
- Send %A_MyDocuments%\Dropbox\
+ Send %A_MyDocuments%\Vault\
}
Else
{
- Send C:\Users\%A_UserName%\Dropbox\
+ Send C:\Users\%A_UserName%\Vault\
+ }
+ Return
+:*:cw`t:: ;cygwin
+ {
+ Send C:\cygwin\home\%A_UserName%\
}
Return
-:*:cw`t::
-{
-Send C:\cygwin\home\%A_UserName%\
-}
-Return
;tiling
#Up::WinMaximize, A
@@ -245,7 +229,6 @@ Return
#Numpad7::Shift("TL")
#Numpad8::Shift("T")
#Numpad9::Shift("TR")
-
Shift(Pos)
{
WinGetClass, class, A
@@ -278,9 +261,7 @@ Shift(Pos)
}
Return
-
-;auto-reload on change
-ScriptReload:
+ScriptReload: ;auto-reload on change
{
FileGetAttrib, FileAttribs, %A_ScriptFullPath%
IfInString, FileAttribs, A
@@ -294,7 +275,6 @@ ScriptReload:
Return
}
-
;kde-windows (Easy Window Dragging -- KDE style (requires XP/2k/NT) -- by Jonny)
!LButton::
MouseGetPos,KDE_X1,KDE_Y1,KDE_id
diff --git a/appspecific.ahk b/appspecific.ahk
index f7d2127..806e4fb 100644
--- a/appspecific.ahk
+++ b/appspecific.ahk
@@ -1,6 +1,5 @@
-;explorer
-#IfWinActive ahk_class CabinetWClass
+#IfWinActive ahk_class CabinetWClass ;explorer
Capslock:: ;up one folder
if A_OSVersion in WIN_XP
{
@@ -24,89 +23,77 @@
Send {F2}
}
Return
-
#IfWinActive
-;font previewer
-#IfWinActive ahk_class FontViewWClass
+#IfWinActive ahk_class FontViewWClass ;font previewer
Capslock::Send !{F4} ;quit
#IfWinActive
-;calc
-#IfWinActive ahk_class SciCalc
+#IfWinActive ahk_class SciCalc ;calc
Capslock::Send !{F4} ;quit
#IfWinActive
-;photoviewer 7
-#IfWinActive ahk_class Photo_Lightweight_Viewer
+#IfWinActive ahk_class Photo_Lightweight_Viewer ;photoviewer windows 7
Capslock::Send !{F4} ;quit
Up::Return ;removes annoying feature where up/down stops left/right naviagation
Down::Return
#IfWinActive
-;photoviewer xp
-#IfWinActive ahk_class ShImgVw:CPreviewWnd
+#IfWinActive ahk_class ShImgVw:CPreviewWnd ;photoviewer windows xp
Capslock::Send !{F4} ;quit
#IfWinActive
-;sumatrapdf
-#IfWinActive ahk_class SUMATRA_PDF_FRAME
+#IfWinActive ahk_class SUMATRA_PDF_FRAME ;sumatra pdf
Capslock::Send !{F4} ;quit
#IfWinActive
-;mpc-hc
-#IfWinActive ahk_class MediaPlayerClassicW
+#IfWinActive ahk_class MediaPlayerClassicW ;mpc-hc
1::Send 2^1 ;1 keeps borders
Ralt & Enter::Send !{Enter} ; ralt-enter fullscreens
Capslock::Send !{F4} ;quit
p::Send ^7 ;p for playlist
#IfWinActive
-;outlook
-#IfWinActive ahk_class rctrl_renwnd32
+#IfWinActive ahk_class rctrl_renwnd32 ;outlook
^Enter::Return ;disable accidentally send email shortcut
#IfWinActive
-;excel
-#IfWinActive ahk_class XLMAIN
+#IfWinActive ahk_class XLMAIN ;excel
^+v::Send {Esc}{Up}^c{Down}^v{Esc}{Down} ;ctrl+shift+v copies above cell into current
#IfWinActive
-;mstsc
-#IfWinActive ahk_class #32770
+#IfWinActive ahk_class #32770 ;mstsc
^Enter::Send 10.0.0.5{Enter} ;tserver
^+Enter::Send 10.0.0.10{Enter} ;dserer
#IfWinActive
-;act
-#IfWinActive ahk_class WindowsForms10.Window.8.app.0.2004eee
+#IfWinActive ahk_class WindowsForms10.Window.8.app.0.2004eee ;act
^Enter::Send ^{End}{Space}-PG+{Tab 3}{Enter} ;save note with footer
^n::Send {F9} ;insert note
^f::Send !LC ;search for company
#IfWinActive
-;command prompt
-#IfWinActive ahk_class ConsoleWindowClass
+#IfWinActive ahk_class ConsoleWindowClass ;command prompt
^c:: ;copy
Send {Enter}
- return
+ return
^v:: ;paste
CoordMode, Mouse, Relative
MouseMove, 100, 100
Send {RButton}p
- return
+ return
#IfWinActive
-;chromium
-#IfWinActive ahk_class ahk_class Chrome_WidgetWin_1
+#IfWinActive ahk_class ahk_class ahk_class MozillaWindowClass ;firefox
^+w::Send ^w ;quit window closes tab
+ ^+n::Send ^+p ;new incognito window
^q::Send ^w ;quit now closes tab, the two keys are too close for this sort of thing
+ ^!d::Send ^j ;why Downloads is ctrl+j while addons is ctrl+alt+a will never make sense
^d::Send ^f ;bookmark remapped to find
^b::Send ^v ;replace bookmarks with paste
#IfWinActive
-;notepad2-mod
-#IfWinActive ahk_class Notepad2
+#IfWinActive ahk_class Notepad2 ;notepad2-mod
!z::Return ;disable delete first char of line 'feature;
^0::Return ;disable annoying transparency feature
^Down::Send {Down} ; disable shift line down feature