This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- .conkyrc | |
-- Created on: Fri, 09 Oct 2021 | |
-- ____ __ ____ __ | |
-- ( _ \ /. |( _ \/ ) | |
-- )___/(_ _))___/ )( | |
-- (__) (_)(__) (__) | |
-- | |
-- Description | |
-- Config for conky | |
-- | |
conky.config = { | |
alignment = 'top_right', | |
background = false, | |
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 = 'Hack Nerd Font Mono:size=12', | |
gap_x = 60, | |
gap_y = 60, | |
minimum_height = 5, | |
minimum_width = 5, | |
maximum_width = 500, | |
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 = 'override', | |
own_window_transparent = true, | |
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 = [[ | |
${color grey}System:$color $sysname $nodename $kernel $machine | |
$hr | |
${color grey}Uptime:$color $uptime | |
${color grey}Frequency (in MHz):$color $freq | |
${color grey}Frequency (in GHz):$color $freq_g | |
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4} | |
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4} | |
${color grey}CPU Usage:$color $cpu% ${cpubar 4} | |
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes | |
$hr | |
${color grey}File systems: | |
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /} | |
$hr | |
${color grey}Name PID CPU% MEM% | |
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} | |
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} | |
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} | |
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} | |
$hr | |
${color grey}Website: | |
${color lightgrey} leosmith.xyz: ${execp curl "https://leosmith.xyz" &> /dev/null && echo '${color green}up' || echo '${color red}down'} | |
${color lightgrey} xss_bomb: ${execp curl "https://leosmith.xyz:8000" &> /dev/null && echo '${color green}up' || echo '${color red}down'} | |
${color lightgrey} admin panel: ${execp curl "http://localhost:8081" &> /dev/null && echo '${color green}up' || echo '${color red}down'} | |
${color grey}$hr | |
Open ports: $color ${execp netstat -tln | tail -n +3 | awk '{print $4}' | grep -v "::" | cut -d':' -f2 | tr '\n' ' '} | |
${color grey}Network Monitor:$color | |
${execp tac /tmp/monitor.log | head -n 5 | awk -f $HOME/.dwm/tshark.awk} | |
]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# monitor.sh | |
# Created on: Sat 09 Oct 2021 12:24:00 AM BST | |
# | |
# ____ __ ____ __ | |
# ( _ \ /. |( _ \/ ) | |
# )___/(_ _))___/ )( | |
# (__) (_)(__) (__) | |
# | |
# Description: | |
while [ 1 ]; do | |
tshark -i wlp59s0 -Y "${TSHARK_FILTER}" -a duration:0.5 >> /tmp/monitor.log | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tshark.awk | |
# Created on: Fri, 08 Oct 2021 | |
# ____ __ ____ __ | |
# ( _ \ /. |( _ \/ ) | |
# )___/(_ _))___/ )( | |
# (__) (_)(__) (__) | |
# | |
# Description | |
# Color config for tshark output on conky | |
{ | |
if ($6 == "ARP") print strftime(" [%H:%M]") " ${color red}" $6 "${color}: " $3 " " $4 " " $5; | |
else if ($6 == "ICMP") print strftime(" [%H:%M]") " ${color green}" $6 "${color}: " $3 " " $4 " " $5; | |
else if ($6 == "ICMPv6") print strftime(" [%H:%M]") " ${color green}" $6 "${color}: " $3 " " $4 " " $5; | |
else if ($6 == "EAPOL") print strftime(" [%H:%M]") " ${color}" $6 "${color}: " $3 " " $4 " " $5; | |
else print strftime(" [%H:%M]") " ${color cyan}" $6 "${color}: " $3 ":" $8 " " $4 " " $5 ":" $10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment