Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
592 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/bash
  2. source ~/.config/config.env
  3. is_eth_used=$(cat /sys/class/net/$ETH_IT/carrier)
  4. is_wlan_used=$(cat /sys/class/net/$WLAN_IT/carrier)
  5. echo -n "^c#88c0d0^"
  6. if [ "$is_eth_used" -eq 1 ]; then # wired network is carrying
  7. icon=" ^d^ " #uF6FF
  8. elif [ "$is_wlan_used" -eq 1 ]; then # wireless network is carrying
  9. icon="直 ^d^ $(nmcli -t -f active,ssid dev wifi | egrep '^yes' | cut -d\' -f2 | cut -d ':' -f2)" #uF1EB
  10. else
  11. icon=" ^d^" #uf128 # no network
  12. fi
  13. echo -n $icon
  14. case $BLOCK_BUTTON in
  15. 1) ~/.local/bin/networkmanager_dmenu;;
  16. esac