Answers:
在以下globalkeys = awful.util.table.join(
部分中~/.config/awesome/rc.lua
:
-- Brightness
awful.key({ }, "XF86MonBrightnessDown", function ()
awful.util.spawn("xbacklight -dec 15") end),
awful.key({ }, "XF86MonBrightnessUp", function ()
awful.util.spawn("xbacklight -inc 15") end),
globalkeys = awful.util.table.join(
节中,更准确地说。
1)安装xbacklight:
sudo apt-get install xbacklight
2)在控制台中测试:
xbacklight -inc 10
xbacklight -dec 10
3)将热键添加到您的真棒配置〜/ .config / awesome / rc.lua
在[globalkeys = awful.util.table.join]部分中插入以下文本:
awful.key({ }, "XF86MonBrightnessDown", function ()
awful.util.spawn("xbacklight -dec 15") end),
awful.key({ }, "XF86MonBrightnessUp", function ()
awful.util.spawn("xbacklight -inc 15") end)
我使用没有XF86MonBrightness *的键盘,这就是为什么我向Mod + o,Mod + p添加绑定的原因:
awful.key({ modkey, }, "p", function ()
awful.util.spawn("xbacklight -dec 15") end),
awful.key({ modkey, }, "o", function ()
awful.util.spawn("xbacklight -inc 15") end)
希望这可以帮助 )
一种方法是在“真棒”或“真棒”启动中加载“ gnome-power-manager”:https : //wiki.archlinux.org/index.php/Awesome#Transitioning_away_from_Gnome3 希望这帮助
另一个选择是在gnome内运行真棒,然后您就可以依靠gnome控件(可以正常工作)并且联网等也可以正常运行 http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome
要在登录Awesome WM时使应用程序自动启动,请执行以下操作: 右键单击Desktop转到awesome> edit config。在末尾添加以下行:
-- Autorun programs in Awesome WM
autorun = true
autorunApps =
{
"xfce4-power-manager",
}
if autorun then
for app = 1, #autorunApps do
awful.util.spawn(autorunApps[app])
end
end
用您的电源管理器替换“ xfce4-power-manager”。