mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
feat(cli): add --no-console to autostart without a console window (#598)
* feat(cli): autostart without a console window
This moves `komorebic` logic into a `lib.rs` file and calls it from `main.rs` (normal behavior) and then there is a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary.
* Revert "feat(cli): autostart without a console window"
This reverts commit 08494b46dd.
* feat(cli): autostart without a console window
This creates a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary and its only job is to run and pass its args to `komorebic`.
* add behind `--no-console` flag
* reference the new binary in wix
* remove no-console
* fix typo
This commit is contained in:
@@ -1196,10 +1196,9 @@ fn main() -> Result<()> {
|
||||
);
|
||||
}
|
||||
SubCommand::EnableAutostart(args) => {
|
||||
let mut current_exe_dir = std::env::current_exe().expect("unable to get exec path");
|
||||
current_exe_dir.pop();
|
||||
|
||||
let komorebic_exe = current_exe_dir.join("komorebic.exe");
|
||||
let mut current_exe = std::env::current_exe().expect("unable to get exec path");
|
||||
current_exe.pop();
|
||||
let komorebic_exe = current_exe.join("komorebic-no-console.exe");
|
||||
let komorebic_exe = dunce::simplified(&komorebic_exe);
|
||||
|
||||
let startup_dir = startup_dir()?;
|
||||
|
||||
Reference in New Issue
Block a user