Skip to content

Commit f286ec1

Browse files
authored
Merge pull request #4 from SidOfc/patch/light-terminal-colors
Use default color for titles in all fzf screens
2 parents 1613e20 + 88a6240 commit f286ec1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/cani/fzf.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ def self.feature_rows
3232
tt = format('%-24s', ft.title.size > 24 ? ft.title[0..23].strip + '..'
3333
: ft.title)
3434

35-
[{content: "[#{ft.status}]", color: cl}, pc, tt, *ft.current_support]
35+
[{content: "[#{ft.status}]", color: cl}, pc,
36+
{content: tt, color: :default}, *ft.current_support]
3637
end
3738
end
3839

3940
def self.browser_rows
4041
@browser_rows ||= Cani.api.browsers.map do |bwsr|
41-
[bwsr.title, 'usage: ' + format('%.4f%%', bwsr.usage.values.reduce(0) { |total, add| total + add })]
42+
[{content: bwsr.title, color: :default},
43+
'usage: ' + format('%.4f%%', bwsr.usage.values.reduce(0) { |total, add| total + add })]
4244
end
4345
end
4446

4547
def self.browser_usage_rows(brwsr)
46-
brwsr.usage.map { |(v, u)| [v, 'usage: ' + format('%.4f%%', u)] }.reverse
48+
brwsr.usage.map { |(v, u)| [{content: v, color: :default}, 'usage: ' + format('%.4f%%', u)] }.reverse
4749
end
4850

4951
def self.browser_feature_rows(brwsr, version)
@@ -54,7 +56,7 @@ def self.browser_feature_rows(brwsr, version)
5456
features.map do |feature|
5557
color = {'un' => :yellow, 'ot' => :magenta}.fetch feature[:status], :green
5658
[{content: "[#{feature[:status]}]", color: color},
57-
"[#{type[:symbol]}]", feature[:title]]
59+
"[#{type[:symbol]}]", {content: feature[:title], color: :default}]
5860
end
5961
end
6062
end.compact

0 commit comments

Comments
 (0)