
Lightweight library enables auto-launch of applications on system startup. Supports enabling/disabling startup, checking status, and customizing executable paths. Utilizes plist files on MacOS and registry keys on Windows.
AutoLaunch targets JVM platform.
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.vinceglb:auto-launch:0.8.0")
}// Create an instance of AutoLaunch.
val autoLaunch = AutoLaunch(appPackageName = "com.autolaunch.sample")
// Enable or disable launch at startup.
autoLaunch.enable()
autoLaunch.disable()
// Check if auto launch is enabled.
val isEnabled = autoLaunch.isEnabled()
// Check if the app was started by autostart.
val isStartedViaAutostart = autoLaunch.isStartedViaAutostart()βΉοΈ Note: To test the auto-launch feature, your application must be distributed. With Compose Multiplatform, you can run a distributable package using
./gradlew :runDistributable
// Get the app resolved executable path
val appPath = AutoLaunch.resolvedExecutable
// Determine whether the app is distributable
val isDistributable = AutoLaunch.isRunningFromDistributableBy default, your application path is detected automatically. You can customize the application path that will be launched at startup:
/Applications/JetBrains Toolbox.app/Contents/MacOS/jetbrains-toolbox..exe file.val autoLaunch = AutoLaunch(
appPackageName = "com.autolaunch.sample",
appPath = "/path/to/your/app"
)Depending on the platform, AutoLaunch uses the following techniques:
~/Library/LaunchAgents/ directory.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run..desktop file in ~/.config/autostart/ directory.
If there is no xdg-desktop-menu -> systemd will be used to enable a daemon.You can find a sample project in the sample directory. Run the following command to test the auto-launch feature:
:sample:runDistributableYour contributions are welcome π₯ Here are some features that are missing:
Made with β€οΈ by Vince
AutoLaunch targets JVM platform.
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.vinceglb:auto-launch:0.8.0")
}// Create an instance of AutoLaunch.
val autoLaunch = AutoLaunch(appPackageName = "com.autolaunch.sample")
// Enable or disable launch at startup.
autoLaunch.enable()
autoLaunch.disable()
// Check if auto launch is enabled.
val isEnabled = autoLaunch.isEnabled()
// Check if the app was started by autostart.
val isStartedViaAutostart = autoLaunch.isStartedViaAutostart()βΉοΈ Note: To test the auto-launch feature, your application must be distributed. With Compose Multiplatform, you can run a distributable package using
./gradlew :runDistributable
// Get the app resolved executable path
val appPath = AutoLaunch.resolvedExecutable
// Determine whether the app is distributable
val isDistributable = AutoLaunch.isRunningFromDistributableBy default, your application path is detected automatically. You can customize the application path that will be launched at startup:
/Applications/JetBrains Toolbox.app/Contents/MacOS/jetbrains-toolbox..exe file.val autoLaunch = AutoLaunch(
appPackageName = "com.autolaunch.sample",
appPath = "/path/to/your/app"
)Depending on the platform, AutoLaunch uses the following techniques:
~/Library/LaunchAgents/ directory.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run..desktop file in ~/.config/autostart/ directory.
If there is no xdg-desktop-menu -> systemd will be used to enable a daemon.You can find a sample project in the sample directory. Run the following command to test the auto-launch feature:
:sample:runDistributableYour contributions are welcome π₯ Here are some features that are missing:
Made with β€οΈ by Vince