我的朋友最近向我介绍了 Awesome 平铺窗口管理器。我试图操纵rc.lua根据我的喜好配置它。谁能告诉我为什么这个命令不生效:
awful.key({ modkey, "Control" }, "l", function () awful.util.spawn("gnome-screensaver-command -l") end),
终端上的命令有效。
由于我使用 Linux Mint Cinnamon,所以我也尝试了cinnamon-screensaver-command
在终端上并且它可以工作。我添加配置的 lua 对象(我想)如下所示:
clientkeys = awful.util.table.join(
awful.key({ modkey, "Control" }, "l", function () awful.util.spawn("cinnamon-screensaver-command -l") end),
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
)
谢谢
答案1
你确定你重装很棒吗?
您可能想尝试:https://awesomewm.org/doc/api/modules/awful.util.html#spawn_with_shell
或者放入其他内容spawn
以确保您的命令正在运行。
另外,gnome-screensaver-command
在你的道路上吗?