From e84a326bd3507c0c4e78a45df0d5db282ba18767 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 1 May 2026 10:10:03 -0700 Subject: [PATCH] docs: add Lua config examples --- csgo-vulkan-fix/README.md | 20 +++++++++++++++++--- hyprbars/README.md | 30 ++++++++++++++++++++++++++++++ hyprexpo/README.md | 22 ++++++++++++++++++++++ 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/csgo-vulkan-fix/README.md b/csgo-vulkan-fix/README.md index 0727576..6615838 100644 --- a/csgo-vulkan-fix/README.md +++ b/csgo-vulkan-fix/README.md @@ -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. \ No newline at end of file +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. diff --git a/hyprbars/README.md b/hyprbars/README.md index bded3bb..7224107 100644 --- a/hyprbars/README.md +++ b/hyprbars/README.md @@ -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/): diff --git a/hyprexpo/README.md b/hyprexpo/README.md index 7ba3cda..4bf7db4 100644 --- a/hyprexpo/README.md +++ b/hyprexpo/README.md @@ -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 | | --- | --- |