Skip to content

Commit

Permalink
hyprlock: add PAMFAIL and PAMPROMPT
Browse files Browse the repository at this point in the history
  • Loading branch information
PaideiaDilemma committed Jan 6, 2025
1 parent fb826ba commit d5d11c9
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions pages/Hypr Ecosystem/hyprlock.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ widget_name {
# further options
}
```

### Monitor selection
`monitor` is available for all widgets and can be left empty for "all monitors".

Expand All @@ -122,6 +121,22 @@ So either use the portname (e.g. `eDP-1`) or the monitor description (e.g. `desc

See [Monitors](../../Configuring/Monitors).

### Variable substitution
The following variables in widget text options will be substituted.

- `$USER` - username (e.g. linux-user)
- `$DESC` - user description (e.g. Linux User)
- `$TIME` - current time in 24-hour format (e.g. `13:37`)
- `$TIME12` - current time in 12-hour format (e.g. `1:37 PM`)
- `$LAYOUT` - current keyboard layout
- `$ATTEMPTS` - failed authentication attempts
- `$PROMPT` - last authentication prompt
- `$FAIL` - last authentication fail reason
- `$PAMPROMPT` - last pam prompt
- `$PAMFAIL` - last pam fail reason
- `$FPRINTPROMPT` - last prompt from fingerprint matching
- `$FPRINTMESSAGE` - last error message from fingerprint matching

## Widget List

### General remarks
Expand Down Expand Up @@ -334,14 +349,7 @@ Behaviour of `swap_font_color` is as follows:

{{< /callout >}}

Available variables for `placeholder_text`:

- `$PROMPT` - prompt text provided by pam. Usually this will be "Password: ", but it depends on your pam configuration.

Available variables for `fail_text`:

- `$FAIL` - pam fail reason
- `$ATTEMPTS` - number of failed authentication attempts
`placeholder_text` and `fail_text` both support [variable substitution](#variable-substitution).

{{% details title="Example input-field" closed="true" %}}

Expand Down Expand Up @@ -386,20 +394,10 @@ Draws a label.
| halign | horizontal alignment | str | center |
| valign | vertical alignment | str | center |

Available variables for `text`:

- `$USER` - username (e.g. linux-user)
- `$DESC` - user description (e.g. Linux User)
- `$TIME` - current time in 24-hour format (e.g. `13:37`)
- `$TIME12` - current time in 12-hour format (e.g. `1:37 PM`)
- `$PROMPT` - last pam prompt
- `$FAIL` - last pam fail reason
- `$ATTEMPTS` - failed attempts
- `$LAYOUT` - current keyboard layout
- `$FPRINTMESSAGE` - last error message from fingerprint matching
- `$FPRINTPROMPT` - last prompt from fingerprint matching
#### Dynamic labels

`text` also supports launching commands, for example:
The `text` option supports [variable substitution](#variable-substitution) and launching shell commands. For example:

```ini
text = cmd[update:1000] echo "<span foreground='##ff2222'>$(date)</span>"
Expand Down

0 comments on commit d5d11c9

Please sign in to comment.