#LCD显示配置 Display dpf { Driver 'DPF' #LCD驱动类型 Port 'usb0' #连接端口 Font '6x8' #字体大小 Foreground 'ffffff' #字体颜色 Background 'ffffff00' #背景颜色 Basecolor '000000' #ffffff00 #基础颜色,这个具体作用在哪还没测试 呵呵 Orientation 1 # Orientation value from 0-3 #显示方向设置 Backlight backlight # Backlight variable control #背光控制 } #图片显示配置 Display Image { Driver 'Image' #驱动类型 Format 'PNG' #显示图片类型 Size '240x320' #窗口大小 Font '6x8' #字体 Pixel '4+1' #像素 Gap '-1x-1' #间隔 Border 20 #边界 Foreground 'ffffff' Background 'ffffff00' Halfground '#70c000' } #显示主题背景,图片显示基本差不多。 Widget Bgnd { class 'Image' # 显示类型 file imgadir . 'bakground.png' #图片路径 reload 1 update minute #刷新时间。 inverted 0 #反转颜色、黑变白 visible 1 # 》0显示 =0不显示 } #文字显示 Widget CPUText { #部件名,最好不要使用熟悉的词,有可能造成不能正常显示 class 'Text' # 显示类型 #expression uname('machine') expression cpuinfo('model name') #输出信息 prefix 'CPU Tmp: ' #前置信息,会显示在expression输出的数据前面 width 7 #文字总宽度 # align 'R' #文字位置,即在一个框里。L左边 R右边 C中间 M移动 align 'M' style 'bold' #字体加粗 update minute Foreground 'f50d0d' Background 'FFFFFF00' precision 0 #得到的数据精确值,0为不显示小数点后值, 》0的表示获取小数点后几位,这个参数在图片显示中不能使用。 postfix 'G' #信息后缀,一般配合显示位置R来使用,否则位置有时会乱 length 13 #获取信息长度 } #进度条 Widget DiskBar { class 'Bar' expression diskstats('sda', 'read_sectors', 500) expression2 diskstats('sda', 'write_sectors', 500) length 13 #进度条长度 direction 'E' #这个测试不出来效果,按字面意思是方向,具体什么作用?? # style 'H' #风格,具体还有什么参数不知???? update tack Foreground '5f5f5f' Background '3f3f3fFF' BarColor0 '00FF00' BarColor1 'FF0000' } Display 'DPF' #显示定义 #布局 Layout mylayout { #文字显示区 Row13.Col27 'CPUText' #Row为上下移动0-40,Col为左右移动0-34 #Layer为图片层,层的作用,比如两张图片坐标一样。在同层中有可能错乱,所以分开放两层就解决。 #第三层,主要用来显示主背景。,测试下只能建立三层,建四层直接不显示第四层内容。 Layer 2 { X1.Y1 'Bgnd' #X为上下。Y为左右 } #二层 Layer 1 { X61.Y184 'Weather1' } #一层 Layer 0 { X156.Y155 'PMDetail2' } } Layout 'mylayout' #自定义区,上面用到的参数可以在此定义, Variables { backlight 2 tick 500 tack 200 second 1000 minute 60000 DorN 'day' ioDevice 'sda' #显示读写数据的设备 netdevice 'eth0' #网络状态的网络设备 imgadir '/usr/share/lcd4linux/mytheme/Img/' datadir '/usr/share/lcd4linux/mytheme/data/' SpaceDir '/volume1' }
direction这个参数有E,W,N,S即那个条条的四个方向(上北,下南,左西,右东),默认是向东(向右)。
style这个就一个参数H(空的,不显示名字),或者0(具体没试,显示这个BAR的名字?)。
以上我都没试过。。。
另外还有Bitmap直接画点点的。。。Icon