ENH make network choose default interface
This commit is contained in:
parent
860f54b7ca
commit
8bb8671cc0
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
iface="$1"
|
||||
cmd="$2"
|
||||
cmd="$1"
|
||||
iface="$(ip route show default | head -n 1 | awk '{print $5}')"
|
||||
|
||||
net_format="%3d"
|
||||
|
||||
|
|
|
@ -125,21 +125,8 @@ set -g status-right ""
|
|||
set -g status-right-length 0
|
||||
{{- else }}
|
||||
|
||||
# TODO this is super annoying
|
||||
{{- if eq .chezmoi.hostname "portnoy4prez" }}
|
||||
iface="enp0s31f6"
|
||||
{{- else if eq .chezmoi.hostname "mangini4mayor" }}
|
||||
iface="enp3s0"
|
||||
{{- else if eq .chezmoi.hostname "harrison4hegemon" }}
|
||||
iface="eth0"
|
||||
{{- else if eq .chezmoi.hostname "peart4prez" }}
|
||||
iface="ens3"
|
||||
{{- else if eq .chezmoi.hostname "myung4mayor" }}
|
||||
iface="extern1"
|
||||
{{- end }}
|
||||
|
||||
down="#($XDG_CONFIG_HOME/tmux/plugins/network $iface down)"
|
||||
up="#($XDG_CONFIG_HOME/tmux/plugins/network $iface up)"
|
||||
down="#($XDG_CONFIG_HOME/tmux/plugins/network down)"
|
||||
up="#($XDG_CONFIG_HOME/tmux/plugins/network up)"
|
||||
net="NET(↑/↓): $up$down"
|
||||
cpu="CPU: #($XDG_CONFIG_HOME/tmux/plugins/cpu_perc)"
|
||||
mem="RAM: #($XDG_CONFIG_HOME/tmux/plugins/mem_perc)"
|
||||
|
|
Loading…
Reference in New Issue