rc.lua.template: add command for replicating XDG autostart (commented by default); closes #234
This commit is contained in:
parent
4e01272133
commit
18918df4e9
|
@ -44,18 +44,26 @@ end
|
|||
-- }}}
|
||||
|
||||
-- {{{ Autostart windowless processes
|
||||
|
||||
-- This function will run once every time Awesome is started
|
||||
local function run_once(cmd_arr)
|
||||
for _, cmd in ipairs(cmd_arr) do
|
||||
findme = cmd
|
||||
firstspace = cmd:find(" ")
|
||||
if firstspace then
|
||||
findme = cmd:sub(0, firstspace-1)
|
||||
end
|
||||
awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd))
|
||||
awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
|
||||
end
|
||||
end
|
||||
|
||||
run_once({ "unclutter -root" }) -- entries must be comma-separated
|
||||
run_once({ "urxvtd", "unclutter -root" }) -- entries must be comma-separated
|
||||
|
||||
-- This function implements the XDG autostart specification
|
||||
--[[
|
||||
awful.spawn.with_shell(
|
||||
'if (xrdb -query | grep --quiet "^awesome\\.started:\\s*true$"); then; exit; fi;' ..
|
||||
'xrdb -merge <<< "awesome.started:true";' ..
|
||||
-- list each of your autostart commands, followed by ; inside single quotes, followed by ..
|
||||
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
|
||||
)
|
||||
--]]
|
||||
|
||||
-- }}}
|
||||
|
||||
-- {{{ Variable definitions
|
||||
|
|
|
@ -135,11 +135,11 @@ theme.mpd = lain.widget.mpd({
|
|||
settings = function()
|
||||
if mpd_now.state == "play" then
|
||||
title = mpd_now.title
|
||||
artist = " " .. mpd_now.artist .. markup("#333333", " <span font='Tamzen 2'> </span>|<span font='Tamzen 5'> </span>")
|
||||
artist = " " .. mpd_now.artist .. markup("#777777", " <span font='Tamzen 2'> </span>|<span font='Tamzen 5'> </span>")
|
||||
mpdicon:set_image(theme.play)
|
||||
elseif mpd_now.state == "pause" then
|
||||
title = "mpd "
|
||||
artist = "paused" .. markup("#333333", " |<span font='Tamzen 5'> </span>")
|
||||
artist = "paused" .. markup("#777777", " |<span font='Tamzen 5'> </span>")
|
||||
mpdicon:set_image(theme.pause)
|
||||
else
|
||||
title = ""
|
||||
|
@ -285,7 +285,7 @@ theme.weather = lain.widget.weather({
|
|||
local first = wibox.widget.textbox(markup.font("Tamzen 3", " "))
|
||||
local spr = wibox.widget.textbox(' ')
|
||||
local small_spr = wibox.widget.textbox(markup.font("Tamzen 4", " "))
|
||||
local bar_spr = wibox.widget.textbox(markup.font("Tamzen 3", " ") .. markup.fontfg(theme.font, "#333333", "|") .. markup.font("Tamzen 5", " "))
|
||||
local bar_spr = wibox.widget.textbox(markup.font("Tamzen 3", " ") .. markup.fontfg(theme.font, "#777777", "|") .. markup.font("Tamzen 5", " "))
|
||||
|
||||
-- Eminent-like task filtering
|
||||
local orig_filter = awful.widget.taglist.filter.all
|
||||
|
|
|
@ -359,7 +359,7 @@ function theme.vertical_wibox(s)
|
|||
end)
|
||||
tag.connect_signal("property::selected", function(t)
|
||||
local s = t.screen or awful.screen.focused()
|
||||
s.myleftwibox.width = 38
|
||||
s.myleftwibox.width = 38
|
||||
s.layoutb.visible = true
|
||||
mylauncher.visible = true
|
||||
gears.surface.apply_shape_bounding(s.myleftwibox, dockshape)
|
||||
|
|
Loading…
Reference in New Issue