reupload
This commit is contained in:
14
arch-user/bin/i3blocks/battery.sh
Executable file
14
arch-user/bin/i3blocks/battery.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
read -r stat </sys/class/power_supply/ACAD/online
|
||||
read -r cap </sys/class/power_supply/BAT1/capacity
|
||||
read -r volt </sys/class/power_supply/BAT1/voltage_now
|
||||
read -r curr </sys/class/power_supply/BAT1/current_now
|
||||
|
||||
w=$((volt*curr/1000000000000))
|
||||
if [ "$stat" = "1" ]; then
|
||||
echo "🔌 $cap% ${w}W"
|
||||
else
|
||||
echo "🔋 $cap% ${w}W"
|
||||
[ "$cap" -lt "15" ] && exit 33
|
||||
fi
|
||||
23
arch-user/bin/i3blocks/volume.sh
Executable file
23
arch-user/bin/i3blocks/volume.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
sink_mute=$(pactl get-sink-mute @DEFAULT_SINK@)
|
||||
case "$sink_mute" in
|
||||
*yes*) sink_res=M;;
|
||||
*) sink_res=$(pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's/.*\s\([0-9]*\)%.*/\1/;t;d');;
|
||||
esac
|
||||
|
||||
source_mute=$(pactl get-source-mute @DEFAULT_SOURCE@)
|
||||
case "$source_mute" in
|
||||
*yes*) source_res=M;;
|
||||
*) source_res=$(pactl get-source-volume @DEFAULT_SOURCE@ | sed -e 's/.*\s\([0-9]*\)%.*/\1/;t;d');;
|
||||
esac
|
||||
|
||||
bt_status="$(bluetoothctl devices Connected)"
|
||||
if [ -n "$bt_status" ]; then
|
||||
sink_icon=🎧
|
||||
else
|
||||
sink_icon=🔈
|
||||
fi
|
||||
|
||||
echo "$sink_icon $sink_res% 🎙 $source_res%"
|
||||
|
||||
3
arch-user/bin/i3blocks/weather.sh
Executable file
3
arch-user/bin/i3blocks/weather.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
curl "https://wttr.in/?format=%l;%t%20%p" --silent | sed 's/^\(.\{3\}\)\(.*\);/\1 /'
|
||||
echo
|
||||
2
arch-user/bin/i3blocks/xkb_layout.sh
Executable file
2
arch-user/bin/i3blocks/xkb_layout.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
swaymsg -t get_inputs | jq -r 'map(select(has("xkb_active_layout_name")))[0].xkb_active_layout_name'
|
||||
Reference in New Issue
Block a user