代码拉取完成,页面将自动刷新
#!/bin/bash
#cd ~/Wallpaper
#file=`ls -1 ~/Wallpaper | sort --random-sort | head -1`
feh --bg-fill ~/Wallpaper/desktop.jpg
# ~/.config/polybar/launch.sh &
###################################################
Max_Brightness=$(cat /sys/class/backlight/intel_backlight/max_brightness)
while true;do
#IP地址
Ip_Address=$(ip addr | grep 'scope global dynamic noprefixroute wlp3s0' | sed -r 's/.*inet\s(.*)\/.*/\1/')
#系统时间
# Time_Now=$(date +"%Y年%m月%d日 %H:%M")
Time_Now=$(date +"%b-%d %H:%M")
#用电状态
if [ $(cat /sys/class/power_supply/BAT*/status) = "Discharging" ];then
Battery_Status="🔋"
else
Battery_Status="🔌"
fi
Battery_Now=$(cat /sys/class/power_supply/BAT*/capacity)
#音量
if [ $(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)\].*/\1/') = "on" ];then
Volume_Status="🔊"
Volume_Now=$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')
else
Volume_Status="🔇"
Volume_Now="0"
fi
#屏幕亮度
Actual_Brightness=$(cat /sys/class/backlight/intel_backlight/actual_brightness)
Brightness_Now=$(bc <<< "scale=2;($Actual_Brightness/$Max_Brightness)*100" | sed -r 's/^(.*)\..*/\1/')
xsetroot -name " 🌐 ${Ip_Address} | ☀ ${Brightness_Now}% | ${Volume_Status} ${Volume_Now}% | ${Battery_Status} ${Battery_Now}% | ${Time_Now} "
sleep 30
done &
###################################################
compton -b & #渲染
numlockx& #小键盘
##################################################
fcitx &
###################################################
#需要安装字体🌐☀ 🔇🔈🔉🔊🔌🔋
#sudo pacman -S noto-fonts-emoji ttf-joypixels unicode-emoji ttf-symbola
###################################################
#sleep 2
#while true;do
# autoStartXset
# sleep 240
#done &
#while true;do
# sleep 7200
# cd ~/Wallpaper
# file=`ls -1 ~/Wallpaper | sort --random-sort | head -1`
# feh --bg-fill $file
#done &
# IpAddress=`ip addr | grep "inet" | awk '{ print $2 }' | awk "NR==3"`
# b1=80;b2=60;b3=40;b4=20
# while true;do
# enp_state=`cat /sys/class/net/enp5s0/operstate`
# wlp_state=`cat /sys/class/net/wlp9s0/operstate`
# if [ $enp_state = "up" ];then
# net_state="\ufbf1 ${IpAddress%/*}"
# elif [ $wlp_state = "up" ];then
# net_state="\ufaa8 ${IpAddress%/*}"
# else
# net_state="\ufaa9"
# fi
#
# mydate="\uf5ef $(date +"%b-%d %a %H:%M") "
# mybattery=`expr $(cat /sys/class/power_supply/BAT0/capacity)`
# if [ $mybattery -ge $b1 ];then
# mybatterycoin="\uf240"
# elif [ $mybattery -ge $b2 ];then
# mybatterycoin="\uf241"
# elif [ $mybattery -ge $b3 ];then
# mybatterycoin="\uf242"
# elif [ $mybattery -ge $b4 ];then
# mybatterycoin="\uf243"
# else
# mybatterycoin="'\uf244"
# fi
# xsetroot -name " $net_state $mybatterycoin $mybattery $mydate "
# sleep 30
# done &
# dwmblocks &
# nm-applet &
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。