Skip to content

Commit

Permalink
Remove as_start_at_login argument from launch_multitouch_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed May 31, 2024
1 parent d0e2ed6 commit fb3d244
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ class components_manager final : public pqrs::dispatcher::extra::dispatcher_clie
}
});

// Run MultitouchExtension

application_launcher::launch_multitouch_extension(true);

// updater_process_manager_

updater_process_manager_ = std::make_unique<updater_process_manager>(configuration_monitor_);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/libkrbn/src/libkrbn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void libkrbn_killall_settings(void) {
}

void libkrbn_launch_multitouch_extension(void) {
krbn::application_launcher::launch_multitouch_extension(false);
krbn::application_launcher::launch_multitouch_extension();
}

void libkrbn_launch_uninstaller(void) {
Expand Down
31 changes: 2 additions & 29 deletions src/share/application_launcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,8 @@ class application_launcher final {
system("killall Karabiner-Elements");
}

static void launch_multitouch_extension(bool as_start_at_login) {
//
// Kill an existing process
//

if (as_start_at_login) {
system("killall Karabiner-MultitouchExtension");
}

//
// Launch process
//

std::stringstream command;
command << "open ";

if (as_start_at_login) {
command << " -n ";
}

command << "'/Library/Application Support/org.pqrs/Karabiner-Elements/Karabiner-MultitouchExtension.app'";

if (as_start_at_login) {
command << " --args --start-at-login";
} else {
command << " --args --show-ui";
}

system(command.str().c_str());
static void launch_multitouch_extension(void) {
system("open '/Library/Application Support/org.pqrs/Karabiner-Elements/Karabiner-MultitouchExtension.app' --args --show-ui");
}

static void launch_uninstaller(void) {
Expand Down

0 comments on commit fb3d244

Please sign in to comment.