aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/quarrel/init.lua
blob: 96f7f5b692929fc295e6d25765a5c89496dc35df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local n = require("naughty").notification

---@class Quarrel
local quarrel = {}

--- Send a notification with the specified message
---@param message any
function quarrel.debug(message)
    n { message = tostring(message) }
end

--- Check if there was a restart
---@return boolean
function quarrel.is_restart()
    awesome.register_xproperty("is_restart", "boolean")
    local restart_detected = awesome.get_xproperty "is_restart" ~= nil
    awesome.set_xproperty("is_restart", true)

    return restart_detected
end

return quarrel