1 个不稳定版本
| 0.1.0 | 2020年6月13日 | 
|---|
#29 in #keyboard-layout
19KB
428 行
alt
alt 是 ktrl 的扩展。它监听系统事件,如窗口焦点变化、Emacs 钩子等... 这些事件被聚合并通过其 ipc 接口发送到 ktrl。
用法
alt 0.1
Itay G. <thifixp@gmail.com>
An Event Aggregator for ktrl
USAGE:
    alt [FLAGS] [OPTIONS]
FLAGS:
        --debug      Enables debug level logging
    -h, --help       Prints help information
    -V, --version    Prints version information
OPTIONS:
        --cfg <CONFIG>     Path to your alt config file. Default: .alt.ron
        --log <LOGFILE>    Path to the log file. Default: .alt.log```
安装
- 安装 alt
cargo install --path .
- 设置你的 ~/.alt.ron文件(见以下示例)。
- 添加到你的窗口管理器自动启动(例如:i3)-
exec ~/.cargo/bin/alt
配置
默认配置文件路径为 ~/.alt.ron。你可以使用 CLI 的 --cfg 参数来覆盖此路径。
示例
(
  aggs: [
  // Ivy Event Aggregator
    (requirements: [
        RqFocus("emacs"),
        RqExtEvent("ivy"),
    ],
    on_ipc: "TurnOnLayerAlias(\"ivy\")",
    off_ipc: "TurnOffLayerAlias(\"ivy\")"),
  ],
)
当 Emacs 焦点 AND ivy 激活时,此操作将切换 ivy ktrl 层
依赖项
~8–18MB
~222K SLoC