Skip to content

Commit

Permalink
Improved module info
Browse files Browse the repository at this point in the history
  • Loading branch information
noccy80 committed Dec 17, 2016
1 parent 072cad3 commit 253fb75
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions modules/diskfree.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ function _diskfree(array $opts=[]) {
} while (true);
}

module("diskfree", "Show disk free space", [ "info", "disk" ]);
option("si", DISKFREE_UNITS_SI, OPT_TYPE_BOOL, "Use SI magnitudes (MiB,KiB etc)", true);
module("diskfree", "Display the amount of free disk space for the current path", [ "info", "disk" ]);
option("si", DISKFREE_UNITS_SI, OPT_TYPE_BOOL, "Use SI magnitudes (MiB,KiB etc)", true);
2 changes: 1 addition & 1 deletion modules/git.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function _git(array $opts) {
return panel(sprintf("%s%s %s", icon('git.branch'), $branch, join(" ",$marks)), ['class'=>'vcs'], 'git');
}

module("git", "Git VCS status", [ "git", "vcs" ]);
module("git", "Show status from git repositories", [ "git", "vcs" ]);
option("tag", GIT_SHOW_TAG, OPT_TYPE_BOOL, "Show tag", false);
option("status", GIT_SHOW_STATUS, OPT_TYPE_BOOL, "Show branch and status", true);
seticon("git.branch",""); // "⑂");
Expand Down
6 changes: 3 additions & 3 deletions modules/hostname.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ function _hostname(array $opts) {
$attr = [
'class' => $opts[HOSTNAME_CLASS]
];
$host = trim(exec("whoami"));
$host = trim(exec("hostname"));
return panel($host, $attr, 'hostname');
}
module("hostname", "Hostname");
option("class", HOSTNAME_CLASS, "string", "The class to use", "system");
module("hostname", "Show the hostname of the system");
option("class", HOSTNAME_CLASS, "string", "The class to use", "system");
2 changes: 1 addition & 1 deletion modules/ip.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ function _ip(array $opts) {
];
return panel($ip, $attr, 'ip');
}
module("ip", "Show the IP of a network device");
module("ip", "Show the IP of a networking device");
option("interface", IP_INTERFACE, "string", "The interface to dispaly", "eth0");
2 changes: 1 addition & 1 deletion modules/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ function _status(array $opts=[]) {
return panel( $character, [ 'class'=>'shell', 'status' => ((LAST_STATUS>0)?'bad':'good') ], 'status' );
}

module("status", "Command status and root indicator");
module("status", "Last command status and uid/root indicator");
4 changes: 2 additions & 2 deletions modules/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ function _text(array $opts) {
if ($opts[TEXT_CLASS]) $attr['class'] = $opts[TEXT_CLASS];
return panel($opts[TEXT_TEXT], $attr, 'text');
}
module("text", "Show a text");
module("text", "Show a static text");
option("text", TEXT_TEXT, "string", "The text to dispaly", "Text");
option("class", TEXT_CLASS, "string", "The class to use", "info");
option("class", TEXT_CLASS, "string", "The class to use", "info");
4 changes: 2 additions & 2 deletions modules/thermal.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function _thermal(array $opts) {
$attr['class'] = $opts[THERMAL_CLASS];
return panel($text, $attr, 'thermal');
}
module("thermal", "Show thermal zone info");
module("thermal", "Show thermal zone (cpu/gpu/chassis temperature) info from sysfs");
option("zone", THERMAL_ZONE, OPT_TYPE_STRING, "Thermal zone (from /sys/class/thermal)", "thermal_zone0");
option("format", THERMAL_FORMAT, OPT_TYPE_STRING, "Format", "%.1fºc");
option("class", THERMAL_CLASS, OPT_TYPE_STRING, "The class to use", "system");
seticon("thermal.icon", "");
seticon("thermal.icon", "");
4 changes: 2 additions & 2 deletions modules/time.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function _time(array $opts) {
if ($opts[TIME_CLASS]) $attr['class'] = $opts[TIME_CLASS];
return panel($time.@date($opts['format']), $attr, 'time');
}
module("time", "Show the current time and/or date");
module("time", "Show the current time and/or date, and optionally an analog clock");
option("format", TIME_FORMAT, OPT_TYPE_STRING, "The time format", "H:i");
option("class", TIME_CLASS, OPT_TYPE_STRING, "The class to use", "info");
option("analog", TIME_ANALOG, OPT_TYPE_BOOL, "Show an analog watch", false);
option("analog", TIME_ANALOG, OPT_TYPE_BOOL, "Show an analog clock", false);
2 changes: 1 addition & 1 deletion modules/tux.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ function _tux(array $opts) {
if ($opts[TUX_CLASS]) $attr['class'] = $opts[TUX_CLASS];
return panel(icon("tux.icon"), $attr, 'text');
}
module("tux", "Show a tux");
module("tux", "Add a cute penguin to your prompt");
option("class", TUX_CLASS, "string", "The class to use", "tux");
seticon("tux.icon", "🐧");
4 changes: 2 additions & 2 deletions modules/username.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ function _username(array $opts) {
$user = trim(exec("whoami"));
return panel(icon("username.icon").$user, $attr, 'username');
}
module("username", "Username");
module("username", "The currently logged in/active username");
option("class", USERNAME_CLASS, "string", "The class to use", "user");
seticon("username.icon", "");
seticon("username.icon", "");

0 comments on commit 253fb75

Please sign in to comment.