1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2025-01-10 17:58:09 +00:00

Moved autostart away from theme.lua files

This commit is contained in:
Alexandre Viau 2014-05-10 18:24:30 -04:00
parent 23b7e4a8a9
commit 6bd3ed8f37
10 changed files with 78 additions and 153 deletions

10
myrc/run_once.lua Normal file
View file

@ -0,0 +1,10 @@
local awful = require("awful")
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end

View file

@ -1,8 +1,8 @@
--[[
Blackburn Awesome WM config 2.0
github.com/copycat-killer
Blackburn Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,20 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization

View file

@ -1,8 +1,8 @@
--[[
Copland Awesome WM config
github.com/copycat-killer
Copland Awesome WM config
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -39,20 +39,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization
@ -244,7 +232,7 @@ settings = function()
volicon:set_image(beautiful.vol)
end
end,
colors =
colors =
{
background = beautiful.bg_normal,
mute = "#EB8F8F",

View file

@ -1,8 +1,8 @@
--[[
Dremora Awesome WM config 2.0
github.com/copycat-killer
Dremora Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,20 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization

View file

@ -1,8 +1,8 @@
--[[
Holo Awesome WM config 2.0
github.com/copycat-killer
Holo Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,20 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization
@ -175,7 +163,7 @@ mpdwidget = lain.widgets.mpd({
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower)
widget:set_markup(markup.font("Tamsyn 4", " ")
.. markup.font("Tamsyn 8",
.. markup.font("Tamsyn 8",
mpd_now.artist
.. " - " ..
mpd_now.title

View file

@ -1,8 +1,8 @@
--[[
Multicolor Awesome WM config 2.0
github.com/copycat-killer
Multicolor Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,19 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization
@ -198,7 +187,7 @@ volumewidget = lain.widgets.alsa({
end
})
-- Net
-- Net
netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
--netdownicon.align = "middle"
netdowninfo = wibox.widget.textbox()
@ -301,11 +290,11 @@ mytasklist.buttons = awful.util.table.join(
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt()
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
@ -321,9 +310,9 @@ for s = 1, screen.count() do
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the upper wibox
mywibox[s] = awful.wibox({ position = "top", screen = s, height = 20 })
mywibox[s] = awful.wibox({ position = "top", screen = s, height = 20 })
--border_width = 0, height = 20 })
-- Widgets that are aligned to the upper left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(mytaglist[s])
@ -362,20 +351,20 @@ for s = 1, screen.count() do
layout:set_left(left_layout)
--layout:set_middle(mytasklist[s])
layout:set_right(right_layout)
mywibox[s]:set_widget(layout)
-- Create the bottom wibox
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 20 })
--mybottomwibox[s].visible = false
-- Widgets that are aligned to the bottom left
bottom_left_layout = wibox.layout.fixed.horizontal()
-- Widgets that are aligned to the bottom right
bottom_right_layout = wibox.layout.fixed.horizontal()
bottom_right_layout:add(mylayoutbox[s])
-- Now bring it all together (with the tasklist in the middle)
bottom_layout = wibox.layout.align.horizontal()
bottom_layout:set_left(bottom_left_layout)
@ -698,7 +687,7 @@ for s = 1, screen.count() do screen[s]:connect_signal("arrange", function ()
c.border_width = 0
elseif awful.client.floating.get(c) or layout == "floating" then
c.border_width = beautiful.border_width
elseif #clients == 1 then
elseif #clients == 1 then
clients[1].border_width = 0
if layout ~= "max" then
awful.client.moveresize(0, 0, 2, 0, clients[1])

View file

@ -1,8 +1,8 @@
--[[
Powerarrow Darker Awesome WM config 2.0
github.com/copycat-killer
Powerarrow Darker Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,19 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization

View file

@ -1,8 +1,8 @@
--[[
Rainbow Awesome WM config 2.0
github.com/copycat-killer
Rainbow Awesome WM config 2.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,20 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization

View file

@ -1,8 +1,8 @@
--[[
Steamburn Awesome WM config 3.0
github.com/copycat-killer
Steamburn Awesome WM config 3.0
github.com/copycat-killer
--]]
-- {{{ Required libraries
@ -38,20 +38,8 @@ do
end
-- }}}
-- {{{ Autostart applications
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}
-- STARTUP apps
require("settings.startup")
-- {{{ Variable definitions
-- localization

9
settings/startup.lua Normal file
View file

@ -0,0 +1,9 @@
-- {{{ Autostart applications
require("myrc.run_once")
run_once("urxvtd")
run_once("unclutter")
run_once("compton")
-- }}}