Skip to content
cybertron edited this page Jan 4, 2012 · 1 revision

The command widget allows you to specify a command to run, and then displays its output. It only has the unique parameter Command, which is the command to be run.

Note that the example below is what I currently use to display my uptime. So far I haven't found any instances where it fails to work, but it may not work in other locales. I should probably make this its own widget, but since this works too I haven't been motivated to do so.

Example:

Widget
   Type Command
   Command uptime | sed -r 's/(.*up )(.*day.?)?(, )?((..:..)|..? min)(,.*,.*,.*,.*)/\2\n\4/'
   Position 1030 2
   Dimensions 60 24
   FGColor 0 255 0

Clone this wiki locally