iterm2mintty 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +1 -1
- data/lib/iterm2mintty/version.rb +1 -1
- data/lib/iterm2mintty.rb +19 -29
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2680e29622eb149bbbc5bae9a08e1151407b06a
|
4
|
+
data.tar.gz: 9f02585fe9a8597ae2100387fadd2f88a332028b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e8458bd3e3bf82715a255c2d9542234df8b5b64d02d4385468ece9c1083de60e2f34a24d2194b5d39788a94a562b3bf7b08e321292df91c3424649ac5b39149
|
7
|
+
data.tar.gz: 89d56d564b69171b892d8d70dec5f0988f5098a6ee54506e071578395bfe032452d5e39d67ec2cb63772421f6ef33cab70bb235839dcba6f7984a9ea5db5b7f9
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -29,7 +29,7 @@ Should output a .minttyrc file in whatever directory you ran it in.
|
|
29
29
|
|
30
30
|
## Contributing
|
31
31
|
|
32
|
-
1. Fork it ( https://github.com/
|
32
|
+
1. Fork it ( https://github.com/bobcats/iterm2mintty/fork )
|
33
33
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
34
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
35
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/iterm2mintty/version.rb
CHANGED
data/lib/iterm2mintty.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "iterm2mintty/version"
|
2
2
|
require "plist"
|
3
|
-
require "pry"
|
4
3
|
|
5
4
|
class Iterm2mintty
|
6
5
|
attr_reader :pathname, :ansi_colors
|
@@ -16,37 +15,28 @@ class Iterm2mintty
|
|
16
15
|
end
|
17
16
|
|
18
17
|
def ansi_colors
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end.compact
|
18
|
+
parsed_theme.map do |k, v|
|
19
|
+
red = Integer(v["Red Component"] * 255)
|
20
|
+
green = Integer(v["Green Component"] * 255)
|
21
|
+
blue = Integer(v["Blue Component"] * 255)
|
22
|
+
color = Color.new(red, green, blue)
|
23
|
+
|
24
|
+
case k
|
25
|
+
when /Ansi/
|
26
|
+
number = Integer(k.match(/\d+/)[0])
|
27
|
+
ANSIColor.new(number: number, color: color)
|
28
|
+
when "Background Color"
|
29
|
+
BGColor.new(color: color)
|
30
|
+
when "Foreground Color"
|
31
|
+
FGColor.new(color: color)
|
32
|
+
when "Cursor Color"
|
33
|
+
CursorColor.new(color: color)
|
34
|
+
end
|
35
|
+
end.compact
|
38
36
|
end
|
39
37
|
|
40
38
|
def parsed_theme
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
class Iterm2mintty::Mintty
|
46
|
-
def self.rc_build(colors)
|
47
|
-
puts colors.map do |color|
|
48
|
-
color.to_mintty
|
49
|
-
end
|
39
|
+
Plist.parse_xml(pathname)
|
50
40
|
end
|
51
41
|
end
|
52
42
|
|