Terminal: Das prompt, dprompt and dbanner (0.9.1)
build / build (push) Successful in 38m26s

- das-shell 0.1.0: the Das two-line bash prompt by default (replaces the
  PS1 of Void's skel .bashrc once), dprompt (Textual prompt builder with
  presets and live preview) and dbanner (SSH login banner editor: canvas
  tools, fields with values, widgets, das-banner service for cached ones,
  Das OS logo and tryzub pictures). Python tests in make test.
- das-server 0.3.0 depends on das-shell; the server installer mentions
  dprompt and dbanner; the desktop image includes it.
- run-qemu.sh forwards the guest's SSH to localhost:2222.
- Hardware fixes: Ventoy menu icon, boot menu titles "Das OS <version>".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
das
2026-10-21 09:17:10 +03:00
co-authored by Claude Opus 5.5
parent 66ea614e0d
commit a2bffc7fe9
72 changed files with 5506 additions and 23 deletions
@@ -0,0 +1,74 @@
{
"name": "das-logo-small",
"title": {
"uk": "Логотип Das OS, малий",
"en": "Das OS logo, small"
},
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"b": {
"fg": "bright_blue",
"bg": null,
"bold": false
},
"c": {
"fg": "bright_yellow",
"bg": "blue",
"bold": false
},
"d": {
"fg": "yellow",
"bg": "bright_blue",
"bold": false
},
"e": {
"fg": "bright_yellow",
"bg": "yellow",
"bold": false
},
"f": {
"fg": "bright_yellow",
"bg": "bright_blue",
"bold": false
},
"g": {
"fg": "bright_blue",
"bg": "bright_yellow",
"bold": false
},
"h": {
"fg": "blue",
"bg": "bright_yellow",
"bold": false
},
"i": {
"fg": "bright_blue",
"bg": "yellow",
"bold": false
}
},
"lines": [
"",
" ▄▄ ██ ▄▄",
" ▀█▀█▀▀█▀█▀",
" ▄▄▀▀▀▀▀▀▀▀▄▄",
" ▀▀▀▀▀▀▀▀▀▀▀▀",
" █▀█▀▀█▀█",
" ▀▀ ██ ▀▀",
""
],
"style_map": [
"",
" aa bb aa",
" aacaddacaa",
" bbeffggffebb",
" bbdggffggdbb",
" ahaiiaha",
" aa bb aa",
""
]
}
@@ -0,0 +1,82 @@
{
"name": "das-logo",
"title": {
"uk": "Логотип Das OS",
"en": "Das OS logo"
},
"styles": {
"a": {
"fg": "bright_blue",
"bg": null,
"bold": false
},
"b": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"c": {
"fg": "bright_blue",
"bg": "yellow",
"bold": false
},
"d": {
"fg": "bright_yellow",
"bg": "blue",
"bold": false
},
"e": {
"fg": "yellow",
"bg": null,
"bold": false
},
"f": {
"fg": "blue",
"bg": "bright_yellow",
"bold": false
},
"g": {
"fg": "bright_yellow",
"bg": "bright_blue",
"bold": false
},
"h": {
"fg": "bright_blue",
"bg": "bright_yellow",
"bold": false
},
"i": {
"fg": "yellow",
"bg": "bright_blue",
"bold": false
}
},
"lines": [
"",
" ██",
" ▄▄ ▄▀▀▄ ▄▄",
" ▀█▀▀██████▀▀█▀",
" █▀▀██████▀▀█",
" ▄▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄▄",
" ▀▀█▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀▀",
" █▀▀██████▀▀█",
" ▄█▀▀██████▀▀█▄",
" ▀▀ ▀▀▀▀ ▀▀",
" ██",
""
],
"style_map": [
"",
" aa",
" bb acca bb",
" bbddbaeeabddbb",
" bffbbaabbffb",
" aaacccggghhgggcccaaa",
" aaaiiihhhgghhhiiiaaa",
" bddbbaabbddb",
" bbffbaeeabffbb",
" bb aiia bb",
" aa",
""
]
}
@@ -0,0 +1,63 @@
{
"name": "trident-shield",
"title": {
"uk": "Малий герб України (тризуб на щиті)",
"en": "Lesser coat of arms of Ukraine (tryzub on a shield)"
},
"styles": {
"a": {
"fg": "blue",
"bg": null,
"bold": false
},
"b": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"c": {
"fg": "blue",
"bg": "bright_yellow",
"bold": false
},
"d": {
"fg": "bright_yellow",
"bg": "blue",
"bold": false
}
},
"lines": [
"██████████████████████",
"██████████████████████",
"████▀████████████▀████",
"████▀█▀████████▀█▀████",
"██████████████████████",
"███████▀██████▀███████",
"██████████████████████",
"█████▀█▀█▀██▀█▀█▀█████",
"██████▀█▀████▀█▀██████",
"██████▀███▀▀███▀██████",
"████▀▀▀██▀██▀██▀▀▀████",
"███▀▀▀▀▀█▀██▀█▀▀▀▀▀███",
" ▀██████▀████▀██████▀",
" ▀▀▀████▀▀████▀▀▀",
" ▀▀██▀▀"
],
"style_map": [
"aaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaabbaaaaaaaaaa",
"aaabcaaaaabbaaaaacbaaa",
"aaabdbcaaabbaaacbdbaaa",
"aaabaabaaabbaaabaabaaa",
"aaabaabcaabbaacbaabaaa",
"aaabaabbaabbaabbaabaaa",
"aaabacbdacbbcadbcabaaa",
"aaabbbcacbaabcacbbbaaa",
"aaabaadbbbccbbbdaabaaa",
"aaabcccbbcbbcbbcccbaaa",
"aaadddddbdbbdbdddddaaa",
" aaaaaaadbbbbdaaaaaaa",
" aaaaaaaddaaaaaaa",
" aaaaaa"
]
}
@@ -0,0 +1,40 @@
{
"name": "trident-small",
"title": {
"uk": "Тризуб, малий",
"en": "Tryzub, small"
},
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
}
},
"lines": [
"",
" ▄ ██ ▄",
" █▀▄ ██ ▄▀█",
" █ █ ██ █ █",
" █ ▄ ██ ▄ █",
" █▄▄▀ ██ ▀▄▄█",
" █▀█▄█ █▄█▀█",
" █▄ ██████ ▄█",
" ▀▀▀████▀▀▀",
" ▀██▀",
""
],
"style_map": [
"",
" a aa a",
" aaa aa aaa",
" a a aa a a",
" a a aa a a",
" aaaa aa aaaa",
" aaaaa aaaaa",
" aa aaaaaa aa",
" aaaaaaaaaa",
" aaaa",
""
]
}
@@ -0,0 +1,46 @@
{
"name": "trident",
"title": {
"uk": "Тризуб",
"en": "Tryzub"
},
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
}
},
"lines": [
"",
" ██",
" █▄ ██ ▄█",
" █▀█ ██ █▀█",
" █ ██ ██ ██ █",
" █ █ ██ █ █",
" █ █ ██ █ █",
" █▄█ █▀▀█ █▄█",
" █ ▀▄██ ██▄▀ █",
" █ █ ██ █ █",
" ▀▀▀▀█▀██▀█▀▀▀▀",
" ▀████▀",
" ▀▀",
""
],
"style_map": [
"",
" aa",
" aa aa aa",
" aaa aa aaa",
" a aa aa aa a",
" a a aa a a",
" a a aa a a",
" aaa aaaa aaa",
" a aaaa aaaa a",
" a a aa a a",
" aaaaaaaaaaaaaa",
" aaaaaa",
" aa",
""
]
}
@@ -0,0 +1,248 @@
{
"name": "blocks",
"title": {
"uk": "Логотип Das OS і відомості про систему",
"en": "Das OS logo and system facts"
},
"local": false,
"vars": {
"url": ""
},
"fields": [
{
"x": 26,
"y": 0,
"width": 50,
"align": "left",
"text": "{user}@{hostname}",
"style": "j"
},
{
"x": 26,
"y": 1,
"width": 50,
"align": "left",
"text": "──────────────────────────────",
"style": "i"
},
{
"x": 26,
"y": 2,
"width": 9,
"align": "left",
"text": "[[ОС|OS]]",
"style": "k"
},
{
"x": 35,
"y": 2,
"width": 41,
"align": "left",
"text": "{os}",
"style": "l"
},
{
"x": 26,
"y": 3,
"width": 9,
"align": "left",
"text": "[[Ядро|Kernel]]",
"style": "k"
},
{
"x": 35,
"y": 3,
"width": 41,
"align": "left",
"text": "{kernel}",
"style": "l"
},
{
"x": 26,
"y": 4,
"width": 9,
"align": "left",
"text": "[[Працює|Uptime]]",
"style": "k"
},
{
"x": 35,
"y": 4,
"width": 41,
"align": "left",
"text": "{uptime}",
"style": "l"
},
{
"x": 26,
"y": 5,
"width": 9,
"align": "left",
"text": "CPU",
"style": "k"
},
{
"x": 35,
"y": 5,
"width": 41,
"align": "left",
"text": "{cpu}",
"style": "l"
},
{
"x": 26,
"y": 6,
"width": 9,
"align": "left",
"text": "[[Пам'ять|Memory]]",
"style": "k"
},
{
"x": 35,
"y": 6,
"width": 41,
"align": "left",
"text": "{mem}",
"style": "l"
},
{
"x": 26,
"y": 7,
"width": 9,
"align": "left",
"text": "IP",
"style": "k"
},
{
"x": 35,
"y": 7,
"width": 41,
"align": "left",
"text": "{ips}",
"style": "l"
},
{
"x": 26,
"y": 8,
"width": 9,
"align": "left",
"text": "[[Вхід|Users]]",
"style": "k"
},
{
"x": 35,
"y": 8,
"width": 41,
"align": "left",
"text": "{users}",
"style": "l"
},
{
"x": 26,
"y": 10,
"width": 50,
"align": "left",
"text": "{url}",
"style": "g"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "disks"
}
],
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"b": {
"fg": "blue",
"bg": "bright_yellow",
"bold": false
},
"c": {
"fg": "bright_blue",
"bg": "bright_yellow",
"bold": false
},
"d": {
"fg": "bright_blue",
"bg": "yellow",
"bold": false
},
"e": {
"fg": "bright_yellow",
"bg": "bright_blue",
"bold": false
},
"f": {
"fg": "yellow",
"bg": "bright_blue",
"bold": false
},
"g": {
"fg": "yellow",
"bg": null,
"bold": false
},
"h": {
"fg": "bright_yellow",
"bg": "blue",
"bold": false
},
"i": {
"fg": "bright_blue",
"bg": null,
"bold": false
},
"j": {
"fg": "bright_cyan",
"bg": null,
"bold": true
},
"k": {
"fg": "bright_blue",
"bg": null,
"bold": true
},
"l": {
"fg": "white",
"bg": null,
"bold": false
}
},
"lines": [
"",
" ██",
" ▄▄ ▄▀▀▄ ▄▄",
" ▀█▀▀██████▀▀█▀",
" █▀▀██████▀▀█",
" ▄▄▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▄▄",
" ▀▀█▀▀▀▀▀▀▀▀▀▀▀▀▀▀█▀▀",
" █▀▀██████▀▀█",
" ▄█▀▀██████▀▀█▄",
" ▀▀ ▀▀▀▀ ▀▀",
" ██"
],
"style_map": [
"",
" ii",
" aa iddi aa",
" aahhaiggiahhaa",
" abbaaiiaabba",
" iiidddeeecceeedddiii",
" iiifffccceecccfffiii",
" ahhaaiiaahha",
" aabbaiggiabbaa",
" aa iffi aa",
" ii"
],
"canvas": {
"width": 76,
"height": 12
}
}
@@ -0,0 +1,105 @@
{
"name": "das-classic",
"title": {
"uk": "Das класичний: рамка з #, назва, IP, посилання",
"en": "Das classic: # frame, name, IP, link"
},
"local": false,
"vars": {
"title": "Das OS",
"url": "https://das.org.ua/"
},
"fields": [
{
"x": 2,
"y": 1,
"width": 35,
"align": "center",
"text": "-=:dAs:=- {title}",
"style": "c"
},
{
"x": 18,
"y": 2,
"width": 19,
"align": "left",
"text": "{ip}",
"style": "d"
},
{
"x": 13,
"y": 3,
"width": 24,
"align": "left",
"text": "{url}",
"style": "d"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "uptime"
},
{
"type": "builtin",
"name": "disks"
},
{
"type": "builtin",
"name": "memory"
},
{
"type": "builtin",
"name": "docker"
},
{
"type": "builtin",
"name": "services"
},
{
"type": "builtin",
"name": "updates"
}
],
"styles": {
"a": {
"fg": "blue",
"bg": null,
"bold": false
},
"b": {
"fg": "red",
"bg": null,
"bold": true
},
"c": {
"fg": "white",
"bg": null,
"bold": true
},
"d": {
"fg": "cyan",
"bg": null,
"bold": true
}
},
"lines": [
"#######################################",
"# #",
"# Server IP: #",
"# Link: #",
"#######################################"
],
"style_map": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"a a",
"a bbbbbbbbbb a",
"a bbbbb a",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
],
"canvas": {
"width": 39,
"height": 5
}
}
@@ -0,0 +1,103 @@
{
"name": "dashboard",
"title": {
"uk": "Панель: усі віджети під заголовком",
"en": "Dashboard: every widget under a header"
},
"local": false,
"vars": {
"url": "",
"city": "Kyiv"
},
"fields": [
{
"x": 2,
"y": 1,
"width": 66,
"align": "center",
"text": "{hostname} · {ip} · {url}",
"style": "b"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "uptime"
},
{
"type": "builtin",
"name": "load"
},
{
"type": "builtin",
"name": "memory"
},
{
"type": "builtin",
"name": "disks"
},
{
"type": "builtin",
"name": "network"
},
{
"type": "builtin",
"name": "docker"
},
{
"type": "builtin",
"name": "updates"
},
{
"type": "builtin",
"name": "weather"
},
{
"type": "builtin",
"name": "smart"
},
{
"type": "builtin",
"name": "services"
},
{
"type": "builtin",
"name": "fail2ban"
},
{
"type": "builtin",
"name": "snapshots"
},
{
"type": "builtin",
"name": "lastlog"
}
],
"styles": {
"a": {
"fg": "bright_blue",
"bg": null,
"bold": false
},
"b": {
"fg": "bright_white",
"bg": null,
"bold": true
}
},
"lines": [
"╭────────────────────────────────────────────────────────────────────╮",
"│ │",
"╰────────────────────────────────────────────────────────────────────╯"
],
"style_map": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"a a",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
],
"canvas": {
"width": 70,
"height": 3
}
}
@@ -0,0 +1,130 @@
{
"name": "double",
"title": {
"uk": "Подвійна рамка з великим ім'ям сервера",
"en": "Double frame with the server name in big letters"
},
"local": false,
"vars": {
"title": "Das OS Server",
"url": ""
},
"fields": [
{
"x": 2,
"y": 1,
"width": 60,
"align": "center",
"text": "{hostname}",
"style": "c",
"font": "small"
},
{
"x": 2,
"y": 5,
"width": 60,
"align": "center",
"text": "{title}",
"style": "d"
},
{
"x": 2,
"y": 6,
"width": 60,
"align": "center",
"text": "{url}",
"style": "e"
},
{
"x": 2,
"y": 8,
"width": 60,
"align": "center",
"text": "IP {ip} · {os} · {kernel}",
"style": "f"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "uptime"
},
{
"type": "builtin",
"name": "load"
},
{
"type": "builtin",
"name": "memory"
},
{
"type": "builtin",
"name": "disks"
},
{
"type": "builtin",
"name": "services"
}
],
"styles": {
"a": {
"fg": "cyan",
"bg": null,
"bold": true
},
"b": {
"fg": "bright_black",
"bg": null,
"bold": false
},
"c": {
"fg": "bright_white",
"bg": null,
"bold": true
},
"d": {
"fg": "yellow",
"bg": null,
"bold": true
},
"e": {
"fg": "cyan",
"bg": null,
"bold": false
},
"f": {
"fg": "white",
"bg": null,
"bold": false
}
},
"lines": [
"╔══════════════════════════════════════════════════════════════╗",
"║ ║",
"║ ║",
"║ ║",
"║ ║",
"║ ║",
"║ ║",
"║──────────────────────────────────────────────────────────────║",
"║ ║",
"╚══════════════════════════════════════════════════════════════╝"
],
"style_map": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"a a",
"a a",
"a a",
"a a",
"a a",
"a a",
"abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba",
"a a",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
],
"canvas": {
"width": 64,
"height": 10
}
}
@@ -0,0 +1,34 @@
{
"name": "minimal",
"title": {
"uk": "Мінімальний: один рядок",
"en": "Minimal: one line"
},
"local": false,
"vars": {},
"fields": [
{
"x": 0,
"y": 0,
"width": 70,
"align": "left",
"text": "{hostname} · {ip} · [[працює|up]] {uptime} · {load}",
"style": "a"
}
],
"widgets_position": "below",
"widgets": [],
"styles": {
"a": {
"fg": "bright_cyan",
"bg": null,
"bold": true
}
},
"lines": [],
"style_map": [],
"canvas": {
"width": 70,
"height": 1
}
}
@@ -0,0 +1,107 @@
{
"name": "tryzub",
"title": {
"uk": "Малий тризуб з іменем і IP",
"en": "Small tryzub with name and IP"
},
"local": false,
"vars": {
"url": ""
},
"fields": [
{
"x": 17,
"y": 2,
"width": 43,
"align": "left",
"text": "{hostname}",
"style": "b"
},
{
"x": 17,
"y": 3,
"width": 43,
"align": "left",
"text": "{ip}",
"style": "c"
},
{
"x": 17,
"y": 5,
"width": 43,
"align": "left",
"text": "[[Працює|Uptime]]: {uptime}",
"style": "d"
},
{
"x": 17,
"y": 6,
"width": 43,
"align": "left",
"text": "{url}",
"style": "e"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "disks"
}
],
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"b": {
"fg": "bright_yellow",
"bg": null,
"bold": true
},
"c": {
"fg": "bright_blue",
"bg": null,
"bold": true
},
"d": {
"fg": "white",
"bg": null,
"bold": false
},
"e": {
"fg": "bright_blue",
"bg": null,
"bold": false
}
},
"lines": [
"",
" ▄ ██ ▄",
" █▀▄ ██ ▄▀█",
" █ █ ██ █ █",
" █ ▄ ██ ▄ █",
" █▄▄▀ ██ ▀▄▄█",
" █▀█▄█ █▄█▀█",
" █▄ ██████ ▄█",
" ▀▀▀████▀▀▀",
" ▀██▀"
],
"style_map": [
"",
" a aa a",
" aaa aa aaa",
" a a aa a a",
" a a aa a a",
" aaaa aa aaaa",
" aaaaa aaaaa",
" aa aaaaaa aa",
" aaaaaaaaaa",
" aaaa"
],
"canvas": {
"width": 60,
"height": 11
}
}
@@ -0,0 +1,191 @@
{
"name": "ukraine",
"title": {
"uk": "Тризуб: малий герб України і дані сервера",
"en": "Tryzub: Ukrainian coat of arms and server facts"
},
"local": false,
"vars": {
"url": ""
},
"fields": [
{
"x": 26,
"y": 1,
"width": 54,
"align": "left",
"text": "{hostname}",
"style": "e",
"font": "small"
},
{
"x": 26,
"y": 6,
"width": 54,
"align": "left",
"text": "[[Слава Україні!|Glory to Ukraine!]]",
"style": "f"
},
{
"x": 26,
"y": 8,
"width": 9,
"align": "left",
"text": "IP",
"style": "f"
},
{
"x": 35,
"y": 8,
"width": 45,
"align": "left",
"text": "{ip}",
"style": "a"
},
{
"x": 26,
"y": 9,
"width": 9,
"align": "left",
"text": "[[Сайт|Site]]",
"style": "f"
},
{
"x": 35,
"y": 9,
"width": 45,
"align": "left",
"text": "{url}",
"style": "a"
},
{
"x": 26,
"y": 10,
"width": 9,
"align": "left",
"text": "[[Працює|Uptime]]",
"style": "f"
},
{
"x": 35,
"y": 10,
"width": 45,
"align": "left",
"text": "{uptime}",
"style": "a"
},
{
"x": 26,
"y": 11,
"width": 9,
"align": "left",
"text": "[[Пам'ять|Memory]]",
"style": "f"
},
{
"x": 35,
"y": 11,
"width": 45,
"align": "left",
"text": "{mem}",
"style": "a"
},
{
"x": 26,
"y": 12,
"width": 9,
"align": "left",
"text": "[[ОС|OS]]",
"style": "f"
},
{
"x": 35,
"y": 12,
"width": 45,
"align": "left",
"text": "{os}",
"style": "a"
}
],
"widgets_position": "below",
"widgets": [
{
"type": "builtin",
"name": "disks"
},
{
"type": "builtin",
"name": "services"
}
],
"styles": {
"a": {
"fg": "bright_yellow",
"bg": null,
"bold": false
},
"b": {
"fg": "blue",
"bg": "bright_yellow",
"bold": false
},
"c": {
"fg": "bright_yellow",
"bg": "blue",
"bold": false
},
"d": {
"fg": "blue",
"bg": null,
"bold": false
},
"e": {
"fg": "bright_yellow",
"bg": null,
"bold": true
},
"f": {
"fg": "bright_blue",
"bg": null,
"bold": true
}
},
"lines": [
"██████████████████████",
"██████████████████████",
"████▀████████████▀████",
"████▀█▀████████▀█▀████",
"██████████████████████",
"███████▀██████▀███████",
"██████████████████████",
"█████▀█▀█▀██▀█▀█▀█████",
"██████▀█▀████▀█▀██████",
"██████▀███▀▀███▀██████",
"████▀▀▀██▀██▀██▀▀▀████",
"███▀▀▀▀▀█▀██▀█▀▀▀▀▀███",
" ▀██████▀████▀██████▀",
" ▀▀▀████▀▀████▀▀▀",
" ▀▀██▀▀"
],
"style_map": [
"dddddddddddddddddddddd",
"ddddddddddaadddddddddd",
"dddabdddddaadddddbaddd",
"dddacabdddaadddbacaddd",
"dddaddadddaadddaddaddd",
"dddaddabddaaddbaddaddd",
"dddaddaaddaaddaaddaddd",
"dddadbacdbaabdcabdaddd",
"dddaaabdbaddabdbaaaddd",
"dddaddcaaabbaaacddaddd",
"dddabbbaabaabaabbbaddd",
"dddcccccacaacacccccddd",
" dddddddcaaaacddddddd",
" dddddddccddddddd",
" dddddd"
],
"canvas": {
"width": 80,
"height": 15
}
}
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# dbanner-title-uk: Контейнери Docker
# dbanner-title-en: Docker containers
# dbanner-mode: live
# Running and stopped containers; nothing when Docker is not there or not reachable.
. "${0%/*}/lib.sh"
command -v docker >/dev/null || exit 0
mapfile -t states < <(timeout 1 docker ps -a --format '{{.State}}' 2>/dev/null) || exit 0
((${#states[@]})) || exit 0
running=0
for s in "${states[@]}"; do [[ $s == running ]] && ((running++)); done
stopped=$((${#states[@]} - running))
color=$Green
((stopped)) && color=$Yellow
echo "$Bold$(say "Docker:" "Docker:")$Off $color$running$Off $(say "працює" "running"), $stopped $(say "зупинено" "stopped")"
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# dbanner-title-uk: Заблоковані fail2ban адреси
# dbanner-title-en: Addresses banned by fail2ban
# dbanner-mode: cached
# dbanner-interval: 300
# How many addresses fail2ban keeps banned now and in total; needs root.
. "${0%/*}/lib.sh"
command -v fail2ban-client >/dev/null || exit 0
((EUID == 0)) || exit 0
out=$(timeout 5 fail2ban-client status sshd 2>/dev/null) || exit 0
now=$(awk -F: '/Currently banned/ {gsub(/ /, "", $2); print $2}' <<<"$out")
total=$(awk -F: '/Total banned/ {gsub(/ /, "", $2); print $2}' <<<"$out")
echo "$Bold$(say "fail2ban (sshd):" "fail2ban (sshd):")$Off $Yellow${now:-0}$Off $(say "заблоковано зараз, усього" "banned now, total") ${total:-0}"
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# dbanner-title-uk: Попередній вхід
# dbanner-title-en: Previous login
# dbanner-mode: live
# The login before this one of the user who logs in (from last).
. "${0%/*}/lib.sh"
command -v last >/dev/null || exit 0
user=${USER:-$(id -un)}
line=$(timeout 1 last -n 2 -w --time-format iso "$user" 2>/dev/null | sed -n 2p)
[[ -n $line && $line != wtmp* ]] || exit 0
read -r _ tty from when _ <<<"$line"
[[ $from == :* || $from =~ ^tty ]] && from=$tty
echo "$Bold$(say "Попередній вхід:" "Previous login:")$Off ${when%+*} $(say "з" "from") $Cyan$from$Off"
@@ -0,0 +1,14 @@
# Shared by the dbanner widget scripts: colors and the user's language.
# shellcheck shell=bash
# shellcheck disable=SC2034
Off=$'\e[0m' Bold=$'\e[1;37m' Red=$'\e[1;31m' Green=$'\e[1;32m' Yellow=$'\e[1;33m' Cyan=$'\e[1;36m' Gray=$'\e[0;90m'
# say UKRAINIAN ENGLISH
say() {
if [[ ${DBANNER_LANG:-} == uk ]]; then echo "$1"; else echo "$2"; fi
}
# level VALUE WARN CRIT: green below WARN, yellow below CRIT, red otherwise
level() {
if (($1 < $2)); then echo -n "$Green"; elif (($1 < $3)); then echo -n "$Yellow"; else echo -n "$Red"; fi
}
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# dbanner-title-uk: Служби, що не працюють
# dbanner-title-en: Services that are down
# dbanner-mode: live
# Enabled runit services that are not running; nothing when all of them are up.
. "${0%/*}/lib.sh"
dir=/var/service
[[ -d $dir ]] || exit 0
down=()
for s in "$dir"/*/; do
s=${s%/}
[[ -f $s/down ]] && continue
state=$(timeout 1 sv status "$s" 2>/dev/null) || state=down
[[ $state == run:* ]] || down+=("${s##*/}")
done
((${#down[@]})) || exit 0
echo "$Bold$(say "Не працюють:" "Down:")$Off $Red${down[*]}$Off $(say "(dsv status)" "(dsv status)")"
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
# dbanner-title-uk: Стан дисків (SMART)
# dbanner-title-en: Disk health (SMART)
# dbanner-mode: cached
# dbanner-interval: 21600
# Health, temperature and power-on hours of every disk; needs root and smartmontools.
. "${0%/*}/lib.sh"
command -v smartctl >/dev/null || exit 0
((EUID == 0)) || exit 0
first=1
for dev in /sys/block/*; do
name=${dev##*/}
[[ $name == @(loop|ram|zram|sr|dm-|md)* ]] && continue
out=$(smartctl -H -A -i "/dev/$name" 2>/dev/null) || [[ -n $out ]] || continue
model=$(sed -n 's/^\(Device Model\|Model Number\|Product\): *//p' <<<"$out" | head -1)
health=$(sed -n 's/.*\(overall-health\|Health Status\).*: *//p' <<<"$out" | head -1)
temp=$(awk '/Temperature_Celsius|Airflow_Temperature/ {print $10; exit} /^Temperature:/ {print $2; exit}' <<<"$out")
hours=$(awk '/Power_On_Hours/ {print $10; exit} /^Power On Hours:/ {gsub(",", "", $4); print $4; exit}' <<<"$out")
[[ -n $health ]] || continue
if ((first)); then echo "$Bold$(say "Стан дисків:" "Disk health:")$Off"; first=0; fi
hcolor=$Green
[[ $health == PASSED || $health == OK ]] || hcolor=$Red
line=" /dev/$name ${model:+($model) }$hcolor$health$Off"
[[ $temp =~ ^[0-9]+$ ]] && line+=", $(level "$temp" 55 70)$temp °C$Off"
[[ $hours =~ ^[0-9]+$ ]] && line+=", $Cyan$hours $(say "год" "h")$Off"
echo "$line"
done
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# dbanner-title-uk: Знімки Btrfs (snapper)
# dbanner-title-en: Btrfs snapshots (snapper)
# dbanner-mode: cached
# dbanner-interval: 3600
# Number of snapper snapshots of / and the date of the last one; needs root.
. "${0%/*}/lib.sh"
command -v snapper >/dev/null || exit 0
((EUID == 0)) || exit 0
mapfile -t rows < <(timeout 10 snapper -c root --csvout list --columns number,date 2>/dev/null | tail -n +3)
((${#rows[@]})) || exit 0
last=${rows[-1]#*,}
echo "$Bold$(say "Знімки:" "Snapshots:")$Off ${#rows[@]}, $(say "останній" "last") $Cyan${last%:*}$Off"
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# dbanner-title-uk: Доступні оновлення
# dbanner-title-en: Available updates
# dbanner-mode: cached
# dbanner-interval: 21600
# Package updates (xbps-install -Mun downloads the repository index, so it runs
# from the das-banner service, not at login).
. "${0%/*}/lib.sh"
command -v xbps-install >/dev/null || exit 0
count=$(xbps-install -Mun 2>/dev/null | wc -l) || exit 0
if ((count)); then
echo "$Bold$(say "Оновлення:" "Updates:")$Off $Yellow$count$Off $(say "пакетів — das-update" "packages — das-update")"
else
echo "$Bold$(say "Оновлення:" "Updates:")$Off $Green$(say "система оновлена" "up to date")$Off"
fi
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# dbanner-title-uk: Погода (wttr.in)
# dbanner-title-en: Weather (wttr.in)
# dbanner-mode: cached
# dbanner-interval: 1800
# Weather from wttr.in for the "city" variable of the banner (DBANNER_CITY).
. "${0%/*}/lib.sh"
command -v curl >/dev/null || exit 0
city=${DBANNER_CITY:-}
lang=${DBANNER_LANG:-en}
line=$(curl -fsS -m 15 -H "Accept-Language: $lang" "https://wttr.in/${city// /+}?format=%l:+%c+%t+(%f),+%w,+%h&lang=$lang" 2>/dev/null) || exit 0
[[ $line == *"Unknown location"* || -z $line ]] && exit 0
echo "$Bold$(say "Погода:" "Weather:")$Off $Cyan$line$Off"
@@ -0,0 +1,16 @@
{
"name": "classic",
"title": {"uk": "Класичне Void: [user@host dir]$", "en": "Classic Void: [user@host dir]$"},
"frame": "plain",
"open": "",
"close": "",
"sep": "",
"segments": [
{"type": "text", "text": "["},
{"type": "userhost", "fg": null, "at_fg": null, "at_bold": false, "host_fg": null, "host_bold": false, "root_fg": null, "root_bold": false},
{"type": "text", "text": " "},
{"type": "cwd", "mode": "base", "fg": null},
{"type": "text", "text": "]"},
{"type": "symbol", "fg": null}
]
}
@@ -0,0 +1,17 @@
{
"name": "das-git",
"title": {"uk": "Das для розробника: git, venv, фонові задачі", "en": "Das for developers: git, venv, background jobs"},
"frame": "das",
"frame_fg": "red",
"segments": [
{"type": "status"},
{"type": "userhost"},
{"type": "time"},
{"type": "cwd"},
{"type": "git"},
{"type": "venv"},
{"type": "jobs"},
{"type": "newline"},
{"type": "symbol"}
]
}
@@ -0,0 +1,15 @@
{
"name": "das",
"title": {"uk": "Das: дві лінії з датою й часом (стандарт)", "en": "Das: two lines with date and time (default)"},
"frame": "das",
"frame_fg": "red",
"segments": [
{"type": "status"},
{"type": "userhost"},
{"type": "date"},
{"type": "time"},
{"type": "cwd"},
{"type": "newline"},
{"type": "symbol"}
]
}
@@ -0,0 +1,14 @@
{
"name": "minimal",
"title": {"uk": "Мінімальне: каталог, git і ❯", "en": "Minimal: directory, git and ❯"},
"frame": "plain",
"open": "",
"close": "",
"sep": " ",
"segments": [
{"type": "cwd", "mode": "short", "fg": "blue", "bold": true},
{"type": "git", "fg": "magenta"},
{"type": "status", "fg": "red", "bold": true},
{"type": "symbol", "char": "❯", "fg": "green", "bold": true}
]
}
@@ -0,0 +1,15 @@
{
"name": "server",
"title": {"uk": "Сервер: ім'я хоста й ознака SSH помітні", "en": "Server: host name and SSH mark stand out"},
"frame": "das",
"frame_fg": "blue",
"segments": [
{"type": "status", "mode": "code", "fg": "bright_red", "bold": true},
{"type": "ssh"},
{"type": "userhost", "host_fg": "bright_yellow"},
{"type": "time"},
{"type": "cwd"},
{"type": "newline"},
{"type": "symbol", "fg": "bright_yellow"}
]
}