splashrc 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/splashrc +13 -10
- 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: 3da73e14990d15dada1af3a193b9ed7c5f223e57
|
4
|
+
data.tar.gz: 7605743ebe9216567b6e93396edaa86d117806b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb6486ef0a0fca419bfcec81f0cd92f0c15487736a7e23b8518ded6e90b7247611a30189541bbda26e874ccd8c80c083f655a5cb708e807c84ba12e3184faa7
|
7
|
+
data.tar.gz: 62804f5d42b936a0df9f96937baa05dcc45eea2de21ce7aafb38c72b5553ca2e423247184e6e4858b4af2507185eb6a3f33deeb09dfa9e13014311dfeebec8ad
|
data/bin/splashrc
CHANGED
@@ -51,18 +51,18 @@ uptime.match(/^\d+m$/)&&uptime="0d 0h #{uptime}"
|
|
51
51
|
begin
|
52
52
|
res = Open3.capture3("xrandr")
|
53
53
|
rescue Errno::ENOENT
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
if res[-1].to_s.split[-1].to_i!=0
|
58
|
-
require 'io/console'
|
59
|
-
res = IO.console.winsize.join("x")+"(chrs)"
|
54
|
+
res_determined = false
|
60
55
|
else
|
61
|
-
|
62
|
-
|
63
|
-
|
56
|
+
if res[-1].to_s.split[-1].to_i!=0
|
57
|
+
require 'io/console'
|
58
|
+
res = IO.console.winsize.join("x")+"(chrs)"
|
59
|
+
else
|
60
|
+
res[0,1].join.split("\n").select!{|i|i.match(/^Screen #{ENV['DISPLAY'].reverse}/)}
|
61
|
+
res = res[0].split(/,\s+/).select!{|i|i.match(/current\s*\d+\s*x\s*\d+\s*/)}[0]
|
62
|
+
res = res.split.drop(1).join+"(px)"
|
63
|
+
end
|
64
|
+
res_determined = true
|
64
65
|
end
|
65
|
-
|
66
66
|
irb_loc = (`which irb`.match(/^which:/).nil? ? `which irb`.chomp : "*r*NOT FOUND")
|
67
67
|
ruby_loc = (`which ruby`.match(/^which:/).nil? ? `which ruby`.chomp : "*r*NOT FOUND")
|
68
68
|
cpu_name= File.read("/proc/cpuinfo").split("\n").select{|i|i.match(/^model\s+name\s+:\s+.+/)}[0].split(/\s*:\s*/)[-1]
|
@@ -85,8 +85,11 @@ add = [
|
|
85
85
|
"CPU:*w* #{cpu_name}",
|
86
86
|
"RAM:*w* #{ram_info}",
|
87
87
|
"",
|
88
|
+
"",
|
88
89
|
]
|
89
90
|
|
91
|
+
res_determined||add.delete_at(add.index(add.select{|i|i.match(/^Resolution:/)}[0]))
|
92
|
+
|
90
93
|
$rc.each_with_index{ |i,ind| $rc[ind] = colors[ind].gsub("%s",$rc[ind]).gsub("|"," ").concat("\e[1;36m").concat(add[ind]).concat("\e[39m").gsub("*w*","\e[37m").gsub("*c*","\e[1;36m").gsub("*r*","\e[0;31m") }
|
91
94
|
at_exit{puts "\e[0;39m"}
|
92
95
|
|