make timeout configurable
This commit is contained in:
parent
f73bbbd0d3
commit
7a06a2a28c
2 changed files with 3 additions and 3 deletions
|
@ -157,9 +157,8 @@ proc handleHyprEvent(e: string) =
|
|||
notify("eww failed:\n" & output)
|
||||
|
||||
proc maybeTriggerSwww(last: var DateTime) =
|
||||
const swwwTimeout = 10 # seconds
|
||||
let current = now()
|
||||
if (current - last).inSeconds > swwwTimeout:
|
||||
if (current - last).inSeconds > config.timeout:
|
||||
oneShotSwww()
|
||||
last = current
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ proc notify*(message: string) =
|
|||
type
|
||||
Icons = Table[string, string]
|
||||
Config = object # config vs icons?
|
||||
wallpapers* {.defaultVal: ""}: string
|
||||
timeout* {.defaultVal: 60.}: int
|
||||
wallpapers* {.defaultVal: "".}: string
|
||||
classes*: Icons
|
||||
`no-client`*: string
|
||||
`default-icon`*: string
|
||||
|
|
Loading…
Reference in a new issue