From c7912aa7dcd42d560337c8ec77634301b1da8a48 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 7 May 2023 16:26:39 +0200 Subject: [PATCH] Fix icons / yaml loader Signed-off-by: Knut Ahlers --- bin/tmux-battery | 16 ++++++++-------- bin/tmux-vpn | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/tmux-battery b/bin/tmux-battery index 2afa92f..1865b62 100755 --- a/bin/tmux-battery +++ b/bin/tmux-battery @@ -1,27 +1,27 @@ #!/bin/bash set -euo pipefail -SYM_ADAPTER="$(printf '\ufba3')" -SYM_BATTERY="$(printf '\uf58d')" +SYM_ADAPTER="$(printf '\U000f06a5')" # nf-md-power_plug +SYM_BATTERY="$(printf '\U000f008e')" # nf-md-battery_outline BATTERY=/sys/class/power_supply/BAT0 AC=/sys/class/power_supply/AC [ -e ${BATTERY} ] || { - echo "No battery" >&2 - exit 0 + echo "No battery" >&2 + exit 0 } [ -e ${AC} ] || { - echo "No ac" >&2 - exit 0 + echo "No ac" >&2 + exit 0 } CAPACITY=$(cat ${BATTERY}/capacity) AC_CONNECT=$(cat ${AC}/online) if [ ${AC_CONNECT} -eq 0 ]; then - SYM=${SYM_BATTERY} + SYM=${SYM_BATTERY} else - SYM=${SYM_ADAPTER} + SYM=${SYM_ADAPTER} fi echo "${SYM} ${CAPACITY}%" diff --git a/bin/tmux-vpn b/bin/tmux-vpn index 6393eeb..0482ef6 100755 --- a/bin/tmux-vpn +++ b/bin/tmux-vpn @@ -17,7 +17,7 @@ def check_ping_reachable(ip): def main(): - config = yaml.load(open(Path('~/.config/i3-vpn.json').expanduser())) + config = yaml.safe_load(open(Path('~/.config/i3-vpn.json').expanduser())) results = [] for check in config['checks']: