mirror of https://github.com/fairyglade/ly.git
Merge branch 'master' into master
This commit is contained in:
commit
78ed67b35f
|
@ -15,7 +15,7 @@ body:
|
|||
id: version
|
||||
attributes:
|
||||
label: Ly version
|
||||
description: The output of `ly --version`. Please note that only Ly v1.0.0 and above are supported.
|
||||
description: The output of `ly --version`. Please note that only Ly v1.1.0 and above are supported.
|
||||
placeholder: 1.1.0-dev.12+2b0301c
|
||||
validations:
|
||||
required: true
|
||||
|
@ -59,7 +59,7 @@ body:
|
|||
label: Relevant logs
|
||||
description: |
|
||||
Please copy and paste any relevant logs, error messages or any other output. This will be automatically formatted into code, so no need for backticks. Screenshots are accepted if they make life easier for you.
|
||||
If you're using the latest code on master (for v1.1.0), including your session log (found at /var/log/ly-session.log unless modified) is a good idea. (But make sure it's relevant!)
|
||||
If it exists, ncluding your session log (found at /var/log/ly-session.log unless modified) is a good idea. (But make sure it's relevant!)
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: moreinfo
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 43 KiB |
|
@ -21,7 +21,7 @@ comptime {
|
|||
}
|
||||
}
|
||||
|
||||
const ly_version = std.SemanticVersion{ .major = 1, .minor = 1, .patch = 0 };
|
||||
const ly_version = std.SemanticVersion{ .major = 1, .minor = 2, .patch = 0 };
|
||||
|
||||
var dest_directory: []const u8 = undefined;
|
||||
var config_directory: []const u8 = undefined;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.{
|
||||
.name = .ly,
|
||||
.version = "1.1.0",
|
||||
.version = "1.2.0",
|
||||
.fingerprint = 0xa148ffcc5dc2cb59,
|
||||
.minimum_zig_version = "0.14.0",
|
||||
.dependencies = .{
|
||||
|
|
1050
include/termbox2.h
1050
include/termbox2.h
File diff suppressed because it is too large
Load Diff
11
readme.md
11
readme.md
|
@ -16,6 +16,7 @@ Ly is a lightweight TUI (ncurses-like) display manager for Linux and BSD.
|
|||
- xorg
|
||||
- xorg-xauth
|
||||
- shutdown
|
||||
- brightnessctl
|
||||
|
||||
### Debian
|
||||
```
|
||||
|
@ -77,6 +78,14 @@ Install Ly for systemd-based systems (the default)
|
|||
# zig build installexe
|
||||
```
|
||||
|
||||
Instead of DISPLAY_MANAGER you need to add your DM:
|
||||
- gdm.service
|
||||
- sddm.service
|
||||
- lightdm.service
|
||||
```
|
||||
# systemctl disable DISPLAY_MANAGER
|
||||
```
|
||||
|
||||
Enable the service
|
||||
```
|
||||
# systemctl enable ly.service
|
||||
|
@ -244,7 +253,9 @@ On Arch Linux, the example .xinitrc (/etc/X11/xinit/xinitrc) starts like this:
|
|||
- bspwm
|
||||
- budgie
|
||||
- cinnamon
|
||||
- dwm
|
||||
- enlightenment
|
||||
- gnome
|
||||
- kde
|
||||
- leftwm
|
||||
- lxde
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
|
||||
|
||||
|
||||
authenticating = uwierzytelnianie...
|
||||
brightness_down = zmniejsz jasność
|
||||
brightness_up = zwiększ jasność
|
||||
capslock = capslock
|
||||
err_alloc = nieudana alokacja pamięci
|
||||
err_bounds = indeks poza granicami
|
||||
|
||||
err_bounds = indeks poza zakresem
|
||||
err_brightness_change = nie udało się zmienić jasności
|
||||
err_chdir = nie udało się otworzyć folderu domowego
|
||||
|
||||
err_console_dev = nie udało się uzyskać dostępu do konsoli
|
||||
err_config = nie można przetworzyć pliku konfiguracyjnego
|
||||
err_console_dev = nie udało się uzyskać dostępu do konsoli
|
||||
err_dgn_oob = wiadomość loga
|
||||
err_domain = niepoprawna domena
|
||||
|
||||
|
||||
err_empty_password = puste hasło jest niedozwolone
|
||||
err_envlist = nie udało się pobrać listy zmiennych środowiskowych
|
||||
err_hostname = nie udało się uzyskać nazwy hosta
|
||||
err_mlock = nie udało się zablokować pamięci haseł
|
||||
err_null = wskaźnik zerowy
|
||||
|
||||
err_null = pusty wskaźnik
|
||||
err_numlock = nie udało się ustawić numlock
|
||||
err_pam = transakcja pam nieudana
|
||||
err_pam_abort = transakcja pam przerwana
|
||||
err_pam_acct_expired = konto wygasło
|
||||
err_pam_auth = błąd autentyfikacji
|
||||
err_pam_auth = błąd uwierzytelniania
|
||||
err_pam_authinfo_unavail = nie udało się zdobyć informacji o użytkowniku
|
||||
err_pam_authok_reqd = token wygasł
|
||||
err_pam_buf = błąd bufora pamięci
|
||||
err_pam_cred_err = nie udało się ustawić uwierzytelnienia
|
||||
err_pam_cred_err = nie udało się ustawić uwierzytelnienia
|
||||
err_pam_cred_expired = uwierzytelnienie wygasło
|
||||
err_pam_cred_insufficient = niewystarczające uwierzytelnienie
|
||||
err_pam_cred_unavail = nie udało się uzyskać uwierzytelnienia
|
||||
err_pam_cred_unavail = nie udało się uzyskać uwierzytelnienia
|
||||
err_pam_maxtries = osiągnięto limit prób
|
||||
err_pam_perm_denied = brak uprawnień
|
||||
err_pam_perm_denied = odmowa dostępu
|
||||
err_pam_session = błąd sesji
|
||||
err_pam_sys = błąd systemu
|
||||
err_pam_user_unknown = nieznany użytkownik
|
||||
err_path = nie udało się ustawić ścieżki
|
||||
err_perm_dir = nie udało się zmienić obecnego katalogu
|
||||
err_perm_group = nie udało się obniżyć uprawnień grupy
|
||||
err_perm_user = nie udało się obniżyć uprawnień użytkownika
|
||||
err_pwnam = nie udało się uzyskać informacji o użytkowniku
|
||||
|
||||
|
||||
|
||||
err_path = nie udało się ustawić ścieżki
|
||||
err_perm_dir = nie udało się zmienić obecnego katalogu
|
||||
err_perm_group = nie udało się obniżyć uprawnień grupy
|
||||
err_perm_user = nie udało się obniżyć uprawnień użytkownika
|
||||
err_pwnam = nie udało się uzyskać informacji o użytkowniku
|
||||
err_sleep = nie udało się wykonać polecenia sleep
|
||||
err_tty_ctrl = nie udało się przekazać kontroli tty
|
||||
err_unknown = wystąpił nieznany błąd
|
||||
err_user_gid = nie udało się ustawić GID użytkownika
|
||||
err_user_init = nie udało się zainicjalizować użytkownika
|
||||
err_user_init = nie udało się zainicjalizować użytkownika
|
||||
err_user_uid = nie udało się ustawić UID użytkownika
|
||||
|
||||
|
||||
err_xsessions_dir = nie udało się znaleźć folderu sesji
|
||||
err_xsessions_open = nie udało się otworzyć folderu sesji
|
||||
|
||||
err_xauth = polecenie xauth nie powiodło się
|
||||
err_xcb_conn = połączenie xcb nie powiodło się
|
||||
err_xsessions_dir = nie udało się znaleźć folderu sesji
|
||||
err_xsessions_open = nie udało się otworzyć folderu sesji
|
||||
insert = wstaw
|
||||
login = login
|
||||
logout = wylogowano
|
||||
|
||||
|
||||
no_x11_support = wsparcie X11 wyłączone podczas kompilacji
|
||||
normal = normalny
|
||||
numlock = numlock
|
||||
|
||||
other = inny
|
||||
password = hasło
|
||||
restart = uruchom ponownie
|
||||
shell = powłoka
|
||||
shutdown = wyłącz
|
||||
|
||||
sleep = uśpij
|
||||
wayland = wayland
|
||||
|
||||
x11 = x11
|
||||
xinitrc = xinitrc
|
||||
|
|
|
@ -55,31 +55,21 @@ fn realloc(self: *Doom) anyerror!void {
|
|||
|
||||
fn draw(self: *Doom) void {
|
||||
for (0..self.terminal_buffer.width) |x| {
|
||||
// We start from 1 so that we always have the topmost line when spreading fire
|
||||
for (1..self.terminal_buffer.height) |y| {
|
||||
const source = y * self.terminal_buffer.width + x;
|
||||
const random = (self.terminal_buffer.random.int(u16) % 7) & 3;
|
||||
// Get current cell
|
||||
const from = y * self.terminal_buffer.width + x;
|
||||
const cell_index = self.buffer[from];
|
||||
|
||||
var dest = (source - @min(source, random)) + 1;
|
||||
if (self.terminal_buffer.width > dest) dest = 0 else dest -= self.terminal_buffer.width;
|
||||
// Spread fire
|
||||
const propagate = self.terminal_buffer.random.int(u1);
|
||||
const to = from - self.terminal_buffer.width; // Get the line above
|
||||
|
||||
const buffer_source = self.buffer[source];
|
||||
const buffer_dest_offset = random & 1;
|
||||
self.buffer[to] = if (cell_index > 0) cell_index - propagate else cell_index;
|
||||
|
||||
if (buffer_source < buffer_dest_offset) continue;
|
||||
|
||||
var buffer_dest = buffer_source - buffer_dest_offset;
|
||||
if (buffer_dest > STEPS) buffer_dest = 0;
|
||||
self.buffer[dest] = @intCast(buffer_dest);
|
||||
|
||||
const dest_y = dest / self.terminal_buffer.width;
|
||||
const dest_x = dest % self.terminal_buffer.width;
|
||||
const dest_cell = self.fire[buffer_dest];
|
||||
dest_cell.put(dest_x, dest_y);
|
||||
|
||||
const source_y = source / self.terminal_buffer.width;
|
||||
const source_x = source % self.terminal_buffer.width;
|
||||
const source_cell = self.fire[buffer_source];
|
||||
source_cell.put(source_x, source_y);
|
||||
// Put the cell
|
||||
const cell = self.fire[cell_index];
|
||||
cell.put(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +79,8 @@ fn initBuffer(buffer: []u8, width: usize) void {
|
|||
const slice_start = buffer[0..length];
|
||||
const slice_end = buffer[length..];
|
||||
|
||||
// Initialize the framebuffer in black, except for the "fire source" as the
|
||||
// last color
|
||||
@memset(slice_start, 0);
|
||||
@memset(slice_end, STEPS);
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ pub fn main() !void {
|
|||
const sleep_len = try TerminalBuffer.strWidth(lang.sleep);
|
||||
const brightness_down_key = if (config.brightness_down_key) |key| try std.fmt.parseInt(u8, key[1..], 10) else null;
|
||||
const brightness_down_len = try TerminalBuffer.strWidth(lang.brightness_down);
|
||||
const brightness_up_key = if (config.brightness_down_key) |key| try std.fmt.parseInt(u8, key[1..], 10) else null;
|
||||
const brightness_up_key = if (config.brightness_up_key) |key| try std.fmt.parseInt(u8, key[1..], 10) else null;
|
||||
const brightness_up_len = try TerminalBuffer.strWidth(lang.brightness_up);
|
||||
|
||||
var event: termbox.tb_event = undefined;
|
||||
|
@ -788,6 +788,11 @@ pub fn main() !void {
|
|||
try info_line.addMessage(lang.logout, config.bg, config.fg);
|
||||
}
|
||||
|
||||
// Clear the TTY because termbox2 doesn't properly do it
|
||||
const capability = termbox.global.caps[termbox.TB_CAP_CLEAR_SCREEN];
|
||||
const capability_slice = capability[0..std.mem.len(capability)];
|
||||
_ = try std.posix.write(termbox.global.ttyfd, capability_slice);
|
||||
|
||||
try std.posix.tcsetattr(std.posix.STDIN_FILENO, .FLUSH, tb_termios);
|
||||
if (auth_fails < config.auth_fails) _ = termbox.tb_clear();
|
||||
|
||||
|
|
Loading…
Reference in New Issue