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)
|
notify("eww failed:\n" & output)
|
||||||
|
|
||||||
proc maybeTriggerSwww(last: var DateTime) =
|
proc maybeTriggerSwww(last: var DateTime) =
|
||||||
const swwwTimeout = 10 # seconds
|
|
||||||
let current = now()
|
let current = now()
|
||||||
if (current - last).inSeconds > swwwTimeout:
|
if (current - last).inSeconds > config.timeout:
|
||||||
oneShotSwww()
|
oneShotSwww()
|
||||||
last = current
|
last = current
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,8 @@ proc notify*(message: string) =
|
||||||
type
|
type
|
||||||
Icons = Table[string, string]
|
Icons = Table[string, string]
|
||||||
Config = object # config vs icons?
|
Config = object # config vs icons?
|
||||||
wallpapers* {.defaultVal: ""}: string
|
timeout* {.defaultVal: 60.}: int
|
||||||
|
wallpapers* {.defaultVal: "".}: string
|
||||||
classes*: Icons
|
classes*: Icons
|
||||||
`no-client`*: string
|
`no-client`*: string
|
||||||
`default-icon`*: string
|
`default-icon`*: string
|
||||||
|
|
Loading…
Reference in a new issue