天气与日历 切换到宽版
扫描二维码关注官方公众号
返回列表 发布新帖

[玩法/技巧] 8元小相框(128X128)lcd4linux配置文件

 火...
30989 309
发表于 2014-5-10 13:17:28 | 显示全部楼层 阅读模式

来吧兄弟,一起玩一起讨论!

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 dsqa 于 2014-5-10 21:50 编辑

看图王.jpg
显示效果图,基本版,只显示了常见参数。
本想偷懒。。。结果发现论坛里发的是240X320的。。。1.5寸的没法用。。。所以简单搞了个1.5的。
这里只抛砖引玉,至于更多功能和美化,大家发挥吧。
--------------------------------------------------分割线---------------------------------------------------------
排版小更新版,看图吧。增加了CPU占用百分比显示,下边IP等信息滚动显示。需要的,回复可见,
IMG_0779_2345看图王.JPG

  1. Display dpf {
  2.         Driver     'DPF'
  3.         Port       'usb0'
  4.         Font       '6x8'
  5.         Foreground 'ffffff'
  6.         Background 'ffffff00'
  7.         Basecolor  '000000'   #ffffff00
  8.         Orientation 0          # Orientation value from 0-3
  9.         Backlight 5           # Backlight variable control
  10. }



  11. Widget Kernel {
  12.         class  'Text'
  13.         expression uname('nodename')
  14.         width  12
  15.         align  'L'
  16.         update minute
  17.         Background 'FFFFFF00'
  18. }

  19. Widget CPUText {
  20.         class  'Text'
  21.         expression uname('machine')
  22.         prefix 'CPU'
  23.         width  21
  24.         align  'R'
  25.         update minute
  26.         Background 'FFFFFF00'
  27. }

  28. Widget CPUBar {
  29.         class 'Bar'
  30.         expression  proc_stat::cpu('busy',   500)
  31.         length 21
  32.         direction 'E'
  33. #        style 'H'
  34.         update tack
  35.         Foreground '5f5f5f'
  36.         Background '00FF00FF'
  37.         BarColor0 'FF0000'
  38.         BarColor1 'EE3333'
  39. }

  40. Widget RAMText1 {
  41.         class  'Text'
  42.         expression meminfo('MemTotal')/1024
  43.         #prefix 'RAM'
  44.         postfix 'MB'
  45.         precision  0
  46.         width  6
  47.         align  'L'
  48.         update tick
  49.         Background 'FFFFFF00'
  50. }

  51. Widget RAMText2 {
  52.         class  'Text'
  53.         expression meminfo('MemFree')/1024
  54.         prefix 'RAM'
  55.         postfix 'MB/'
  56.         precision  0
  57.         width  15
  58.         align  'R'
  59.         update tick
  60.         Background 'FFFFFF00'
  61. }

  62. Widget RAMBar {
  63.         class 'Bar'
  64.         expression  meminfo('MemTotal') - meminfo('MemFree')
  65.         max meminfo('MemTotal')
  66.         length 21
  67.         direction 'E'
  68. #        style 'H'
  69.         update tack
  70.         Foreground '5f5f5f'
  71.         Background '00FF00FF'
  72.         BarColor0 'FF0000'
  73.         BarColor1 'EE3333'
  74. }

  75. Widget LoadText {
  76.         class  'Text'
  77.         expression loadavg(1)
  78.         prefix 'Load:'
  79.         postfix loadavg(1)>1.0?'!':''
  80.         width  21
  81.         align  'R'
  82.         precision  1
  83.         update tack
  84.         Background 'FFFFFF00'
  85. }

  86. Widget LoadBar {
  87.         class 'Bar'
  88.         expression  loadavg(1)
  89.         max 2.0
  90.         length 21
  91.         direction 'E'
  92. #        style 'H'
  93.         update tack
  94.         Foreground '5f5f5f'
  95.         Background '00FF00FF'
  96.         BarColor0 'FF0000'
  97.         BarColor1 'EE3333'
  98. }

  99. Widget DiskText1 {
  100.         class 'Text'
  101.         expression diskstats('sda', 'read_sectors', 500)/2
  102.         prefix 'Read:'
  103.         postfix 'K'
  104.         precision  0
  105.         width 21
  106.         align 'R'
  107.         update tick
  108.         Foreground 'ffffff'
  109.         Background 'FFFFFF00'
  110. }

  111. Widget DiskText2 {
  112.         class 'Text'
  113.         expression diskstats('sda', 'write_sectors', 500)/2
  114.         prefix 'Write:'
  115.         postfix 'K'
  116.         precision  0
  117.         width 21
  118.         align 'R'
  119.         update tick
  120.         Foreground 'ffffff'
  121.         Background 'FFFFFF00'
  122. }

  123. Widget DiskBar {
  124.         class 'Bar'
  125.         expression  diskstats('sda', 'read_sectors',  500)
  126.         expression2 diskstats('sda', 'write_sectors', 500)
  127.         length 21
  128.         direction 'E'
  129. #        style 'H'
  130.         update tack
  131.         Foreground '5f5f5f'
  132.         Background '3f3f3fFF'
  133.         BarColor0 '00FF00'
  134.         BarColor1 'FF0000'
  135. }

  136. Widget SpaceText1 {
  137.         class 'Text'
  138.         expression statfs(SpaceDir, 'blocks')*statfs(SpaceDir, 'bsize')/1073741824
  139.         prefix SpaceDir
  140.         postfix 'G'
  141.         precision  0
  142.         width 21
  143.         align 'R'
  144.         update minute
  145.         Foreground 'ffffff'
  146.         Background 'FFFFFF00'
  147. }

  148. Widget SpaceText2 {
  149.         class 'Text'
  150.         expression statfs(SpaceDir, 'bavail')*statfs(SpaceDir, 'bsize')/1073741824
  151.         prefix 'Free:'
  152.         postfix 'G'
  153.         precision  0
  154.         width 21
  155.         align 'R'
  156.         update minute
  157.         Foreground 'ffffff'
  158.         Background 'FFFFFF00'
  159. }


  160. Widget SpaceBar {
  161.         class 'Bar'
  162.         expression  statfs(SpaceDir, 'blocks') - statfs(SpaceDir, 'bavail')
  163.         length 21
  164.         direction 'E'
  165. #        style 'H'
  166.         max statfs(SpaceDir, 'blocks')
  167.         update tick
  168.         Foreground '5f5f5f'
  169.         Background '00FF00FF'
  170.         BarColor0 'FF0000'
  171.         BarColor1 'EE3333'
  172. }

  173. Widget NetText1 {
  174.         class 'Text'
  175.         expression netdev::fast('eth0', 'Tx_bytes', 500)/1024
  176.         prefix 'Up:'
  177.         postfix 'K/s'
  178.         width 21
  179.         precision  0
  180.         align 'R'
  181.         update tick
  182.         Foreground 'ffffff'
  183.         Background 'FFFFFF00'
  184. }

  185. Widget NetText2 {
  186.         class 'Text'
  187.         expression netdev::fast('eth0', 'Rx_bytes', 500)/1024
  188.         prefix 'Down:'
  189.         postfix 'K/s'
  190.         precision  0
  191.         width 21
  192.         align 'R'
  193.         update tick
  194.         Foreground 'ffffff'
  195.         Background 'FFFFFF00'
  196. }

  197. Widget NetBar {
  198.         class 'Bar'
  199.         expression netdev('eth0', 'Tx_bytes', 500)
  200.         expression2  netdev('eth0', 'Rx_bytes', 500)
  201.         length 21
  202.         direction 'E'
  203. #        style 'H'
  204. #        max 2097152
  205. #        max 204800
  206.         update tack
  207.         Foreground '5f5f5f'
  208.         Background '3F3F3FFF'
  209.         BarColor0 '00FF00'
  210.         BarColor1 'FF0000'
  211. }

  212. Widget UpText {
  213.         class 'Text'
  214.         expression uptime('%dd %H:%M:%S')
  215.         # prefix 'R:'
  216.         width 13
  217.         align 'R'
  218.         update tick
  219.         Foreground 'ffffff'
  220.         Background 'FFFFFF00'
  221. }

  222. Widget IPText {
  223.         class 'Text'
  224.         expression netinfo::ipaddr('eth0')
  225.         prefix 'IP:'
  226.         width 21
  227.         align 'L'
  228.         update minute
  229.         Foreground 'ffffff'
  230.         Background 'FFFFFF00'
  231. }




  232. Display 'DPF'


  233. Layout mylayout {
  234.         Row01.Col01 'Kernel'
  235.         Row01.Col09 'UpText'
  236.         Row02.Col01 'CPUText'
  237.         Row03.Col01 'CPUBar'
  238.         Row04.Col01 'LoadText'
  239.         #Row05.Col01 'LoadBar'
  240.         Row05.Col16 'RAMText1'
  241.         Row05.Col01 'RAMText2'
  242.         Row06.Col01 'RAMBar'
  243.         Row07.Col01 'DiskText1'
  244.         Row8.Col01 'DiskText2'
  245.         Row9.Col01 'DiskBar'
  246.         Row10.Col01 'SpaceText1'
  247.         Row11.Col01 'SpaceText2'
  248.         Row12.Col01 'SpaceBar'
  249.         Row13.Col01 'NetText1'
  250.         Row14.Col01 'NetText2'
  251.         Row15.Col01 'NetBar'
  252.         #Row18.Col01 'UpText'
  253.         Row16.Col01 'IPText'
  254.         }

  255. Layout 'mylayout'

  256. Variables {
  257.         tick 500
  258.         tack 200
  259.         second 1000
  260.         minute 60000
  261.         SpaceDir  '/mnt/sda1'
  262. }
复制代码

隐藏东西,你懂的
游客,如果您要查看本帖隐藏内容请回复




本帖被以下淘专辑推荐:

我的原则是,可以1+1=2的,绝不1+3*2/6-1+1=2

评论309

剑剑Lv.10 发表于 2014-5-10 13:30:45 | 显示全部楼层
你搞定了,快手啊。看看有什么收藏的。
回复 点赞

使用道具 举报

mrqian7188Lv.5 发表于 2014-5-10 13:58:00 来自手机 | 显示全部楼层
这个好,借用一下。
回复 点赞

使用道具 举报

anotherfishLv.4 发表于 2014-5-10 14:02:59 来自手机 | 显示全部楼层
有完整的教程和工具固件包吗?
回复 点赞

使用道具 举报

hjfgtLv.10 发表于 2014-5-10 14:07:36 | 显示全部楼层
回复一下看一看隐藏了什么。
回复 点赞

使用道具 举报

skimenLv.10 发表于 2014-5-10 14:13:54 | 显示全部楼层
看看隐藏了什么
回复 点赞

使用道具 举报

mycfanLv.10 发表于 2014-5-10 14:24:35 | 显示全部楼层
hjjjjjjjjj
回复 点赞

使用道具 举报

itsddtLv.10 发表于 2014-5-10 14:36:23 | 显示全部楼层
非的让我回复才看吖
回复 点赞

使用道具 举报

askaLv.10 发表于 2014-5-10 14:38:49 | 显示全部楼层
这么快就有成果了,等我的清仓2.5到货就实验
回复 点赞

使用道具 举报

vanloonLv.10 发表于 2014-5-10 15:09:56 | 显示全部楼层
看看 藏的什么
回复 点赞

使用道具 举报

克苏鲁的恩赐Lv.2 发表于 2014-5-10 15:25:58 | 显示全部楼层
LZ,到现在都没研究出怎么刷这个的固件!
回复 点赞

使用道具 举报

garychanLv.2 发表于 2014-5-10 15:26:26 | 显示全部楼层
看看 藏的什么
回复 点赞

使用道具 举报

11225071Lv.4 发表于 2014-5-10 15:56:28 | 显示全部楼层
谢谢分享好技术!
回复 点赞

使用道具 举报

jackboxLv.5 发表于 2014-5-10 16:24:01 | 显示全部楼层
隐藏了什么????
回复 点赞

使用道具 举报

yuko4632Lv.10 发表于 2014-5-10 16:28:07 | 显示全部楼层
藏啥了???
安装lcd4linux?。。。添加软件源,然后用相应的安装命令安装就行了。。。  详情 回复
发表于 2014-5-10 19:34
回复 点赞

使用道具 举报

xjcsuperLv.10 发表于 2014-5-10 16:50:47 | 显示全部楼层
lcd4linux搞定了?
回复 点赞

使用道具 举报

884079151Lv.3 发表于 2014-5-10 17:11:15 | 显示全部楼层
你搞定了,快手啊。看看有什么收藏的。可以的话给我的黑裙也安装上
回复 点赞

使用道具 举报

jame9Lv.10 发表于 2014-5-10 17:13:41 | 显示全部楼层
进来学习啦!
回复 点赞

使用道具 举报

mrqian7188Lv.5 发表于 2014-5-10 17:38:42 | 显示全部楼层
这个不错,已经用上了! 1.jpg



回复 点赞

使用道具 举报

huhuzhuLv.5 发表于 2014-5-10 19:04:56 | 显示全部楼层
已经拍下了,看看!
回复 点赞

使用道具 举报

回复

懒得打字嘛,点击右侧快捷回复 【本站酷狼4T,750元】
您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 快速发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表