splashrc 1.1.1 → 1.1.2
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/bin/splashrc +9 -3
- 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: deeb97bdefc102ff804e8d91e712f1868932f2c1
|
|
4
|
+
data.tar.gz: ea3238fa8528ae79799a55d5c8ec42555942c4ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2340837c78c71f88138944548d5e45da49414701f3f1ddd037ae22c6f04f1e817244dbca1fc61f84b95176f00cae778f3ef546c4b27bb1c6f1569ed52ff03207
|
|
7
|
+
data.tar.gz: '08058a15b936906cf78f0aa4f3758636d590f654783471ea8914f777dcddb9fe698ba0c8b5bb809708a5e8cd7dd878e15d3e39dce3a154546add9ec5a2672d9c'
|
data/bin/splashrc
CHANGED
|
@@ -48,7 +48,12 @@ uptime=`uptime`.split("user")[0].split("up")[-1].split(",")[0].split(/\s+/)[1].g
|
|
|
48
48
|
uptime.match(/^\d+h\s+\d+$/)&&uptime="0d #{uptime}m"
|
|
49
49
|
uptime.match(/^\d+m$/)&&uptime="0d 0h #{uptime}"
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
begin
|
|
52
|
+
res = Open3.capture3("xrandr")
|
|
53
|
+
rescue Errno::ENOENT
|
|
54
|
+
abort "Please install xrandr(probably located in xorg-xrandr)."
|
|
55
|
+
end
|
|
56
|
+
|
|
52
57
|
if res[-1].to_s.split[-1].to_i!=0
|
|
53
58
|
require 'io/console'
|
|
54
59
|
res = IO.console.winsize.join("x")+"(chrs)"
|
|
@@ -59,6 +64,7 @@ else
|
|
|
59
64
|
end
|
|
60
65
|
|
|
61
66
|
irb_loc = (`which irb`.match(/^which:/).nil? ? `which irb`.chomp : "*r*NOT FOUND")
|
|
67
|
+
ruby_loc = (`which ruby`.match(/^which:/).nil? ? `which ruby`.chomp : "*r*NOT FOUND")
|
|
62
68
|
cpu_name= File.read("/proc/cpuinfo").split("\n").select{|i|i.match(/^model\s+name\s+:\s+.+/)}[0].split(/\s*:\s*/)[-1]
|
|
63
69
|
ram_info=`free -m`.split("\n")[1].split[1,2].reverse.join("MiB / ")+"MiB"
|
|
64
70
|
|
|
@@ -70,7 +76,7 @@ add = [
|
|
|
70
76
|
"Locale:*w* #{ENV['LANG']}",
|
|
71
77
|
"Time:*w* #{Time.now}",
|
|
72
78
|
"Timezone:*w* #{Time.new.zone}",
|
|
73
|
-
"Ruby:*w* #{
|
|
79
|
+
"Ruby:*w* #{ruby_loc}",
|
|
74
80
|
"Ruby version:*w* #{RUBY_VERSION}",
|
|
75
81
|
"Gems:*w* #{`gem list`.split("\n").length}",
|
|
76
82
|
"Shell:*w* #{ENV['SHELL']}",
|
|
@@ -86,4 +92,4 @@ at_exit{puts "\e[0;39m"}
|
|
|
86
92
|
|
|
87
93
|
puts
|
|
88
94
|
puts $rc
|
|
89
|
-
puts
|
|
95
|
+
puts
|