Skip to content

Latest commit

 

History

History
130 lines (89 loc) · 5.76 KB

README.md

File metadata and controls

130 lines (89 loc) · 5.76 KB

Nata

Nata is an application-aware switching layer for Kanata on Linux.

Warning

Please be aware that Nata is currently in its beta version. As such, it may contain bugs that have not yet been identified or resolved.

Table of Contents

Installation

Download the Script and Make It Executable

  1. Manual Download: Download the Nata script and make it executable:

    chmod +x nata.sh
  2. Using curl to download the script and make it executable in a single Line:

    curl -O https://raw.githubusercontent.com/mdSlash/nata/refs/heads/main/src/nata.sh && chmod +x nata.sh

Dependencies

To run Nata script, you will need the following dependencies installed on your system:

  • nc: A utility to send data to the Kanata server via TCP to change the layer.
  • jq: A command-line JSON processor for managing data from the config file.

Additional Requirements for Active Window Information

To retrieve active window information such as window class and title, you will need one of the following tools based on your display server:

For X11 Users:

For Wayland Users:

These tools are typically installed by default if you are using:

Usage

To use Nata script:

  1. Configure your configuration file.
  2. Execute the script with the desired options if necessary.

Configuration

Here are the properties you can include in your configuration file:

Property Description
ip IP address
port Port number
interval Interval (in ms) for checking active window rules and changing layers.
base_layer Base layer for window rules.
recipes Location of the recipe script.
window_rules If the active window matches the rule, it will change to the specified layer.

See the config doc for more details.

Options

Here is a list of available options for the Nata script:

Option Description
-h, --help Display help message and exit.
-v, --version Show script version and exit.
-q, --quiet Run quietly; log errors only.
-i, --interval Set update interval for checking the active window.
-p, --port Specify a TCP port or IP address with a port.
-C, --class Change layer if the value matches the rule: { "class": "<VALUE>", "title": "*" }.
-t, --title Change layer if the value matches the rule: { "class": "*", "title": "<VALUE>" }.
-l, --layer Specify a layer name to switch to and exit.
-c, --config Path to the config file in JSON format.
-r, --recipes Path to a script that runs in the background on layer change.

See the options doc for more details.

Recipes

You can create a custom script to execute when switching layers. For example, to send a notification on layer change, you can use:

notify-send -r 12345 "Current Layer" "Layer Name: $LAYER_NAME"

See the recipes doc for more details.

Contributing

We welcome contributions! If you find bugs or have suggestions for improvements, please open an issue or submit a pull request.