Module: cwc

cwc lifecycle and low-level APIs.

Info:

  • Copyright: 2024
  • License: GPLv3
  • Originally authored by: Dwi Asmoro Bangun
    (Full contributors list available on our github project)

Static module functions

cwc.quit () Quit cwc.
cwc.reload () Reload cwc lua configuration.
cwc.commit () Commit configuration change.
cwc.spawn (vargs) Spawn program.
cwc.spawn_with_shell (cmd) Spawn program with shell.
cwc.get_is_nested () -> boolean Check if the session is nested.
cwc.is_startup () -> boolean Check if the configuration is startup (not reload).
cwc.get_datadir () -> string Get cwc datadir location probably in /usr/share/cwc.
cwc.setenv (key, val) Wrapper of C setenv.
cwc.chvt () Change the vt (chvt).
cwc.connect_signal (signame, func) Add event listener.
cwc.disconnect_signal (signame, func) Remove event listener.
cwc.emit_signal (signame, ...) Notify event listener.


Static module functions

🔗 cwc.quit ()
Quit cwc.
🔗 cwc.reload ()
Reload cwc lua configuration.
🔗 cwc.commit ()
Commit configuration change.
🔗 cwc.spawn (vargs)
Spawn program.

Parameters:

Name Type(s) Description
vargs string[] Array of argument list
🔗 cwc.spawn_with_shell (cmd)
Spawn program with shell.

Parameters:

Name Type(s) Description
cmd string Shell command
🔗 cwc.get_is_nested () -> boolean
Check if the session is nested.

Returns:

    boolean
🔗 cwc.is_startup () -> boolean
Check if the configuration is startup (not reload).

Returns:

    boolean
🔗 cwc.get_datadir () -> string
Get cwc datadir location probably in /usr/share/cwc.

Returns:

    string
🔗 cwc.setenv (key, val)
Wrapper of C setenv.

Parameters:

Name Type(s) Description
key string Variable name.
val string Value.
🔗 cwc.chvt ()
Change the vt (chvt).
🔗 cwc.connect_signal (signame, func)
Add event listener.

Parameters:

Name Type(s) Description
signame string The name of the signal.
func function Callback function to run.
🔗 cwc.disconnect_signal (signame, func)
Remove event listener.

Parameters:

Name Type(s) Description
signame string The name of the signal.
func function Attached callback function .
🔗 cwc.emit_signal (signame, ...)
Notify event listener.

Parameters:

Name Type(s) Description
signame string The name of the signal.
... The signal callback argument.
generated by LDoc 1.5.0 based on AwesomeWM template