mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' of https://github.com/senorprogrammer/wtf
This commit is contained in:
@@ -22,7 +22,8 @@ func NewSystemInfo() *SystemInfo {
|
||||
var cmd *exec.Cmd
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
cmd = exec.Command("uname -a", arg...)
|
||||
arg = append(arg, "-a")
|
||||
cmd = exec.Command("lsb_release", arg...)
|
||||
case "darwin":
|
||||
cmd = exec.Command("sw_vers", arg...)
|
||||
default:
|
||||
@@ -33,7 +34,6 @@ func NewSystemInfo() *SystemInfo {
|
||||
|
||||
for _, row := range strings.Split(raw, "\n") {
|
||||
parts := strings.Split(row, ":")
|
||||
|
||||
if len(parts) < 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -33,10 +33,6 @@ func NewWidget(date, version string) *Widget {
|
||||
}
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
widget.UpdateRefreshedAt()
|
||||
|
||||
widget.View.SetText(
|
||||
|
||||
Reference in New Issue
Block a user