Advertisement
To-Slalom

my conky

Apr 11th, 2021
1,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.00 KB | None | 0 0
  1. -- vim: ts=4 sw=4 noet ai cindent syntax=lua
  2. -- manual http://conky.sourceforge.net/docs.html
  3. --[[
  4. Conky, a system monitor, based on torsmo
  5.  
  6. Any original torsmo code is licensed under the BSD license
  7.  
  8. All code written since the fork of torsmo is licensed under the GPL
  9.  
  10. Please see COPYING for details
  11.  
  12. Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
  13. Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
  14. All rights reserved.
  15.  
  16. This program is free software: you can redistribute it and/or modify
  17. it under the terms of the GNU General Public License as published by
  18. the Free Software Foundation, either version 3 of the License, or
  19. (at your option) any later version.
  20.  
  21. This program is distributed in the hope that it will be useful,
  22. but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. GNU General Public License for more details.
  25. You should have received a copy of the GNU General Public License
  26. along with this program.  If not, see <http://www.gnu.org/licenses/>.
  27. ]]
  28.  
  29. conky.config = {
  30.     use_xft                 = true,
  31.     xftalpha                = 0.8,
  32.     update_interval         = 1.0,
  33.     total_run_times         = 0,
  34.     own_window_hints        = 'undecorated,below,sticky,skip_taskbar,skip_pager',
  35.     own_window              = true ,
  36.     own_window_type         = 'conky', -- dock, panel, normal , conky , desktop , override
  37.     own_window_argb_visual  = yes ,
  38.     own_window_class        = override ,
  39.     own_window_transparent  = yes ,
  40.     own_window_argb_visual  = yes ,
  41.     own_window_argb_value   = 145 , -- semi-transparent  
  42.     background              = true,
  43.     double_buffer           = true,
  44.     imlib_cache_size        = 0,
  45.     no_buffers              = true,
  46.     uppercase               = false,
  47.     cpu_avg_samples         = 2,
  48.     override_utf8_locale    = true,
  49.     -- placement
  50.     alignment               = 'top_right',
  51.     gap_x                   = 25,
  52.     gap_y                   = 25,
  53.     -- default drawing
  54.     draw_shades             = false ,
  55.     draw_outline            = false ,
  56.     draw_borders            = false ,
  57.     draw_graph_borders      = true  ,
  58.     default_bar_width       = 150   , default_bar_height   = 5 ,
  59.     default_graph_width     = 150   , default_graph_height = 12,
  60.     default_gauge_width     = 20    , default_gauge_height = 20,
  61.     -- colors
  62.     font                    = 'Open Sans:size=10',
  63.     default_color           = '#EEEEEE',
  64.     color1                  = '#AABBFF',
  65.     color2                  = '#CCCCCC',
  66.     color3                  = '#dbe2c3',
  67.     -- layouting
  68.     template0               = [[${font Liberation Sans:bold:size=11}${color2}\1 ${color3}${hr 2}${font}]],
  69.     template1               = [[${color1}\1]],
  70.     template2               = [[${goto 100}${color}]],
  71.     template3               = [[${goto 180}${color}${alignr}]],
  72. }
  73. conky.text = [[
  74. # https://gist.github.com/Lqp1/1b6b459a4e660bfc26e0a5312a6be7ca
  75. # https://distrowatch.com/search.php?category=From+RAM#simple
  76. ## horas
  77. ${font Open Sans:size=20} ${color3} ${alignc} ${time %H:%M}
  78. ## Dia   week, day month year
  79. ${font} ${color3} ${alignc} ${time %a}, ${time %d %b %Y}
  80. ${font Open Sans:Bold:size=10}${color2}SYSTEM ${hr 1}${offset 1}
  81. ${offset 5}${color3}OS Name         ${alignr} ${color1} ${execi 86400 cat `ls -atr /etc/*-release | tail -2` | grep "PRETTY_NAME" | cut -d= -f2 |  sed 's/"//g'} ${offset 1}
  82. ${offset 5}${color3}Kernel          ${alignr} ${color1} $kernel ${offset 1}
  83. ${offset 5}${color3}Uptime          ${alignr} ${color1} ${uptime} ${offset 1}
  84. # ${offset 20}${color slate grey}Load: ${color }$load1avg
  85. # CPU Info
  86. ${font}${color2}CPU ${hr 1}${offset 1}
  87. #${color a39f93}OS Name ${color} ${alignr} ${execi 86400 lscpu | grep "Model name:" | sed -r 's/Model name:\s{1,}//g'}
  88. #${color a39f93}CPU ${color} ${alignr} ${execi 86400 lscpu | grep "Model name" | sed -r 's/Model name:\s{1,}(.*) @ .*z\s*/\1/g'}
  89. #${font Open Sans:Bold:size=10}${color 4C7523}CPU  ${execi 86400 lscpu | grep "Model name" | sed -r 's/Model name:\s{1,}(.*) @ .*z\s*/\1/g'}  ${color} ${font}${offset 1}
  90. #${color a39f93}Frequency (in MHz) $color ${alignr} $freq ${offset 1}
  91. #${color a39f93}Frequency (in GHz) $color ${alignr} $freq_g GHz ${offset 1}
  92. #${color a39f93}Core 1 ${alignr} ${color}${freq_g 1}GHz ${cpu cpu0}% ${offset 1}
  93. #${color a39f93}Core 2 ${alignr} ${color}${freq_g 2}GHz ${cpu cpu1}% ${offset 1}
  94. #${color a39f93}Core 3 ${alignr} ${color}${freq_g 3}GHz ${cpu cpu2}% ${offset 1}
  95. #${color a39f93}Core 4 ${alignr} ${color}${freq_g 4}GHz ${cpu cpu3}% ${offset 1}
  96. ${offset 5}${color3}CPU Frequency    ${alignr} ${color1} ${freq_g}GHz ${offset 1}
  97. ${offset 5}${color3}CPU Usage        ${alignr} ${color1} ${cpu}% ${offset 1}
  98. ${offset 5}${color3}CPU Temperature  ${alignr} ${color1} ${acpitemp}°C ${offset 1}
  99. ${offset 5}${color3}CPU Architecture ${alignr} ${color1} ${machine} ${offset 1}
  100. ${offset 5}${color3}Processes        ${alignr} ${color1} ${processes} ${offset 1}
  101. ${offset 5}${color3}Running          ${alignr} ${color1} ${running_processes} ${offset 1}
  102. #${color a39f93}Battery   ${alignr} ${color} ${battery_percent}% ${offset 1}
  103. # Disco rigido que se esta a usar atualmente
  104. ${font Open Sans:Bold:size=10}${color2}HDD ${hr 1} ${color1} ${font}${offset 1}
  105. ${offset 5}${color3}Total ${alignr} ${color1} ${fs_size /home/} ${offset 1}
  106. ${offset 5}${color3}Free  ${alignr} ${color1} ${fs_free /home/} ${offset 1}
  107. ${offset 5}${color3}Used  ${alignr} ${color1} ${fs_used /home/} ${offset 1}
  108. # ${color a39f93}Host  ${color} ${alignr} ${nodename} ${offset 1}
  109. # *********************************************************
  110. # swapbar  (height)   Bar that shows amount of swap in use
  111. # swap                Amount of swap in use
  112. # swapmax             Total amount of swap
  113. # swapperc Percentage of swap in use
  114. # *********************************************************
  115. ${color2}${hr 2}
  116. ${font}${color3}swap ${alignc} $swap / $swapmax ${alignr} Used ${swapperc}%
  117. ${font}${color3}RAM  ${alignc} $mem / $memmax ${alignr} Used ${memperc}%
  118. ${font}${color3}File systems ${fs_size /} ${alignr} Used ${fs_used /}%
  119. #  ${fs_bar 4 /} ${membar 4} ${swapbar 4} ${cpubar cpu5} ${cpugraph 50}
  120. # Memoria Ram que esta a ser utilisada, livre...
  121. # ${font Open Sans:Bold:size=10}${color 4C7523}Ram ${hr 2} ${color} ${font}${offset 1}
  122. # ${color} Total   ${color} ${alignr} $memmax ${offset 1}
  123. # ${color} In use  ${color} ${alignr} $mem ${offset 1}
  124. # ${color} Free    ${color} ${alignr} $memeasyfree ${offset 1}
  125. # ${color} Buffers ${color} ${alignr} $buffers ${offset 1}
  126. # ${color} Cache   ${color} ${alignr} $cached ${offset 1}
  127. # ${color} ${top_mem name 1}${alignr}${top_mem mem_res 1} ${offset 1}
  128. # ${color} ${top_mem name 2}${alignr}${top_mem mem_res 2} ${offset 1}
  129. # ${color} ${top_mem name 3}${alignr}${top_mem mem_res 3} ${offset 1}
  130. # ${color} ${top_mem name 4}${alignr}${top_mem mem_res 4} ${offset 1}
  131. # ${color} ${top_mem name 5}${alignr}${top_mem mem_res 5} ${offset 1}
  132. # Processo que estao a correr atualmente
  133. #${font Open Sans:Bold:size=10}${color 4C7523}PROCESSES ${hr 2}$color${font}${offset 1}
  134. #${font Open Sans:Bold:size=8}${color a39f93}CPU
  135. #${offset 15}${font Noto sans:size=8}${color EDE0FF}Name ${alignr}PID   CPU%   MEM%
  136. #${offset 15}${color FF7878}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
  137. #${offset 15}${color FF7878}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
  138. #${offset 15}${color FF7878}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
  139. #${offset 15}${color FF7878}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
  140. # VGA Name
  141. # ${font Open Sans:Bold:size=10}${color 4C7523}VGA  ${execi 86400 lspci -nn | grep -E 'VGA|Display'}  ${color} ${font}${offset 1}
  142. # Placa de rede Wirless
  143. #${font Open Sans:Bold:size=10}${color 4C7523}Wi-Fi ${hr 2} ${color} ${font}${offset 1}
  144. #${if_existing /proc/net/route wlan0}
  145. #${offset 5}Link Quality $alignr ${wireless_link_qual_perc wlan0}% ${offset 1}
  146. #${offset 5}ESSID $alignr (${wireless_essid wlan0}) ${offset 1}
  147. #${offset 5}Gateway IP $alignr (${gw_ip} ${offset 1}
  148. #${offset 5}Public IP $alignr (${addr wlan0}) ${offset 1}
  149. #${offset 5}AP's MAC address $alignr (${wireless_ap wlan0}) ${offset 1}
  150. #${offset 5}${color}Up Speed ${color }${upspeed wlan0}/s ${offset 1}
  151. #${offset 5}${upspeedgraph wlan0 10,130 000000 ffffff} ${offset 1}
  152. #${offset 5}${color}Down Speed: ${color }${downspeed wlan0}/s${color} ${offset 1}
  153. #${offset 5}${downspeedgraph wlan0 10,130 000000 ffffff} ${offset 1}
  154. #${endif}
  155. # Placa de rede RJ45
  156. #${if_existing /proc/net/route eth0}
  157. #${offset 5}Gateway IP $alignr (${gw_ip} ${offset 1}
  158. #${offset 5}Public IP $alignr (${addr eth0}) ${offset 1}
  159. #${offset 5}AP's MAC address $alignr (${wireless_ap eth0}) ${offset 1}
  160. #${offset 5}${color}Up: ${color }${upspeed eth0} k/s ${offset 1}
  161. #${offset 5}${upspeedgraph eth0 20,130 000000 ffffff} ${offset 1}
  162. #${offset 5}${color}Down: ${color }${downspeed eth0}k/s${color} ${offset 1}
  163. #${offset 5}${downspeedgraph eth0 20,130 000000 00ffff} ${offset 1}
  164. #${endif}
  165. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement