Skip to content

Commit 4ae4385

Browse files
committed
-Released on macOS :)
1 parent 6c91932 commit 4ae4385

File tree

9 files changed

+26
-12
lines changed

9 files changed

+26
-12
lines changed

Images/Accessibility Prompt.png

744 KB
Loading
727 KB
Loading
825 KB
Loading

Images/Tasker on macOS.png

745 KB
Loading

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,26 @@ You can get it [here](https://github.com/thebigG/Tasker/releases)
2020
3.Make sure to check the "Allow Executing file as a program" box
2121
<img src="Images/linux-appiamge-executable.png" alt="" />
2222

23-
2423
To make your life more convinient with appimages I highly recommend downloading this https://github.com/TheAssassin/AppImageLauncher
2524

26-
**NOTE**:Will be packaging for Windows10 and macOS very soon :)
25+
## On macOS
26+
<img src="Images/Tasker on macOS.png" alt="" />
27+
28+
29+
30+
**NOTE:** For the mouse and keyboard hooks to work, you **must** give accessbility permissions to Tasker. For the Microphone hooks, you **must** give Microphone permission to Tasker.
31+
<img src="Images/Accessibility Prompt.png" alt="" />
32+
33+
<img src="Images/Accessibilty Panel on Tasker.png" alt="" />
34+
35+
If you were prompted to give permission, like in the image above, then tick the box in Accessbility menu for Tasker and restart Tasker. You only have to do this once. After the first time you do it, you will always be able to use the mouse and keyboard hooks.
36+
37+
You also have to give Microphone permissions to Tasker just like the mouse/keyboard hooks. Except for the Microphone, you don't have to restart Tasker after you allow Microphone Access.
38+
39+
40+
41+
42+
**NOTE**:Will be packaging for Windows10 very soon :)
2743

2844
# How do I help?
2945

Tasker/Tasker.pro.user

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE QtCreatorProject>
3-
<!-- Written by QtCreator 4.11.1, 2020-06-03T13:41:34. -->
3+
<!-- Written by QtCreator 4.11.1, 2020-06-04T13:32:45. -->
44
<qtcreator>
55
<data>
66
<variable>EnvironmentId</variable>
@@ -299,7 +299,7 @@
299299
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
300300
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
301301
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
302-
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/lorenzogomez/Tasker/build-Tasker-Desktop_Qt_5_9_9_clang_64bit-Release/Tasker.app/Contents/MacOS</value>
302+
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
303303
</valuemap>
304304
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
305305
</valuemap>

Tasker/XHook.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ void XHook::update() {
8989
setState(HookState::productive);
9090
} else {
9191
}
92-
setState(HookState::productive);
9392
}
9493

9594
/**
@@ -106,14 +105,12 @@ void XHook::resetState() { setState(HookState::unproductive); }
106105
*/
107106
int XHook::startXHook() {
108107
setState(HookState::unproductive);
109-
QDir dir{QCoreApplication::applicationDirPath()};
110-
dir.setPath("../iohook/");
111108
xChildHook.setWorkingDirectory(WORKDIR);
112109
// Kill xHook process when this process ends
113110
connect(qApp, &QGuiApplication::lastWindowClosed, this, &XHook::end);
114111
xChildHook.start(IOHOOK_SCRIPT_PATH, xChildHookArguments);
115112
qDebug() << "path=" << IOHOOK_SCRIPT_PATH;
116-
qDebug() << "current path=" << QDir::currentPath();
113+
qDebug() << "current path=" << QCoreApplication::applicationDirPath();
117114
xChildHook.waitForStarted();
118115
switch (xChildHook.state()) {
119116
case QProcess::NotRunning:

Tasker/XHook.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
#define IOHOOK_SCRIPT_PATH "./XListenerHook"
99
#define WORKDIR "../libs/linux/iohook"
1010
#elif defined(Q_OS_OSX)
11-
#define IOHOOK_SCRIPT_PATH "./XListenerHook"
12-
#define WORKDIR "../iohook"
11+
#define IOHOOK_SCRIPT_PATH "./run_hook.sh"
12+
#define WORKDIR "./Contents/iohook"
1313
#endif
1414
#else
1515
#if defined(Q_OS_LINUX)
1616
#define IOHOOK_SCRIPT_PATH "./XListenerHook"
1717
#define WORKDIR "../libs/linux/iohook"
1818
#elif defined(Q_OS_OSX)
1919
#define IOHOOK_SCRIPT_PATH "./XListenerHook"
20-
#define WORKDIR "../Frameworks/iohook"
20+
#define WORKDIR QCoreApplication::applicationDirPath() + "/../Frameworks/iohook"
2121
#elif defined(Q_OS_WIN)
2222
#define IOHOOK_SCRIPT_PATH "../libs/windows/iohook/XListenerHook"
2323
#endif

Tasker/livesession.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#if defined(Q_OS_LINUX)
1717
#define LIVESESSIONFONTPATH "../share/applications/unifont-13.0.02.ttf"
1818
#elif defined(Q_OS_OSX)
19-
#define LIVESESSIONFONTPATH "../resources/fonts/unifont-13.0.02.ttf"
19+
#define LIVESESSIONFONTPATH \
20+
QCoreApplication::applicationDirPath() + "/../Resources/unifont-13.0.02.ttf"
2021
#endif
2122
#endif
2223

0 commit comments

Comments
 (0)