improve notify
This commit is contained in:
parent
f5b54f962f
commit
8fa101f0e2
3 changed files with 8 additions and 3 deletions
|
@ -1,11 +1,13 @@
|
|||
import std/[
|
||||
os, osproc, streams, strformat, strutils, tables
|
||||
os, osproc, streams, strutils, tables
|
||||
]
|
||||
export tables
|
||||
import yaml
|
||||
|
||||
proc notify*(message: string) =
|
||||
discard execCmd fmt"notify-send --app-name=hyprman --transient '{message}'"
|
||||
var cmd = "notify-send --app-name=hyprman --transient hyprman "
|
||||
cmd.add message
|
||||
discard execCmd(cmd)
|
||||
|
||||
type
|
||||
Icons = Table[string, string]
|
||||
|
|
|
@ -20,6 +20,8 @@ proc setImg(path: string, output: string) =
|
|||
execCmd(fmt"swww img --transition-type fade --outputs {output} {path}")
|
||||
if code != 0: notify "swww failed"
|
||||
|
||||
const oneMinute = 1000 * 60
|
||||
|
||||
proc runSwww*() =
|
||||
if config.wallpapers == "": quit(0)
|
||||
if not dirExists(config.wallpapers):
|
||||
|
@ -29,5 +31,5 @@ proc runSwww*() =
|
|||
while true:
|
||||
for monitor in swwwMonitors():
|
||||
setImg(gallery.sample(), monitor)
|
||||
sleep 1000 * 60 * 30
|
||||
sleep 5 * oneMinute
|
||||
|
||||
|
|
1
todo.md
1
todo.md
|
@ -4,6 +4,7 @@
|
|||
- [ ] switch to usu once parser is stable again
|
||||
- [x] make swww powered wallpaper cycler
|
||||
- [ ] add support for monitor orientation?
|
||||
- [ ] make `hyprman swww` support monitor changes by watching hyprland IPC
|
||||
|
||||
<!-- generated with <3 by daylinmorgan/todo -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue