[PR #598] [MERGED] feat(cli/autostart): add --no-console to autostart without a console window #1009

Closed
opened 2026-01-05 14:53:43 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LGUG2Z/komorebi/pull/598
Author: @amrbashir
Created: 11/26/2023
Status: Merged
Merged: 12/3/2023
Merged by: @LGUG2Z

Base: masterHead: feat/auto-start-without-console


📝 Commits (8)

  • 08494b4 feat(cli): autostart without a console window
  • 18f0a6e Revert "feat(cli): autostart without a console window"
  • e97aaa3 feat(cli): autostart without a console window
  • a43746e add behind --no-console flag
  • e1e511f reference the new binary in wix
  • d237553 Merge branch 'master' into feat/auto-start-without-console
  • 955131f remove no-console
  • f4a9b71 fix typo

📊 Changes

7 files changed (+56 additions, -4 deletions)

View changed files

📝 .goreleaser.yml (+9 -0)
📝 Cargo.lock (+4 -0)
📝 Cargo.toml (+1 -0)
komorebic-no-console/Cargo.toml (+15 -0)
komorebic-no-console/src/main.rs (+19 -0)
📝 komorebic/src/main.rs (+3 -4)
📝 wix/main.wxs (+5 -0)

📄 Description

So this PR actually contains two approaches for this in 08494b4and e97aaa3

The first one, 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.

The second one, 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.

Both have benefits and drawbacks, but the main benefit of the second approach (which I recommend anyways) is that it creates a smaller binary and thus doesn't bloat the final installer.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/LGUG2Z/komorebi/pull/598 **Author:** [@amrbashir](https://github.com/amrbashir) **Created:** 11/26/2023 **Status:** ✅ Merged **Merged:** 12/3/2023 **Merged by:** [@LGUG2Z](https://github.com/LGUG2Z) **Base:** `master` ← **Head:** `feat/auto-start-without-console` --- ### 📝 Commits (8) - [`08494b4`](https://github.com/LGUG2Z/komorebi/commit/08494b46ddc3b9db4ea9b7b1c3f7f007af9c9087) feat(cli): autostart without a console window - [`18f0a6e`](https://github.com/LGUG2Z/komorebi/commit/18f0a6e298e690f6a2bad0d0c496dcda1fca6079) Revert "feat(cli): autostart without a console window" - [`e97aaa3`](https://github.com/LGUG2Z/komorebi/commit/e97aaa38f9f3690e23b6520dbc0425d333db18e3) feat(cli): autostart without a console window - [`a43746e`](https://github.com/LGUG2Z/komorebi/commit/a43746ecd44222abf553ad3d0723345d37f544f5) add behind `--no-console` flag - [`e1e511f`](https://github.com/LGUG2Z/komorebi/commit/e1e511feb5104ef5a38f215fce5e77898ae4666c) reference the new binary in wix - [`d237553`](https://github.com/LGUG2Z/komorebi/commit/d237553a7804f993cb05002c248e95b1f675b714) Merge branch 'master' into feat/auto-start-without-console - [`955131f`](https://github.com/LGUG2Z/komorebi/commit/955131f2b29ba08d26f2a869034f8cbc6e169fd2) remove no-console - [`f4a9b71`](https://github.com/LGUG2Z/komorebi/commit/f4a9b7154bc22084c011578c164d49d3276fbe54) fix typo ### 📊 Changes **7 files changed** (+56 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.goreleaser.yml` (+9 -0) 📝 `Cargo.lock` (+4 -0) 📝 `Cargo.toml` (+1 -0) ➕ `komorebic-no-console/Cargo.toml` (+15 -0) ➕ `komorebic-no-console/src/main.rs` (+19 -0) 📝 `komorebic/src/main.rs` (+3 -4) 📝 `wix/main.wxs` (+5 -0) </details> ### 📄 Description So this PR actually contains two approaches for this in [`08494b4`](https://github.com/LGUG2Z/komorebi/commit/08494b46ddc3b9db4ea9b7b1c3f7f007af9c9087)and [`e97aaa3`](https://github.com/LGUG2Z/komorebi/commit/e97aaa38f9f3690e23b6520dbc0425d333db18e3) The first one, 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. The second one, 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`. Both have benefits and drawbacks, but the main benefit of the second approach (which I recommend anyways) is that it creates a smaller binary and thus doesn't bloat the final installer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-01-05 14:53:43 +01:00
adam closed this issue 2026-01-05 14:53:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#1009