docs: add Lua config examples

This commit is contained in:
Ivan Malison 2026-05-01 10:10:03 -07:00
parent c50ed7b75e
commit e84a326bd3
3 changed files with 69 additions and 3 deletions

View file

@ -18,9 +18,9 @@ CS2 launch options:
```
example plugin config:
```
```ini
plugin {
csgo-vulkan-fix {
csgo_vulkan_fix {
# Whether to fix the mouse position. A select few apps might be wonky with this.
fix_mouse = true
@ -31,4 +31,18 @@ plugin {
}
```
fullscreen the game manually and enjoy.
Lua config:
```lua
hl.config({
plugin = {
csgo_vulkan_fix = {
fix_mouse = true,
},
},
})
hl.plugin.csgo_vulkan_fix.vkfix_app({ app = "cs2", w = 1650, h = 1050 })
hl.plugin.csgo_vulkan_fix.vkfix_app({ app = "myapp", w = 1920, h = 1080 })
```
fullscreen the game manually and enjoy.

View file

@ -55,6 +55,36 @@ hyprbars-button = bgcolor, size, icon, on-click, fgcolor
Please note it _has_ to be inside `plugin { hyprbars { } }`.
For Lua config, use `hl.config` for plugin options and
`hl.plugin.hyprbars.add_button` for buttons:
```lua
hl.config({
plugin = {
hyprbars = {
bar_height = 20,
on_double_click = "hyprctl dispatch fullscreen 1",
},
},
})
hl.plugin.hyprbars.add_button({
bg_color = "rgb(ff4040)",
fg_color = "rgb(ffffff)",
size = 10,
icon = "X",
action = "hyprctl dispatch killactive",
})
hl.plugin.hyprbars.add_button({
bg_color = "rgb(eeee11)",
fg_color = "rgb(000000)",
size = 10,
icon = "_",
action = "hyprctl dispatch fullscreen 1",
})
```
## Window rules
Hyprbars supports the following _dynamic_ [window rules](https://wiki.hypr.land/Configuring/Window-Rules/):

View file

@ -51,6 +51,28 @@ Example:
bind = SUPER, g, hyprexpo:expo, toggle
```
Lua config:
```lua
hl.config({
plugin = {
hyprexpo = {
columns = 3,
gap_size = 5,
bg_col = "rgb(111111)",
workspace_method = "center current",
skip_empty = false,
show_workspace_numbers = false,
workspace_number_color = "rgb(ffffff)",
gesture_distance = 300,
},
},
})
hl.bind("SUPER + g", function()
hl.plugin.hyprexpo.expo("toggle")
end)
```
Here are a list of options you can use:
| option | description |
| --- | --- |