Sleepless

Prompts

Configuration

Last updated on

The configuration file is located at client/modules/config.lua.

local config = {}

config.debug = false

config.defaultPromptDistance = 2.0
config.defaultPosition = 'bottom-center'
config.defaultLayout = 'auto'
config.separator = 'slash'

config.mode = 'auto'
config.modeCommand = 'promptmode'

config.keyboardStyle = 'white'
config.gamepadStyle = 'light'
config.coloredButtons = false

config.scale = 1.0
config.iconSize = 2.4

config.versionCheckEnabled = true

-- Built-in: modern | minimal | light | retro | cyber | vice | noir | industrial | fantasy
config.theme = 'modern'

config.themeColors = {
    modern = { 49, 164, 252, 255 },
    minimal = { 168, 186, 204, 255 },
    light = { 37, 99, 235, 255 },
    retro = { 255, 176, 32, 255 },
    cyber = { 0, 229, 255, 255 },
    vice = { 255, 64, 180, 255 },
    noir = { 240, 240, 236, 255 },
    industrial = { 212, 168, 48, 255 },
    fantasy = { 212, 175, 110, 255 },
}

config.themeColor = nil

return config

Options

OptionTypeDefaultDescription
debugbooleanfalseEnables the /prompts test command
defaultPromptDistancenumber2.0Distance, in meters, for world prompts that omit distance
defaultPositionstring'bottom-center'Slot used when show() omits position
defaultLayout'row' | 'column' | 'auto''auto'auto uses a column on left/right middle slots, otherwise a row
separator'slash' | 'line' | 'dot' | 'none''slash'Divider between prompts in a group
mode'auto' | 'keyboard' | 'xbox' | 'playstation''auto'Default icon mode when the player has no saved preference
modeCommandstring'promptmode'Chat command that opens the mode dialog
keyboardStylestring'white'Keyboard / mouse art style
gamepadStylestring'light'Xbox / PlayStation art style
coloredButtonsbooleanfalseUse colored face-button variants when the pack has them
scalenumber1.0Overall HUD scale
iconSizenumber2.4Icon size in rem (1rem = 1% of viewport height)
versionCheckEnabledbooleantrueGitHub version check on the server
themestring'modern'Visual look. Must match a file in web/themes/<id>.css
themeColorstablesee abovePer-theme RGBA accent { r, g, b, a } (0–255)
themeColornumber[] | nilnilOptional global accent override. When set, every theme uses this color instead of themeColors

Icon styles

Keyboard: white, dark, alt, retro, vintage.

Gamepad: default, light, alt, alt2, retro.

These can also be changed at runtime with setStyle. See Client Exports.

Icon mode

/promptmode opens an ox_lib select dialog. The player's pick is stored in KVP and overrides config.mode on the next start.

ModeBehavior
autoFollows last input device. Detects Xbox vs DualSense / DualShock
keyboardAlways show keyboard / mouse icons
xboxAlways show Xbox icons
playstationAlways show DualSense icons

Default positions and aliases are listed on Prompt Options.

Locales

ox_lib locales live in locales/. English ships as locales/en.json. Copy that file to add another language (fr.json, de.json, and so on). The hold string is prefixed on any prompt with holdTime.

{
  "hold": "Hold"
}

Debug command

When debug is true:

  • /prompts vehicle example
  • /prompts positions one prompt in every slot
  • /prompts hold hold-to-complete demo
  • /prompts keybind remap sleepless_prompts_demo under Settings > Key Bindings > FiveM and watch the icon change
  • /prompts style dark
  • /prompts theme cyber
  • /prompts hide

Built-in looks and how to add your own are on Custom Themes.

On this page