mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-21 22:43:38 +00:00
Move back custom widgets into main project
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
pub const DisplayServer = enum {
|
|
||||||
wayland,
|
|
||||||
shell,
|
|
||||||
xinitrc,
|
|
||||||
x11,
|
|
||||||
custom,
|
|
||||||
};
|
|
||||||
@@ -6,9 +6,6 @@ pub const interop = @import("interop.zig");
|
|||||||
pub const UidRange = @import("UidRange.zig");
|
pub const UidRange = @import("UidRange.zig");
|
||||||
pub const LogFile = @import("LogFile.zig");
|
pub const LogFile = @import("LogFile.zig");
|
||||||
pub const SharedError = @import("SharedError.zig");
|
pub const SharedError = @import("SharedError.zig");
|
||||||
pub const SavedUsers = @import("SavedUsers.zig");
|
|
||||||
pub const Environment = @import("Environment.zig");
|
|
||||||
pub const DisplayServer = @import("enums.zig").DisplayServer;
|
|
||||||
|
|
||||||
pub fn IniParser(comptime Struct: type) type {
|
pub fn IniParser(comptime Struct: type) type {
|
||||||
return struct {
|
return struct {
|
||||||
|
|||||||
@@ -9,8 +9,5 @@ pub const Widget = @import("Widget.zig");
|
|||||||
pub const BigLabel = @import("components/BigLabel.zig");
|
pub const BigLabel = @import("components/BigLabel.zig");
|
||||||
pub const CenteredBox = @import("components/CenteredBox.zig");
|
pub const CenteredBox = @import("components/CenteredBox.zig");
|
||||||
pub const CyclableLabel = @import("components/generic.zig").CyclableLabel;
|
pub const CyclableLabel = @import("components/generic.zig").CyclableLabel;
|
||||||
pub const InfoLine = @import("components/InfoLine.zig");
|
|
||||||
pub const Label = @import("components/Label.zig");
|
pub const Label = @import("components/Label.zig");
|
||||||
pub const Session = @import("components/Session.zig");
|
|
||||||
pub const Text = @import("components/Text.zig");
|
pub const Text = @import("components/Text.zig");
|
||||||
pub const UserList = @import("components/UserList.zig");
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const ini = @import("zigini");
|
const ini = @import("ly-ui").ly_core.ini;
|
||||||
const Ini = ini.Ini;
|
const Ini = ini.Ini;
|
||||||
|
|
||||||
const enums = @import("enums.zig");
|
const enums = @import("enums.zig");
|
||||||
@@ -7,10 +7,11 @@ const ly_core = @import("ly-ui").ly_core;
|
|||||||
const interop = ly_core.interop;
|
const interop = ly_core.interop;
|
||||||
const SharedError = ly_core.SharedError;
|
const SharedError = ly_core.SharedError;
|
||||||
const LogFile = ly_core.LogFile;
|
const LogFile = ly_core.LogFile;
|
||||||
const Environment = ly_core.Environment;
|
|
||||||
const utmp = interop.utmp;
|
const utmp = interop.utmp;
|
||||||
const Utmp = utmp.utmpx;
|
const Utmp = utmp.utmpx;
|
||||||
|
|
||||||
|
const Environment = @import("Environment.zig");
|
||||||
|
|
||||||
pub const AuthOptions = struct {
|
pub const AuthOptions = struct {
|
||||||
tty: u8,
|
tty: u8,
|
||||||
service_name: [:0]const u8,
|
service_name: [:0]const u8,
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const keyboard = @import("../keyboard.zig");
|
const ly_ui = @import("ly-ui");
|
||||||
const TerminalBuffer = @import("../TerminalBuffer.zig");
|
const keyboard = ly_ui.keyboard;
|
||||||
const Widget = @import("../Widget.zig");
|
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||||
const generic = @import("generic.zig");
|
const Widget = ly_ui.Widget;
|
||||||
|
const CyclableLabel = ly_ui.CyclableLabel;
|
||||||
|
|
||||||
const MessageLabel = generic.CyclableLabel(Message, Message);
|
const MessageLabel = CyclableLabel(Message, Message);
|
||||||
|
|
||||||
const InfoLine = @This();
|
const InfoLine = @This();
|
||||||
|
|
||||||
@@ -1,21 +1,20 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const ly_core = @import("ly-core");
|
const ly_ui = @import("ly-ui");
|
||||||
const Environment = ly_core.Environment;
|
const keyboard = ly_ui.keyboard;
|
||||||
|
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||||
|
const Widget = ly_ui.Widget;
|
||||||
|
const CyclableLabel = ly_ui.CyclableLabel;
|
||||||
|
|
||||||
const keyboard = @import("../keyboard.zig");
|
|
||||||
const TerminalBuffer = @import("../TerminalBuffer.zig");
|
|
||||||
const Widget = @import("../Widget.zig");
|
|
||||||
const generic = @import("generic.zig");
|
|
||||||
const UserList = @import("UserList.zig");
|
const UserList = @import("UserList.zig");
|
||||||
|
const Environment = @import("../Environment.zig");
|
||||||
|
|
||||||
const Env = struct {
|
const Env = struct {
|
||||||
// TODO: Remove dependency on Environment
|
|
||||||
environment: Environment,
|
environment: Environment,
|
||||||
index: usize,
|
index: usize,
|
||||||
};
|
};
|
||||||
const EnvironmentLabel = generic.CyclableLabel(Env, *UserList);
|
const EnvironmentLabel = CyclableLabel(Env, *UserList);
|
||||||
|
|
||||||
const Session = @This();
|
const Session = @This();
|
||||||
|
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
|
||||||
const ly_core = @import("ly-core");
|
const ly_ui = @import("ly-ui");
|
||||||
const SavedUsers = ly_core.SavedUsers;
|
const keyboard = ly_ui.keyboard;
|
||||||
|
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||||
|
const Widget = ly_ui.Widget;
|
||||||
|
const CyclableLabel = ly_ui.CyclableLabel;
|
||||||
|
|
||||||
const keyboard = @import("../keyboard.zig");
|
|
||||||
const TerminalBuffer = @import("../TerminalBuffer.zig");
|
|
||||||
const Widget = @import("../Widget.zig");
|
|
||||||
const generic = @import("generic.zig");
|
|
||||||
const Session = @import("Session.zig");
|
const Session = @import("Session.zig");
|
||||||
|
const SavedUsers = @import("../config/SavedUsers.zig");
|
||||||
|
|
||||||
const StringList = std.ArrayListUnmanaged([]const u8);
|
const StringList = std.ArrayListUnmanaged([]const u8);
|
||||||
pub const User = struct {
|
pub const User = struct {
|
||||||
@@ -17,7 +17,7 @@ pub const User = struct {
|
|||||||
allocated_index: bool,
|
allocated_index: bool,
|
||||||
first_run: bool,
|
first_run: bool,
|
||||||
};
|
};
|
||||||
const UserLabel = generic.CyclableLabel(User, *Session);
|
const UserLabel = CyclableLabel(User, *Session);
|
||||||
|
|
||||||
const UserList = @This();
|
const UserList = @This();
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@ pub fn init(
|
|||||||
allocator: Allocator,
|
allocator: Allocator,
|
||||||
buffer: *TerminalBuffer,
|
buffer: *TerminalBuffer,
|
||||||
usernames: StringList,
|
usernames: StringList,
|
||||||
// TODO: Remove dependency on SavedUsers
|
|
||||||
saved_users: *SavedUsers,
|
saved_users: *SavedUsers,
|
||||||
session: *Session,
|
session: *Session,
|
||||||
width: usize,
|
width: usize,
|
||||||
@@ -11,11 +11,11 @@ const Color = TerminalBuffer.Color;
|
|||||||
const Styling = TerminalBuffer.Styling;
|
const Styling = TerminalBuffer.Styling;
|
||||||
const ly_core = ly_ui.ly_core;
|
const ly_core = ly_ui.ly_core;
|
||||||
const IniParser = ly_core.IniParser;
|
const IniParser = ly_core.IniParser;
|
||||||
const SavedUsers = ly_core.SavedUsers;
|
|
||||||
const ini = ly_core.ini;
|
const ini = ly_core.ini;
|
||||||
|
|
||||||
const Config = @import("Config.zig");
|
const Config = @import("Config.zig");
|
||||||
const OldSave = @import("OldSave.zig");
|
const OldSave = @import("OldSave.zig");
|
||||||
|
const SavedUsers = @import("SavedUsers.zig");
|
||||||
|
|
||||||
const color_properties = [_][]const u8{
|
const color_properties = [_][]const u8{
|
||||||
"bg",
|
"bg",
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ pub const Animation = enum {
|
|||||||
dur_file,
|
dur_file,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const DisplayServer = enum {
|
||||||
|
wayland,
|
||||||
|
shell,
|
||||||
|
xinitrc,
|
||||||
|
x11,
|
||||||
|
custom,
|
||||||
|
};
|
||||||
|
|
||||||
pub const Input = enum {
|
pub const Input = enum {
|
||||||
info_line,
|
info_line,
|
||||||
session,
|
session,
|
||||||
|
|||||||
14
src/main.zig
14
src/main.zig
@@ -10,11 +10,8 @@ const ly_ui = @import("ly-ui");
|
|||||||
const Position = ly_ui.Position;
|
const Position = ly_ui.Position;
|
||||||
const BigLabel = ly_ui.BigLabel;
|
const BigLabel = ly_ui.BigLabel;
|
||||||
const CenteredBox = ly_ui.CenteredBox;
|
const CenteredBox = ly_ui.CenteredBox;
|
||||||
const InfoLine = ly_ui.InfoLine;
|
|
||||||
const Label = ly_ui.Label;
|
const Label = ly_ui.Label;
|
||||||
const Session = ly_ui.Session;
|
|
||||||
const Text = ly_ui.Text;
|
const Text = ly_ui.Text;
|
||||||
const UserList = ly_ui.UserList;
|
|
||||||
const TerminalBuffer = ly_ui.TerminalBuffer;
|
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||||
const Widget = ly_ui.Widget;
|
const Widget = ly_ui.Widget;
|
||||||
const ly_core = ly_ui.ly_core;
|
const ly_core = ly_ui.ly_core;
|
||||||
@@ -23,10 +20,6 @@ const UidRange = ly_core.UidRange;
|
|||||||
const LogFile = ly_core.LogFile;
|
const LogFile = ly_core.LogFile;
|
||||||
const SharedError = ly_core.SharedError;
|
const SharedError = ly_core.SharedError;
|
||||||
const IniParser = ly_core.IniParser;
|
const IniParser = ly_core.IniParser;
|
||||||
const SavedUsers = ly_core.SavedUsers;
|
|
||||||
const DisplayServer = ly_core.DisplayServer;
|
|
||||||
const Environment = ly_core.Environment;
|
|
||||||
const Entry = Environment.Entry;
|
|
||||||
const ini = ly_core.ini;
|
const ini = ly_core.ini;
|
||||||
const Ini = ini.Ini;
|
const Ini = ini.Ini;
|
||||||
|
|
||||||
@@ -37,10 +30,17 @@ const DurFile = @import("animations/DurFile.zig");
|
|||||||
const GameOfLife = @import("animations/GameOfLife.zig");
|
const GameOfLife = @import("animations/GameOfLife.zig");
|
||||||
const Matrix = @import("animations/Matrix.zig");
|
const Matrix = @import("animations/Matrix.zig");
|
||||||
const auth = @import("auth.zig");
|
const auth = @import("auth.zig");
|
||||||
|
const InfoLine = @import("components/InfoLine.zig");
|
||||||
|
const Session = @import("components/Session.zig");
|
||||||
|
const UserList = @import("components/UserList.zig");
|
||||||
const Config = @import("config/Config.zig");
|
const Config = @import("config/Config.zig");
|
||||||
const Lang = @import("config/Lang.zig");
|
const Lang = @import("config/Lang.zig");
|
||||||
const migrator = @import("config/migrator.zig");
|
const migrator = @import("config/migrator.zig");
|
||||||
const OldSave = @import("config/OldSave.zig");
|
const OldSave = @import("config/OldSave.zig");
|
||||||
|
const SavedUsers = @import("config/SavedUsers.zig");
|
||||||
|
const DisplayServer = @import("enums.zig").DisplayServer;
|
||||||
|
const Environment = @import("Environment.zig");
|
||||||
|
const Entry = Environment.Entry;
|
||||||
|
|
||||||
const ly_version_str = "Ly version " ++ build_options.version;
|
const ly_version_str = "Ly version " ++ build_options.version;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user