#!/bin/sh # This script displays battery icon according to the charge level and charging state # Author: Piotr Miller # e-mail: nwg.piotr@gmail.com # Website: http://nwg.pl # Project: https://github.com/nwg-piotr/tint2-executors # Icon by @edskeye # Dependencies: `wireless_tools` # Arguments: [-N] ("Wi-Fi: " instead of icon) | [-M'custom name'] IWGETID="sudo /sbin/iwgetid" NAME="none" wifi=$($IWGETID | awk -F '"' '{ print $2 }') if [[ ! -z "$wifi" ]]; then NAME="$wifi" fi if [[ $1 == -N* ]]; then echo "Wi-Fi: $NAME" elif [[ $1 == -M* ]]; then echo "$(echo $1 | cut -c3-) $NAME" else echo /usr/share/icons/MB-Mango-Suru-GLOW/devices/16/network-wireless.svg echo " ${NAME}" fi