diff --git a/.goreleaser.yml b/.goreleaser.yml index 508750b8..6587f54a 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -35,7 +35,6 @@ archives: name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}-{{ .Os }}" files: - LICENSE - - komorebi.sample.ahk - CHANGELOG.md checksum: diff --git a/README.md b/README.md index d7053ebf..9c9d443d 100644 --- a/README.md +++ b/README.md @@ -127,10 +127,14 @@ binaries from the latest GitHub Release: ```powershell scoop bucket add extras scoop install komorebi + +# To download the example configuration +iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk +iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk +iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk ``` -If you install _komorebi_ using Scoop, the binaries will automatically be added to your `Path` and a command will be -shown for you to run in order to get started using the sample configuration file. +If you install _komorebi_ using Scoop, the binaries will automatically be added to your `Path`. Thanks to [@sitiom](https://github.com/sitiom) for getting _komorebi_ added to the popular Scoop Extras bucket. @@ -152,7 +156,7 @@ cargo install --path komorebic --locked Once you have either the prebuilt binaries in your `Path`, or have compiled the binaries from source (these will already be in your `Path` if you installed Rust with [rustup](https://rustup.rs), which you absolutely should), you can -run `komorebic start` at a Powershell prompt, and you will see the following output: +run `komorebic start --await-configuration` at a Powershell prompt, and you will see the following output: ``` Start-Process komorebi -WindowStyle hidden diff --git a/justfile b/justfile index 04592e53..42a8a499 100644 --- a/justfile +++ b/justfile @@ -23,7 +23,8 @@ install: just install-komorebic just install-komorebi komorebic ahk-library - cat '%USERPROFILE%\.config\komorebi\komorebic.lib.ahk' > komorebic.lib.sample.ahk + cat '%USERPROFILE%\.config\komorebi\komorebic.lib.ahk' > komorebic.lib.ahk + cat '%USERPROFILE%\.config\komorebi\komorebi.generated.ahk' > komorebi.generated.ahk run: just install-komorebic diff --git a/komorebi.generated.ahk b/komorebi.generated.ahk new file mode 100644 index 00000000..09e2361b --- /dev/null +++ b/komorebi.generated.ahk @@ -0,0 +1,337 @@ +; Generated by komorebic.exe +; To use this file, add the line below to the top of your komorebi.ahk configuration file +; #Include %A_ScriptDir%\komorebi.generated.ahk + +; 1Password +Run, komorebic.exe float-rule exe "1Password.exe", , Hide + +; Adobe Creative Cloud +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application class "CreativeCloudDesktopWindowClass", , Hide + +; AutoHotkey +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "AutoHotkeyU64.exe", , Hide +Run, komorebic.exe float-rule title "Window Spy", , Hide + +; Beeper +Run, komorebic.exe identify-border-overflow-application exe "Beeper.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Beeper.exe", , Hide + +; Bitwarden +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Bitwarden.exe", , Hide + +; Calculator +Run, komorebic.exe float-rule title "Calculator", , Hide + +; Credential Manager UI Host +; Targets the Windows popup prompting you for a PIN instead of a password on 1Password etc. +Run, komorebic.exe float-rule exe "CredentialUIBroker.exe", , Hide + +; Cron +Run, komorebic.exe identify-border-overflow-application exe "Cron.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Cron.exe", , Hide + +; Discord +Run, komorebic.exe identify-border-overflow-application exe "Discord.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Discord.exe", , Hide + +; DiscordCanary +Run, komorebic.exe identify-border-overflow-application exe "DiscordCanary.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "DiscordCanary.exe", , Hide + +; DiscordDevelopment +Run, komorebic.exe identify-border-overflow-application exe "DiscordDeveloper.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "DiscordDeveloper.exe", , Hide + +; DiscordPTB +Run, komorebic.exe identify-border-overflow-application exe "DiscordPTB.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "DiscordPTB.exe", , Hide + +; ElectronMail +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ElectronMail.exe", , Hide + +; Element +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Element.exe", , Hide + +; ElevenClock +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ElevenClock.exe", , Hide + +; Epic Games Launcher +Run, komorebic.exe identify-border-overflow-application exe "EpicGamesLauncher.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "EpicGamesLauncher.exe", , Hide + +; Flow Launcher +Run, komorebic.exe identify-border-overflow-application exe "Flow.Launcher.exe", , Hide + +; GOG Galaxy +Run, komorebic.exe identify-border-overflow-application exe "GalaxyClient.exe", , Hide +Run, komorebic.exe manage-rule exe "GalaxyClient.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "GalaxyClient.exe", , Hide +; Targets a hidden window spawned by GOG Galaxy +Run, komorebic.exe float-rule class "Chrome_RenderWidgetHostHWND", , Hide + +; GoPro Webcam +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application class "GoPro Webcam", , Hide + +; Google Chrome +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "chrome.exe", , Hide + +; Google Drive +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "GoogleDriveFS.exe", , Hide + +; Inno Setup +; Target hidden window spawned by Inno Setup applications +Run, komorebic.exe float-rule class "TApplication", , Hide +; Target Inno Setup installers +Run, komorebic.exe float-rule class "TWizardForm", , Hide + +; IntelliJ IDEA +Run, komorebic.exe identify-object-name-change-application exe "idea64.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "idea64.exe", , Hide +; Targets JetBrains IDE popups and floating windows +Run, komorebic.exe float-rule class "SunAwtDialog", , Hide + +; Kleopatra +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "kleopatra.exe", , Hide + +; Kotatogram +Run, komorebic.exe identify-border-overflow-application exe "Kotatogram.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Kotatogram.exe", , Hide + +; Logi Bolt +Run, komorebic.exe float-rule exe "LogiBolt.exe", , Hide + +; LogiTune +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "LogiTune.exe", , Hide +Run, komorebic.exe float-rule exe "LogiTune.exe", , Hide + +; Logitech G HUB +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "lghub.exe", , Hide +Run, komorebic.exe identify-border-overflow-application exe "lghub.exe", , Hide + +; Logitech Options +Run, komorebic.exe float-rule exe "LogiOptionsUI.exe", , Hide + +; Mailspring +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "mailspring.exe", , Hide + +; ManyCam +Run, komorebic.exe identify-border-overflow-application exe "ManyCam.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ManyCam.exe", , Hide + +; Mica For Everyone + +; Microsoft Excel +Run, komorebic.exe identify-border-overflow-application exe "EXCEL.EXE", , Hide +Run, komorebic.exe identify-layered-application exe "EXCEL.EXE", , Hide +; Targets a hidden window spawned by Microsoft Office applications +Run, komorebic.exe float-rule class "_WwB", , Hide + +; Microsoft Outlook +Run, komorebic.exe identify-border-overflow-application exe "OUTLOOK.EXE", , Hide +Run, komorebic.exe identify-layered-application exe "OUTLOOK.EXE", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "OUTLOOK.EXE", , Hide + +; Microsoft PowerPoint +Run, komorebic.exe identify-border-overflow-application exe "POWERPNT.EXE", , Hide +Run, komorebic.exe identify-layered-application exe "POWERPNT.EXE", , Hide + +; Microsoft Teams +; Target Teams pop-up notification windows +Run, komorebic.exe float-rule title "Microsoft Teams Notifications", , Hide + +; Microsoft Word +Run, komorebic.exe identify-border-overflow-application exe "WINWORD.EXE", , Hide +Run, komorebic.exe identify-layered-application exe "WINWORD.EXE", , Hide + +; Modern Flyouts +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ModernFlyoutsHost.exe", , Hide + +; Mozilla Firefox +Run, komorebic.exe identify-object-name-change-application exe "firefox.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "firefox.exe", , Hide +; Targets invisible windows spawned by Firefox to show tab previews in the taskbar +Run, komorebic.exe float-rule class "MozillaTaskbarPreviewClass", , Hide + +; NVIDIA GeForce Experience +Run, komorebic.exe identify-border-overflow-application exe "NVIDIA GeForce Experience.exe", , Hide + +; NiceHash Miner +Run, komorebic.exe identify-border-overflow-application exe "nhm_app.exe", , Hide +Run, komorebic.exe manage-rule exe "nhm_app.exe", , Hide + +; NohBoard +Run, komorebic.exe float-rule exe "NohBoard.exe", , Hide + +; Notion Enhanced +Run, komorebic.exe identify-border-overflow-application exe "Notion Enhanced.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Notion Enhanced.exe", , Hide + +; OBS Studio (32-bit) +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "obs32.exe", , Hide + +; OBS Studio (64-bit) +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "obs64.exe", , Hide + +; ONLYOFFICE Editors +Run, komorebic.exe identify-border-overflow-application class "DocEditorsWindowClass", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application class "DocEditorsWindowClass", , Hide + +; Obsidian +Run, komorebic.exe identify-border-overflow-application exe "Obsidian.exe", , Hide +Run, komorebic.exe manage-rule exe "Obsidian.exe", , Hide + +; OpenRGB +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "OpenRGB.exe", , Hide + +; Paradox Launcher +Run, komorebic.exe float-rule exe "Paradox Launcher.exe", , Hide + +; PowerToys +; Target color picker dialog +Run, komorebic.exe float-rule exe "PowerToys.ColorPickerUI.exe", , Hide +; Target image resizer dialog +Run, komorebic.exe float-rule exe "PowerToys.ImageResizer.exe", , Hide + +; Process Hacker +Run, komorebic.exe identify-border-overflow-application exe "ProcessHacker.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ProcessHacker.exe", , Hide +Run, komorebic.exe float-rule exe "ProcessHacker.exe", , Hide + +; ProtonVPN +Run, komorebic.exe identify-border-overflow-application exe "ProtonVPN.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ProtonVPN.exe", , Hide + +; PyCharm +Run, komorebic.exe identify-object-name-change-application exe "pycharm64.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "pycharm64.exe", , Hide + +; QuickLook +Run, komorebic.exe float-rule exe "QuickLook.exe", , Hide + +; RepoZ +Run, komorebic.exe float-rule exe "RepoZ.exe", , Hide + +; Roblox FPS Unlocker +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "rbxfpsunlocker.exe", , Hide + +; RoundedTB +Run, komorebic.exe identify-border-overflow-application exe "RoundedTB.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "RoundedTB.exe", , Hide + +; ShareX +Run, komorebic.exe identify-border-overflow-application exe "ShareX.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ShareX.exe", , Hide + +; Signal +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "signal.exe", , Hide + +; SiriKali +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "sirikali.exe", , Hide + +; Slack +Run, komorebic.exe identify-border-overflow-application exe "Slack.exe", , Hide +Run, komorebic.exe manage-rule exe "Slack.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Slack.exe", , Hide + +; Slack +Run, komorebic.exe identify-border-overflow-application exe "slack.exe", , Hide +Run, komorebic.exe manage-rule exe "slack.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "slack.exe", , Hide + +; Spotify +Run, komorebic.exe identify-border-overflow-application exe "Spotify.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Spotify.exe", , Hide + +; Steam +Run, komorebic.exe identify-border-overflow-application class "vguiPopupWindow", , Hide + +; Task Manager +Run, komorebic.exe float-rule class "TaskManagerWindow", , Hide + +; Telegram +Run, komorebic.exe identify-border-overflow-application exe "Telegram.exe", , Hide +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "Telegram.exe", , Hide + +; TouchCursor +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "tcconfig.exe", , Hide +Run, komorebic.exe float-rule exe "tcconfig.exe", , Hide + +; TranslucentTB +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "TranslucentTB.exe", , Hide + +; Visual Studio Code +Run, komorebic.exe identify-border-overflow-application exe "Code.exe", , Hide + +; Windows Console (conhost.exe) +Run, komorebic.exe manage-rule class "ConsoleWindowClass", , Hide + +; Windows Explorer +; Targets copy/move operation windows +Run, komorebic.exe float-rule class "OperationStatusWindow", , Hide +Run, komorebic.exe float-rule title "Control Panel", , Hide + +; Windows Installer +; Targets MSI Installers +Run, komorebic.exe float-rule class "MsiDialogCloseClass", , Hide + +; Wox +; Targets a hidden window spawned by Wox +Run, komorebic.exe float-rule title "Hotkey sink", , Hide + +; Zoom +Run, komorebic.exe float-rule exe "Zoom.exe", , Hide + +; qBittorrent +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "qbittorrent.exe", , Hide + +; ueli +; If you have disabled minimize/close to tray for this application, you can delete/comment out the next line +Run, komorebic.exe identify-tray-application exe "ueli.exe", , Hide +Run, komorebic.exe float-rule exe "ueli.exe", , Hide diff --git a/komorebi.sample.ahk b/komorebi.sample.ahk index c938a5d6..812142d6 100644 --- a/komorebi.sample.ahk +++ b/komorebi.sample.ahk @@ -1,225 +1,93 @@ #SingleInstance Force +; You can generate a fresh version of this file with "komorebic ahk-library" +#Include %A_ScriptDir%\komorebic.lib.ahk +; https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations +#Include %A_ScriptDir%\komorebi.generated.ahk + +; Default to minimizing windows when switching workspaces +WindowHidingBehaviour("minimize") + +; Set cross-monitor move behaviour to insert instead of swap +CrossMonitorMoveBehaviour("insert") + ; Enable hot reloading of changes to this file -Run, komorebic.exe watch-configuration enable, , Hide +WatchConfiguration("enable") + +; Ensure there is 1 workspace created on monitor 0 +EnsureWorkspaces(0, 1) ; Configure the invisible border dimensions -Run, komorebic.exe invisible-borders 7 0 14 7, , Hide +InvisibleBorders(7, 0, 14, 7) -; Enable focus follows mouse -Run, komorebic.exe focus-follows-mouse enable, , Hide +; Configure the 1st workspace +WorkspaceName(0, 0, "I") -; Ensure there are 3 workspaces created on monitor 0 -Run, komorebic.exe ensure-workspaces 0 5, , Hide +; Uncomment the next two lines if you want a visual border drawn around the focused window +; ActiveWindowBorderColour(66, 165, 245) ; this is a nice blue colour +; ActiveWindowBorder("enable") -; Give the workspaces some optional names -Run, komorebic.exe workspace-name 0 0 bsp, , Hide -Run, komorebic.exe workspace-name 0 1 columns, , Hide -Run, komorebic.exe workspace-name 0 2 thicc, , Hide -Run, komorebic.exe workspace-name 0 3 matrix, , Hide -Run, komorebic.exe workspace-name 0 4 floaty, , Hide +; Allow komorebi to start managing windows +CompleteConfiguration() -; Set the padding of the different workspaces -Run, komorebic.exe workspace-padding 0 1 30, , Hide -Run, komorebic.exe container-padding 0 1 30, , Hide -Run, komorebic.exe workspace-padding 0 2 200, , Hide -Run, komorebic.exe workspace-padding 0 3 0, , Hide -Run, komorebic.exe container-padding 0 3 0, , Hide - -; Set the layouts of different workspaces -Run, komorebic.exe workspace-layout 0 1 columns, , Hide - -; Set the floaty layout to not tile any windows -Run, komorebic.exe workspace-tiling 0 4 disable, , Hide - -; Always show chat apps on the second workspace -Run, komorebic.exe workspace-rule exe slack.exe 0 1, , Hide -Run, komorebic.exe workspace-rule exe Discord.exe 0 1, , Hide - -; Always float IntelliJ popups, matching on class -Run, komorebic.exe float-rule class SunAwtDialog, , Hide -; Always float Control Panel, matching on title -Run, komorebic.exe float-rule title "Control Panel", , Hide -; Always float Task Manager, matching on class -Run, komorebic.exe float-rule class TaskManagerWindow, , Hide -; Always float Wally, matching on executable name -Run, komorebic.exe float-rule exe Wally.exe, , Hide -Run, komorebic.exe float-rule exe wincompose.exe, , Hide -; Always float Calculator app, matching on window title -Run, komorebic.exe float-rule title Calculator, , Hide -Run, komorebic.exe float-rule exe 1Password.exe, , Hide - -; Always manage forcibly these applications that don't automatically get picked up by komorebi -Run, komorebic.exe manage-rule exe TIM.exe, , Hide - -; Identify applications that close to the tray -Run, komorebic.exe identify-tray-application exe Discord.exe, , Hide - -; Identify applications that have overflowing borders -Run, komorebic.exe identify-border-overflow exe Discord.exe, , Hide - -; Change the focused window, Alt + Vim direction keys +; Change the focused window, Alt + Vim direction keys (HJKL) !h:: -Run, komorebic.exe focus left, , Hide +Focus("left") return !j:: -Run, komorebic.exe focus down, , Hide +Focus("down") return !k:: -Run, komorebic.exe focus up, , Hide +Focus("up") return !l:: -Run, komorebic.exe focus right, , Hide +Focus("right") return -; Move the focused window in a given direction, Alt + Shift + Vim direction keys +; Move the focused window in a given direction, Alt + Shift + Vim direction keys (HJKL) !+h:: -Run, komorebic.exe move left, , Hide +Move("left") return !+j:: -Run, komorebic.exe move down, , Hide +Move("down") return !+k:: -Run, komorebic.exe move up, , Hide +Move("up") return !+l:: -Run, komorebic.exe move right, , Hide +Move("right") return -; Stack the focused window in a given direction, Alt + Shift + direction keys -!+Left:: -Run, komorebic.exe stack left, , Hide -return - -!+Down:: -Run, komorebic.exe stack down, , Hide -return - -!+Up:: -Run, komorebic.exe stack up, , Hide -return - -!+Right:: -Run, komorebic.exe stack right, , Hide -return - -!]:: -Run, komorebic.exe cycle-stack next, , Hide -return - -![:: -Run, komorebic.exe cycle-stack previous, , Hide -return - -; Unstack the focused window, Alt + Shift + D -!+d:: -Run, komorebic.exe unstack, , Hide -return - -; Promote the focused window to the top of the tree, Alt + Shift + Enter -!+Enter:: -Run, komorebic.exe promote, , Hide -return - -; Switch to an equal-width, max-height column layout on the main workspace, Alt + Shift + C -!+c:: -Run, komorebic.exe workspace-layout 0 0 columns, , Hide -return - -; Switch to the default bsp tiling layout on the main workspace, Alt + Shift + T -!+t:: -Run, komorebic.exe workspace-layout 0 0 bsp, , Hide -return - -; Toggle the Monocle layout for the focused window, Alt + Shift + F -!+f:: -Run, komorebic.exe toggle-monocle, , Hide -return - -; Toggle native maximize for the focused window, Alt + Shift + = -!+=:: -Run, komorebic.exe toggle-maximize, , Hide -return - -; Flip horizontally, Alt + X -!x:: -Run, komorebic.exe flip-layout horizontal, , Hide -return - -; Flip vertically, Alt + Y -!y:: -Run, komorebic.exe flip-layout vertical, , Hide -return - -; Force a retile if things get janky, Alt + Shift + R -!+r:: -Run, komorebic.exe retile, , Hide -return - -; Float the focused window, Alt + T -!t:: -Run, komorebic.exe toggle-float, , Hide -return - -; Reload ~/komorebi.ahk, Alt + O -!o:: -Run, komorebic.exe reload-configuration, , Hide -return - -; Pause responding to any window events or komorebic commands, Alt + P -!p:: -Run, komorebic.exe toggle-pause, , Hide -return - -; Switch to workspace -!1:: -Send ! -Run, komorebic.exe focus-workspace 0, , Hide -return - -!2:: -Send ! -Run, komorebic.exe focus-workspace 1, , Hide -return - -!3:: -Send ! -Run, komorebic.exe focus-workspace 2, , Hide -return - -!4:: -Send ! -Run, komorebic.exe focus-workspace 3, , Hide -return - -!5:: -Send ! -Run, komorebic.exe focus-workspace 4, , Hide -return - -; Move window to workspace -!+1:: -Run, komorebic.exe move-to-workspace 0, , Hide -return - -!+2:: -Run, komorebic.exe move-to-workspace 1, , Hide -return - -!+3:: -Run, komorebic.exe move-to-workspace 2, , Hide -return - -!+4:: -Run, komorebic.exe move-to-workspace 3, , Hide -return - -!+5:: -Run, komorebic.exe move-to-workspace 4, , Hide -return +; There are many more commands that you can bind to whatever keys combinations you want! +; +; Have a look at the komorebic.lib.ahk file to see which arguments are required by different commands +; +; If you want more information about a command, you can run every komorebic command with "--help" +; +; For example, if you see this in komorebic.lib.ahk +; +; WorkspaceLayout(monitor, workspace, value) { +; Run, komorebic.exe workspace-layout %monitor% %workspace% %value%, , Hide +; } +; +; Just run "komorebic.exe workspace-layout --help" and you'll get all the information you need to use the command +; +; komorebic.exe-workspace-layout +; Set the layout for the specified workspace +; +; USAGE: +; komorebic.exe workspace-layout +; +; ARGS: +; Monitor index (zero-indexed) +; Workspace index on the specified monitor (zero-indexed) +; [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack] +; +; OPTIONS: +; -h, --help Print help information diff --git a/komorebi.sample.with.lib.ahk b/komorebi.sample.with.lib.ahk deleted file mode 100644 index 146347e0..00000000 --- a/komorebi.sample.with.lib.ahk +++ /dev/null @@ -1,243 +0,0 @@ -#SingleInstance Force -#Include %A_ScriptDir%\komorebic.lib.ahk - -; Default to minimizing windows when switching workspaces -WindowHidingBehaviour("minimize") - -; Enable hot reloading of changes to this file -WatchConfiguration("enable") - -; Ensure there are 5 workspaces created on monitor 0 -EnsureWorkspaces(0, 5) - -; Configure the invisible border dimensions -InvisibleBorders(7, 0, 14, 7) - -; Configure the 1st workspace -WorkspaceName(0, 0, "bsp") - -; Configure the 2nd workspace -WorkspaceName(0, 1, "columns") ; Optionally set the name of the workspace -WorkspacePadding(0, 1, 30) ; Set the padding around the edge of the screen -ContainerPadding(0, 1, 30) ; Set the padding between the containers on the screen -WorkspaceRule("exe", "slack.exe", 0, 1) ; Always show chat apps on this workspace - -; Configure the 3rd workspace -WorkspaceName(0, 2, "thicc") -WorkspacePadding(0, 2, 200) ; Set some super thicc padding - -; Configure the 4th workspace -WorkspaceName(0, 3, "matrix") -WorkspacePadding(0, 3, 0) ; No padding at all -ContainerPadding(0, 3, 0) ; Matrix-y hacker vibes - -; Configure the 5th workspace -WorkspaceName(0, 4, "floaty") -WorkspaceTiling(0, 4, "disable") ; Everything floats here - -; Configure floating rules -FloatRule("class", "SunAwtDialog") ; All the IntelliJ popups -FloatRule("title", "Control Panel") -FloatRule("class", "TaskManagerWindow") -FloatRule("exe", "Wally.exe") -FloatRule("exe", "wincompose.exe") -FloatRule("exe", "1Password.exe") -FloatRule("exe", "Wox.exe") -FloatRule("exe", "ddm.exe") -FloatRule("class", "Chrome_RenderWidgetHostHWND") ; GOG Electron invisible overlay -FloatRule("class", "CEFCLIENT") - -; Identify Minimize-to-Tray Applications -IdentifyTrayApplication("exe", "Discord.exe") -IdentifyTrayApplication("exe", "Spotify.exe") -IdentifyTrayApplication("exe", "GalaxyClient.exe") - -; Identify Electron applications with overflowing borders -IdentifyBorderOverflow("exe", "Discord.exe") -IdentifyBorderOverflow("exe", "Spotify.exe") -IdentifyBorderOverflow("exe", "GalaxyClient.exe") -IdentifyBorderOverflow("class", "ZPFTEWndClass") - -; Identify applications to be forcibly managed -ManageRule("exe", "GalaxyClient.exe") - -; Change the focused window, Alt + Vim direction keys -!h:: -Focus("left") -return - -!j:: -Focus("down") -return - -!k:: -Focus("up") -return - -!l:: -Focus("right") -return - -; Move the focused window in a given direction, Alt + Shift + Vim direction keys -!+h:: -Move("left") -return - -!+j:: -Move("down") -return - -!+k:: -Move("up") -return - -!+l:: -Move("right") -return - -; Stack the focused window in a given direction, Alt + Shift + direction keys -!+Left:: -Stack("left") -return - -!+Down:: -Stack("down") -return - -!+Up:: -Stack("up") -return - -!+Right:: -Stack("right") -return - -!]:: -CycleStack("next") -return - -![:: -CycleStack("previous") -return - -; Unstack the focused window, Alt + Shift + D -!+d:: -Unstack() -return - -; Promote the focused window to the top of the tree, Alt + Shift + Enter -!+Enter:: -Promote() -return - -; Manage the focused window -!=:: -Manage() -return - -; Unmanage the focused window -!-:: -Unmanage() -return - -; Switch to an equal-width, max-height column layout on the main workspace, Alt + Shift + C -!+c:: -ChangeLayout("columns") -return - -; Switch to the default bsp tiling layout on the main workspace, Alt + Shift + T -!+t:: -ChangeLayout("bsp") -return - -; Toggle the Monocle layout for the focused window, Alt + Shift + F -!+f:: -ToggleMonocle() -return - -; Toggle native maximize for the focused window, Alt + Shift + = -!+=:: -ToggleMaximize() -return - -; Flip horizontally, Alt + X -!x:: -FlipLayout("horizontal") -return - -; Flip vertically, Alt + Y -!y:: -FlipLayout("vertical") -return - -; Force a retile if things get janky, Alt + Shift + R -!+r:: -Retile() -return - -; Float the focused window, Alt + T -!t:: -ToggleFloat() -return - -; Reload ~/komorebi.ahk, Alt + O -!o:: -ReloadConfiguration() -return - -; Pause responding to any window events or komorebic commands, Alt + P -!p:: -TogglePause() -return - -; Enable focus follows mouse -!0:: -ToggleFocusFollowsMouse("komorebi") -return - -; Switch to workspace -!1:: -Send ! -FocusWorkspace(0) -return - -!2:: -Send ! -FocusWorkspace(1) -return - -!3:: -Send ! -FocusWorkspace(2) -return - -!4:: -Send ! -FocusWorkspace(3) -return - -!5:: -Send ! -FocusWorkspace(4) -return - -; Move window to workspace -!+1:: -MoveToWorkspace(0) -return - -!+2:: -MoveToWorkspace(1) -return - -!+3:: -MoveToWorkspace(2) -return - -!+4:: -MoveToWorkspace(3) -return - -!+5:: -MoveToWorkspace(4) -return diff --git a/komorebic.lib.sample.ahk b/komorebic.lib.ahk similarity index 100% rename from komorebic.lib.sample.ahk rename to komorebic.lib.ahk