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)

Fields

cwc.datadir string Get cwc datadir location, it will search through $XDG_DATA_DIRS/share/cwc. Read only
cwc.version string Get cwc version. Read only
cwc.tasklist_show_all boolean Set to true to show all clients or false to show clients that on the current tag.

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.is_nested () -> boolean Check if the session is nested.
cwc.is_startup () -> boolean Check if the configuration is startup (not reload).
cwc.setenv (key, val) Wrapper of C setenv.
cwc.unsetenv (key) Wrapper of C unsetenv.
cwc.chvt (n) Change the vt (chvt).
cwc.unlock_session () Unlock the session in case the screen locker behaving weird/crashed.
cwc.connect_signal (signame, func) Add event listener.
cwc.disconnect_signal (signame, func) Remove event listener.
cwc.emit_signal (signame, ...) Notify event listener.


Fields

🔗 cwc.datadir string · read only
Get cwc datadir location, it will search through $XDG_DATA_DIRS/share/cwc.
🔗 cwc.version string · read only
Get cwc version.
🔗 cwc.tasklist_show_all boolean
Set to true to show all clients or false to show clients that on the current tag.

only affect widget or bar that implement wlr foreign toplevel management.

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.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.setenv (key, val)
Wrapper of C setenv.

Parameters:

Name Type(s) Description
key string Variable name.
val string Value.
🔗 cwc.unsetenv (key)
Wrapper of C unsetenv.

Parameters:

Name Type(s) Description
key string Variable name.
🔗 cwc.chvt (n)
Change the vt (chvt).

Parameters:

Name Type(s) Description
n integer Index of the vt.
🔗 cwc.unlock_session ()
Unlock the session in case the screen locker behaving weird/crashed.
🔗 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