输入法服务开机启动 输入法服务开机启动 更新日期:2020-06-28 直接在rc.lua文件的末尾加上如下代码: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19-- 开始自动加载一些程序 do -- 只在程序没有运行时才运行该程序 function run_once(prg) awful.util.spawn_with_shell("pgrep -u $USER -x " .. prg .. " || (" .. prg .. ")") end -- 程序名列表 local prgs = { "fcitx", -- 此处加入想要开机启动的程序名 } -- 启动列表中所有程序 for _, prg in pairs(prgs) do run_once(prg) end end