Moss Patches
Moss Patches are zip files that can be loaded into Moss. Moss Patches enable users to customize Moss to their liking and to easily share their customizations with others.
Moss Patches consist of a Moss configuration file, a manifest.txt file and any other resource that you need such as images or fonts. The files are zipped together and the zip archive is renamed with an .mpk extension.
Customizing Moss
These instructions are written for a Linux user who has a little experience with the command line. If someone is is interested in writing up instructions for other OSs, or instructions that are not command line based I’d be happy to link to them.
First create a directory for our work.
mkdir mypatch
cd mypatch
Next we add a manifest.txt file to our patch. The manifest tells Moss what the name of the patch is and it gives a short description. In the future, more options will be availble.
echo "name: mypatch" >> manifest.txt
echo "config-file: mossrc" >> manifest.txt
echo "description: My device the way I like it." >> manifest.txt
The next step is to create our mossrc file. If you are familiar with conky you will be comfortable with moss.
1 # default.conf 2 3 update_interval 1.0 4 background_mod #333333 #555555 5 alignment top_middle 6 7 # Custom colors using colorN 8 color_add alertHigh #ddaa00 9 color_add alertMid #ddaa66 10 color_add alertLow #ddaabb 11 color_add myBlue #336699 12 13 default_color white 14 default_shade_color myBlue 15 default_outline_color white 16 17 gap_y 40.0 18 gap_x 0.0 19 20 TEXT 21 $kernel on $machine 22 ${voffset 10}$hr 23 ${color lightgrey}Uptime:$color $uptime ${color lightgrey} - Realtime: $color$realtime 24 ${color lightgrey}CPU Usage:${color} ${cpu}% ${cpubar} 25 ${color lightgrey}Battery:$color $battery 26 ${color lightgrey}Load:$color $loadavg 27 ${color lightgrey}RAM Usage:$color ${printf "%-20.20s" ${printf "%s/%s - %s%%" $mem $memmax $memperc}} 28 ${color lightgrey}Swap Usage:$color ${printf "%-19.19s" ${printf "%s/%s - %s%%" $swap $swapmax $swapperc}} 29 ${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes 30 ${voffset 10}$color$stippled_hr 31 ${color white}Networking: 32 ${color lightgrey}ppp0 Down:${color #8844ee} ${downspeed ppp0} ${color lightgrey} Up:${color #22ccff} ${upspeed ppp0} 33 ${color lightgrey}tiwlan0 Down:${color #8844ee} ${downspeed tiwlan0} ${color lightgrey} Up:${color #22ccff} ${upspeed tiwlan0} 34 ${color lightgrey}File systems: 35 /sdcard $color${printf "%5.5s/%-7.7s" ${fs_used /sdcard} ${fs_size /sdcard}} ${fs_bar /sdcard} 36 ${voffset 10}$color$stippled_hr 37 ${color}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" Name PID CPU% MEM%} 38 ${color alertHigh}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}} 39 ${color alertMid}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}} 40 ${color alertLow}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}} 41 ${color lightgrey}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}} 42 ${color lightgrey}${printf "%-20.20s %-7.7s %-7.7s %-7.7s" ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}} 43 44 # vim:set ft=mossrc:
Finally we can zip the entire patch up with the mpk
extension.
cd ..
zip -r mypatch.mpk mypatch
The resulting mypatch.mpk
can be downloaded through you device’s browser or
it can be copied to your device’s external storage and opened with a file
manager.
More Examples
More Moss Patches can be found on the Samples page or on the moss-configs repository on github. Take a look there to get more ideas on how to include background images or custom fonts. You can download and unzip them to take a look.