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 LogFile = @import("LogFile.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 {
|
||||
return struct {
|
||||
|
||||
@@ -9,8 +9,5 @@ pub const Widget = @import("Widget.zig");
|
||||
pub const BigLabel = @import("components/BigLabel.zig");
|
||||
pub const CenteredBox = @import("components/CenteredBox.zig");
|
||||
pub const CyclableLabel = @import("components/generic.zig").CyclableLabel;
|
||||
pub const InfoLine = @import("components/InfoLine.zig");
|
||||
pub const Label = @import("components/Label.zig");
|
||||
pub const Session = @import("components/Session.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 enums = @import("enums.zig");
|
||||
@@ -7,10 +7,11 @@ const ly_core = @import("ly-ui").ly_core;
|
||||
const interop = ly_core.interop;
|
||||
const SharedError = ly_core.SharedError;
|
||||
const LogFile = ly_core.LogFile;
|
||||
const Environment = ly_core.Environment;
|
||||
const utmp = interop.utmp;
|
||||
const Utmp = utmp.utmpx;
|
||||
|
||||
const Environment = @import("Environment.zig");
|
||||
|
||||
pub const AuthOptions = struct {
|
||||
tty: u8,
|
||||
service_name: [:0]const u8,
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const keyboard = @import("../keyboard.zig");
|
||||
const TerminalBuffer = @import("../TerminalBuffer.zig");
|
||||
const Widget = @import("../Widget.zig");
|
||||
const generic = @import("generic.zig");
|
||||
const ly_ui = @import("ly-ui");
|
||||
const keyboard = ly_ui.keyboard;
|
||||
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||
const Widget = ly_ui.Widget;
|
||||
const CyclableLabel = ly_ui.CyclableLabel;
|
||||
|
||||
const MessageLabel = generic.CyclableLabel(Message, Message);
|
||||
const MessageLabel = CyclableLabel(Message, Message);
|
||||
|
||||
const InfoLine = @This();
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const ly_core = @import("ly-core");
|
||||
const Environment = ly_core.Environment;
|
||||
const ly_ui = @import("ly-ui");
|
||||
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 Environment = @import("../Environment.zig");
|
||||
|
||||
const Env = struct {
|
||||
// TODO: Remove dependency on Environment
|
||||
environment: Environment,
|
||||
index: usize,
|
||||
};
|
||||
const EnvironmentLabel = generic.CyclableLabel(Env, *UserList);
|
||||
const EnvironmentLabel = CyclableLabel(Env, *UserList);
|
||||
|
||||
const Session = @This();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
const std = @import("std");
|
||||
const Allocator = std.mem.Allocator;
|
||||
|
||||
const ly_core = @import("ly-core");
|
||||
const SavedUsers = ly_core.SavedUsers;
|
||||
const ly_ui = @import("ly-ui");
|
||||
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 SavedUsers = @import("../config/SavedUsers.zig");
|
||||
|
||||
const StringList = std.ArrayListUnmanaged([]const u8);
|
||||
pub const User = struct {
|
||||
@@ -17,7 +17,7 @@ pub const User = struct {
|
||||
allocated_index: bool,
|
||||
first_run: bool,
|
||||
};
|
||||
const UserLabel = generic.CyclableLabel(User, *Session);
|
||||
const UserLabel = CyclableLabel(User, *Session);
|
||||
|
||||
const UserList = @This();
|
||||
|
||||
@@ -27,7 +27,6 @@ pub fn init(
|
||||
allocator: Allocator,
|
||||
buffer: *TerminalBuffer,
|
||||
usernames: StringList,
|
||||
// TODO: Remove dependency on SavedUsers
|
||||
saved_users: *SavedUsers,
|
||||
session: *Session,
|
||||
width: usize,
|
||||
@@ -11,11 +11,11 @@ const Color = TerminalBuffer.Color;
|
||||
const Styling = TerminalBuffer.Styling;
|
||||
const ly_core = ly_ui.ly_core;
|
||||
const IniParser = ly_core.IniParser;
|
||||
const SavedUsers = ly_core.SavedUsers;
|
||||
const ini = ly_core.ini;
|
||||
|
||||
const Config = @import("Config.zig");
|
||||
const OldSave = @import("OldSave.zig");
|
||||
const SavedUsers = @import("SavedUsers.zig");
|
||||
|
||||
const color_properties = [_][]const u8{
|
||||
"bg",
|
||||
|
||||
@@ -9,6 +9,14 @@ pub const Animation = enum {
|
||||
dur_file,
|
||||
};
|
||||
|
||||
pub const DisplayServer = enum {
|
||||
wayland,
|
||||
shell,
|
||||
xinitrc,
|
||||
x11,
|
||||
custom,
|
||||
};
|
||||
|
||||
pub const Input = enum {
|
||||
info_line,
|
||||
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 BigLabel = ly_ui.BigLabel;
|
||||
const CenteredBox = ly_ui.CenteredBox;
|
||||
const InfoLine = ly_ui.InfoLine;
|
||||
const Label = ly_ui.Label;
|
||||
const Session = ly_ui.Session;
|
||||
const Text = ly_ui.Text;
|
||||
const UserList = ly_ui.UserList;
|
||||
const TerminalBuffer = ly_ui.TerminalBuffer;
|
||||
const Widget = ly_ui.Widget;
|
||||
const ly_core = ly_ui.ly_core;
|
||||
@@ -23,10 +20,6 @@ const UidRange = ly_core.UidRange;
|
||||
const LogFile = ly_core.LogFile;
|
||||
const SharedError = ly_core.SharedError;
|
||||
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 = ini.Ini;
|
||||
|
||||
@@ -37,10 +30,17 @@ const DurFile = @import("animations/DurFile.zig");
|
||||
const GameOfLife = @import("animations/GameOfLife.zig");
|
||||
const Matrix = @import("animations/Matrix.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 Lang = @import("config/Lang.zig");
|
||||
const migrator = @import("config/migrator.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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user