#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'
}