From 1c676c7cf2efe877260132888a88a2b918855785 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 25 Aug 2021 08:02:39 -0400 Subject: [PATCH] close #971 --- .config/lf/lfrc | 2 +- .config/newsboat/urls | 1 + .config/shell/aliasrc | 3 +-- .config/shell/bm-dirs | 2 +- .local/bin/statusbar/sb-battery | 7 ++++--- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 57a80ca..92567e6 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -104,4 +104,4 @@ map up map V push :!nvim # Source Bookmarks -source "~/.config/lf/shortcutrc" \ No newline at end of file +source "~/.config/lf/shortcutrc" diff --git a/.config/newsboat/urls b/.config/newsboat/urls index d675d97..1da0702 100644 --- a/.config/newsboat/urls +++ b/.config/newsboat/urls @@ -3,4 +3,5 @@ https://notrelated.libsyn.com/rss https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)" https://landchad.net/rss.xml https://based.cooking/rss.xml +https://artixlinux.org/feed.php "tech" https://www.archlinux.org/feeds/news/ "tech" diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 5122d08..235fc04 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -7,7 +7,7 @@ [ -f "$XINITRC" ] && alias startx="startx $XINITRC" # sudo not required for some system commands -for command in mount umount sv pacman updatedb su ; do +for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do alias $command="sudo $command" done; unset command @@ -38,7 +38,6 @@ alias \ sdn="sudo shutdown -h now" \ e="$EDITOR" \ v="$EDITOR" \ - p="sudo pacman" \ xi="sudo xbps-install" \ xr="sudo xbps-remove -R" \ xq="xbps-query" \ diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs index b204215..9d212ec 100644 --- a/.config/shell/bm-dirs +++ b/.config/shell/bm-dirs @@ -4,7 +4,7 @@ cf ${XDG_CONFIG_HOME:-$HOME/.config} D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} d ${XDG_DOCUMENTS_DIR:-$HOME/Documents} dt ${XDG_DATA_HOME:-$HOME/.local/share} -rr ${XDG_DATA_HOME:-$HOME/.local/src} +rr $HOME/.local/src h $HOME m ${XDG_MUSIC_DIR:-$HOME/Music} mn /mnt diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery index 382b31b..93cbe08 100755 --- a/.local/bin/statusbar/sb-battery +++ b/.local/bin/statusbar/sb-battery @@ -21,16 +21,17 @@ for battery in /sys/class/power_supply/BAT?*; do # If non-first battery, print a space separator. [ -n "${capacity+x}" ] && printf " " # Sets up the status and capacity - case "$(cat "$battery/status")" in + case "$(cat "$battery/status" 2>&1)" in "Full") status="⚡" ;; "Discharging") status="🔋" ;; "Charging") status="🔌" ;; "Not charging") status="🛑" ;; "Unknown") status="♻️" ;; + *) exit 1 ;; esac - capacity=$(cat "$battery/capacity") + capacity="$(cat "$battery/capacity" 2>&1)" # Will make a warn variable if discharging and low [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗" # Prints the info printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn -done && exit 0 +done && printf "\\n"