This commit is contained in:
Valeria Fadeeva 2025-01-24 01:56:40 +05:00
parent 871736db3b
commit 9019c689af
9 changed files with 160 additions and 50 deletions

9
.trunk/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp

View File

@ -0,0 +1,2 @@
# Prettier friendly markdownlint config (all formatting rules disabled)
extends: markdownlint/style/prettier

View File

@ -0,0 +1 @@
edition = "2021"

View File

@ -0,0 +1,7 @@
enable=all
source-path=SCRIPTDIR
disable=SC2154
# If you're having issues with shellcheck following source, disable the errors via:
# disable=SC1090
# disable=SC1091

View File

@ -0,0 +1,14 @@
module.exports = {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false, // https://github.com/svg/svgo/issues/1128
sortAttrs: true,
removeOffCanvasPaths: true,
},
},
},
],
};

38
.trunk/trunk.yaml Normal file
View File

@ -0,0 +1,38 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.22.9
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.6.6
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- go@1.21.0
- node@18.20.5
- python@3.10.8
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- clippy@1.65.0
- git-diff-check
- markdownlint@0.43.0
- osv-scanner@1.9.2
- prettier@3.4.2
- rustfmt@1.65.0
- shellcheck@0.10.0
- shfmt@3.6.0
- svgo@3.3.2
- taplo@0.9.3
- trufflehog@3.88.2
actions:
disabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available

31
assets/text/about_en.txt Normal file
View File

@ -0,0 +1,31 @@
A Linux distribution is a selected set of Linux operating system components assembled into a distribution package — the kernel, libraries and utilities of the GNU project, the installation program, other utilities and programs for Linux.
Typically, a Linux distribution contains basic components, including a boot loader, Linux kernel, init system, daemons, a graphical server and applications.
Linux distributions are designed to meet various user needs, from servers and desktop computers to embedded systems. For example, server distributions include various server software (web servers, DBMS), while desktop distributions include desktop environments, office suites, and multimedia players.
A Linux derivative is an operating system created by modifying an existing Linux distribution to meet specific user goals or needs.
Derivative developers often change software packages, configurations, and system behavior to create customized solutions.
----------------------------------------------
Product from girls and boys, from the creators of non boring wallpapers, distributions from Vasyans, including Linus Torvalds was Vasyan, who made the kernel of the operating system on his home computer, as opposed to the paid kernel of the Unix system at that time, and many, many others.
„If you criticize someone else's, offer your own. Offer — do it.“
— Sergey Pavlovich Korolev is a Soviet scientist, design engineer, the main organizer of the production of rocket and space technology and rocket weapons in the USSR and the founder of practical cosmonautics.
30.12.1906 — 14.01.1966
„Rejecting — offer, offering — act.“
— Paul Valéry — French poet, essayist, philosopher.
30.10.1871 — 20.07.1945
----------------------------------------------
Don't Worry, Be Happy! :D";
----------------------------------------------

View File

@ -1,42 +1,3 @@
----------------------------------------------
EN
----------------------------------------------
A Linux distribution is a selected set of Linux operating system components assembled into a distribution package — the kernel, libraries and utilities of the GNU project, the installation program, other utilities and programs for Linux.
Typically, a Linux distribution contains basic components, including a boot loader, Linux kernel, init system, daemons, a graphical server and applications.
Linux distributions are designed to meet various user needs, from servers and desktop computers to embedded systems. For example, server distributions include various server software (web servers, DBMS), while desktop distributions include desktop environments, office suites, and multimedia players.
A Linux derivative is an operating system created by modifying an existing Linux distribution to meet specific user goals or needs.
Derivative developers often change software packages, configurations, and system behavior to create customized solutions.
----------------------------------------------
Product from girls and boys, from the creators of non boring wallpapers, distributions from Vasyans, including Linus Torvalds was Vasyan, who made the kernel of the operating system on his home computer, as opposed to the paid kernel of the Unix system at that time, and many, many others.
„If you criticize someone else's, offer your own. Offer — do it.“
— Sergey Pavlovich Korolev is a Soviet scientist, design engineer, the main organizer of the production of rocket and space technology and rocket weapons in the USSR and the founder of practical cosmonautics.
30.12.1906 — 14.01.1966
„Rejecting — offer, offering — act.“
— Paul Valéry — French poet, essayist, philosopher.
30.10.1871 — 20.07.1945
----------------------------------------------
Don't Worry, Be Happy! :D";
----------------------------------------------
RU
----------------------------------------------
Дистрибутив Linux — это скомпонованный в дистрибутивный пакет подобранный набор компонентов операционной системы Linux — ядро, библиотеки и утилиты проекта GNU, программа установки, другие утилиты и программы для Linux.
Как правило, дистрибутив Linux содержит базовые компоненты, в том числе загрузчик, ядро Linux, систему инициализации, программы-демоны, графический сервер и приложения.

View File

@ -46,6 +46,9 @@ fn run_cmd(cmd_string: &str, lang_env_var: Option<&str>) {
}
fn main() {
let current_date = chrono::Utc::now();
let current_year = format!("{}", current_date.year());
let width = 800;
let height = 700;
@ -387,6 +390,8 @@ fn main() {
});
});
let row_help = Flex::default().row();
let mut btn_get_help = Button::default().with_label("I need help");
btn_get_help.set_callback(move |b| {
@ -432,6 +437,11 @@ fn main() {
});
});
row_help.end();
let row_telegram = Flex::default().row();
let mut btn_telegram_channel = Button::default().with_label("Telegram Channel");
btn_telegram_channel.set_callback(move |b| {
@ -462,6 +472,10 @@ fn main() {
});
});
row_telegram.end();
let row_other_media = Flex::default().row();
let mut btn_youtube = Button::default().with_label("YouTube");
btn_youtube.set_callback(move |b| {
@ -507,6 +521,8 @@ fn main() {
});
});
row_other_media.end();
col_information.end();
grp_information.end();
@ -516,29 +532,60 @@ fn main() {
.with_label("About\t\t")
.column();
let mut tabs_mini_about = Tabs::default_fill();
let mut term = terminal::Terminal::default_fill();
term.set_color(Color::Light1);
term.set_text_color(Color::Gray0);
term.set_redraw_style(RedrawStyle::PerWrite);
let grp_mini_about_en = Flex::default_fill()
.with_label("EN\t\t")
.column();
if let Ok(lines) = read_lines("/usr/share/melawy-linux-welcome/assets/text/about.txt") {
let mut term_en = terminal::Terminal::default_fill();
term_en.set_color(Color::Light1);
term_en.set_text_color(Color::Gray0);
term_en.set_redraw_style(RedrawStyle::PerWrite);
if let Ok(lines) = read_lines("/usr/share/melawy-linux-welcome/assets/text/about_en.txt") {
// Получает итератор, который возвращает Option
for line in lines {
if let Ok(text_string) = line {
term.append(format!("{}\n", text_string).as_str());
term_en.append(format!("{}\n", text_string).as_str());
}
}
}
let current_date = chrono::Utc::now();
let current_year = format!("{}", current_date.year());
let copyright_en = format!("\n(с) Valeria Fadeeva, 2023 - {}\n", current_year.clone());
term_en.append(copyright_en.as_str());
grp_mini_about_en.end();
// -----------------------------------------------------------
let grp_mini_about_ru = Flex::default_fill()
.with_label("RU\t\t")
.column();
let mut term_ru = terminal::Terminal::default_fill();
term_ru.set_color(Color::Light1);
term_ru.set_text_color(Color::Gray0);
term_ru.set_redraw_style(RedrawStyle::PerWrite);
if let Ok(lines) = read_lines("/usr/share/melawy-linux-welcome/assets/text/about_ru.txt") {
// Получает итератор, который возвращает Option
for line in lines {
if let Ok(text_string) = line {
term_ru.append(format!("{}\n", text_string).as_str());
}
}
}
let copyright_ru = format!("\n(с) Валерия Фадеева, 2023 - {}\n", current_year.clone());
term.append(copyright_en.as_str());
term.append(copyright_ru.as_str());
term_ru.append(copyright_ru.as_str());
grp_mini_about_ru.end();
tabs_mini_about.end();
tabs_mini_about.auto_layout();
grp_about.end();