close #971
This commit is contained in:
parent
f36f2fe539
commit
1c676c7cf2
5 changed files with 8 additions and 7 deletions
|
@ -3,4 +3,5 @@ https://notrelated.libsyn.com/rss
|
||||||
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
|
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
|
||||||
https://landchad.net/rss.xml
|
https://landchad.net/rss.xml
|
||||||
https://based.cooking/rss.xml
|
https://based.cooking/rss.xml
|
||||||
|
https://artixlinux.org/feed.php "tech"
|
||||||
https://www.archlinux.org/feeds/news/ "tech"
|
https://www.archlinux.org/feeds/news/ "tech"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
||||||
|
|
||||||
# sudo not required for some system commands
|
# 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"
|
alias $command="sudo $command"
|
||||||
done; unset command
|
done; unset command
|
||||||
|
|
||||||
|
@ -38,7 +38,6 @@ alias \
|
||||||
sdn="sudo shutdown -h now" \
|
sdn="sudo shutdown -h now" \
|
||||||
e="$EDITOR" \
|
e="$EDITOR" \
|
||||||
v="$EDITOR" \
|
v="$EDITOR" \
|
||||||
p="sudo pacman" \
|
|
||||||
xi="sudo xbps-install" \
|
xi="sudo xbps-install" \
|
||||||
xr="sudo xbps-remove -R" \
|
xr="sudo xbps-remove -R" \
|
||||||
xq="xbps-query" \
|
xq="xbps-query" \
|
||||||
|
|
|
@ -4,7 +4,7 @@ cf ${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
|
||||||
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
|
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
|
||||||
dt ${XDG_DATA_HOME:-$HOME/.local/share}
|
dt ${XDG_DATA_HOME:-$HOME/.local/share}
|
||||||
rr ${XDG_DATA_HOME:-$HOME/.local/src}
|
rr $HOME/.local/src
|
||||||
h $HOME
|
h $HOME
|
||||||
m ${XDG_MUSIC_DIR:-$HOME/Music}
|
m ${XDG_MUSIC_DIR:-$HOME/Music}
|
||||||
mn /mnt
|
mn /mnt
|
||||||
|
|
|
@ -21,16 +21,17 @@ for battery in /sys/class/power_supply/BAT?*; do
|
||||||
# If non-first battery, print a space separator.
|
# If non-first battery, print a space separator.
|
||||||
[ -n "${capacity+x}" ] && printf " "
|
[ -n "${capacity+x}" ] && printf " "
|
||||||
# Sets up the status and capacity
|
# Sets up the status and capacity
|
||||||
case "$(cat "$battery/status")" in
|
case "$(cat "$battery/status" 2>&1)" in
|
||||||
"Full") status="⚡" ;;
|
"Full") status="⚡" ;;
|
||||||
"Discharging") status="🔋" ;;
|
"Discharging") status="🔋" ;;
|
||||||
"Charging") status="🔌" ;;
|
"Charging") status="🔌" ;;
|
||||||
"Not charging") status="🛑" ;;
|
"Not charging") status="🛑" ;;
|
||||||
"Unknown") status="♻️" ;;
|
"Unknown") status="♻️" ;;
|
||||||
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
capacity=$(cat "$battery/capacity")
|
capacity="$(cat "$battery/capacity" 2>&1)"
|
||||||
# Will make a warn variable if discharging and low
|
# Will make a warn variable if discharging and low
|
||||||
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
|
[ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗"
|
||||||
# Prints the info
|
# Prints the info
|
||||||
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
|
printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn
|
||||||
done && exit 0
|
done && printf "\\n"
|
||||||
|
|
Loading…
Reference in a new issue