Last active
July 20, 2019 10:04
-
-
Save benny-sun/d2df2e5c97a3b9b4a02adb660d170cb5 to your computer and use it in GitHub Desktop.
擴充網路卡監聽狀態,例如本來使用wifi,改連有線網路後,自動切換對應流量及IP
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
# ********************************************************************** | |
# "CPU Panel (8-core)" theme for Conky by Tony George (teejee2008@gmail.com) | |
# | |
# Webpage: http://teejeetech.blogspot.in/ | |
# ********************************************************************** | |
background yes | |
double_buffer yes | |
alignment bottom_right | |
border_width 1 | |
cpu_avg_samples 2 | |
default_color white | |
default_outline_color white | |
default_shade_color white | |
draw_borders no | |
draw_graph_borders yes | |
draw_outline no | |
draw_shades no | |
gap_x 100 | |
gap_y 30 | |
net_avg_samples 2 | |
no_buffers yes | |
out_to_console no | |
out_to_stderr no | |
extra_newline no | |
own_window yes | |
own_window_type normal | |
own_window_transparent yes | |
own_window_colour 000000 | |
own_window_argb_visual yes | |
own_window_argb_value 0 | |
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager | |
minimum_size 170 0 | |
stippled_borders 0 | |
update_interval 2.0 | |
uppercase no | |
use_spacer none | |
show_graph_scale no | |
show_graph_range no | |
use_xft yes | |
xftalpha 0.1 | |
xftfont Droid Sans:size=10 | |
color0 white | |
color1 EAEAEA | |
color2 FFA300 | |
color3 grey | |
TEXT | |
${if_match "${execi 10 nmcli dev status | head -2 | tail -1 | cut -d ' ' -f1}" == "enp0s31f6"} | |
${color2}Download ${color0}${alignr}${downspeedf enp0s31f6} KiB/s | |
${downspeedgraph enp0s31f6 100,} | |
${color2}Upload ${color0}${alignr}${upspeedf enp0s31f6} KiB/s | |
${upspeedgraph enp0s31f6 100,} | |
${color2}Local-eth${color0}${alignr}${exec hostname -I | cut -d ' ' -f1} | |
${color2}Local-wifi${color0}${alignr}${exec hostname -I | cut -d ' ' -f2} | |
${color2}Public${color0}${alignr}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1} | |
${else} | |
${if_match "${execi 10 nmcli dev status | head -2 | tail -1 | cut -d ' ' -f1}" == "wlp4s0"} | |
${color2}Download ${color0}${alignr}${downspeedf wlp4s0} KiB/s | |
${downspeedgraph wlp4s0 100,} | |
${color2}Upload ${color0}${alignr}${upspeedf wlp4s0} KiB/s | |
${upspeedgraph wlp4s0 100,} | |
${color2}Local${color0}${alignr}${exec hostname -I} | |
${color2}Public${color0}${alignr}${execi 3600 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1} | |
${else} | |
${endif} | |
${endif} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ethernet (有線網路下)
Ethernet (無線網路下)