Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
4ae78f8de0 | |||
9e41188e8d | |||
5030afc04e | |||
97a9d37417 | |||
c2539b4d27 | |||
0b7fe2ccfc | |||
e0eb274d8b | |||
72ee2410a2 | |||
6c0ca2ab1f | |||
2b9d1c9549 | |||
83604a8ef5 | |||
e4420a9c59 | |||
29c3125614 |
@@ -7,90 +7,241 @@
|
||||
#include <stdint.h>
|
||||
#include <iostream>
|
||||
#include <format>
|
||||
|
||||
namespace Mutil::Console::Sequences {
|
||||
const char ESC = 0x1b;
|
||||
const char CSI = 0x9b;
|
||||
const char DCS = 0x90;
|
||||
const char OSC = 0x9d;
|
||||
}
|
||||
#include <initializer_list>
|
||||
|
||||
namespace Mutil::Console::General {
|
||||
const char BEL = 0x07;
|
||||
const char BS = 0x08;
|
||||
const char HT = 0x09;
|
||||
const char LF = 0x0A;
|
||||
const char VT = 0x0B;
|
||||
const char FF = 0x0C;
|
||||
const char CR = 0x0D;
|
||||
using Mutil::Console::Sequences::ESC;
|
||||
const char DEL = 0x7f;
|
||||
}
|
||||
|
||||
namespace Mutil::Console::Cursor {
|
||||
class Movement {
|
||||
public:
|
||||
void Home() {};
|
||||
void LnCol(uint64_t line, uint64_t column) {};
|
||||
void Up(uint64_t lines) {};
|
||||
void Down(uint64_t lines) {};
|
||||
void Right(uint64_t columns) {};
|
||||
void Left(uint64_t columns) {};
|
||||
void NextLn(uint64_t lines) {};
|
||||
void PrevLn(uint64_t lines) {};
|
||||
void JmpCol(uint64_t column) {};
|
||||
std::pair<uint64_t, uint64_t> Pos() {};
|
||||
void Save() {};
|
||||
void Restore() {};
|
||||
enum Codes : char {
|
||||
BEL = 0x07,
|
||||
BS,
|
||||
HT,
|
||||
LF,
|
||||
VT,
|
||||
FF,
|
||||
CR,
|
||||
ESC = 0x1b,
|
||||
DEL = 0x7f,
|
||||
};
|
||||
}
|
||||
|
||||
namespace Mutil::Console::Erase {
|
||||
|
||||
}
|
||||
|
||||
namespace Mutil::Console::Graphics {
|
||||
class Format {
|
||||
void Reset() {};
|
||||
void Bold() {};
|
||||
void ResetBold() {};
|
||||
void Dim() {};
|
||||
void ResetDim() {};
|
||||
void Italic() {};
|
||||
void ResetItalic() {};
|
||||
void Underline() {};
|
||||
void ResetUnderline() {};
|
||||
void Blink() {};
|
||||
void ResetBlink() {};
|
||||
void Inverse() {};
|
||||
void ResetInverse() {};
|
||||
void Hidden() {};
|
||||
void ResetHidden() {};
|
||||
void Strikethrough() {};
|
||||
void ResetStrikethrough() {};
|
||||
// Rendition flags
|
||||
const uint64_t RNormal = 0;
|
||||
const uint64_t RBold = 1<<0;
|
||||
const uint64_t RDim = 1<<1;
|
||||
const uint64_t RItalic = 1<<2;
|
||||
const uint64_t RUnderline = 1<<3;
|
||||
const uint64_t RBlink = 1<<4;
|
||||
const uint64_t RInverse = 1<<5;
|
||||
const uint64_t RHidden = 1<<6;
|
||||
const uint64_t RStrikethrough = 1<<7;
|
||||
const uint64_t RResetBold = 1<<8;
|
||||
const uint64_t RResetDim = 1<<9;
|
||||
const uint64_t RResetItalic = 1<<10;
|
||||
const uint64_t RResetUnderline = 1<<11;
|
||||
const uint64_t RResetBlink = 1<<12;
|
||||
const uint64_t RResetInverse = 1<<13;
|
||||
const uint64_t RResetHidden = 1<<14;
|
||||
const uint64_t RResetStrikethrough = 1<<15;
|
||||
const uint64_t RColor16 = 1<<16;
|
||||
const uint64_t RColor256 = 1<<17;
|
||||
const uint64_t RColorRGB = 1<<18;
|
||||
const uint64_t RForegroundColor = 1<<19;
|
||||
const uint64_t RBackgroundColor = 1<<20;
|
||||
const uint64_t RDefaultColor = 1<<21;
|
||||
|
||||
class Rendition {
|
||||
uint64_t flags = 0;
|
||||
uint32_t color = 0;
|
||||
public:
|
||||
Rendition() {};
|
||||
Rendition(uint64_t f) : flags(f) {};
|
||||
Rendition(uint64_t f, uint8_t c) : flags(f | RColor256), color(c) {
|
||||
if ((flags & (RForegroundColor | RBackgroundColor)) == 0)
|
||||
flags |= RForegroundColor;
|
||||
};
|
||||
Rendition(uint64_t f, uint8_t r, uint8_t g, uint8_t b) : flags(f | RColorRGB) {
|
||||
if ((flags & (RForegroundColor | RBackgroundColor)) == 0)
|
||||
flags |= RForegroundColor;
|
||||
|
||||
this->color = (uint32_t)r << 16 | (uint32_t)g << 8 | (uint32_t)b << 0;
|
||||
}
|
||||
|
||||
|
||||
std::string Compile() {
|
||||
std::ostringstream s;
|
||||
s << Mutil::Console::General::Codes::ESC << '[';
|
||||
|
||||
if (flags == RNormal) {
|
||||
s << "0m";
|
||||
return s.str();
|
||||
}
|
||||
|
||||
if ((flags & RBold) == RBold)
|
||||
s << "1" << ";";
|
||||
|
||||
if ((flags & RDim) == RDim)
|
||||
s << "2" << ";";
|
||||
|
||||
if ((flags & RItalic) == RItalic)
|
||||
s << "3" << ";";
|
||||
|
||||
if ((flags & RUnderline) == RUnderline)
|
||||
s << "4" << ";";
|
||||
|
||||
if ((flags & RBlink) == RBlink)
|
||||
s << "5" << ";";
|
||||
|
||||
if ((flags & RInverse) == RInverse)
|
||||
s << "7" << ";";
|
||||
|
||||
if ((flags & RHidden) == RHidden)
|
||||
s << "8" << ";";
|
||||
|
||||
if ((flags & RStrikethrough) == RStrikethrough)
|
||||
s << "9" << ";";
|
||||
|
||||
if ((flags & RResetBold) == RResetBold)
|
||||
s << "22" << ";";
|
||||
|
||||
if ((flags & RResetDim) == RResetDim)
|
||||
s << "22" << ";";
|
||||
|
||||
if ((flags & RResetItalic) == RResetItalic)
|
||||
s << "23" << ";";
|
||||
|
||||
if ((flags & RResetUnderline) == RResetUnderline)
|
||||
s << "24" << ";";
|
||||
|
||||
if ((flags & RResetBlink) == RResetBlink)
|
||||
s << "25" << ";";
|
||||
|
||||
if ((flags & RResetInverse) == RResetInverse)
|
||||
s << "27" << ";";
|
||||
|
||||
if ((flags & RResetHidden) == RResetHidden)
|
||||
s << "28" << ";";
|
||||
|
||||
if ((flags & RResetStrikethrough) == RResetStrikethrough)
|
||||
s << "29" << ";";
|
||||
|
||||
if ((flags & RForegroundColor) == RForegroundColor)
|
||||
s << "38" << ";";
|
||||
|
||||
if ((flags & RBackgroundColor) == RBackgroundColor)
|
||||
s << "48" << ";";
|
||||
|
||||
if ((flags & RColor256) == RColor256)
|
||||
s << "5" << ";" << std::to_string(color) << ";";
|
||||
|
||||
if ((flags & RColorRGB) == RColorRGB)
|
||||
s << "2" << ";" << std::to_string((color >> 16) & 0x000000ff) << ";" << std::to_string((color >> 8) & 0x000000ff) << ";" << std::to_string((color >> 0) & 0x000000ff) << ";";
|
||||
|
||||
if ((flags & (RDefaultColor | RForegroundColor)) == (RDefaultColor | RForegroundColor))
|
||||
s << "39" << ";";
|
||||
|
||||
if ((flags & (RDefaultColor | RBackgroundColor)) == (RDefaultColor | RBackgroundColor))
|
||||
s << "49" << ";";
|
||||
|
||||
std::string c = s.str();
|
||||
c.back() = 'm';
|
||||
|
||||
return c;
|
||||
}
|
||||
};
|
||||
|
||||
// Color 16
|
||||
/* const uint8_t Black = 30;
|
||||
const uint8_t Red = 31;
|
||||
const uint8_t Green = 32;
|
||||
const uint8_t Yellow = 33;
|
||||
const uint8_t Blue = 34;
|
||||
const uint8_t Magenta = 35;
|
||||
const uint8_t Cyan = 36;
|
||||
const uint8_t White = 37;
|
||||
const uint8_t Default = 39;
|
||||
const uint8_t BlackBG = 40;
|
||||
const uint8_t
|
||||
const uint8_t
|
||||
const uint8_t
|
||||
const uint8_t
|
||||
const uint8_t
|
||||
const uint8_t
|
||||
|
||||
class Color16 {
|
||||
class String {
|
||||
std::string str;
|
||||
Rendition rendition;
|
||||
public:
|
||||
String(std::string s) : str(s) {}
|
||||
String(std::string s, Rendition r) : str(s), rendition(r) {};
|
||||
void Style(Rendition r) { rendition = r;};
|
||||
std::string Render() { return rendition.Compile() + str + Rendition(RNormal).Compile(); };
|
||||
std::string Render(Rendition r) {
|
||||
Style(r);
|
||||
return Render();
|
||||
}
|
||||
};
|
||||
|
||||
};*/
|
||||
}
|
||||
|
||||
namespace Mutil::Console::Functions {
|
||||
void call(std::ostream &os, const std::string& arg, const char& func) {
|
||||
std::ostringstream s;
|
||||
s << General::Codes::ESC << '[' << arg << func;
|
||||
os << s.str();
|
||||
}
|
||||
|
||||
class Display {
|
||||
std::ostream &os = std::cout;
|
||||
public:
|
||||
Display() {};
|
||||
Display(std::ostream &os) : os(os) {};
|
||||
void A(uint n = 1) { call(os, std::to_string(n), 'A'); };
|
||||
void B(uint n = 1) { call(os, std::to_string(n), 'B'); };
|
||||
void C(uint n = 1) { call(os, std::to_string(n), 'C'); };
|
||||
void D(uint n = 1) { call(os, std::to_string(n), 'D'); };
|
||||
void E(uint n = 1) { call(os, std::to_string(n), 'E'); };
|
||||
void F(uint n = 1) { call(os, std::to_string(n), 'F'); };
|
||||
void G(uint n = 1) { call(os, std::to_string(n), 'G'); };
|
||||
void H(uint n = 0, uint m = 0) { call(os, std::format("{};{}",n,m), 'H'); };
|
||||
void J(uint n = 0) { call(os, std::to_string(n), 'J'); };
|
||||
void K(uint n = 0) { call(os, std::to_string(n), 'K'); };
|
||||
void S(uint n = 1) { call(os, std::to_string(n), 'S'); };
|
||||
void T(uint n = 1) { call(os, std::to_string(n), 'T'); };
|
||||
void s() { os << General::Codes::ESC << "7"; };
|
||||
void u() { os << General::Codes::ESC << "8"; };
|
||||
void m(Graphics::Rendition r) { os << r.Compile(); };
|
||||
//Display& Write(const char* in) {
|
||||
// os << in;
|
||||
// return *this;
|
||||
//}
|
||||
|
||||
template<typename In>
|
||||
friend std::ostream& operator<<(Display& d, In in);
|
||||
};
|
||||
|
||||
template<typename In>
|
||||
std::ostream& operator<<(Display& d, In in) {
|
||||
return d.os << in;
|
||||
}
|
||||
|
||||
|
||||
std::string CursorUp(uint n) { return std::format("{}[{}A", "\x1b[", n); };
|
||||
void CursorDown(uint n) {};
|
||||
void CursorForward(uint n) {};
|
||||
void CursorBack(uint n) {};
|
||||
void CursorNextLine(uint n) {};
|
||||
void CursorPreviousLine(uint n) {};
|
||||
void CursorHorizontalAbsolute(uint n) {};
|
||||
std::string CursorPosition(uint n, uint m) { return std::format("\x1b[{};{}H", n, m); };
|
||||
void RequestCursorPosition() {};
|
||||
void EraseInDisplay(uint n) {};
|
||||
void EraseInLine(uint n) {};
|
||||
void ScrollUp(uint n) {};
|
||||
void ScrollDown(uint n) {};
|
||||
void SaveCursorPosition() {};
|
||||
void RestoreCursorPosition() {};
|
||||
|
||||
/* Yucky
|
||||
void SelectGraphicsRendition(std::initializer_list<uint8_t> args) {
|
||||
if (empty(args)) { return; };
|
||||
|
||||
std::stringstream s;
|
||||
s << Mutil::Console::General::Codes::ESC << '[';
|
||||
|
||||
for (uint8_t a : args) {
|
||||
//std::cout << (uint16_t)a << std::endl;
|
||||
if (a == *std::prev(args.end())) {
|
||||
s << std::to_string(a);
|
||||
break;
|
||||
}
|
||||
s << std::to_string(a) << ';';
|
||||
}
|
||||
s << 'm';
|
||||
|
||||
std::cout << s.str();
|
||||
};
|
||||
*/
|
||||
}
|
24
include/Desktop.hpp
Normal file
24
include/Desktop.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Created by maxine on 6/23/25.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <regex>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace Desktop::Browser {
|
||||
const std::regex URLPattern("((http|https)://)(www.)?[a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)");
|
||||
|
||||
int OpenURL(std::string url) {
|
||||
if (url.empty())
|
||||
throw std::invalid_argument("No url provided");
|
||||
|
||||
if(!regex_match(url, URLPattern))
|
||||
throw std::invalid_argument("Invalid url");
|
||||
|
||||
std::string cmd = "xdg-open " + url;
|
||||
|
||||
return std::system(cmd.c_str());
|
||||
}
|
||||
}
|
@@ -5,84 +5,53 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <functional>
|
||||
#include <format>
|
||||
|
||||
namespace Mutil::Logging {
|
||||
namespace Mutil::Logging {
|
||||
/// Logger object for constructing loggers.
|
||||
class LoggerObj {
|
||||
class LoggerObj : public std::ostream {
|
||||
private:
|
||||
/// Output stream, default std::clog.
|
||||
std::ostream &os = std::clog;
|
||||
/// Lambda formatting function, primarily for storing a format string in a versatile way, users allowed to supply their own.
|
||||
std::function<std::string(void)> λ;
|
||||
/// Lambda function on message, can be used for formatting
|
||||
std::function<std::string(const std::string_view)> λMessage;
|
||||
public:
|
||||
/// Default constructor, just simple messages to be written to console
|
||||
/// Default constructor, just simple messages to be written to console stderr
|
||||
LoggerObj() {};
|
||||
/// Construct with specified output stream
|
||||
LoggerObj(std::ostream &os);
|
||||
/// Construct with a custom, formatted prefix applied to every message, such as "* Mutil Logging >> message".
|
||||
template<typename... Args>
|
||||
LoggerObj(const std::format_string<Args...> fmt, Args&&... args) {
|
||||
λ = [fmt, args...](){
|
||||
return std::vformat(fmt.get(), std::make_format_args(args...));
|
||||
};
|
||||
}
|
||||
/// Construct with a custom lambda formatting function
|
||||
LoggerObj(std::function<std::string(void)> λ) : λ(λ) {};
|
||||
/// Construct with a specified output stream and custom formatting function
|
||||
LoggerObj(std::ostream &os, std::function<std::string(void)> λ) : λ(λ) {};
|
||||
LoggerObj(std::ostream &os) : os(os) {};
|
||||
/// Full construction
|
||||
LoggerObj(std::ostream &os, std::function<std::string(const std::string_view)> λMessage) : os(os), λMessage(λMessage) {};
|
||||
public:
|
||||
/// If provided only runs formatting function, formatting function may retrieve data for its own messages.
|
||||
void operator()() {
|
||||
λ && os << λ();
|
||||
}
|
||||
|
||||
/// Send a simple log message
|
||||
void operator()(const std::string_view message) {
|
||||
(λ && os << λ() << message << '\n') ||
|
||||
os << message << '\n';
|
||||
λMessage ? os << λMessage(message) : os << message;
|
||||
os << std::endl;
|
||||
}
|
||||
|
||||
/// Send a formatted/complex log message
|
||||
template<typename... Args>
|
||||
void operator()(const std::format_string<Args...> fmt, Args&&... args) {
|
||||
(λ && os << λ() << std::vformat(fmt.get(), std::make_format_args(args...)) << '\n') ||
|
||||
os << std::vformat(fmt.get(), std::make_format_args(args...)) << '\n';
|
||||
std::string m = std::vformat(fmt.get(), std::make_format_args(args...));
|
||||
λMessage ? os << λMessage(m) : os << m;
|
||||
os << std::endl;
|
||||
};
|
||||
|
||||
/// Send log messages using logger as a stream
|
||||
//template<typename In>
|
||||
//LoggerObj& operator<<(In message) {
|
||||
// λMessage ? os << λMessage(message) : os << message;
|
||||
// os << std::endl;
|
||||
// return *this;
|
||||
//};
|
||||
|
||||
template<typename In>
|
||||
std::ostream& operator<<(In message) {
|
||||
(λ && os << λ() << message) ||
|
||||
os << message;
|
||||
return os;
|
||||
};
|
||||
LoggerObj& operator<<(In message) {
|
||||
λMessage ? os << λMessage(message) : os << message;
|
||||
os << std::endl;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class Info : public LoggerObj {
|
||||
public:
|
||||
Info() : LoggerObj("[I] | ") {};
|
||||
};
|
||||
|
||||
class Warning : public LoggerObj {
|
||||
public:
|
||||
Warning() : LoggerObj("[W] | ") {};
|
||||
};
|
||||
|
||||
class Error : public LoggerObj {
|
||||
public:
|
||||
Error() : LoggerObj("[E] | ") {};
|
||||
};
|
||||
|
||||
class Verbose : public LoggerObj {
|
||||
public:
|
||||
Verbose() : LoggerObj("[V] | ") {};
|
||||
};
|
||||
|
||||
class Debug : public LoggerObj {
|
||||
public:
|
||||
Debug() : LoggerObj("[D] | ") {};
|
||||
};
|
||||
}
|
||||
|
||||
|
138
main.cpp
138
main.cpp
@@ -1,16 +1,130 @@
|
||||
#include <Logging.hpp>
|
||||
#include <Desktop.hpp>
|
||||
#include <Console.hpp>
|
||||
#include <source_location>
|
||||
#include <unistd.h>
|
||||
|
||||
class Debug : public Mutil::Logging::LoggerObj {
|
||||
std::string NormalRen = Mutil::Console::Graphics::Rendition().Compile();
|
||||
std::string MessageRen = Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RItalic, 135).Compile();
|
||||
std::string TraceRen = Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RBold, 241).Compile();
|
||||
public:
|
||||
Debug() : LoggerObj(std::cout, [this](const std::string_view m) {return std::format("{}{}[D] {}{}", NormalRen, MessageRen, m, NormalRen); }) {};
|
||||
void Trace(const std::source_location &location = std::source_location::current()) {
|
||||
this->operator()("{}{} @ {}:{}", TraceRen, location.function_name(), location.file_name(), location.line());
|
||||
};
|
||||
};
|
||||
|
||||
int main() {
|
||||
Mutil::Logging::LoggerObj lo;
|
||||
lo("Hello world!!!!");
|
||||
Mutil::Logging::Info I;
|
||||
Mutil::Logging::Error E;
|
||||
Mutil::Logging::Verbose V;
|
||||
Mutil::Logging::Debug D;
|
||||
I("Something...");
|
||||
E("Something...");
|
||||
V("Something...");
|
||||
D("Something...");
|
||||
std::cout << (char)0x1b << (char)0x5b << "33m" << "BULLOCKS" << '\n';
|
||||
//std::cout << 0x1b5b << "33m" << "BALLS" << '\n';
|
||||
std::function<std::string(const std::string_view)> λmessage = [](const std::string_view m) {
|
||||
return std::format("{}{} {}{}{}",
|
||||
Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RItalic, 252, 186, 3).Compile(),
|
||||
"-->",
|
||||
Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RUnderline, 74).Compile(),
|
||||
m,
|
||||
Mutil::Console::Graphics::Rendition().Compile());
|
||||
};
|
||||
|
||||
Mutil::Logging::LoggerObj l(std::cout, λmessage);
|
||||
|
||||
l("Hello world");
|
||||
l << "something" << "something." << "something..";
|
||||
Mutil::Console::Graphics::Rendition r(Mutil::Console::Graphics::RItalic, 252, 186, 3);
|
||||
std::string c = r.Compile();
|
||||
std::cout << c << "ass" << std::endl;
|
||||
|
||||
std::cout << Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RBold | Mutil::Console::Graphics::RItalic, 160, 186, 3).Compile() << "SHIIIIIIT" << Mutil::Console::Graphics::Rendition(Mutil::Console::Graphics::RNormal).Compile() << std::endl;
|
||||
|
||||
Debug d;
|
||||
d << "DEBUGGGGING";
|
||||
d.Trace();
|
||||
Mutil::Console::Graphics::String s("balls");
|
||||
std::cout << s.Render({Mutil::Console::Graphics::RItalic}) << std::endl;
|
||||
|
||||
//d << Mutil::Console::Functions::CursorUp(6);
|
||||
//d.Trace();
|
||||
|
||||
//std::cout << "\x1b[2J" << Mutil::Console::Functions::CursorPosition(1, 3) << "AAAAAAAAAAAAAAAAA" << std::endl;
|
||||
|
||||
//std::cout << "\x1b[2J";
|
||||
//std::cout << Mutil::Console::Functions::CursorPosition(1, 39
|
||||
//) << "AAAAAAAA";
|
||||
//std::cout << Mutil::Console::Functions::CursorPosition(2, 35) << "AAAA";
|
||||
//std::cout << Mutil::Console::Functions::CursorPosition(3, 31) << "AAAA";
|
||||
// std::cout << Mutil::Console::Functions::CursorPosition(4, 29) << "AA";
|
||||
// std::cout << std::endl;
|
||||
|
||||
Mutil::Console::Functions::Display display;
|
||||
display.J(2);
|
||||
display.H();
|
||||
display.m({Mutil::Console::Graphics::RUnderline,70});
|
||||
//const char* womp = "womp womp";
|
||||
//std::cout << womp << std::endl;
|
||||
|
||||
|
||||
display << "ASS" << std::endl;
|
||||
display << "DICK" << "FUCK" << std::endl;
|
||||
display.m({});
|
||||
|
||||
//display.H(12, 40);
|
||||
//display << "λ" << std::endl;
|
||||
|
||||
display.J(2);
|
||||
//display << "\x1b[?47h";
|
||||
for (uint i = 1; i < 24; i++) {
|
||||
//display.J(2);
|
||||
Mutil::Console::Graphics::Rendition r(0, i);
|
||||
display.H(i, i+1);
|
||||
display.m(r);
|
||||
display << std::format("F{}", i) << "λ" << std::endl;
|
||||
// 1 second = 1000000 microseconds
|
||||
// 24 frames (technically)
|
||||
// 1000000 / 24
|
||||
// 41666 microseconds between frames roughly
|
||||
usleep(41666*2);
|
||||
display.A();
|
||||
display.m(r);
|
||||
display.G(i+std::string(std::format("F{}λ", i)).size()-1);
|
||||
usleep(41666*2);
|
||||
display.K();
|
||||
for (uint j = i+std::string(std::format("F{}λ", i)).size()-1; j < 80; j++) {
|
||||
display << "-" << std::endl;
|
||||
display.A();
|
||||
display.G(j);
|
||||
usleep(41666/2);
|
||||
}
|
||||
display << "λ";
|
||||
display << '\n';
|
||||
//display.K(0);
|
||||
|
||||
}
|
||||
display.m({});
|
||||
//display << '\n';
|
||||
//display << "\x1b[?47l";
|
||||
|
||||
|
||||
//display << "\x1b[?47h";
|
||||
////display.H();
|
||||
////display.J(2);
|
||||
////display.s();
|
||||
////display.H(24,80);
|
||||
////display.m({Mutil::Console::Graphics::RUnderline, 27});
|
||||
////display << "SomethingSomethingAsshole" << std::endl;
|
||||
//display.H(3,3);
|
||||
////display.m({});
|
||||
////display.u();
|
||||
//display.s();
|
||||
//display.H(24,80);
|
||||
//display << "0" << std::endl;
|
||||
//display.u();
|
||||
//display << "\x1b[?47l";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Desktop::Browser::OpenURL("https://git.redacted.cc/maxine/mutil");
|
||||
}
|
||||
|
Reference in New Issue
Block a user