Ubuntu MATE 22.04 Conky
今回もConkyをインストールした
20.04から少々仕様が変わっていたので、改めてメモ書き
1 インストール
$ sudo apt install conky conky-all |
2 センサー類
$ sudo apt insatll lm-sensors |
一度再起動して確認
$ sensors |
表示されたことを確認
hddtempをインストールがなくなったようで
インストールしようとしたが出来なかった
3 NVMeのSSDの温度を確認するために
$ sudo apt install smartmontools |
確認
$ /usr/sbin/modinfo drivetemp |
filename: /lib/modules/5.15.0-56-generic/kernel/drivers/hwmon/drivetemp.ko alias: platform:drivetemp license: GPL description: Hard drive temperature monitor author: Guenter Roeck <linus@roeck-us.net> depends: retpoline: Y intree: Y name: drivetemp vermagic: 5.15.0-56-generic SMP mod_unload modversions |
モジュールの適用準備
$ ls /etc/modules-load.d/ #modules-load.dなければ下記のコマンドで作成する
$ sudo mkdir /etc/modules-load.d/ |
モジュールの適用
$ echo drivetemp | sudo tee /etc/modules-load.d/drivetemp.conf |
再起動してコマンドの確認
$ for m in /sys/class/hwmon/* ; do echo -n “$m = ” ; cat $m/name ; done |
/sys/class/hwmon/hwmon0 = acpitz /sys/class/hwmon/hwmon1 = nvme /sys/class/hwmon/hwmon2 = drivetemp /sys/class/hwmon/hwmon3 = drivetemp /sys/class/hwmon/hwmon4 = drivetemp /sys/class/hwmon/hwmon5 = drivetemp /sys/class/hwmon/hwmon6 = drivetemp /sys/class/hwmon/hwmon7 = drivetemp /sys/class/hwmon/hwmon8 = iwlwifi_1 /sys/class/hwmon/hwmon9 = coretemp |
4 Conky設定ファイルの作成 #今回は透明化してみた
以前はconkyrcだったが、変更になったようです
$ mkdir -p ~/.config/conky $ conky -C > ~/.config/conky/conky.conf |
設定ファイルの修正
$ pluma ~/.config/conky/conky.conf |
— Conky, a system monitor https://github.com/brndnmtthws/conky — — This configuration file is Lua code. You can write code in here, and it will — execute when Conky loads. You can use it to generate your own advanced — configurations. — — Try this (remove the `–`): — — print(“Loading Conky config”) — — For more on Lua, see: — https://www.lua.org/pil/contents.htmlconky.config = { alignment = ‘bottom_right’, background = true, #falseからtrueに変更する。 border_width = 1, cpu_avg_samples = 2, default_color = ‘white’, default_outline_color = ‘white’, default_shade_color = ‘white’, double_buffer = true, draw_borders = false, draw_graph_borders = true, draw_outline = false, draw_shades = false, extra_newline = false, font = ‘DejaVu Sans Mono:size=12’, gap_x = 60, gap_y = 60, minimum_height = 5, minimum_width = 5, net_avg_samples = 2, no_buffers = true, out_to_console = false, out_to_ncurses = false, out_to_stderr = false, out_to_x = true, own_window = true, own_window_class = ‘Conky’, own_window_type = ‘normal’, #desktopからnormalに変更 own_window_transparent = true, #行追加 own_window_argb_visual = true, #行追加 own_window_hints = ‘undecorated,below,sticky,skip_taskbar,skip_pager’, #行追加 show_graph_range = false, show_graph_scale = false, stippled_borders = 0, update_interval = 1.0, uppercase = false, use_spacer = ‘none’, use_xft = true, }#ここから下は書き換えたconky.text = [[ ${font Arialblack:size=10}System Info$font $sysname $kernel UPTIME: $uptime LAv: $loadavg $hr Wireless signal${alignr}${wireless_link_qual_perc wlan0}% LAN ${font sans-serif:normal:size=8} $alignr ${addr enp5s0} WiFi ${font sans-serif:normal:size=8} $alignr ${addr wlan0} $hr CPUクロック: ${freq_g}GHz CPU0使用率: ${cpu cpu0}% ${cpugraph cpu0 ff0000 00ff00} CPU1使用率: ${cpu cpu1}% ${cpugraph cpu1 fff000 ff0000} CPU2使用率: ${cpu cpu2}% ${cpugraph cpu2 fff000 ff0000} メモリ使用率: $memperc% ${membar 4} スワップ使用率: $swapperc% ${swapbar 4} プロセス: $processes ($running_processes)RUN ディスク使用率: ${fs_used_perc}% ${fs_bar 4} ネットワーク:enp5s0 Up: ${upspeed enp5s0}/s ${upspeedgraph enp5s0 ff0000 0000ff} Down: ${downspeed enp5s0}/s ${downspeedgraph enp5s0 0000ff fff000} ネットワーク:wlan0 Up: ${upspeed wlan0}/s ${upspeedgraph wlan0 ff0000 0000ff} Down: ${downspeed wlan0}/s ${downspeedgraph wlan0 0000ff fff000} $hr ${font Arialblack:size=10}Temperature$font CPU0: ${hwmon 9 temp 1} Celsius nvme0: ${hwmon 1 temp 1} Celsius dev/sda: ${hwmon 2 temp 1} Celsius dev/sdb: ${hwmon 3 temp 1} Celsius dev/sdc: ${hwmon 4 temp 1} Celsius dev/sdd: ${hwmon 5 temp 1} Celsius dev/sde: ${hwmon 6 temp 1} Celsius dev/sdf: ${hwmon 7 temp 1} Celsius #℃が文字化けするのでCelisius表示 ]] |
5 自動起動の設定
$ mkdir -pv ~/.config/autostart #フォルダがなければ作る $ cp /usr/share/applications/conky.desktop ~/.config/autostart/. |
再起動して表示されることを確認した