itt 0.1.7 → 0.2.0.pre.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/itt.rb +48 -14
- data/lib/version.rb +1 -1
- metadata +17 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9f38d7eb29fd2d9b64175b467017e526f5a4761e61908bdbc8a6379eceee9ee
|
|
4
|
+
data.tar.gz: e8383f1ab66b8a079b12a433c0b007d86942109b12bdacbba554106d422d6b22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef6f0b2a8f30ed73bb3daecad86a50c0d6f906f7b2eb53694a2d96daa94e4b056c37c7eaf2ae8422aa47d0ee70fc20f8afb80fb1d806d5e8e59e9823f9c897e1
|
|
7
|
+
data.tar.gz: 9c35022f92d672fca0c321d67854307ad17789e67e683b4a87d6fd434a6af9df6c9a270aa13743b7afec681da02f3b4a80876e5c1bedd5c3a4fb1582e56833be
|
data/lib/itt.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
1
|
+
require "version"
|
|
2
|
+
require "rumoji"
|
|
3
3
|
module ITT
|
|
4
4
|
# Predefined colors, as close to the default iTerm2 tab colors as possible
|
|
5
5
|
COLORS = {
|
|
@@ -11,18 +11,52 @@ module ITT
|
|
|
11
11
|
purple: [140, 121, 149]
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
# ANSI formatting
|
|
15
|
+
module Style
|
|
16
|
+
RESET = "\e[0m"
|
|
17
|
+
BOLD = "\e[1m"
|
|
18
|
+
DIM = "\e[2m"
|
|
19
|
+
# Foreground colors
|
|
20
|
+
RED = "\e[38;2;214;110;107m"
|
|
21
|
+
GREEN = "\e[38;2;183;213;103m"
|
|
22
|
+
BLUE = "\e[38;2;117;165;236m"
|
|
23
|
+
ORANGE = "\e[38;2;223;157;78m"
|
|
24
|
+
YELLOW = "\e[38;2;167;160;96m"
|
|
25
|
+
PURPLE = "\e[38;2;140;121;149m"
|
|
26
|
+
CYAN = "\e[36m"
|
|
27
|
+
WHITE = "\e[37m"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.styled_colors
|
|
31
|
+
COLORS.keys.map do |c|
|
|
32
|
+
color_code = Style.const_get(c.to_s.upcase)
|
|
33
|
+
"#{color_code}#{c}#{Style::RESET}"
|
|
34
|
+
end.join(Style::DIM + ", " + Style::RESET)
|
|
35
|
+
end
|
|
36
|
+
|
|
14
37
|
# Help info
|
|
15
|
-
HELP =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
HELP = <<~HELP
|
|
39
|
+
#{Style::BOLD}itt#{Style::RESET} #{Style::DIM}v#{VERSION}#{Style::RESET}
|
|
40
|
+
#{Style::DIM}iTerm2 tab color and title utility#{Style::RESET}
|
|
41
|
+
|
|
42
|
+
#{Style::BOLD}USAGE#{Style::RESET}
|
|
43
|
+
itt #{Style::DIM}[color]#{Style::RESET} #{Style::CYAN}<title>#{Style::RESET}
|
|
44
|
+
itt clear
|
|
45
|
+
|
|
46
|
+
#{Style::BOLD}EXAMPLES#{Style::RESET}
|
|
47
|
+
itt #{Style::PURPLE}purple#{Style::RESET} web-server #{Style::DIM}# Set color and title#{Style::RESET}
|
|
48
|
+
itt #{Style::PURPLE}p#{Style::RESET} web-server #{Style::DIM}# Short color name#{Style::RESET}
|
|
49
|
+
itt #{Style::ORANGE}orange#{Style::RESET} rails-console
|
|
50
|
+
itt #{Style::BLUE}blue#{Style::RESET} :whale: docker #{Style::DIM}# Emoji support#{Style::RESET}
|
|
51
|
+
itt #{Style::RED}clear#{Style::RESET} #{Style::DIM}# Reset to default#{Style::RESET}
|
|
52
|
+
|
|
53
|
+
#{Style::BOLD}COLORS#{Style::RESET}
|
|
54
|
+
#{styled_colors}
|
|
55
|
+
|
|
56
|
+
#{Style::DIM}Emoji codes: https://emoji-cheat-sheet.com#{Style::RESET}
|
|
57
|
+
HELP
|
|
58
|
+
|
|
59
|
+
module_function
|
|
26
60
|
|
|
27
61
|
# Escape sequence to set the title
|
|
28
62
|
def set_title(title)
|
|
@@ -31,7 +65,7 @@ module ITT
|
|
|
31
65
|
|
|
32
66
|
# Escape sequences to set the color
|
|
33
67
|
def set_color(red, green, blue)
|
|
34
|
-
output =
|
|
68
|
+
output = ""
|
|
35
69
|
output << "\e]6;1;bg;red;brightness;#{red}\a"
|
|
36
70
|
output << "\e]6;1;bg;green;brightness;#{green}\a"
|
|
37
71
|
output << "\e]6;1;bg;blue;brightness;#{blue}\a"
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: itt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0.pre.pre1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Ladachowski
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rumoji
|
|
@@ -24,7 +24,8 @@ dependencies:
|
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0.4'
|
|
27
|
-
description: iTerm2
|
|
27
|
+
description: Set iTerm2 tab titles and background colors from the command line. Supports
|
|
28
|
+
all default iTerm2 colors and emoji in titles.
|
|
28
29
|
email: adam@saiden.pl
|
|
29
30
|
executables:
|
|
30
31
|
- itt
|
|
@@ -37,14 +38,14 @@ files:
|
|
|
37
38
|
homepage: https://github.com/aladac/itt
|
|
38
39
|
licenses:
|
|
39
40
|
- MIT
|
|
40
|
-
metadata:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
metadata:
|
|
42
|
+
homepage_uri: https://github.com/aladac/itt
|
|
43
|
+
source_code_uri: https://github.com/aladac/itt
|
|
44
|
+
changelog_uri: https://github.com/aladac/itt/commits/master
|
|
45
|
+
bug_tracker_uri: https://github.com/aladac/itt/issues
|
|
46
|
+
rubygems_mfa_required: 'true'
|
|
47
|
+
post_install_message: "\n\e[1mitt\e[0m installed successfully!\n\n\e[2mIf using zsh,
|
|
48
|
+
add to ~/.zshrc:\e[0m\n export DISABLE_AUTO_TITLE=true\n\n"
|
|
48
49
|
rdoc_options: []
|
|
49
50
|
require_paths:
|
|
50
51
|
- lib
|
|
@@ -52,15 +53,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
52
53
|
requirements:
|
|
53
54
|
- - ">="
|
|
54
55
|
- !ruby/object:Gem::Version
|
|
55
|
-
version:
|
|
56
|
+
version: 2.6.0
|
|
56
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
58
|
requirements:
|
|
58
59
|
- - ">="
|
|
59
60
|
- !ruby/object:Gem::Version
|
|
60
61
|
version: '0'
|
|
61
62
|
requirements: []
|
|
62
|
-
rubygems_version: 3.
|
|
63
|
-
signing_key:
|
|
63
|
+
rubygems_version: 3.5.22
|
|
64
|
+
signing_key:
|
|
64
65
|
specification_version: 4
|
|
65
|
-
summary:
|
|
66
|
+
summary: iTerm2 tab color and title utility
|
|
66
67
|
test_files: []
|