Great Renaming, i3blocks officially changed
This commit is contained in:
parent
eb7ad7220a
commit
865cfdb029
18 changed files with 51 additions and 55 deletions
|
@ -60,7 +60,7 @@ exec --no-startup-id remaps
|
||||||
# Unclutter makes the mouse invisible after a brief period
|
# Unclutter makes the mouse invisible after a brief period
|
||||||
exec --no-startup-id unclutter
|
exec --no-startup-id unclutter
|
||||||
# Run the script to update the mpd i3block on change.
|
# Run the script to update the mpd i3block on change.
|
||||||
exec_always --no-startup-id i3mpdupdate
|
exec_always --no-startup-id mpdupdate
|
||||||
# mpd startup
|
# mpd startup
|
||||||
exec --no-startup-id mpd
|
exec --no-startup-id mpd
|
||||||
# Podboat automatic queue and download
|
# Podboat automatic queue and download
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
command=/usr/lib/i3blocks/$BLOCK_NAME
|
command=~/.scripts/statusbar/$BLOCK_NAME
|
||||||
separator_block_width=15
|
separator_block_width=15
|
||||||
markup=pango
|
markup=pango
|
||||||
|
|
||||||
|
@ -7,79 +7,63 @@ command=cat ~/.recordingicon
|
||||||
interval=once
|
interval=once
|
||||||
signal=9
|
signal=9
|
||||||
|
|
||||||
[mpd]
|
[music]
|
||||||
label=🎼
|
label=🎼
|
||||||
command=i3mpd
|
|
||||||
interval=once
|
interval=once
|
||||||
signal=11
|
signal=11
|
||||||
|
|
||||||
[news]
|
[news]
|
||||||
label=📰
|
label=📰
|
||||||
command=i3news
|
|
||||||
interval=once
|
interval=once
|
||||||
signal=6
|
signal=6
|
||||||
|
|
||||||
[pacman]
|
[pacpackages]
|
||||||
label=📦
|
label=📦
|
||||||
command=i3pacman
|
|
||||||
interval=once
|
interval=once
|
||||||
signal=8
|
signal=8
|
||||||
|
|
||||||
[torrents]
|
[torrent]
|
||||||
command=i3torrent
|
|
||||||
interval=20
|
interval=20
|
||||||
signal=7
|
signal=7
|
||||||
|
|
||||||
[weather]
|
[weather]
|
||||||
command=i3weather
|
|
||||||
interval=3600
|
interval=3600
|
||||||
|
|
||||||
[mail]
|
[mailbox]
|
||||||
label=📬
|
label=📬
|
||||||
command=i3mail
|
|
||||||
interval=180
|
interval=180
|
||||||
signal=12
|
signal=12
|
||||||
|
|
||||||
#[memory]
|
#[memory]
|
||||||
#command=i3mem
|
|
||||||
#interval=30
|
#interval=30
|
||||||
#label=🧠
|
#label=🧠
|
||||||
|
|
||||||
#[cpu]
|
#[cpu]
|
||||||
#command=i3cpu
|
|
||||||
#interval=15
|
#interval=15
|
||||||
#label=💻
|
#label=💻
|
||||||
|
|
||||||
[volume]
|
[volume]
|
||||||
interval=once
|
interval=once
|
||||||
command=i3volume
|
|
||||||
signal=10
|
signal=10
|
||||||
|
|
||||||
#[diskspace]
|
#[disk]
|
||||||
#interval=60
|
#interval=60
|
||||||
#command=i3disk /
|
#command=disk /
|
||||||
|
|
||||||
#[diskspace]
|
#[disk]
|
||||||
#interval=60
|
#interval=60
|
||||||
#command=i3disk /home 🏠
|
#command=disk /home 🏠
|
||||||
|
|
||||||
[battery]
|
[battery]
|
||||||
command=i3battery BAT1
|
command=battery BAT0
|
||||||
interval=5
|
interval=5
|
||||||
|
|
||||||
[battery]
|
[clock]
|
||||||
command=i3battery BAT0
|
|
||||||
interval=5
|
|
||||||
|
|
||||||
[time]
|
|
||||||
label=📅
|
label=📅
|
||||||
command=i3date
|
|
||||||
interval=30
|
interval=30
|
||||||
|
|
||||||
[internet]
|
[internet]
|
||||||
command=i3internet
|
|
||||||
interval=10
|
interval=10
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
command=i3help
|
|
||||||
interval=once
|
interval=once
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Give a battery name (e.g. BAT0) as an argument.
|
# Give a battery name (e.g. BAT0) as an argument.
|
||||||
|
|
||||||
|
# get xresources colors
|
||||||
|
for x in "$(xrdb -query | sed "s/.*\./export /g;s/:\s*/=\"/g;s/$/\"/g")"; do eval "$x"; done
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
3) pgrep -x dunst >/dev/null && notify-send "<b>🔋 Battery module:</b>
|
3) pgrep -x dunst >/dev/null && notify-send "<b>🔋 Battery module:</b>
|
||||||
🔋: discharging
|
🔋: discharging
|
||||||
|
@ -14,21 +17,19 @@ esac
|
||||||
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
|
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
|
||||||
status=$(cat /sys/class/power_supply/"$1"/status)
|
status=$(cat /sys/class/power_supply/"$1"/status)
|
||||||
|
|
||||||
if [ "$capacity" -ge 80 ]; then
|
if [ "$capacity" -ge 75 ]; then
|
||||||
color="#b8bb26"
|
color="$color10"
|
||||||
elif [ "$capacity" -ge 60 ]; then
|
elif [ "$capacity" -ge 50 ]; then
|
||||||
color="#ebdbb2"
|
color="$color15"
|
||||||
elif [ "$capacity" -ge 40 ]; then
|
elif [ "$capacity" -ge 25 ]; then
|
||||||
color="#fabd2f"
|
color="$color11"
|
||||||
elif [ "$capacity" -ge 20 ]; then
|
|
||||||
color="#fe8019"
|
|
||||||
else
|
else
|
||||||
color="#fb4934"
|
color="$color9"
|
||||||
warn="❗"
|
warn="❗"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z $warn ] && warn=" "
|
[ -z $warn ] && warn=" "
|
||||||
|
|
||||||
[ "$status" = "Charging" ] && color="#FFF"
|
[ "$status" = "Charging" ] && color="$color15"
|
||||||
|
|
||||||
printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
|
printf "<span color='%s'>%s%s%s</span>" "$color" "$(echo "$status" | sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Unknown/♻️/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')"
|
|
@ -9,4 +9,4 @@ $(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;;
|
||||||
- % is of single core." ;;
|
- % is of single core." ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
sensors | awk '/^temp1/ {print $2}'
|
sensors | awk '/Core 0/ {print $3}'
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
[ "$(pgrep -x i3mpdupdate | wc -l)" -gt 2 ] && exit
|
|
||||||
|
|
||||||
while : ; do
|
|
||||||
pgrep -x mpd || exit
|
|
||||||
mpc idle > /dev/null
|
|
||||||
pkill -RTMIN+11 i3blocks ;
|
|
||||||
done
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) $TERMINAL -e transmission-remote-cli
|
|
||||||
esac
|
|
||||||
|
|
||||||
transmission-remote -l | grep % | sed -e "s/.*100%.*/Z/g;s/.*Idle.*/A/g;s/.*%.*/M/g" | sort -h | uniq -c | sed -e "s/Z/🌱/g;s/M/⬇️/g;s/A/⌛️/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1) setsid "$TERMINAL" -e newsboat ;;
|
1) setsid "$TERMINAL" -e newsboat ;;
|
||||||
2) setsid newsup >/dev/null ;;
|
2) setsid newsup >/dev/null & exit ;;
|
||||||
3) pgrep -x dunst >/dev/null && notify-send "<b>📰 News module:</b>
|
3) pgrep -x dunst >/dev/null && notify-send "<b>📰 News module:</b>
|
||||||
- Shows unread news items
|
- Shows unread news items
|
||||||
- Shows 🔃 if updating with \`newsup\`
|
- Shows 🔃 if updating with \`newsup\`
|
26
.scripts/statusbar/torrent
Executable file
26
.scripts/statusbar/torrent
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
transmission-remote -l | grep % |
|
||||||
|
sed " # This first sed command is to ensure a desirable order with sort
|
||||||
|
s/.*Stopped.*/A/g;
|
||||||
|
s/.*Seeding.*/Z/g;
|
||||||
|
s/.*100%.*/N/g;
|
||||||
|
s/.*Idle.*/B/g;
|
||||||
|
s/.*%.*/M/g" |
|
||||||
|
sort -h | uniq -c | sed " # Now we replace the standin letters with icons.
|
||||||
|
s/A/🛑/g;
|
||||||
|
s/B/⌛️/g;
|
||||||
|
s/M/🔽/g;
|
||||||
|
s/N/✅/g;
|
||||||
|
s/Z/🌱/g" | awk '{print $2, $1}' | tr '\n' ' ' | sed -e "s/ $//g"
|
||||||
|
|
||||||
|
case $BLOCK_BUTTON in
|
||||||
|
1) $TERMINAL -e transmission-remote-cli ;;
|
||||||
|
3) pgrep -x dunst >/dev/null && notify-send "<b>Torrent module:</b>
|
||||||
|
🛑: paused
|
||||||
|
⏳: waiting
|
||||||
|
🔽: downloading
|
||||||
|
✅: done
|
||||||
|
🌱: done and seeding" ;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in a new issue