my dwmblocks setup

This commit is contained in:
2022-11-09 20:00:41 +01:00
parent a933ce0d61
commit 1528bb5fc9
6 changed files with 70 additions and 4 deletions

11
dwmblocks_scripts/dwm_ipaddr Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
eth="$(ip -4 addr show enp8s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
wlp="$(ip -4 addr show wlp7s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
if [[ $(echo $eth | wc -c) -gt 1 ]]
then
echo "$eth"
exit;
fi
echo "$wlp"