Commit Graph

630 Commits

Author SHA1 Message Date
Jackson Delahunt 2ad63fc6eb config: add shell option to hide the shell session
The shell session is unconditionally added to the session list with no way
to hide it. This is inconsistent with xinitrc, which is omitted when set
to null. Adds a shell boolean config option (default true) that hides the
shell session when set to false.
2026-03-29 14:51:45 +11:00
AnErrupTion 142476041d
Update French translation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-28 12:09:41 +01:00
RacerBG fad683e035 Update the Bulgarian translation (#952)
## What are the changes about?

As the title says.

## What existing issue does this resolve?

N/A

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/952
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RacerBG <racerbg@noreply.codeberg.org>
Co-committed-by: RacerBG <racerbg@noreply.codeberg.org>
2026-03-28 12:07:10 +01:00
AnErrupTion e882eea22a
Improve bug report template
Notably, don't make the issue reproduction on a fresh install required.
This'll likely filter out the honest people who have actually done it
from the others who haven't.

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 23:18:16 +01:00
RadsammyT fe6942d406 fix: custom label and bind ordering (#951)
## What are the changes about?

Fixes the order of custom labels and binds because of a HashMap shenanigan (no guaranteed order), so we use `ArrayHashMap` instead which preserves insertion order.  They should now be shown in the order they are declared in the config.

![image](/attachments/7a928c5f-fbbe-4a60-b120-3feddbcdfdb6)

![image](/attachments/22afe011-00a0-4a29-90ab-060e1d059c75)

## What existing issue does this resolve?

!950

## Pre-requisites

- [x] I have tested & confirmed the changes work locally
- [x] I have run `zig fmt` throughout my changes

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/951
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RadsammyT <radsammyt@gmail.com>
Co-committed-by: RadsammyT <radsammyt@gmail.com>
2026-03-27 22:46:37 +01:00
AnErrupTion 5b7c7dfdf5
migrator.zig: Run zig fmt
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 21:34:32 +01:00
AnErrupTion 074bb0a68a
Improve custom command sample config readability (closes #949)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 20:34:39 +01:00
AnErrupTion e0a3364169
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-27 17:17:18 +01:00
RadsammyT 7a8d913531 Feature: Add custom command & label support (#945)
## What are the changes about?

Adds customizable commands and labels to ly.
Solves https://codeberg.org/fairyglade/ly/issues/905.

Since Ly doesn't use INI headers. I use them exclusively for declarations of custom commands and labels.

### Commands

Bind a keybind to a command, and add a hint to the HUD. Useful for use cases like display brightness, switching between GPUs, etc.

Supports localization in the `name` field only. ex: where `lang = es`: `$brightness_up` => `bajar brillo`

Declared in config.ini with the following:

```ini
[cmd:F8]
name = custom command 2
cmd = touch /tmp/ly.gaming
```

### Labels

Add a label to the HUD. As specified in #905.
The text of the label corresponds to the output of the command specified in `[lbl:NAME]`.
Only shows the first line of the output.

Declared in config.ini with the following:

```ini
[lbl:kernel]
cmd = uname -srn
refresh = 0
```

Example to add to the config.ini:
```ini
# Declare a command with the F8 binding.
[cmd:F8]
#The name of the command to show up in Ly.
name = custom command
cmd = touch /tmp/ly.gaming

# Declare a label with an ID. This ID should be unique across all labels.
[lbl:kernel]
cmd = uname -srn
# In frames, the time to re-run the command and update the label. If 0, only run once- do not refresh.
refresh = 0

# Once you're done setting up labels and commands, add an empty header
# below to continue configurating the rest of Ly.
# Put other settings not belonging to custom commands/labels below here.
[]

```

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

![image](/attachments/f9373ac9-567e-4f47-987c-1df6f4ee0d84)

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/945
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: RadsammyT <radsammyt@gmail.com>
Co-committed-by: RadsammyT <radsammyt@gmail.com>
2026-03-27 17:15:49 +01:00
AnErrupTion 984ac596af
Group for loops in event loop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-26 21:55:35 +01:00
AnErrupTion ed486c29d2
Add xauth file as X server argument
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-26 21:10:50 +01:00
AnErrupTion a6fc5d67e8
Use upstream zigini library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 22:43:05 +01:00
AnErrupTion 549576aa3e
Make box widget not position-dependent
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 22:06:57 +01:00
AnErrupTion 3758b5da1b
Mention -quiet argument for X11 server (closes #722)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 21:10:09 +01:00
AnErrupTion 5e1c681385
Update screenshot (closes #948)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 20:49:53 +01:00
AnErrupTion ac78ccc398
Update Kawaii-Ash's GitHub username
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-25 20:06:59 +01:00
Tom e548333473 Improve README.md (#946)
Signed-off-by: Tom <tom@helix.me.uk>

## What are the changes about?

Sentence structure updates and converting text to md syntax

## What existing issue does this resolve?

Fixes: #943

- Updated a few sentences to make them more understandable
- Converted the **Note**'s etc to md formatting.

## Pre-requisites

- [✓] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/946
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Tom <tripplehelix@noreply.codeberg.org>
Co-committed-by: Tom <tripplehelix@noreply.codeberg.org>
2026-03-21 19:30:23 +01:00
AnErrupTion 60e3380375
Switch to single-instance Widget model
And make widget() functions return pointers to widgets instead of just
widgets

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-21 16:19:33 +01:00
AnErrupTion aa392837bc
Require "zig fmt" to be run in a PR
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-21 16:01:03 +01:00
AnErrupTion abe72c74ff
Optimise event loop initialisation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-18 20:26:00 +01:00
Mr. Cat dda56eab37 Fix compilation error when building without X11 support (#947)
## What are the changes about?

Add an argument to info log function to fix compiler error.

## What existing issue does this resolve?

If building with `zig build -Denable_x11_support=false` there is a compiler error about a missing argument.
```
install
└─ install ly
   └─ compile exe ly Debug native 1 errors
src/main.zig:730:27: error: member function expected 3 argument(s), found 2
        try state.log_file.info(
            ~~~~~~~~~~~~~~^~~~~
ly-core/src/LogFile.zig:26:5: note: function declared here
pub fn info(self: *LogFile, category: []const u8, comptime message: []const u8, args: anytype) !void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    callMain [inlined]: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:627:37
    callMainWithArgs [inlined]: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:587:20
    main: /home/oskar/.cache/zig/p/N-V-__8AACFNhBSaulceFT2Wx6Mx-ycGtZh7CEztyVdtX2jW/lib/std/start.zig:602:28
    1 reference(s) hidden; use '-freference-trace=4' to see all references
```

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/947
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Mr. Cat <mrcat@posteo.com>
Co-committed-by: Mr. Cat <mrcat@posteo.com>
2026-03-18 20:18:45 +01:00
AnErrupTion 9c50297059
Fix insert mode hack + fix bugs
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 23:58:06 +01:00
AnErrupTion acac884cfe
Add support for local keybinds
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 22:58:39 +01:00
AnErrupTion a89c918c5d
Move back custom widgets into main project
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:59:24 +01:00
AnErrupTion 64539f4342
Split UI code into ly-ui library
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:44:33 +01:00
AnErrupTion 93696a6b30
Remove unused import + add TODO
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 21:03:59 +01:00
AnErrupTion 4f26eeada0
Fix double spacing issue in labels
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 20:10:47 +01:00
AnErrupTion 83e98a185f
Add TODO in main.zig
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 20:01:47 +01:00
AnErrupTion 128dcb16f8
Merge branch 'master' of codeberg.org:fairyglade/ly
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-03-17 19:58:58 +01:00
Luna 3a4109eb2d Add toggle visibility to password (#938)
## What are the changes about?

I have add a keybinding to toggle the visibility of the password

## What existing issue does this resolve?

N/A

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/938
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: Luna <luna-39@noreply.codeberg.org>
Co-committed-by: Luna <luna-39@noreply.codeberg.org>
2026-03-17 12:27:23 +01:00
GalaxyShard 7cefff4570 Add Esperanto translation (#942)
Title.

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/942
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: GalaxyShard <dominic.adragna@byteroach.com>
Co-committed-by: GalaxyShard <dominic.adragna@byteroach.com>
2026-03-16 23:16:43 +01:00
OSVidYapan f31c55b562 Improve README.md (#940)
For anyone who doesn't know see this thread;
https://codeberg.org/fairyglade/ly/pulls/934
This is the original post i have fixed the commit log issue
(by recreating entire new fork)
Note that is is also grammarly fixed version.
(mostly please advise if i still have those mistakes)

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/940
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
Co-authored-by: OSVidYapan <osvidyapan@noreply.codeberg.org>
Co-committed-by: OSVidYapan <osvidyapan@noreply.codeberg.org>
2026-03-16 21:13:08 +01:00
AnErrupTion 9cde291ac7
Remove unused termbox alias
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-27 22:19:09 +01:00
AnErrupTion 03d976171a
Fix battery level overlapping shutdown label (fixes #935)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-27 20:28:11 +01:00
AnErrupTion b01e4afc79
Make default startup script more compatible
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 17:10:52 +01:00
AnErrupTion 5a4605ffb6
Add layering system for widgets
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 11:29:14 +01:00
AnErrupTion 01dcfa207e
Show UI errors in info line again
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 11:20:54 +01:00
AnErrupTion 32d5330efb
Move the event loop to a separate function
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 01:19:19 +01:00
AnErrupTion 5564fed664
Add Widget.calculateTimeout function
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-12 00:27:07 +01:00
AnErrupTion 7c7aed9cb2
Make animation timeout independent of event loop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 23:51:32 +01:00
AnErrupTion 57c96a3478
Fix animation timeout bug + remove redundant check
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 22:55:10 +01:00
AnErrupTion 6773f74788
Add widget display name to improve logging
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 21:51:07 +01:00
AnErrupTion b389e379fa
Make handling inputs widget-independent
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-11 21:00:00 +01:00
hynak 4a72e41e44 Fix default startup script (#929)
## What are the changes about?

Discussed in !920. Adds fixes to the startup script by removing the array usage (some shells use arrays different/unsupported) and adds stdout_behavior Inherit flag to the child process to propagate the echos to the TTY.

## What existing issue does this resolve?

N/A

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/929
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
2026-02-10 22:20:30 +01:00
AnErrupTion d268d5bb45
Add the cascade animation as a separate widget
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 17:43:55 +01:00
Cyaxares f320d3f666 Add Kurdish translation (#930)
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/930
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: Cyaxares <cyaxares@noreply.codeberg.org>
Co-committed-by: Cyaxares <cyaxares@noreply.codeberg.org>
2026-02-10 10:47:50 +01:00
AnErrupTion 70e95f094a
Fix incorrect key parsing
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 10:41:08 +01:00
AnErrupTion 207b352888
Add central Widget struct + clean up code
In particular, move all termbox2 usage to TerminalBuffer.zig &
keyboard.zig

Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-10 00:22:27 +01:00
AnErrupTion 99dba44e46
Rename min_refresh_delta option to animation_frame_delay (closes #925)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-09 11:38:56 +01:00
AnErrupTion d1810d8c98
Fix numlock & capslock positioning
Signed-off-by: AnErrupTion <anerruption@disroot.org>
2026-02-09 11:20:27 +01:00