style: re-format
This commit is contained in:
+16
-16
@@ -5,32 +5,32 @@ require("lua.lib.globals")
|
||||
local M = {}
|
||||
|
||||
local function start_swaync()
|
||||
if settings["systemd"] then
|
||||
local unit = "swaync.service"
|
||||
local source = HYPR .. "/systemd/" .. unit
|
||||
if settings["systemd"] then
|
||||
local unit = "swaync.service"
|
||||
local source = HYPR .. "/systemd/" .. unit
|
||||
|
||||
if systemd.ensure_user_unit(unit, source) then
|
||||
hl.exec_cmd("systemctl --user start swaync")
|
||||
else
|
||||
hl.exec_cmd("swaync")
|
||||
end
|
||||
else
|
||||
hl.exec_cmd("swaync")
|
||||
end
|
||||
if systemd.ensure_user_unit(unit, source) then
|
||||
hl.exec_cmd("systemctl --user start swaync")
|
||||
else
|
||||
hl.exec_cmd("swaync")
|
||||
end
|
||||
else
|
||||
hl.exec_cmd("swaync")
|
||||
end
|
||||
end
|
||||
|
||||
local function stop_swaync()
|
||||
if settings["systemd"] and utils.command_success("systemctl --user status swaync") then
|
||||
hl.exec_cmd("systemctl --user stop swaync")
|
||||
end
|
||||
if settings["systemd"] and utils.command_success("systemctl --user status swaync") then
|
||||
hl.exec_cmd("systemctl --user stop swaync")
|
||||
end
|
||||
end
|
||||
|
||||
M.autostart = {
|
||||
start_swaync,
|
||||
start_swaync,
|
||||
}
|
||||
|
||||
M.autostop = {
|
||||
stop_swaync,
|
||||
stop_swaync,
|
||||
}
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user