update: autostart
This commit is contained in:
parent
2975984d23
commit
929742f132
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function run {
|
||||
if ! pgrep -f $1 ;
|
||||
then
|
||||
$@&
|
||||
fi
|
||||
}
|
||||
|
||||
# compositor
|
||||
run picom --experimental-backends --config $HOME/.config/picom/picom.conf
|
||||
|
||||
# auth
|
||||
run /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
18
config/awesome/configuration/autostart.lua
Normal file
18
config/awesome/configuration/autostart.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
|
||||
local function run_once(cmd)
|
||||
local findme = cmd
|
||||
local 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), false)
|
||||
end
|
||||
|
||||
-- picom
|
||||
|
||||
run_once("picom --experimental-backends --config " ..
|
||||
gears.filesystem.get_configuration_dir() .. "theme/picom.conf")
|
||||
|
||||
return autostart
|
|
@ -36,7 +36,7 @@ screen_width = awful.screen.focused().geometry.width
|
|||
screen_height = awful.screen.focused().geometry.height
|
||||
|
||||
-- Autostart
|
||||
awful.spawn.with_shell("~/.config/awesome/configuration/autorun.sh")
|
||||
local autostart = require("configuration.autostart")
|
||||
|
||||
-- Import Configuration
|
||||
require("configuration")
|
||||
|
|
Loading…
Reference in a new issue