如何配置键绑定以将客户端发送到 Awesome wm 中的 bling 便签本?

如何配置键绑定以将客户端发送到 Awesome wm 中的 bling 便签本?

我想创建一个快捷方式,可以将客户端发送到 bling 的便签本。

初始化 bling 便签本的部分:

local bling = require("bling")
local term_scratch = bling.module.scratchpad {
    command = "wezterm start --class spad",           -- How to spawn the scratchpad
    rule = { instance = "spad" },                     -- The rule that the scratchpad will be searched by
    sticky = true,                                    -- Whether the scratchpad should be sticky
    autoclose = true,                                 -- Whether it should hide itself when losing focus
    floating = true,                                  -- Whether it should be floating (MUST BE TRUE FOR ANIMATIONS)
    geometry = {x=360, y=90, height=900, width=1200}, -- The geometry in a floating state
    reapply = true,                                   -- Whether all those properties should be reapplied on every new opening of the scratchpad (MUST BE TRUE FOR ANIMATIONS)
    dont_focus_before_close  = false,                 -- When set to true, the scratchpad will be closed by the toggle function regardless of whether its focused or not. When set to false, the toggle function will first bring the scratchpad into focus and only close it on a second call
}

未能将客户端移动到所述便笺本的键绑定:

globalkeys = gears.table.join(
    awful.key({ modkey, "Shift" }, "h",
    function ()
        term_scratch:toggle()
    end ),

我不明白的文档页面:https://blingcorp.github.io/bling/#/module/scratch

我应该如何使用term_scratch:toggle()对象/函数?

系统:Arch linux、X11、awesome-wm、awesome-wm bling 附加组件。

答案1

xprop设置从以下行中获取的所需实例名称:rule = { instance = "spad" },

相关内容