Skip to content

Command Line Controls

Dani John edited this page Feb 16, 2021 · 264 revisions

Contents

Instruction

Lively can be controlled with command line arguments from terminal.

This allows you to interact with Lively through scripts or third party applications like Rainmeter.

Make sure Lively is already running and then send the commands through its main executable.

(Alternatively download the command utility which includes --help documentation and also if required set it as environment/PATH variable to call it globally.)

For example the wallpaper audio can by muted by running the following command:

livelywpf.exe app --volume 0

Note:

There will be a 1sec delay for script execution if you directly send message to Lively executable instead of the command utility.

Commands

Play

Control wallpaper playback state.

app --play <state>

state: true/false - play/pause wallpapers.

Volume

Set global sound level of all wallpapers.

app --volume <volume-level>

volume-level: Number in the range 0-100.

Desktop Icon

Control desktop icon visibility.

app --showIcons <state>

state: true/false - show/hide desktop icons.

Open Application

Open Lively main application.

app --showApp <state>

state: true/false - open/minimize Lively tray application.

Set Wallpaper

setwp --file <file-path> --monitor <screen-id>

screen-id: (optional) The screen number as seen in Lively control panel, if not given primary screen is default.

file-path: Folder path containing LivelyInfo.json project file/File path of the wallpaper in library.

Example:

setwp --file "C:\Users\rocks\AppData\Local\Lively Wallpaper\Library\wallpapers\xyz"

Set wallpaper to primary screen.

setwp --file "C:\Users\rocks\AppData\Local\Lively Wallpaper\Library\wallpapers\xyz" ---monitor 1

Set wallpaper to screen 1.

Close Wallpaper(s)

Closes the running wallpaper on the given screen, if screen-id is -1 then all wallpapers are closed.

closewp <screen-id>

screen-id: The screen number as seen in Lively control panel.

Customize Wallpaper

Set the Lively Properties of the wallpaper.

setprop --monitor <screen-id> --property <arg>

screen-id: (optional) The screen number as seen in Lively control panel, if not given primary screen is default.

arg: LivelyProperty.json argument, syntax "keyValue=value".

Make sure to enclose the arg inside double quotes so that spaces in text are correctly parsed.

Example:

To change the color control:

   "backgroundColor": {
    "text": "Overlay Color",
    "type": "color",
    "value": "#C0C0C0"
  }

setprop --monitor 1 --property "backgroundColor=#ff0000"

To change the file in folderDropdown control:

   "imgSelect": {
    "type": "folderDropdown",
    "value": "image3.jpg",
    "text": "Image",
    "filter": "*.jpg|*.png",
    "folder": "wallpapers"
  }

setprop --monitor 1 --property "imgSelect=image1.jpg"

Special cases:

Reset properties: setprop --monitor 1 --property "lively_default_settings_reload=true"

Button press: setprop --monitor 1 --property "button_name=true"

The default Lively property of media files can be referred here.

AutoHotKey

The following AutoHotkey script execute when Win + Z key is pressed.

Audio toggle

Toggle wallpaper volume between 0 and 75

toggle:= false
; hotkeys - winkey-z
#z::
toggle := !toggle
If toggle
{
  Run cmd.exe /c livelycu.exe app --volume 0,,hide 
}
else
{
  Run cmd.exe /c livelycu.exe app --volume 75,,hide 
}

Wallpaper shuffle

Sets random wallpapers from wallpapers.txt file

; Create the array, initially empty:
Array := Array()

; Write to the array:
Loop, Read, wallpapers.txt ; This loop retrieves each line from the file, one at a time.
{
    Array.Push(A_LoopReadLine) ; Append this line to the array.
}

; hotkey: winkey-z
#z::
command := "livelycu.exe setwp --file " . """"Array[random(Array.MinIndex(), Array.MaxIndex())]""""
Run cmd.exe /c %command%,,hide

random( x, y )
{
   Random, var, %x%, %y%
   return var
}
wallpapers.txt
C:\Users\rocks\AppData\Local\Lively Wallpaper\Library\wallpapers\aiqzbihh.0ho
C:\Users\rocks\Documents\GIFS\Car.gif

Random hue (video/gif/pictures only)

Sets a random hue value for the running wallpaper

; hotkeys - winkey-z
#z::
command := "livelycu.exe setprop --property hue=" . random(-100,100)
Run cmd.exe /c %command%,,hide

random( x, y )
{
   Random, var, %x%, %y%
   return var
}

Clone this wiki locally