mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Simple update
This commit is contained in:
parent
c4d54758ef
commit
ae9fa7059a
7 changed files with 12 additions and 28 deletions
22
bin/catfetch
22
bin/catfetch
|
|
@ -1,35 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Kernel version
|
||||
kernel=$(cat /proc/sys/kernel/osrelease|cut -d '-' -f1)
|
||||
|
||||
# Window manager name
|
||||
[ ! "$wm" ] && [ "$DISPLAY" ] && command -v xprop >/dev/null && {
|
||||
wmname="$(xprop -id $(xprop -root -notype\
|
||||
| awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t\
|
||||
| grep "WM_NAME"\
|
||||
| cut -f2 -d \")"
|
||||
| awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}') -notype -f _NET_WM_NAME 8t\
|
||||
| grep "WM_NAME"\
|
||||
| cut -f2 -d \")"
|
||||
}
|
||||
|
||||
# Shell
|
||||
shell=$(basename $SHELL)
|
||||
|
||||
# Packages
|
||||
manager=$(which apt pacman yay apk xbps-query 2>/dev/null)
|
||||
manager=$(which apt pacman yay 2>/dev/null)
|
||||
manager=${manager##*/}
|
||||
case "$manager" in
|
||||
apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
|
||||
yay) packages="$(yay -Q | wc -l)";;
|
||||
pacman) packages="$(pacman -Q | wc -l)";;
|
||||
esac
|
||||
|
||||
|
||||
# Colors ####
|
||||
esac
|
||||
bold=$(tput bold)
|
||||
reset="\e[0m"
|
||||
blue="\e[36m"
|
||||
|
||||
# Fetch ####
|
||||
echo -e " ${blue}${bold} WM ${reset}${wmname}"
|
||||
echo -e " /\_/\ ${blue}${bold} SHELL ${reset}${shell}"
|
||||
echo -e " (=^.^=) ${blue}${bold}KERNEL ${reset}${kernel}"
|
||||
|
|
|
|||
1
bin/kbhl
1
bin/kbhl
|
|
@ -3,4 +3,3 @@ case "$1" in
|
|||
"on"|"-on"|"--on"|1) xset led on ;;
|
||||
"of"|"off"|"-off"|"--off"|0) xset led off ;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue