astrum is a widgeting system that depends on libcosmic
it can run on any wayland compositor that supports the layer-shell protocol.
astrum is made in rust and is configured in lua i reccomend using the lua language server as that is what i will depend on for types and i reccomend getting familiar with the annotation syntax as that is what i will show in documentation
since this project is still a work in progress, you have to build it from source.
if you use nix you can add this as a nix flake input
inputs = {
    astrum.url = "github:vnuxa/astrum"
}
and somewhere in your package list add the following
    astrum.defaultPackage.${pkgs.system}
I also recommend having the lua language server installed in your text editor, since it contains astrum types and descriptions
Start by making ~/.config/astrum/config.lua
Astrum = require("astrum")
App = Astrum:application()
-- you can make windows with App:window()
return App
You will see nothing happening if you run astrum, mainly because its an empty config
You have to make a window in order for astrum to display something
Making windows
Windows are toplevel containers that hold widgets and signals (More on signals later).
App:window("window_name", {
 -- window model goes here
})
Windows have a mandatory view field, which defines what widgets to display
The view field gets ran after signals get processed.
App:window("window_name", {
    view = function()
         return Astrum.widgets:text("hello world!")
    end
})
This will display a window that has a text widget containing "hello world!"
Signals and states
Windows also have an optional signals field, which is a dictionary of signal names and logic that will be processed when the signal is fired
App:window("window_name", {
    view = function()
         return Astrum.widgets:button({
             child = Astrum.widgets:text("press me!")
             on_press = "button_pressed" -- the name of the signal
         })
    end,
    -- the syntax for signals is this
    -- signal_name = function(signal_data) end
    signals = {
        button_pressed = function() -- signal data is unnecessary since we do not send any yet
            print("hello world!")
        end
    }
})
This example will make a window, that has a button which when pressed will print hello world!
Signals are also the main way you change the state within astrum
And view logic is where you define widgets based on state
local state = {
    widget_text = "false"
}
App:window("window_name", {
    view = function()
         return Astrum.widgets:button({
             child = Astrum.widgets:text(state.widget_text)
             on_press = "button_pressed"
         })
    end,
    signals = {
        button_pressed = function()
            if state.widget_text == "false" then
                state.widget_text = "true"
            else
                state.widget_text = "false"
            end
        end
    }
})
This will make a window that has a button with text that toggles between false and true
Since astrum depends on libcosmic, styling is done within lua and not in another language (css for example)
Stylesheets
Although the styling is done within lua, there still are stylesheets
Astrum.style:add_style("style_name", {
-- style body goes here
})
Each widget has its own styling model, though if a widget has multiple styling states (for example buttons on_pressed and on_hovered) there is a default state as well, which overrides the base defaults, if not already specified
You can use stylesheets within widgets via the get_style function
Astrum.widgets:text({
    content = "hello world!",
    style = Astrum.style:get_style("style_name")
})
Subscriptions are the only way to update your state and view logic after an external event occurs.
Subscriptions will trigger every window's view and signal logic (might change in the future, depending on libcosmic)
To use a subscription, you must subscribe to a specific service.
Here is a hyprland workspace changed subscription example:
local state = {
    -- most services have types
    ---@type HyprlandWorkspaces
    workspaces = {}
}
App:window("workspace_example", {
    view = function()
        local row = Widgets:row({})
        for _, workspace in pairs(state.workspaces) do
            row:push(Widgets:text(tostring(workspace.id)))
        end
        return row
    end,
    -- Tells the application to subscribe to the `Hyprland` service
    subscriptions = {
        hyprland = {
            ---Specifies that whenever there is a workspace change, send the following signal that goes by the name of `on_workspace`
            workspaces = "on_workspace"
        }
    }
    signals = {
        on_workspace = function(signal_data)
            -- Signal data is of type `HyprlandWorkspaces`
            state.workspaces = signal_data
        end
    }
})
Advanced subscriptions
These subscriptions do not follow the common subscription syntax or are not autocompleted automatically by the LSP which is why they will be further explained here.
Calls
Calls is a powerful subscription that allows external proccesses to interact with astrum by sending a call signal.
Each key in the calls subscription table will be the call_signal and each value will be the name of the signal that will fire when it recieved the call signal
local called_times = 0
app:window("notification-thing", {
	view = function()
        return widgets:text("recieved call `mycall` ".. called_times.. " times")
	end,
	subscriptions = {
        calls = {
            mycall = "on_call"
        }
	},
	signals = {
        on_call = function(signal_data)
            called_times = called_times + 1
        end
	},
})
This will display a widget that shows the amount of times that it has recieved the mycall call signal
to send this call signal, add --call to the options of astrum (i.e. astrum --call mycall)
You can also send data through the call by adding a : after the call signal name, though note that it has to be in valid lua table
local data = ""
app:window("notification-thing", {
	view = function()
        return widgets:text("call `mycall` has sent data: ".. data)
	end,
	subscriptions = {
        calls = {
            mycall = "on_call"
        }
	},
	signals = {
        on_call = function(signal_data)
            data = signal_data.data
        end
	},
})
and executing the resulting command
astrum --call 'mycall:{data="test"}'
will result in the window text displaying the following
    call `mycall` has send data: test
Keybinds
Custom keybinds in astrum are defined through subscriptions
The index of the keybind susbcription table will be the signal name that it will send to when the specified keys have been pressed.
The first parameter of the value table are the modifiers that need to be pressed, seperated by commas.
The second parameter is a single character or a lowercase name for the keybind (you can see the full list of named keys in the source of the keybind susbcription)
An example implementation:
app:window("notification-thing", {
    keymode = "on_demand",
	subscriptions = {
        keybinds = {
            on_key = { "ctrl,shift", "space"},
            on_key2 = { "ctrl", "d"}
        }
	},
	signals = {
        on_key = function()
            print("ctrl shift and space have been pressed!")
        end,
        on_key2 = function()
            print("ctrl and d have been pressed!")
        end
	},
})
Note: keybinds will not work if the keymode is
none
Table of contents
Astrum
Propreties:
Methods:
:application() → AstrumApp
:toggle_window(window_name)
window_name:string
AstrumApp
Propreties:
Methods:
:window(window_name, window_model)
window_name:stringThe unique name of the window
window_model:WindowModelThe model of the window
WindowModel
Propreties:
anchor→"bottom"|"left"|"right"|"top"[]?
exclusive_zone→(integer|"ignore")?How much space should the window reserve, set it to
"ignore"if you want it to ignore other layers
height→number?If provided, manually set the height of the window
is_popup→boolean?
keymode→("exclusive"|"none"|"on_demand")?
layer→("background"|"bottom"|"top")?
signals→({ [string]: fun(signal_data: table) }|{ [string]: fun(signal_data: table) }[])?A dictionary of signal names and their respective logic that will be processed when the signal is called on. If a table value is provided, it will unpack it. If there are multiple signals with the same name, it will get overriden
subscriptions→Subscriptions?Connects to an external processes by sending signals. All of the subscriptions are to be provided in a table
see definitions: Subscriptions 
view→fun():WidgetLogic that dictates what widgets for the window to render
see definitions: Widget 
Methods:
Table of contents
HyprlandSubscriptionMprisSubscriptionNotificationNotificationSubscriptionSubscriptionsSystemTrayItemSystemTraySubscription
HyprlandSubscription
Propreties:
active_client→string?Sends a signal whenever the active hyprland client (window) was changed (e.g. active window focus has changed). Outputs a singular
HyprlandClientornilif there is no focus
clients→string?Sends a signal whenever a hyprland client (window) was changed (for example: window closed, window opened, window moved). All of the clients ordered by their workspace is provided
workspaces→string?Sends an signal whenever hyprland workspaces change (e.g. workspace is added, workspace is moved, workspace is destroyed). All of the workspaces are provided
Methods:
MprisSubscription
Propreties:
looping_changed→string?Sends a signal whenever the player's loop status was changed. New loop status is provided
paused→string?Sends a signal whenever the player was paused
playing→string?Sends a signal whenever the player started playing
shuffle_toggled→string?Sends a signal whenever the player's shuffle status was changed. New shuffle status is provided
stopped→string?Sends a signal whenever the player was stopped
track_changed→string?Sends a signal whenever the player's track has changed. New metadata is provided
volume_changed→string?Sends a signal whenever the player's volume was changed. New volume is provided
Methods:
Notification
Propreties:
actions→string[]Actions are sent over as a list of pairs. Each even element in the list represents the identifier of the action. Each odd element in the list is the localized string that will be displayed to the user
app_icon→stringThe optional program icon of the calling application. Can be blank, indicating no icon.
app_name→stringThe optional name of the application sending the notification. Can be blank
body→stringThe optional detailed body text. Can be blank
expire_timeout→numberThe timeout in milliseconds since the display of the notification and at which the notification should automatically close. If it is
-1it means that there is predefined expire timeout (up to you). If0then it never expires.
replaces_id→numberThe optional notification ID that this notification replaces. It is reccomended that the server must atomically (i.e. with no visual cues or flicker) replace the given notification with this one, so that applications can modify noitifications while they still are active. A value of 0 means that it will not replace notifications
summary→stringThe summary text briefly describing the notification
Methods:
NotificationSubscription
Propreties:
on_notification→stringSends a signal whenever a notification is recieved. The
signal_datais of typeNotificationand contains the data of the notification.
Methods:
Subscriptions
Propreties:
calls→table<string, string>?Sends to a signal when the specified call name (in the index) has been sent
hyprland→HyprlandSubscription?
see definitions: HyprlandSubscription 
keybinds→table<string, [string|"alt"|"ctrl"|"shift"|"super", string|"alt"|"arrow_down"|"arrow_left"|"arrow_right"...(+34)]>?List of signal names (the
keyof the table) that will be sent when pressing down the specified modifiers and a character. The first parameter of the value tuple ismodifiers, which are seperated by commas (i.e."shift,super"would work whenshiftandsuperare being pressed). The 2nd parameter is a single character or lowercase name for the keybind
mpris→MprisSubscription?
see definitions: MprisSubscription 
notifications→NotificationSubscription?
see definitions: Notification NotificationSubscription 
system_tray→SystemTraySubscription?
see definitions: SystemTraySubscription 
time→table<number, string>?Sends a signal whenever a specified amount (the
keyof the table) is passed
Methods:
SystemTrayItem
Propreties:
category→"application_status"|"communications"|"hardware"|"system_services"The category for this item
icon_name→string?The name of the icon that should visualise the tray item
icon_pixmap→string?The id of the pixmap to use.
id→stringA name that is unique for this application
status→"active"|"needs_attention"|"passive"|"unknown"Describes the status for this item or of the associated application
title→string?A name that describes the application, can be more descriptive than
id, but it is also not nesscessary.
Methods:
SystemTraySubscription
Propreties:
update→string?Sends a signal every time items in the tray get updated
Methods:
Table of contents
Widgets
Propreties:
Methods:
:button(content_or_model, extra_model) → Widget
content_or_model:(string|ButtonModel)?The text to be displayed (shorthand) or the model for the button
extra_model:ButtonModel?The params for the shorthand. You do not need this if you provide a model in the first argument
:centerbox(model) → Widget
model:CenterboxModel?
:column(model) → table
model:ColumnModel?
:container(model) → Widget
model:ContainerModel
:icon(icon_name_or_model, extra_model) → Widget
icon_name_or_model:(string|IconModel)?The icon name (shorthand) or the model for the icon
extra_model:IconModel?Extra params for the shorthand. You do not need this if you already provided a model in the first argument
:image(content_or_model, extra_model) → Widget
content_or_model:(string|ImageModel)?The text to be displayed (shorthand) or the model for the image
extra_model:ImageModel?The params for the shorthand. You do not need this if you provide a model in the first argument
:mouse_area(model) → Widget
model:MouseAreaModel
:row(model) → table
model:RowModel?
:scrollable(model) → Widget
model:ScrollableModel
:signal(signal_name, signal_data) → CustomSignal
signal_name:string
signal_data:tableData to be sent through the signal
:space(width, height) → Widget
width:("fill"|"shrink"|["fill_portion", number]|["fixed", number])?The width of the empty amount of space. Defaults to
"shrink"
height:("fill"|"shrink"|["fill_portion", number]|["fixed", number])?The height of the empty emount of space. Defaults to
"shrink"
:text(content_or_model, extra_model) → Widget
content_or_model:(string|TextModel)?The text to be displayed (shorthand) or the model for the text
extra_model:TextModel?Extra params for the shorthand. You do not need this if you provide a model in the first argument
:text_input(content_or_model, placeholder, model) → Widget
content_or_model:string|TextInputModel
placeholder:string?
model:TextInputModel?
Table of contents
ButtonModelCenterboxModelColumnModelContainerModelCustomSignalIconModelImageModelMouseAreaModelOnScrollSignalRowModelScrollableModelTextInputModelTextModelWidgetWidthHeightWidget
ButtonModel
Propreties:
child→Widget?A widget that will be displayed within the button
see definitions: Widget 
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
on_press→(string|CustomSignal)?Sends a signal whenever the button is pressed. If a string is provided, it will send no data
see definitions: CustomSignal 
padding→(number|[number, number, number, number]|[number, number])?
style→ButtonAppearance?Sets the appearance of the button
see definitions: ButtonAppearance 
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
CenterboxModel
Propreties:
align_items→("center"|"end"|"start")?
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
left_child→Widget?Element to be displayed on the left side of the centerbox
see definitions: Widget 
middle_child→Widget?Element to be displayed in the middle of the centerbox
see definitions: Widget 
padding→(number|[number, number, number, number]|[number, number])?
right_child→Widget?Element to be displayed on the right side of the centerbox
see definitions: Widget 
spacing→number?The spacing of elements in pixels
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
ColumnModel
Propreties:
align_x→("center"|"left"|"right")?Sets the vertical alignments of the contents of the
column
children→Widget[]?List of widgets to be rendered within the
column
see definitions: Widget 
clip→boolean?Sets whether the contents of the
columnshould be clipped on overflow
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
max_width→number?Maximum width of the
columnin pixels
padding→(number|[number, number, number, number]|[number, number])?
spacing→number?The spacing between elements in pixels
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
ContainerModel
Propreties:
align_x→("center"|"left"|"right")?Sets the alignment of content on the horizontal axis
align_y→("bottom"|"center"|"top")?Sets the alignment of content on the vertical axis
center_x→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the
containerand centers the content horizontally
center_y→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the
containerand centers the content vertically
child→Widget?Element to be displayed within the
container
see definitions: Widget 
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
max_height→number?Maximum height of the
containerin pixels
max_width→number?Maximum width of the
containerin pixels
padding→(number|[number, number, number, number]|[number, number])?
style→ContainerAppearance?Sets the appearance of the container
see definitions: ContainerAppearance 
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
CustomSignal
Propreties:
signal_data→table
signal_name→string
Methods:
IconModel
Propreties:
content_fit→("contain"|"cover"|"fill"|"none"|"scale_down")?Sets how the content should be fit.
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
icon_name→string?The name of the icon.
icon_nameoricon_pathis required.
icon_path→string?The path to the icon.
icon_nameoricon_pathis required.
size→integer?The size of the icon.
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
ImageModel
Propreties:
border_radius→(number|[number, number, number, number])?The border radius of the image
content→string?A path to an image, this field is required
content_fit→("contain"|"cover"|"fill"|"none"|"scale_down")?Sets how the content should be fit. Defaults to
contain
filter_method→("linear"|"nearest")?
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
opacity→number?Sets the opacity of an image. It should be in
0.0 - 1.0range
rotation→(["floating", number]|["solid", number])?Sets the rotation of the image.
floating- element will float while rotating, layout will be the same prior to rotation (default).solid- element will be solid while rotating, layout will be adjusted to fit rotated content
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
MouseAreaModel
Propreties:
child→WidgetElement that determines the size of the mouse area
see definitions: Widget 
on_double_click→CustomSignal?Sends a signal when the left mouse button has been pressed twice over a specified area.
see definitions: CustomSignal 
on_drag→CustomSignal?Sends a signal when a drag has been initiated over a specified area.
see definitions: CustomSignal 
on_enter→CustomSignal?Sends a signal when the mouse has entered a specified area
see definitions: CustomSignal 
on_exit→CustomSignal?Sends a signal when the mouse has left a specified area
see definitions: CustomSignal 
on_middle_press→CustomSignal?Sends a signal when the middle mouse button has been pressed over a specified area.
see definitions: CustomSignal 
on_press→CustomSignal?Sends a signal when the left mouse button has been pressed over a specified area.
see definitions: CustomSignal 
on_release→CustomSignal?Sends a signal when the left mouse button has been released over a specified area.
see definitions: CustomSignal 
on_scroll→string?Sends to a specified signal name, sends
directionfield in a table that can be eitherupordown(e.g. OnScrollSignal)
Methods:
OnScrollSignal
Propreties:
direction→"down"|"up"
Methods:
RowModel
Propreties:
align_y→("bottom"|"center"|"top")?Sets the vertical alignments of the contents of the
row
children→Widget[]?List of widgets to be rendered within the
row
see definitions: Widget 
clip→boolean?Sets whether the contents of the
rowshould be clipped on overflow
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
padding→(number|[number, number, number, number]|[number, number])?
spacing→number?The spacing between elements in pixels
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
ScrollableModel
Propreties:
child→Widget?Infinite amount of content to be displayed within the scrollable
see definitions: Widget 
direction→(["both", { vertical: ScrollablePropreties, horizontal: ScrollablePropreties }]|["horizontal", ScrollablePropreties]|["vertical", ScrollablePropreties])?The direction where the content will be scrolled
see definitions: ScrollablePropreties 
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
TextInputModel
Propreties:
always_active→boolean?If enabled, makes it behave as if it were always focused
line_height→(["absolute", number]|["relative", number])?Sets the line height of the
on_input→string?Runs a signal when some text is typed in the text input, sends
textin the signal data which contains the new text. Cannot pass through custom signals
on_submit→(string|CustomSignal)?Sends a custom signal when the text input is focused and the enter key is pressed
see definitions: CustomSignal 
password→boolean?If the text input should be a secure password input
placeholder→string?Placeholder text for the text input
size→number?Sets the text size of the text input
style→TextInputAppearance?Sets the appearance of the text input
see definitions: TextInputAppearance 
value→string?The text of the text input. Needs an external variable paired with
on_inputin order to change
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?
Methods:
TextModel
Propreties:
align_x→("center"|"left"|"right")?Sets the horizontal alignment of the text
align_y→("bottom"|"center"|"top")?Sets the vertical alignment of the text
content→string?The text that should be displayed
font→Font?The font of the text
see definitions: Font 
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the text
line_height→number?Sets the line height in pixels
size→number?The font size of the text
style→TextAppearance?Sets the appearance of the text
see definitions: TextAppearance 
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
Widget
Propreties:
widget_name→string
Methods:
WidthHeightWidget
Propreties:
height→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the height of the widget
width→("fill"|"shrink"|["fill_portion", number]|["fixed", number])?Sets the width of the widget
Methods:
Table of contents
Font
Propreties:
name→stringThe font's name
style→("italic"|"normal"|"oblique")?The style of the font
weight→("black"|"bold"|"extrabold"|"extralight"|"light"...(+4))?The font's weight
Methods:
ScrollablePropreties
Propreties:
anchor→("end"|"start")?Sets the alignment of the scrollable
margin→number?Sets the scrollbar margin in pixels
scrollers_width→number?Sets the width of the scroller in pixels
width→number?Sets the width of the scrollbar in pixels
Methods:
Table of contents
MatchUtil
Propreties:
arm→fun(condition: any, result: any):MatchUtilChecks if the
scrutineeis equal to the condition (==)
see definitions: MatchUtil 
arm_less_eq→fun(condition: any, result: any):MatchUtilChecks if the
scrutineeis less than or equal to the condition (<=)
see definitions: MatchUtil 
arm_less_than→fun(condition: any, result: any):MatchUtilChecks if the
scrutineeis less than to the condition (<)
see definitions: MatchUtil 
arm_more_eq→fun(condition: any, result: any):MatchUtilChecks if the
scrutineeis more than or equal to the condition (>=)
see definitions: MatchUtil 
arm_more_than→fun(condition: any, result: any):MatchUtilChecks if the
scrutineeis more than to the condition (>)
see definitions: MatchUtil 
collapse→fun():anyCollapses the entire match arm, returning either a result, the fallback if no match was found or nothing
default→fun(result: any):MatchUtilIf none of the arms have a match, it will fallback to this result
see definitions: MatchUtil 
Methods:
SwitchUtil
Propreties:
case→fun(condition: any, result: fun():any):SwitchUtilChecks if the
scrutineeis equal to the condition (==)
see definitions: SwitchUtil 
case_less_eq→fun(condition: any, result: fun():any):SwitchUtilChecks if the
scrutineeis less than or equal to the condition (<=)
see definitions: SwitchUtil 
case_less_than→fun(condition: any, result: fun():any):SwitchUtilChecks if the
scrutineeis less than to the condition (<)
see definitions: SwitchUtil 
case_more_eq→fun(condition: any, result: fun():any):SwitchUtilChecks if the
scrutineeis more than or equal to the condition (>=)
see definitions: SwitchUtil 
case_more_than→fun(condition: any, result: fun():any):SwitchUtilChecks if the
scrutineeis more than to the condition (>)
see definitions: SwitchUtil 
collapse→fun()Evaluates the found case, if no case was found then evaluate the fallback if it is provided
default→fun(result: fun():any):MatchUtilIf none of the arms have a match, it will fallback to this result
see definitions: MatchUtil 
Methods:
Table of contents
Animation
Propreties:
animation_id→numberThe animation's ID, used for interracting with lilt animations
Methods:
:animate_table(false_table, true_table)
false_table:tableThe table to go to when the
animation stateisfalse
true_table:tableThe table to go to when the
animation stateistrue
:animate_value(false_value, true_value)
false_value:numberThe value to transition to when the
animation stateisfalse
true_value:numberThe value to transition to when the
animation stateistrue
:get_state() → boolean
:play()
:toggle(state)
state:boolean?If provided, change to a specific state
Animations
Propreties:
Methods:
:animate_style(animation, false_style, true_style)
animation:Animation
false_style:stringThe classname of the requested style to go to when the
animationisfalse.
true_style:stringThe classname of the requested style to go to when the
animationistrue.
:new(starting_value, time, easing, repeat_amount, reverse, delay) → Animation
starting_value:boolean|nilThe state of the animation, default is
false
time:number|nilThe amount of seconds it takes for the animation to complete. Default is
1
easing:"ease_in"|"ease_in_back"|"ease_in_bounce"|"ease_in_circ"|"ease_in_cubic"...(+27)The easing style of the animation, default is
"linear"
repeat_amount:number|nilThe amount of times the animation will repeat itself, default is
nil
reverse:boolean|nilWill the animation reverse itself, default is
false
delay:number|nilThe delay until the animation will start, in seconds. Default is
0
Table of contents
ButtonAppearanceButtonStyleSheetContainerAppearanceTextAppearanceTextInputAppearanceTextInputStyleSheet
ButtonAppearance
Propreties:
background→rgba?The background of the button
border_color→rgba?The color of the button border
border_radius→(number|[number, number, number, number])?Sets the border radius of the button
border_width→number?Sets the width of the border within the button
icon_color→rgba?The icon color of the button
outline_color→rgba?Sets the color of the outline
outline_width→number?An outline placed around the button
overlay→rgba?The background overlay of the button
shadow_offset→Vector?The amount of shadow offset to be applied on the button
see definitions: Vector 
text_color→rgba?The color of the text
Methods:
ButtonStyleSheet
Propreties:
active→ButtonAppearance?The appearance of the button when it is active
see definitions: ButtonAppearance 
default→ButtonAppearanceThe default appearance for the button, this default style will fill in the other styles if they are not provided
see definitions: ButtonAppearance 
disabled→ButtonAppearance?The appearance of the button when it is disabled
see definitions: ButtonAppearance 
hovered→ButtonAppearance?The appearance of the button when it is hovered
see definitions: ButtonAppearance 
pressed→ButtonAppearance?The appearance of the button when it is pressed
see definitions: ButtonAppearance 
Methods:
ContainerAppearance
Propreties:
background→rgba?The background of the container
border→Border?The border of the container
see definitions: Border 
icon_color→rgba?The color of icons within the container
shadow→Shadow?
see definitions: Shadow 
text_color→rgba?The color of the text
Methods:
TextAppearance
Propreties:
text_color→rgba?The color of the text
Methods:
TextInputAppearance
Propreties:
background→rgba?The color of the background
border_color→rgba?The color of the border
border_radius→number?The border radius
border_width→number?The border width
placeholder_color→rgba?The color of the placeholder text within the text input
selected_fill→rgba?The color of the selected text background within the text input
selected_text_color→rgba?The color of selected text within the text input
text_color→rgba?The color of the text within the text input
Methods:
TextInputStyleSheet
Propreties:
active→ButtonAppearance?The appearance of the text input when it is active
see definitions: ButtonAppearance 
default→ButtonAppearanceThe default appearance of the text input, this default style will fill in the other styles if they are not provided
see definitions: ButtonAppearance 
disabled→ButtonAppearance?The appearance of the text input when it is disabled
see definitions: ButtonAppearance 
error→ButtonAppearance?The appearance of the text input when it is errored
see definitions: ButtonAppearance 
focused→ButtonAppearance?The appearance of the text input when it is hovered
see definitions: ButtonAppearance 
Methods:
Table of contents
Border
Propreties:
color→rgba?The color of the border
radius→(number|[number, number, number, number])?The radius of the border
width→number?The width of the border
Methods:
Shadow
Propreties:
blur_radius→number?The blur radius of the shadow
color→rgba?The color of the shadow
offset→Vector?The offset of the shadow
see definitions: Vector 
Methods:
Vector
Propreties:
x→numberThe X component of the vector
y→numberthe Y component of the vector
Methods:
rgb
Propreties:
blue→numberValue ranging from 0-255
green→numberValue ranging from 0-255
red→numberValue ranging from 0-255
Methods:
rgba
Propreties:
alpha→numberValue ranging from 0.0-1.0
blue→numberValue ranging from 0-255
green→numberValue ranging from 0-255
red→numberValue ranging from 0-255
Methods:
Table of contents
AppModelApplicationsServiceGreetdHyprlandClientHyprlandWorkspaceMprisLoopingChangedMprisOutputMprisPlayerMprisServiceMprisShuffleToggledMprisTrackChangedMprisVolumeChangedTimeServiceTrackMetadata
AppModel
Propreties:
description→stringThe description of the app, if it has one
desktop→stringThe .desktop file path
executable→stringThe apps executable binary path
icon→stringThe icon name of the app
id→stringThe id of the app. The id is oobtained by the desktop file name
name→stringThe name of the app
Methods:
ApplicationsService
Propreties:
Methods:
:get_all_apps() → AppModel[]
:launch_app(executable_path)
executable_path:string
Greetd
Propreties:
Methods:
:login(username, attempt, command) → "login_failure"|"login_success"
username:stringThe username to log in with
attempt:stringThe password you need to loog in with
command:stringThe command to run if login was successfull
HyprlandClient
Propreties:
at→{ x: number, y: number }The x and y position where the client is on
class→stringThe class name of the client
floating→booleanIs this window floating or not
initial_class→stringThe
initial_titleof the client
initial_title→stringThe
initial_titleof the client
process_id→numberThe process id of the client
size→{ x: number, y: number }the x and y size of the client
title→stringThe title of the client
workspace_id→numberThe id of the workspace that the client/window is on
Methods:
HyprlandWorkspace
Propreties:
active→boolean
id→number
Methods:
MprisLoopingChanged
Propreties:
loop_status→"None"|"Playlist"|"Track"
player→stringThe players name
Methods:
MprisOutput
Propreties:
player→stringThe players name
Methods:
MprisPlayer
Propreties:
Methods:
:get_volume() → number
:next()
:play_pause()
:previous()
:set_loop(status)
status:"None"|"Playlist"|"Track"
:set_shuffle(shuffle)
shuffle:boolean
:set_volume(volume)
volume:number
MprisService
Propreties:
Methods:
:get_player(player_name) → MprisPlayer
player_name:string
MprisShuffleToggled
Propreties:
player→stringThe players name
shuffle→boolean
Methods:
MprisTrackChanged
Propreties:
player→stringThe players name
track→TrackMetadata|{ empty: boolean }
see definitions: TrackMetadata 
Methods:
MprisVolumeChanged
Propreties:
player→stringThe players name
volume→number
Methods:
TimeService
Propreties:
Methods:
:delay(duration, signal)
duration:numberHow much time (in seconds) needs to pass until sending the signal
signal:string|CustomSignalThe signal to send once the specified amount of time has passed
TrackMetadata
Propreties:
album_artists→string[]List of artists of the song
album_name→stringThe album name of the song playing
length→numberThe length of the song in seconds
title→stringThe title of the song playing