(At least in Manjaro Linux) By default, after install i3, the config file is placed at:
~/.i3/config
To add some new entry to i3status (whose output is usually placed at the bottom-right of the screen):
- Create a new shell script with the following content:
#!/bin/sh
# Store me at ~/.i3/extended_status.sh
i3status | while :
do
read line
free_mem="`awk '/MemFree/ {print int($2/1024)}' /proc/meminfo`"
free_swp="`awk '/SwapFree/ {print int($2/1024)}' /proc/meminfo`"
rx_bytes=`cat /sys/class/net/wlp58s0/statistics/rx_bytes`
rx_dif="`echo $rx_bytes - $old_rx_bytes | bc`"
rx_dif=`echo $rx_dif / 1000 | bc`
tx_bytes=`cat /sys/class/net/wlp58s0/statistics/tx_bytes`
tx_dif="`echo $tx_bytes - $old_tx_bytes | bc`"
tx_dif=`echo $tx_dif / 1000 | bc`
backlight=`/usr/bin/xbacklight`
backlight=`echo $backlight / 1 | bc`%
echo "↑ $tx_dif kbps | ↓ $rx_dif kbps | $free_mem $free_swp MB | ☀ $backlight | $line"
old_rx_bytes=$rx_bytes
old_tx_bytes=$tx_bytes
done
- Modify the i3 config file such as:
bar {
#status_command i3status
status_command ~/.config/i3/extended_status.sh # ~/.i3/extended_status.sh
}
-
chmod +x ~/.config/i3/extended_status.sh
. -
Restart i3.