-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfetch.rb
executable file
·38 lines (33 loc) · 1003 Bytes
/
fetch.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# frozen_string_literal: true
require 'io/console'
require 'paint'
require 'terminal/join/extensions'
art = <<~ANSI
┌───┐
│[94m▐█▌[0m│
│[0;1m+ [91m⠔[0m│
└───'
[1;94mGameBtw[0m
ANSI
info = {
shell: { color: :red, icon: '', value: 'Ruby' },
workspace: { color: :magenta, icon: '', value: 'Zellij' },
distro: { color: :blue, icon: '', value: 'Nobara' },
font: { color: :green, icon: '', value: 'JetBrains Mono' },
colorscheme: { color: :yellow, icon: '', value: 'Catppuccin' }
}
.map do
Paint["#{_1.to_s.upcase.rjust(16)} #{_2[:icon]}", :bright, _2[:color]] + " #{_2[:value]}"
end
.join("\n")
color = [
%i[bright magenta],
%i[bright blue],
%i[bright cyan],
%i[bright green],
%i[bright yellow],
%i[ yellow],
%i[bright red]
]
.map { Paint[' ', *_1] }.join
puts [art, [info, color].vjoin("\n")].hjoin.style(width: IO.console.winsize[1])