mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
refactor(ahk): remove derive-ahk and references
This commit finally sunsets the derive-ahk proc macro and the ahk-library cli command. There is now a dedicated, stripped down komorebi.ahk example on the docs website which mirrors the contents and style of the sample whkdrc: https://lgug2z.github.io/komorebi/common-workflows/autohotkey.html
This commit is contained in:
@@ -11,7 +11,6 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
derive-ahk = { path = "../derive-ahk" }
|
||||
komorebi-core = { path = "../komorebi-core" }
|
||||
komorebi-client = { path = "../komorebi-client" }
|
||||
|
||||
@@ -21,7 +20,6 @@ color-eyre = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
dunce = { workspace = true }
|
||||
fs-tail = "0.1"
|
||||
heck = "0.5"
|
||||
lazy_static = "1"
|
||||
miette = { version = "7", features = ["fancy"] }
|
||||
paste = "1"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![warn(clippy::all, clippy::nursery, clippy::pedantic)]
|
||||
#![warn(clippy::all)]
|
||||
#![allow(clippy::missing_errors_doc, clippy::doc_markdown)]
|
||||
|
||||
use chrono::Local;
|
||||
@@ -24,7 +24,6 @@ use color_eyre::eyre::bail;
|
||||
use color_eyre::Result;
|
||||
use dirs::data_local_dir;
|
||||
use fs_tail::TailedFile;
|
||||
use heck::ToKebabCase;
|
||||
use komorebi_core::resolve_home_path;
|
||||
use lazy_static::lazy_static;
|
||||
use miette::NamedSource;
|
||||
@@ -39,8 +38,6 @@ use windows::Win32::UI::WindowsAndMessaging::ShowWindow;
|
||||
use windows::Win32::UI::WindowsAndMessaging::SHOW_WINDOW_CMD;
|
||||
use windows::Win32::UI::WindowsAndMessaging::SW_RESTORE;
|
||||
|
||||
use derive_ahk::AhkFunction;
|
||||
use derive_ahk::AhkLibrary;
|
||||
use komorebi_client::StaticConfig;
|
||||
use komorebi_core::config_generation::ApplicationConfigurationGenerator;
|
||||
use komorebi_core::ApplicationIdentifier;
|
||||
@@ -102,15 +99,6 @@ lazy_static! {
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
trait AhkLibrary {
|
||||
fn generate_ahk_library() -> String;
|
||||
}
|
||||
|
||||
trait AhkFunction {
|
||||
fn generate_ahk_function() -> String;
|
||||
}
|
||||
|
||||
#[derive(thiserror::Error, Debug, miette::Diagnostic)]
|
||||
#[error("{message}")]
|
||||
#[diagnostic(code(komorebi::configuration), help("try fixing this syntax error"))]
|
||||
@@ -142,7 +130,7 @@ macro_rules! gen_enum_subcommand_args {
|
||||
( $( $name:ident: $element:ty ),+ $(,)? ) => {
|
||||
$(
|
||||
paste! {
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
#[clap(value_enum)]
|
||||
[<$element:snake>]: $element
|
||||
@@ -182,7 +170,7 @@ macro_rules! gen_target_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
/// Target index (zero-indexed)
|
||||
target: usize,
|
||||
@@ -207,7 +195,7 @@ macro_rules! gen_named_target_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -231,7 +219,7 @@ macro_rules! gen_workspace_subcommand_args {
|
||||
( $( $name:ident: $(#[enum] $(@$value_enum:tt)?)? $value:ty ),+ $(,)? ) => (
|
||||
paste! {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct [<Workspace $name>] {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -263,7 +251,7 @@ macro_rules! gen_named_workspace_subcommand_args {
|
||||
( $( $name:ident: $(#[enum] $(@$value_enum:tt)?)? $value:ty ),+ $(,)? ) => (
|
||||
paste! {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct [<NamedWorkspace $name>] {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -285,7 +273,7 @@ gen_named_workspace_subcommand_args! {
|
||||
Tiling: #[enum] BooleanState,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct ClearWorkspaceLayoutRules {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -294,7 +282,7 @@ pub struct ClearWorkspaceLayoutRules {
|
||||
workspace: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct WorkspaceCustomLayout {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -306,7 +294,7 @@ pub struct WorkspaceCustomLayout {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct NamedWorkspaceCustomLayout {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -315,7 +303,7 @@ pub struct NamedWorkspaceCustomLayout {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct WorkspaceLayoutRule {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -330,7 +318,7 @@ pub struct WorkspaceLayoutRule {
|
||||
layout: DefaultLayout,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct NamedWorkspaceLayoutRule {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -342,7 +330,7 @@ pub struct NamedWorkspaceLayoutRule {
|
||||
layout: DefaultLayout,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct WorkspaceCustomLayoutRule {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -357,7 +345,7 @@ pub struct WorkspaceCustomLayoutRule {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct NamedWorkspaceCustomLayoutRule {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -369,7 +357,7 @@ pub struct NamedWorkspaceCustomLayoutRule {
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct Resize {
|
||||
#[clap(value_enum)]
|
||||
edge: OperationDirection,
|
||||
@@ -377,7 +365,7 @@ struct Resize {
|
||||
sizing: Sizing,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct ResizeAxis {
|
||||
#[clap(value_enum)]
|
||||
axis: Axis,
|
||||
@@ -385,13 +373,13 @@ struct ResizeAxis {
|
||||
sizing: Sizing,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct ResizeDelta {
|
||||
/// The delta of pixels by which to increase or decrease window dimensions when resizing
|
||||
pixels: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct InvisibleBorders {
|
||||
/// Size of the left invisible border
|
||||
left: i32,
|
||||
@@ -403,7 +391,7 @@ struct InvisibleBorders {
|
||||
bottom: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct GlobalWorkAreaOffset {
|
||||
/// Size of the left work area offset (set right to left * 2 to maintain right padding)
|
||||
left: i32,
|
||||
@@ -415,7 +403,7 @@ struct GlobalWorkAreaOffset {
|
||||
bottom: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct MonitorWorkAreaOffset {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -429,7 +417,7 @@ struct MonitorWorkAreaOffset {
|
||||
bottom: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct MonitorIndexPreference {
|
||||
/// Preferred monitor index (zero-indexed)
|
||||
index_preference: usize,
|
||||
@@ -443,7 +431,7 @@ struct MonitorIndexPreference {
|
||||
bottom: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct DisplayIndexPreference {
|
||||
/// Preferred monitor index (zero-indexed)
|
||||
index_preference: usize,
|
||||
@@ -451,7 +439,7 @@ struct DisplayIndexPreference {
|
||||
display: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct EnsureWorkspaces {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -459,7 +447,7 @@ struct EnsureWorkspaces {
|
||||
workspace_count: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct EnsureNamedWorkspaces {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -467,7 +455,7 @@ struct EnsureNamedWorkspaces {
|
||||
names: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct FocusMonitorWorkspace {
|
||||
/// Target monitor index (zero-indexed)
|
||||
target_monitor: usize,
|
||||
@@ -475,7 +463,7 @@ struct FocusMonitorWorkspace {
|
||||
target_workspace: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct SendToMonitorWorkspace {
|
||||
/// Target monitor index (zero-indexed)
|
||||
target_monitor: usize,
|
||||
@@ -483,7 +471,7 @@ pub struct SendToMonitorWorkspace {
|
||||
target_workspace: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
pub struct MoveToMonitorWorkspace {
|
||||
/// Target monitor index (zero-indexed)
|
||||
target_monitor: usize,
|
||||
@@ -495,7 +483,7 @@ macro_rules! gen_focused_workspace_padding_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
/// Pixels size to set as an integer
|
||||
size: i32,
|
||||
@@ -513,7 +501,7 @@ macro_rules! gen_padding_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
/// Monitor index (zero-indexed)
|
||||
monitor: usize,
|
||||
@@ -535,7 +523,7 @@ macro_rules! gen_named_padding_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
/// Target workspace name
|
||||
workspace: String,
|
||||
@@ -556,7 +544,7 @@ macro_rules! gen_padding_adjustment_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
#[clap(value_enum)]
|
||||
sizing: Sizing,
|
||||
@@ -576,7 +564,7 @@ macro_rules! gen_application_target_subcommand_args {
|
||||
// SubCommand Pattern
|
||||
( $( $name:ident ),+ $(,)? ) => {
|
||||
$(
|
||||
#[derive(clap::Parser, derive_ahk::AhkFunction)]
|
||||
#[derive(clap::Parser)]
|
||||
pub struct $name {
|
||||
#[clap(value_enum)]
|
||||
identifier: ApplicationIdentifier,
|
||||
@@ -597,7 +585,7 @@ gen_application_target_subcommand_args! {
|
||||
RemoveTitleBar,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct InitialWorkspaceRule {
|
||||
#[clap(value_enum)]
|
||||
identifier: ApplicationIdentifier,
|
||||
@@ -609,7 +597,7 @@ struct InitialWorkspaceRule {
|
||||
workspace: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct InitialNamedWorkspaceRule {
|
||||
#[clap(value_enum)]
|
||||
identifier: ApplicationIdentifier,
|
||||
@@ -619,7 +607,7 @@ struct InitialNamedWorkspaceRule {
|
||||
workspace: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct WorkspaceRule {
|
||||
#[clap(value_enum)]
|
||||
identifier: ApplicationIdentifier,
|
||||
@@ -631,7 +619,7 @@ struct WorkspaceRule {
|
||||
workspace: usize,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct NamedWorkspaceRule {
|
||||
#[clap(value_enum)]
|
||||
identifier: ApplicationIdentifier,
|
||||
@@ -641,13 +629,13 @@ struct NamedWorkspaceRule {
|
||||
workspace: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct ToggleFocusFollowsMouse {
|
||||
#[clap(value_enum, short, long, default_value = "windows")]
|
||||
implementation: FocusFollowsMouseImplementation,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct FocusFollowsMouse {
|
||||
#[clap(value_enum, short, long, default_value = "windows")]
|
||||
implementation: FocusFollowsMouseImplementation,
|
||||
@@ -655,13 +643,13 @@ struct FocusFollowsMouse {
|
||||
boolean_state: BooleanState,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct Border {
|
||||
#[clap(value_enum)]
|
||||
boolean_state: BooleanState,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct BorderColour {
|
||||
#[clap(value_enum, short, long, default_value = "single")]
|
||||
window_kind: WindowKind,
|
||||
@@ -673,19 +661,19 @@ struct BorderColour {
|
||||
b: u32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct BorderWidth {
|
||||
/// Desired width of the window border
|
||||
width: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct BorderOffset {
|
||||
/// Desired offset of the window border
|
||||
offset: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
struct Start {
|
||||
/// Allow the use of komorebi's custom focus-follows-mouse implementation
|
||||
@@ -708,56 +696,56 @@ struct Start {
|
||||
ahk: bool,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct Stop {
|
||||
/// Stop whkd if it is running as a background process
|
||||
#[clap(long)]
|
||||
whkd: bool,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct SaveResize {
|
||||
/// File to which the resize layout dimensions should be saved
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct LoadResize {
|
||||
/// File from which the resize layout dimensions should be loaded
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct LoadCustomLayout {
|
||||
/// JSON or YAML file from which the custom layout definition should be loaded
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct SubscribeSocket {
|
||||
/// Name of the socket to send event notifications to
|
||||
socket: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct UnsubscribeSocket {
|
||||
/// Name of the socket to stop sending event notifications to
|
||||
socket: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct SubscribePipe {
|
||||
/// Name of the pipe to send event notifications to (without "\\.\pipe\" prepended)
|
||||
named_pipe: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct UnsubscribePipe {
|
||||
/// Name of the pipe to stop sending event notifications to (without "\\.\pipe\" prepended)
|
||||
named_pipe: String,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct AhkAppSpecificConfiguration {
|
||||
/// YAML file from which the application-specific configurations should be loaded
|
||||
path: PathBuf,
|
||||
@@ -765,7 +753,7 @@ struct AhkAppSpecificConfiguration {
|
||||
override_path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct PwshAppSpecificConfiguration {
|
||||
/// YAML file from which the application-specific configurations should be loaded
|
||||
path: PathBuf,
|
||||
@@ -773,19 +761,19 @@ struct PwshAppSpecificConfiguration {
|
||||
override_path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct FormatAppSpecificConfiguration {
|
||||
/// YAML file from which the application-specific configurations should be loaded
|
||||
path: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct AltFocusHack {
|
||||
#[clap(value_enum)]
|
||||
boolean_state: BooleanState,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
#[derive(Parser)]
|
||||
struct EnableAutostart {
|
||||
/// Path to a static configuration JSON file
|
||||
#[clap(action, short, long)]
|
||||
@@ -808,7 +796,7 @@ struct Opts {
|
||||
subcmd: SubCommand,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkLibrary)]
|
||||
#[derive(Parser)]
|
||||
enum SubCommand {
|
||||
#[clap(hide = true)]
|
||||
Docgen,
|
||||
@@ -1180,8 +1168,6 @@ enum SubCommand {
|
||||
MouseFollowsFocus(MouseFollowsFocus),
|
||||
/// Toggle mouse follows focus on all workspaces
|
||||
ToggleMouseFollowsFocus,
|
||||
/// Generate a library of AutoHotKey helper functions
|
||||
AhkLibrary,
|
||||
/// Generate common app-specific configurations and fixes to use in komorebi.ahk
|
||||
#[clap(arg_required_else_help = true)]
|
||||
#[clap(alias = "ahk-asc")]
|
||||
@@ -1465,35 +1451,6 @@ fn main() -> Result<()> {
|
||||
println!("{}", whkdrc.display());
|
||||
}
|
||||
}
|
||||
SubCommand::AhkLibrary => {
|
||||
let library = HOME_DIR.join("komorebic.lib.ahk");
|
||||
let mut file = OpenOptions::new()
|
||||
.write(true)
|
||||
.create(true)
|
||||
.truncate(true)
|
||||
.open(library.clone())?;
|
||||
|
||||
let output: String = SubCommand::generate_ahk_library();
|
||||
let fixed_id = output.replace("%id%", "\"%id%\"");
|
||||
let fixed_stop_def = fixed_id.replace("Stop(whkd)", "Stop()");
|
||||
let fixed_output =
|
||||
fixed_stop_def.replace("komorebic.exe stop --whkd %whkd%", "komorebic.exe stop");
|
||||
|
||||
file.write_all(fixed_output.as_bytes())?;
|
||||
|
||||
println!(
|
||||
"\nAHKv1 helper library for komorebic written to {}",
|
||||
library.to_string_lossy()
|
||||
);
|
||||
|
||||
println!("\nYou can convert this file to AHKv2 syntax using https://github.com/mmikeww/AHK-v2-script-converter");
|
||||
|
||||
println!(
|
||||
"\nYou can include the converted library at the top of your komorebi.ahk config with this line:"
|
||||
);
|
||||
|
||||
println!("\n#Include komorebic.lib.ahk");
|
||||
}
|
||||
SubCommand::Log => {
|
||||
let timestamp = Local::now().format("%Y-%m-%d").to_string();
|
||||
let color_log = std::env::temp_dir().join(format!("komorebi.log.{timestamp}"));
|
||||
|
||||
Reference in New Issue
Block a user