### Install komokana via Scoop Source: https://github.com/lgug2z/komokana/blob/master/README.md Adds the 'extras' bucket to Scoop and then installs komokana. ```powershell scoop bucket add extras scoop install komokana ``` -------------------------------- ### Install komorebi via Scoop Source: https://github.com/lgug2z/komokana/blob/master/README.md Installs the latest version of komorebi from the 'extras' bucket using Scoop. ```powershell scoop bucket add extras scoop install komorebi ``` -------------------------------- ### Running Komokana Command Example Source: https://github.com/lgug2z/komokana/blob/master/README.md Demonstrates the command-line usage for running Komokana with specified port, default layer, and configuration file path. Ensure Komorebi and Kanata are running beforehand. ```bash komokana -p [KANATA_PORT] -d [DEFAULT_LAYER] -c [PATH_TO_YOUR_CONFIG] ``` -------------------------------- ### Install komokana via WinGet Source: https://github.com/lgug2z/komokana/blob/master/README.md Installs the latest version of komokana using the WinGet package manager. ```powershell winget install LGUG2Z.komokana ``` -------------------------------- ### Build komokana from Source Source: https://github.com/lgug2z/komokana/blob/master/README.md Compiles the komokana source code using Cargo, installing the binary. Requires a working Rust development environment and the x86_64-pc-windows-msvc toolchain. ```powershell cargo install --path . --locked ``` -------------------------------- ### Komokana YAML Configuration Example Source: https://github.com/lgug2z/komokana/blob/master/README.md Configures Komokana to switch layers based on application executables, window titles, and virtual key codes. This YAML file defines rules for layer management. ```yaml - exe: "firefox.exe" # when a window with this exe is active target_layer: "firefox" # switch to this layer, a vim-like layer just for browsing! title_overrides: # unless... - title: "Slack |" # the window title matches this # valid matching strategies are: starts_with, ends_with, contains and equals strategy: "starts_with" # matching with this matching strategy target_layer: "qwerty" # if it does, then switch to this layer for chatting - title: "Mozilla Firefox" # new firefox tab, we'll probably want to switch to qwerty mode to type a url! strategy: "equals" target_layer: "qwerty" virtual_key_overrides: # unless... # list of key codes and their decimal values here: https://cherrytree.at/misc/vk.htm - virtual_key_code: 18 # this key is held down (alt in this case) when the window becomes active targer_layer: "qwerty" # if it is, then switch to this layer, so that we can continue switching window focus with alt+hjkl virtual_key_ignores: # alternatively - 18 # if this key is held down (alt in this case), then don't make any layer switches # your normal layer might have a tap-hold on j since it's a such convenient and ergonomic key # but it sucks to be in vim, holding down j to move down and have nothing happen because of the hold... # no worries! let's switch to a layer which removes the tap-hold on the j when we are in windows # where we use vim or vim editing extensions! - exe: "WindowsTerminal.exe" target_layer: "editor" - exe: "idea64.exe" target_layer: "editor" ``` -------------------------------- ### Configure yasb Widget for Komokana Source: https://github.com/lgug2z/komokana/blob/master/README.md This YAML configuration sets up a yasb widget to display the current layer status from Komokana. It specifies the widget type, label, CSS class, and the command to execute to get the layer data. ```yaml widgets: kanata: type: "yasb.custom.CustomWidget" options: label: "{data}" label_alt: "{data}" class_name: "kanata-widget" exec_options: run_cmd: "cat '%LOCALAPPDATA%\Temp\kanata_layer'" run_interval: 300 return_format: "string" ``` -------------------------------- ### Zero-Clause BSD License Text Source: https://github.com/lgug2z/komokana/blob/master/README.md This is the full text of the Zero-Clause BSD license, which governs contributions to the Komokana project. It grants broad permissions for use, modification, and distribution without warranty. ```plaintext Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ``` -------------------------------- ### Kanata Keyboard Layers Definition Source: https://github.com/lgug2z/komokana/blob/master/README.md Defines keyboard layers and aliases for tap-hold actions and layer switching. This Clojure code sets up custom key behaviors for different application contexts. ```clojure (defalias ;; these are some convenient aliases to send the letter on tap, or toggle the ;; "firefox" layout on hold ft (tap-hold 50 200 f (layer-toggle firefox)) jt (tap-hold 50 200 j (layer-toggle firefox)) ;; these are some convenient aliases for us to switch layers qwr (layer-switch qwerty) ff (layer-switch firefox) ) ;; imagine this is our default layer, passed as "-d qwerty" when launching komokana ;; the only two keys overriden here are f and j, which when held, will toggle ;; our "firefox" layer (deflayer qwerty _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @ft _ _ @jt _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ) ;; this is our firefox layer which lets us navigate webpages using hjkl (deflayer firefox _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ left down up rght _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ) ;; this is our editor layer for use in windows where the vim editor or vim extensions ;; in a text editor are running. the only thing we do here is ensure that the tap-hold ;; not present on j, so that when we hold down j we can zoom all the way down the file ;; that we are editing (deflayer editor _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @ft _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.