mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2026-03-23 14:05:11 +00:00
Moved autostart away from theme.lua files
This commit is contained in:
parent
23b7e4a8a9
commit
6bd3ed8f37
10
myrc/run_once.lua
Normal file
10
myrc/run_once.lua
Normal 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
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Blackburn Awesome WM config 2.0
|
Blackburn Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,20 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Copland Awesome WM config
|
Copland Awesome WM config
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -39,20 +39,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
@ -244,7 +232,7 @@ settings = function()
|
||||||
volicon:set_image(beautiful.vol)
|
volicon:set_image(beautiful.vol)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
colors =
|
colors =
|
||||||
{
|
{
|
||||||
background = beautiful.bg_normal,
|
background = beautiful.bg_normal,
|
||||||
mute = "#EB8F8F",
|
mute = "#EB8F8F",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Dremora Awesome WM config 2.0
|
Dremora Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,20 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
|
||||||
26
rc.lua.holo
26
rc.lua.holo
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Holo Awesome WM config 2.0
|
Holo Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,20 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
@ -175,7 +163,7 @@ mpdwidget = lain.widgets.mpd({
|
||||||
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
|
mpd_now.artist = mpd_now.artist:upper():gsub("&.-;", string.lower)
|
||||||
mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower)
|
mpd_now.title = mpd_now.title:upper():gsub("&.-;", string.lower)
|
||||||
widget:set_markup(markup.font("Tamsyn 4", " ")
|
widget:set_markup(markup.font("Tamsyn 4", " ")
|
||||||
.. markup.font("Tamsyn 8",
|
.. markup.font("Tamsyn 8",
|
||||||
mpd_now.artist
|
mpd_now.artist
|
||||||
.. " - " ..
|
.. " - " ..
|
||||||
mpd_now.title
|
mpd_now.title
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Multicolor Awesome WM config 2.0
|
Multicolor Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,19 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
@ -198,7 +187,7 @@ volumewidget = lain.widgets.alsa({
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Net
|
-- Net
|
||||||
netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
|
netdownicon = wibox.widget.imagebox(beautiful.widget_netdown)
|
||||||
--netdownicon.align = "middle"
|
--netdownicon.align = "middle"
|
||||||
netdowninfo = wibox.widget.textbox()
|
netdowninfo = wibox.widget.textbox()
|
||||||
|
|
@ -301,11 +290,11 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
end))
|
end))
|
||||||
|
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
|
|
||||||
-- Create a promptbox for each screen
|
-- Create a promptbox for each screen
|
||||||
mypromptbox[s] = awful.widget.prompt()
|
mypromptbox[s] = awful.widget.prompt()
|
||||||
|
|
||||||
|
|
||||||
-- We need one layoutbox per screen.
|
-- We need one layoutbox per screen.
|
||||||
mylayoutbox[s] = awful.widget.layoutbox(s)
|
mylayoutbox[s] = awful.widget.layoutbox(s)
|
||||||
mylayoutbox[s]:buttons(awful.util.table.join(
|
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)
|
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
|
||||||
|
|
||||||
-- Create the upper wibox
|
-- 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 })
|
--border_width = 0, height = 20 })
|
||||||
|
|
||||||
-- Widgets that are aligned to the upper left
|
-- Widgets that are aligned to the upper left
|
||||||
local left_layout = wibox.layout.fixed.horizontal()
|
local left_layout = wibox.layout.fixed.horizontal()
|
||||||
left_layout:add(mytaglist[s])
|
left_layout:add(mytaglist[s])
|
||||||
|
|
@ -362,20 +351,20 @@ for s = 1, screen.count() do
|
||||||
layout:set_left(left_layout)
|
layout:set_left(left_layout)
|
||||||
--layout:set_middle(mytasklist[s])
|
--layout:set_middle(mytasklist[s])
|
||||||
layout:set_right(right_layout)
|
layout:set_right(right_layout)
|
||||||
|
|
||||||
mywibox[s]:set_widget(layout)
|
mywibox[s]:set_widget(layout)
|
||||||
|
|
||||||
-- Create the bottom wibox
|
-- Create the bottom wibox
|
||||||
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 20 })
|
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 20 })
|
||||||
--mybottomwibox[s].visible = false
|
--mybottomwibox[s].visible = false
|
||||||
|
|
||||||
-- Widgets that are aligned to the bottom left
|
-- Widgets that are aligned to the bottom left
|
||||||
bottom_left_layout = wibox.layout.fixed.horizontal()
|
bottom_left_layout = wibox.layout.fixed.horizontal()
|
||||||
|
|
||||||
-- Widgets that are aligned to the bottom right
|
-- Widgets that are aligned to the bottom right
|
||||||
bottom_right_layout = wibox.layout.fixed.horizontal()
|
bottom_right_layout = wibox.layout.fixed.horizontal()
|
||||||
bottom_right_layout:add(mylayoutbox[s])
|
bottom_right_layout:add(mylayoutbox[s])
|
||||||
|
|
||||||
-- Now bring it all together (with the tasklist in the middle)
|
-- Now bring it all together (with the tasklist in the middle)
|
||||||
bottom_layout = wibox.layout.align.horizontal()
|
bottom_layout = wibox.layout.align.horizontal()
|
||||||
bottom_layout:set_left(bottom_left_layout)
|
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
|
c.border_width = 0
|
||||||
elseif awful.client.floating.get(c) or layout == "floating" then
|
elseif awful.client.floating.get(c) or layout == "floating" then
|
||||||
c.border_width = beautiful.border_width
|
c.border_width = beautiful.border_width
|
||||||
elseif #clients == 1 then
|
elseif #clients == 1 then
|
||||||
clients[1].border_width = 0
|
clients[1].border_width = 0
|
||||||
if layout ~= "max" then
|
if layout ~= "max" then
|
||||||
awful.client.moveresize(0, 0, 2, 0, clients[1])
|
awful.client.moveresize(0, 0, 2, 0, clients[1])
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Powerarrow Darker Awesome WM config 2.0
|
Powerarrow Darker Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,19 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Rainbow Awesome WM config 2.0
|
Rainbow Awesome WM config 2.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,20 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Steamburn Awesome WM config 3.0
|
Steamburn Awesome WM config 3.0
|
||||||
github.com/copycat-killer
|
github.com/copycat-killer
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
|
|
@ -38,20 +38,8 @@ do
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart applications
|
-- STARTUP apps
|
||||||
function run_once(cmd)
|
require("settings.startup")
|
||||||
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")
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- localization
|
-- localization
|
||||||
|
|
|
||||||
9
settings/startup.lua
Normal file
9
settings/startup.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- {{{ Autostart applications
|
||||||
|
|
||||||
|
require("myrc.run_once")
|
||||||
|
|
||||||
|
run_once("urxvtd")
|
||||||
|
run_once("unclutter")
|
||||||
|
run_once("compton")
|
||||||
|
|
||||||
|
-- }}}
|
||||||
Loading…
Reference in a new issue