mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 11:44:55 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04d4447273 | ||
|
|
ced8f9bee3 | ||
|
|
c6446db3e2 |
@@ -23,7 +23,7 @@ comptime {
|
||||
}
|
||||
}
|
||||
|
||||
const ly_version = std.SemanticVersion{ .major = 1, .minor = 3, .patch = 0 };
|
||||
const ly_version = std.SemanticVersion{ .major = 1, .minor = 4, .patch = 0 };
|
||||
|
||||
var dest_directory: []const u8 = undefined;
|
||||
var config_directory: []const u8 = undefined;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.{
|
||||
.name = .ly,
|
||||
.version = "1.3.0",
|
||||
.version = "1.4.0",
|
||||
.fingerprint = 0xa148ffcc5dc2cb59,
|
||||
.minimum_zig_version = "0.15.0",
|
||||
.dependencies = .{
|
||||
|
||||
12
readme.md
12
readme.md
@@ -121,9 +121,15 @@ that Ly will run on, otherwise bad things will happen. For example, to disable `
|
||||
# systemctl disable getty@tty2.service
|
||||
```
|
||||
|
||||
You can change the TTY Ly will run on by editing the corresponding
|
||||
service file for your platform, or on systemd, by enabling the service on
|
||||
different TTYs, as is done above.
|
||||
On platforms that use systemd-logind to dynamically start `autovt@.service` instances when the switch to a new tty occurs, any ly instances for ttys *except the default tty* need to be enabled using a different mechanism: To autostart ly on switch to `tty2`, do not enable any `ly` unit directly, instead symlink `autovt@tty2.service` to `ly@tty2.service` within `/usr/lib/systemd/system/` (analogous for every other tty you want to enable ly on).
|
||||
|
||||
The target of the symlink, `ly@ttyN.service`, does not actually exist, but systemd nevertheless recognizes that the instanciation of `autovt@.service` with `%I` equal to `ttyN` now points to an instanciation of `ly@.service` with `%I` set to `ttyN`.
|
||||
|
||||
Compare to `man 5 logind.conf`, especially regarding the `NAutoVTs=` and `ReserveVT=` parameters.
|
||||
|
||||
|
||||
On non-systemd systems, you can change the TTY Ly will run on by editing the corresponding
|
||||
service file for your platform.
|
||||
|
||||
### OpenRC
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Unit]
|
||||
Description=TUI display manager
|
||||
After=systemd-user-sessions.service plymouth-quit-wait.service
|
||||
After=getty@%I.service
|
||||
Conflicts=getty@%I.service
|
||||
After=getty@%i.service
|
||||
Conflicts=getty@%i.service
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
|
||||
@@ -41,15 +41,19 @@ pub fn addEnvironment(self: *Session, environment: Environment) !void {
|
||||
const env = Env{ .environment = environment, .index = self.label.list.items.len };
|
||||
|
||||
try self.label.addItem(env);
|
||||
sessionChanged(env, self.user_list);
|
||||
addedSession(env, self.user_list);
|
||||
}
|
||||
|
||||
fn addedSession(env: Env, user_list: *UserList) void {
|
||||
const user = user_list.label.list.items[user_list.label.current];
|
||||
if (!user.first_run) return;
|
||||
|
||||
user.session_index.* = env.index;
|
||||
}
|
||||
|
||||
fn sessionChanged(env: Env, maybe_user_list: ?*UserList) void {
|
||||
if (maybe_user_list) |user_list| {
|
||||
const user = user_list.label.list.items[user_list.label.current];
|
||||
if (!user.first_run) return;
|
||||
|
||||
user.session_index.* = env.index;
|
||||
user_list.label.list.items[user_list.label.current].session_index.* = env.index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user