diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/NOTES b/NOTES old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/daemons/README.md b/daemons/README.md old mode 100644 new mode 100755 diff --git a/daemons/bottom_middle.lua b/daemons/bottom_middle.lua new file mode 100755 index 0000000..c4039fb --- /dev/null +++ b/daemons/bottom_middle.lua @@ -0,0 +1,66 @@ +conky.config = { + -- Remove the gaps + gap_x = 0, + gap_y = 20, + + -- Define ancor + alignment = 'bottom_middle', + + -- TODO(Krey): Decide on the implementation + minimum_width = 500, + + -- TODO(Krey): To be processed + background = false, + border_width = 0.5, + cpu_avg_samples = 4, + default_color = 'white', + default_outline_color = 'grey', + default_shade_color = 'black', + draw_borders = true, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + use_xft = true, + font = 'Unifont:size=16', + + net_avg_samples = 2, + double_buffer = true, + out_to_console = false, + out_to_stderr = false, + extra_newline = false, + own_window = true, + own_window_colour = '000000', + own_window_class = 'Conky', + own_window_argb_visual = true, + own_window_type = 'dock', + own_window_transparent = true, + own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', + stippled_borders = 0, + update_interval = 0.5, + uppercase = false, + show_graph_scale = false, + show_graph_range = false, +} + +-- |-${alignc}X${alignr}-| + +conky.text = [[ +${execi 1 ps -Ao "priority,comm,pid,pcpu,size" --sort=-pcpu | sed -n 1,10p} +]] + +-- conky.text = [[ +-- ${offset 20} ${alignc}Procs: $processes Run: $running_processes +-- ${offset 20}Name ${alignr}PID CPU% MEM% +-- +-- ${alignc}${top name 1}[${top pid 1}](${top cpu 1}%)${top mem 1}${color} +-- +-- ${offset 20}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2} +-- ${offset 20}${color red}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}${color} +-- ${offset 20}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4} +-- ${offset 20}${color red}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}${color} +-- ${offset 20}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6} +-- ${offset 20}${color red}${top name 7} ${alignr}${top pid 7} ${top cpu 7} ${top mem 7}${color} +-- ${offset 20}${top name 8} ${alignr}${top pid 8} ${top cpu 8} ${top mem 8} +-- ${offset 20}${color red}${top name 9} ${alignr}${top pid 9} ${top cpu 9} ${top mem 9}${color} +-- ${offset 20}${top name 10} ${alignr}${top pid 10} ${top cpu 10} ${top mem 10} +-- ]] diff --git a/daemons/bottom_right.lua b/daemons/bottom_right.lua old mode 100644 new mode 100755 diff --git a/daemons/top_left.lua b/daemons/top_left.lua old mode 100644 new mode 100755 index 3fe6942..292fa2c --- a/daemons/top_left.lua +++ b/daemons/top_left.lua @@ -1,7 +1,7 @@ conky.config = { -- Remove the gaps gap_x = 0, - gap_y = 0, + gap_y = 50, -- Define ancor alignment = 'top_left', @@ -46,18 +46,24 @@ conky.text = [[ ${font Entopia:bold:size=21}NETWORK ${hr 2}${font} ${offset 20}Internet Service Provider: ${alignr}Vodafone CZ ${offset 20}Nameserver: ${alignr}${nameserver} -${offset 20}enp7s0 ${alignr}${addr enp7s0} -${offset 20}${downspeedgraph enp7s0 50,150} ${alignr}${upspeedgraph enp7s0 50,150} -${offset 20}${color green}${font}▼ $color${downspeed enp7s0} ${alignr}${color green}▲ $color${upspeed enp7s0} +${offset 20}enp7s0 ${alignr}${addr enp8s0} +${offset 20}${downspeedgraph enp7s0 50,150} ${alignr}${upspeedgraph enp8s0 50,150} +${offset 20}${color green}${font}▼ $color${downspeed enp8s0} ${alignr}${color green}▲ $color${upspeed enp8s0} -${execigraph 5 "cat /home/kreyren/.config/conky/data/ping.log | sed '2q;d' | sed -E "s#\w+\s+bytes\s+from\s+[a-z\.-]+\s+\([0-9.]+\):\s[a-z_=]+\w\s\w+=[0-9]+\stime=([0-9]+\.[0-9])\s+ms#\1#g"" -t 80 -l 8} -PING: ${execi 5 cat /home/kreyren/.config/conky/data/ping.log | sed '2q;d' | sed -E "s#\w+\s+bytes\s+from\s+[a-z\.-]+\s+\([0-9.]+\):\s[a-z_=]+\w\s\w+=[0-9]+\stime=([0-9]+\.[0-9])\s+ms#\1#g"} ms +${execigraph 5 "cat /home/kreyren/.local/config/conky/data/ping.log | sed '2q;d' | sed -E "s#.*=(\w+[\.\,]\w+)\sms\$#\1#g"" -t 80 -l 8} +PING: ${execi 5 cat /home/kreyren/.local/config/conky/data/ping.log | sed '2q;d' | sed -E "s#.*=(\w+[\.\,]\w+)\sms\$#\1#g"} ms -${execigraph 5 "bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 1000000)"} -DOWN: ${execi 5 bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.download)"') / 8000000)} MB/s (${execi 5 bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.download)"') / 1000000)} Mb/s) +${execigraph 5 "bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.download)"') / 1000000 / 100)"} +DOWN: ${execi 5 bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.download)"') / 8000000)} MB/s (${execi 5 bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.download)"') / 1000000)} Mb/s) -${execigraph 5 "bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 1000000)"} -UP: ${execi 5 bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 8000000)} MB/s (${execi 5 bc <<< $(echo $(cat /home/kreyren/.config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 1000000)} Mb/s) +${execigraph 5 "bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 100000 / 100)"} +UP: ${execi 5 bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 8000000)} MB/s (${execi 5 bc <<< $(echo $(cat /home/kreyren/.local/config/conky/data/speedtest.json | jq --raw-output '"\(.upload)"') / 1000000)} Mb/s) + + + + + + ${font Entopia:bold:size=24}SERVICES ${font}${hr 2} ${offset 20}Tor relay: ${alignr}[UNKNOWN] diff --git a/daemons/top_middle.lua b/daemons/top_middle.lua old mode 100644 new mode 100755 index 16ad776..d6de0d8 --- a/daemons/top_middle.lua +++ b/daemons/top_middle.lua @@ -43,7 +43,8 @@ conky.config = { } conky.text = [[ -${voffset 10} -${alignc}${font :bold:size=32}${execi 3600 date -u +"%d/%m/%Y"}${font} +${voffset 1} ${alignc}-- ${exec date -u +"%H:%M:%S %Z"} -- -]] \ No newline at end of file +${alignc}${font :bold:size=32}${execi 3600 date -u +"%d/%m/%Y"}${font} +${alignc}-- ${exec date +"%H:%M:%S %Z"} -- +]] diff --git a/daemons/top_right.lua b/daemons/top_right.lua old mode 100644 new mode 100755 index 2f543f4..fd648db --- a/daemons/top_right.lua +++ b/daemons/top_right.lua @@ -1,13 +1,14 @@ conky.config = { -- Remove the gaps - gap_x = 0, - gap_y = 0, + gap_x = 10, + gap_y = 50, -- Define ancor alignment = 'top_right', -- TODO(Krey): Decide on the implementation - minimum_width = 450, + minimum_width = 250, + -- maximum_width = 400, -- TODO(Krey): To be processed background = false, @@ -21,7 +22,7 @@ conky.config = { draw_outline = false, draw_shades = false, use_xft = true, - font = 'Unifont:size=16', + font = 'Unifont:size=12', net_avg_samples = 2, double_buffer = true, @@ -36,7 +37,7 @@ conky.config = { own_window_transparent = true, own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', stippled_borders = 0, - update_interval = 1, + update_interval = 0.1, uppercase = false, show_graph_scale = false, show_graph_range = false, @@ -45,45 +46,57 @@ conky.config = { -- |-${alignc}x${alignr}-| conky.text = [[ -${alignc}${font :bold:size=42}${execi 3600 hostname | tr [:lower:] [:upper:]}${font} +${alignc}${font :bold:size=34}${execi 3600 hostname | tr [:lower:] [:upper:]}${font} ${alignc}-- ${execi 3600 "hostname --domain"} -- -${font Entopia:bold:size=24}SYSTEM ${font}${hr 2} -${offset 20}Host: ${alignr}${execi 3600 cat /sys/devices/virtual/dmi/id/product_version | sed s/\ *$//g} [${execi 3600 cat /sys/devices/virtual/dmi/id/product_name | sed s/\ //g}] -${offset 20}OS: ${alignr}${execi 3600 lsb_release -ds | sed s/\"//g} +${font Entopia:bold:size=18}SYSTEM ${font}${hr 2} +${offset 20}Host: ${alignr}${execi 3600 cat /sys/devices/virtual/dmi/id/product_name | sed s/\ //g} +${offset 20}OS: ${alignr}${execi 3600 grep PRETTY_NAME /etc/os-release | sed s/PRETTY_NAME=//g | sed s/\"//g} ${offset 20}Kernel: ${alignr}${sysname} ${kernel} ${offset 20}Architecture: ${alignr}${machine} ${offset 20}Process scheduler: ${alignr}Unknown ${offset 20}Uptime: ${alignr}${uptime} -${font Entopia:bold:size=24}PERFORMANCE ${font}${hr 2} -${offset 20}${font :bold}CPU:${font} i7-2620M ${freq_g} Ghz (${running_threads}/${threads}) ${cpubar cpu0 8} -${offset 30}0: (${execi 5 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '1p'}] ${cpubar cpu1 10} -${offset 30}1: (${execi 5 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '2p'}] ${cpubar cpu1 10} -${offset 30}2: (${execi 5 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '3p'}] ${cpubar cpu1 10} -${offset 30}3: (${execi 5 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 3600 cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | sed -n '4p'}] ${cpubar cpu1 10} -${offset 30}${loadgraph} -${offset 30}RAM: ${mem} / ${memmax} (${memperc}%) ${membar 8} -${offset 30}${memgraph 25} -${offset 20}iGPU: ${alignr}Intel HD Graphics 3000 -${offset 20}dGPU: ${alignr}AMD Radeon HD 6650M (${execi 3 env DRI_PRIME=1 sensors | grep radeon-pci-0100 -A 3 | grep temp1 | sed -E "s/(temp1:\s+)(\+|)(\w+.\w+|N\/A).*/\3/g"} C) +${font Entopia:bold:size=18}PERFORMANCE ${font}${hr 2} +${offset 20}${font :bold}CPU:${font} i7-2600K ${freq_g} Ghz (${running_threads}/${threads}) ${cpubar cpu0 13} +${offset 30}0: (${execi 1 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor}] ${cpubar cpu0 12} +${offset 30}1: (${execi 1 sensors | grep "Core 0" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor}] ${cpubar cpu1 12} +${offset 30}2: (${execi 1 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor}] ${cpubar cpu2 12} +${offset 30}3: (${execi 1 sensors | grep "Core 1" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor}] ${cpubar cpu3 12} +${offset 30}4: (${execi 1 sensors | grep "Core 2" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor}] ${cpubar cpu4 12} +${offset 30}5: (${execi 1 sensors | grep "Core 2" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor}] ${cpubar cpu5 12} +${offset 30}6: (${execi 1 sensors | grep "Core 3" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor}] ${cpubar cpu6 12} +${offset 30}7: (${execi 1 sensors | grep "Core 3" | cut -c 17-20} C): [${execi 10 cat /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor}] ${cpubar cpu7 12} +${offset 30}${loadgraph 80,350 00FF00 FF0000 10 -t 75} +${offset 30}RAM: ${mem} / ${memmax} (${memperc}%) ${membar 12} +${offset 30}${memgraph 50,350 00FF00 FF0000 -t 75} +${offset 20}${font :size=14}iGPU:${font} Intel HD Graphics 3000 +${offset 20}${font :size=14}dGPU:${font} ${font Unifont:size=14:bold}${execi 30 glxinfo | grep Device | sed -E "s#(\s+Device:\s+)([a-zA-Z\ 0-9]+)\s+\((\w+).*#\2#"}${font} +${offset 20} = Architecture: ${execi 30 glxinfo | grep Device | sed -E "s#(\s+Device:\s+)([a-zA-Z\ 0-9]+)\s+\((\w+),\s+([A-Z\ \.]+)([0-9\.]+),\s+[0-9\.]+,\s+[A-Z]+\s+[0-9\.]+\)\s+\([0-9a-z]+\)#\3#"} +${offset 20} = DRM: ${execi 30 glxinfo | grep Device | sed -E "s#(\s+Device:\s+)([a-zA-Z\ 0-9]+)\s+\((\w+),\s+([A-Z\ \.]+)([0-9\.]+).*#\5#"} +${offset 20} = LLVM: ${execi 30 glxinfo | grep Device | sed -E "s#(\s+Device:\s+)([a-zA-Z\ 0-9]+)\s+\((\w+),\s+([A-Z\ \.]+)([0-9\.]+),\s+([0-9\.]+),\s+([A-Z]+)\s+([0-9\.]+)\)\s+\([0-9a-z]+\)#\8#"} +${offset 20} = VBIOS version: ${execi 30 cat /sys/class/drm/card0/device/vbios_version} +${offset 20} = Max Link Speed: ${execi 30 cat /sys/class/drm/card0/device/max_link_speed} +${offset 20} = Voltage: ${execi 1 sensors | grep amdgpu-pci-0700 -A 4 | grep vddgfx | sed -E "s#(\w+):\s+##g"} +${offset 20} = Wattage: ${execi 1 sensors | grep amdgpu-pci-0700 -A 5 | grep PPT | sed -E "s#(\w+:\s+)(\w+\.\w+)\s(\w)\s+\(cap\s\=\s(\w+\.\w+)\s\w\)#\2/\4 \3#"} +${offset 20} = Temperature: ${execi 1 sensors | grep amdgpu-pci-0700 -A 4 | grep edge | sed -E "s#edge:\s+\+(\w+\.\w+)(°C)\s+\(crit\s=\s\+(\w+\.\w+)°C.*#\1\/\3 \2#"} +${offset 20} = FanSpeed: ${execi 1 sensors | grep amdgpu-pci-0700 -A 4 | grep fan1 | sed -E "s#fan1:\s+(\w+)\sRPM\s+\(min\s\=\s+\w+\sRPM\,\smax\s=\s(\w+)\s(RPM)\)#\1/\2 \3#"} +${offset 20} = State: ${execi 1 cat /sys/class/drm/card0/device/power_dpm_state} +${offset 20} = Utilization: ${execi 0.1 cat /sys/class/drm/card0/device/gpu_busy_percent} % +${offset 30}${execigraph 0.1 "cat /sys/class/drm/card0/device/gpu_busy_percent" 80,350 00FF00 FF0000 100 -t 75} +${offset 20} VRAM: ${execi 30 cat /sys/class/drm/card0/device/mem_info_vram_vendor} | ${execi 1 "bc <<< $(cat /sys/class/drm/card0/device/mem_info_vram_used)/1000000"}/${execi 1 "bc <<< $(cat /sys/class/drm/card0/device/mem_info_vram_total)/1000000"} MB +${offset 20} = VRAM Utilization: ${execi 0.1 cat /sys/class/drm/card0/device/mem_busy_percent} +${offset 20}${execigraph 0,1 "cat /sys/class/drm/card0/device/mem_busy_percent" 60,350 00FF00 FF0000 100 -t 75} ${offset 20}Entropy: ${entropy_avail}/${entropy_poolsize} (${entropy_perc}%) ${alignr}${entropy_bar 5,100} -${font Entopia:bold:size=21}TASKS ${hr 2}${font} -${offset 20}Name ${alignr}PID CPU% MEM% -${offset 20}${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1} -${offset 20}${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2} -${offset 20}${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3} -${offset 20}${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4} -${offset 20}${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5} -${offset 20}${top name 6} ${alignr}${top pid 6} ${top cpu 6} ${top mem 6} -${offset 20}${top name 7} ${alignr}${top pid 7} ${top cpu 7} ${top mem 7} -${offset 20} ${alignc}Procs: $processes Run: $running_processes - -${font Entopia:bold:size=21}DISKS ${hr 2}${font} -${offset 20}${font :bold}/dev/sda:${font} [${ioscheduler sda}] +${font Entopia:bold:size=18}DISKS ${hr 2}${font} +${offset 20}${font Unifont:size=16:bold}/dev/sda:${font} [${ioscheduler sda}] ${offset 30}${fs_used /}/${fs_size /} ${fs_bar 8 /} ${offset 30}${diskiograph_read /dev/sda 25,100} ${alignr}${diskiograph_read /dev/sda 25,100} ${offset 30}Read ${diskio_read /dev/sda} ${alignr}Write: ${diskio_write /dev/sda} +${offset 20}${font Unifont:size=16:bold}/dev/sdb:${font} [${ioscheduler sdb}] +${offset 30}${fs_used /home/kreyren}/${fs_size /home/kreyren} ${fs_bar 8 /home/kreyren} +${offset 30}${diskiograph_read /dev/sdb 25,100} ${alignr}${diskiograph_read /dev/sdb 25,100} +${offset 30}Read ${diskio_read /dev/sdb} ${alignr}Write: ${diskio_write /dev/sdb} ${offset 20}Swap: $swap/$swapmax $swapperc% ${swapbar 4} -]] \ No newline at end of file +]] diff --git a/img/preview.png b/img/preview.png old mode 100644 new mode 100755 diff --git a/modules/debug.lua b/modules/debug.lua old mode 100644 new mode 100755 diff --git a/old/README.md b/old/README.md old mode 100644 new mode 100755 diff --git a/old/config.lua.old b/old/config.lua.old old mode 100644 new mode 100755 diff --git a/old/conkyrc.lua.old b/old/conkyrc.lua.old old mode 100644 new mode 100755 diff --git a/old/test.lua b/old/test.lua old mode 100644 new mode 100755 diff --git a/wrappers/conky.sh b/wrappers/conky.sh index b82ee82..d11a6ec 100755 --- a/wrappers/conky.sh +++ b/wrappers/conky.sh @@ -3,31 +3,39 @@ #@ Written by Jacob Hrbek in 14/06/2021 17:39:35 UTC under the terms of GPLv3 license -conky_conkyDir="${conky_conkyDir:-"${HOME}/.config/conky"}" +if command -v ${GUIX:-guix}; then + conky_conkyDir="${conky_conkyDir:-"$HOME/.local/config/conky"}" +else + conky_conkyDir="${conky_conkyDir:-"$HOME/.config/conky"}" +fi -while [ "$#" -ge 0 ]; do case "$1" in +while [ "$#" -ne 0 ]; do case "$1" in kill) pkill ${CONKY:-"conky"} ;; - *) + start) [ -d "$conky_conkyDir/data" ] || mkdir "$conky_conkyDir/data" # NOTE(Krey): I have to do the fucking renaming, bcs pipelines! # Capture data from a speedtest - while true; do - sleep 300; speedtest --single --server 1363 --json > "$conky_conkyDir/data/speedtest.json.temp" + while true; do + # --server 1363 # Doesn't work for some reason with the CLI? + ${SPEEDTEST:-speedtest} --secure --single --json > "$conky_conkyDir/data/speedtest.json.temp" mv "$conky_conkyDir/data/speedtest.json.temp" "$conky_conkyDir/data/speedtest.json" + sleep 300 done & # Capture data from a ping while true; do # | sed '2q;d' | sed -E "s#\w+\s+bytes\s+from\s+[a-z\.-]+\s+\([0-9.]+\):\s[a-z_=]+\w\s\w+=[0-9]+\stime=([0-9]+\.[0-9])\s+ms#\1#g" - sleep 60; ping -c 1 upc.cz > "$conky_conkyDir/data/ping.log.temp" + ping -c 1 vodafone.cz > "$conky_conkyDir/data/ping.log.temp" mv "$conky_conkyDir/data/ping.log.temp" "$conky_conkyDir/data/ping.log" + sleep 60 done & ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/top_right.lua" & - ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/top_middle.lua" & + #${CONKY:-"conky"} --config="$conky_conkyDir/daemons/top_middle.lua" & ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/top_left.lua" & - ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/bottom_right.lua" + ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/bottom_middle.lua" & + # ${CONKY:-"conky"} --config="$conky_conkyDir/daemons/bottom_right.lua" & exit 0 esac; shift 1; done