Awesome 配置笔记

Awesome 是什么?

Awesome用户配置文件:~/.config/awesome/rc.lua
系统默认配置文件在:/etc/xdg/awesome/rc.lua


-- This is used later as the default terminal and editor to run.

--  这里设置默认的编辑器和终端
terminal = "urxvt"
editor = os.getenv("EDITOR") or "emacs" 
editor_cmd = terminal .. " -e " .. editor



-- 自定义快捷键:

-- Win + p 打开 dmenu :
awful.key({modkey}, "p", function ()
    awful.util.spawn('dmenu_run')
end),

-- Ctrl + Atl + l 锁屏:
-- 因为 Windows 中是 Win + L ,但在 awesome 中 Win + L 已经被用来干其他事情了
awful.key({"Mod1", "Control"}, "l", function ()
    awful.util.spawn('xscreensaver-command -lock')
end),

-- 取消 Win + Shift + q 的退出,
-- 退出的时候用菜单,因为我老是不小心按了...
-- awful.key({modkey, "Shift"}, "q", awesome.quit),



-- Autorun programs
autorun = true
autorunApps = 
{ 
"firefox",
"thunderbird",
"amarok",
"linux-fetion",
"amule",
}

if autorun then
for app = 1, #autorunApps do
awful.util.spawn_with_shell(autorunApps[app])
end
end

问:里面很多layout我用不到,怎么给弄掉?
答:注释掉就可以了,“--” 就是注释符,例如我的习惯:


-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
{
-- awful.layout.suit.floating,
awful.layout.suit.tile,
-- awful.layout.suit.tile.left,
-- awful.layout.suit.tile.bottom,
-- awful.layout.suit.tile.top,
-- awful.layout.suit.fair,
-- awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
-- awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier
}





--自定义快捷键
awful.key({ modkey, }, "e", function ()awful.util.spawn('emacs') end),
awful.key({ modkey, }, "o", function ()awful.util.spawn('opera') end),
awful.key({ modkey, }, "c", function () awful.util.spawn('chromium') end),
awful.key({ modkey, }, "p", function () awful.util.spawn('evince') end),
awful.key({ modkey, }, "f", function () awful.util.spawn('pcmanfm') end),

Awesome 配置笔记_第1张图片

Awesome 的壁纸配置默认是 /usr/share/awesome/themes/default 目录下的 background.png,要替换桌面壁纸的话,替换background.png即可。

你可能感兴趣的:(awesome,archlinux)