-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 08494b4. * 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
- Loading branch information
Showing
7 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "komorebic-no-console" | ||
version = "0.1.19" | ||
authors = ["Jade Iqbal <jadeiqbal@fastmail.com>"] | ||
description = "The command-line interface (without a console) for Komorebi, a tiling window manager for Windows" | ||
categories = ["cli", "tiling-window-manager", "windows"] | ||
repository = "https://github.com/LGUG2Z/komorebi" | ||
license = "MIT" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#![windows_subsystem = "windows"] | ||
|
||
use std::io; | ||
use std::os::windows::process::CommandExt; | ||
use std::process::Command; | ||
|
||
const CREATE_NO_WINDOW: u32 = 0x08000000; | ||
|
||
fn main() -> io::Result<()> { | ||
let mut current_exe = std::env::current_exe().expect("unable to get exec path"); | ||
current_exe.pop(); | ||
let komorebic_exe = current_exe.join("komorebic.exe"); | ||
|
||
Command::new(komorebic_exe) | ||
.args(std::env::args_os().skip(1)) | ||
.creation_flags(CREATE_NO_WINDOW) | ||
.status() | ||
.map(|_| ()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters