Documentation
¶
Index ¶
Constants ¶
View Source
const ( VarPrefix = "lazywal_" VarPath = VarPrefix + "path" VarPIDs = VarPrefix + "pids" VarMonitorPIDs = VarPrefix + "monitor_pids" )
Variables ¶
View Source
var ClearCmd = &bonzai.Cmd{ Name: `clear`, Alias: `kill`, Usage: `lazywal clear`, Short: `kill all xwinwrap processes that may be hanging`, MinArgs: 0, Cmds: []*bonzai.Cmd{HelpCmd}, Mcp: &bonzai.McpMeta{ Desc: "Clear the wallpaper by killing all xwinwrap processes", }, Do: func(x *bonzai.Cmd, _ ...string) error { fmt.Println("Killing all xwinwrap processes") cmd := exec.Command("pkill", "xwinwrap") return cmd.Run() }, }
View Source
var Cmd = &bonzai.Cmd{ Name: `lazywal`, Short: `video/gif wallpaper client`, Vers: `v1.3.0`, Cmds: []*bonzai.Cmd{ HelpCmd, LoopCmd, ClearCmd, PywalCmd, dependencies.TestDepsCmd, }, Do: func(x *bonzai.Cmd, args ...string) error { return showHelp(x) }, Long: ` Lazywal: a terminal client to help setup video-loops/gifs as background. Copyright 2021-2024 Zayac-The-Engineer, 2024-2025 Pedro G. Branquinho (Go version) License: MIT License Site: buddhilw.com Source: git@github.com/BuddhiLW/lazywal.git Issues: github.com/BuddhiLW/lazywal/issues You can use the following commands: * lazywal set <path> (Auto-detects monitor configuration) * lazywal set <path> display <WxH> (Manual display size - e.g. 1440x1080) * lazywal kill (Kills all xwinwrap processes) * lazywal pywal (Updates color scheme using pywal) Features: * Multi-monitor support with correct positioning * Automatic monitor detection * Pywal integration for system-wide color schemes * Handles video files and animated GIFs Dependencies: * xwinwrap - For window creation * mpv - For video playback * xrandr - For monitor detection * pywal - Optional, for color scheme generation See the README.md for more information and examples. `, }
View Source
var HelpCmd = &bonzai.Cmd{ Name: `help`, Alias: `h|?`, Short: `display help information`, Do: func(x *bonzai.Cmd, args ...string) error { caller := x.Caller() if caller != nil && caller != x { return showHelp(caller) } return showHelp(x) }, }
HelpCmd provides basic help functionality
View Source
var LoopCmd = &bonzai.Cmd{ Name: `set`, Alias: `set-path|path`, Usage: `lazywal set <path> [display <dimension>]`, Short: `set video wallpaper from given path`, MinArgs: 1, Cmds: []*bonzai.Cmd{HelpCmd, SetDisplayCmd}, Mcp: &bonzai.McpMeta{ Desc: "Set a video or animated GIF as wallpaper on all monitors", Params: []bonzai.McpParam{ {Name: "path", Desc: "Absolute path to video or GIF file", Type: "string", Required: true}, }, }, Do: func(x *bonzai.Cmd, args ...string) error { path := args[0] if !validPath(path) { return fmt.Errorf("invalid path: %s", path) } log.Print("File chosen: ", path) Wall.Config.Path = path err := dependencies.TestDepsCmd.Do(x, args[0]) if err != nil { return err } if len(args) < 2 { err := SetDisplayCmd.Do(x, defaultDisplay) if err != nil { return err } return nil } if len(args) > 2 && args[1] == "display" { err := SetDisplayCmd.Do(x, args[2:]...) if err != nil { return err } } if len(args) > 0 && Matches(PywalCmd, args[len(args)-1]) { err := PywalCmd.Do(x) if err != nil { return err } } return nil }, }
View Source
var PywalCmd = &bonzai.Cmd{ Name: `pywal`, Alias: `update-pywal|colors`, Usage: `lazywal set <path> colors`, Short: `apply pywal colors from random video frame`, NumArgs: 0, Cmds: []*bonzai.Cmd{HelpCmd}, Mcp: &bonzai.McpMeta{ Desc: "Extract a random frame from the current wallpaper and apply pywal color scheme", }, Do: func(_ *bonzai.Cmd, args ...string) error { available, err := dependencies.IsWalAvailable() if available { fmt.Println("wal is available in your system.") } else { return err } Wall.Pywal() return nil }, }
View Source
var SetDisplayCmd = &bonzai.Cmd{ Name: `display`, Alias: `setdisplay|set`, Usage: `<path>`, Short: `set wallpaper to screen dimensions`, NumArgs: 1, Cmds: []*bonzai.Cmd{HelpCmd}, Do: func(_ *bonzai.Cmd, args ...string) error { err := SetDisplay(args[0]) if err != nil { return err } return Wall.Set() }, }
Functions ¶
func GetDefaultDisplay ¶
func GetDefaultDisplay() string
func SetDisplay ¶
func UpdatePywalScheme ¶
Types ¶
type Monitor ¶ added in v1.1.0
func GetMonitors ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.