move script folders to a correct place, some vim config changes, etc...
This commit is contained in:
parent
c360fc2339
commit
ffe452fe24
28 changed files with 380 additions and 360 deletions
18
.local/bin/statusbar/sb-battery
Executable file
18
.local/bin/statusbar/sb-battery
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
BATTERY_PATH="/sys/class/power_supply/BAT0"
|
||||
status="$(cat ${BATTERY_PATH}/status)"
|
||||
|
||||
case "${status}" in
|
||||
"Full") status_string="⚡" ;;
|
||||
"Discharging") status_string="🔋" ;;
|
||||
"Charging") status_string="🔌" ;;
|
||||
"Not charging") status_string="🛑" ;;
|
||||
"Unknown") status_string="♻️" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
capacity="$(cat ${BATTERY_PATH}/capacity)"
|
||||
[ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && status_string="❗"
|
||||
|
||||
echo "${status_string} ${capacity}%"
|
||||
7
.local/bin/statusbar/sb-cast
Executable file
7
.local/bin/statusbar/sb-cast
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
PIDFILE="${XDG_RUNTIME_DIR}/mkchromecast.pid"
|
||||
|
||||
if [ -f "${PIDFILE}" ]; then
|
||||
printf "🔴 Casting"
|
||||
fi
|
||||
7
.local/bin/statusbar/sb-vpn
Executable file
7
.local/bin/statusbar/sb-vpn
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
IFNAME="$(ip link show | grep 'wg_' | cut -d ' ' -f 2 | sed 's/://' | sed 's/wg_//' | tr '[:lower:]' '[:upper:]' | sed 's/_D/ (dpi)/')"
|
||||
|
||||
if [ ! -z "${IFNAME}" ]; then
|
||||
echo "🛡️ ${IFNAME}"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue