move project to ~/.config/i3blocks/
This commit is contained in:
parent
6eb3d12207
commit
8f9ea8138b
16
README.md
16
README.md
@ -1,3 +1,17 @@
|
||||
# simple-i3blocks
|
||||
|
||||
Simple i3blocks scripts for ram, time and date, storage usage and more to be coded...
|
||||
Simple i3blocks scripts for ram, time and date, storage usage and more to be coded...
|
||||
|
||||
# TODO
|
||||
- [x] date and time
|
||||
- [x] ram
|
||||
- [x] storage
|
||||
- [x] ip
|
||||
- [ ] fix ip not showing sometimes
|
||||
- [ ] swap
|
||||
- [ ] audio
|
||||
- [ ] battery
|
||||
- [ ] cpu
|
||||
- [ ] wifi/ethernet/bluetooth
|
||||
- [ ] external storage mount
|
||||
- [ ] ethernet bandwith
|
||||
|
5
audio
Executable file
5
audio
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
sl=$(amixer get Master | tail -n 1)
|
||||
status=$(echo "${sl}" | grep -wo "on")
|
||||
volume=$(echo "${sl}" | awk -F ' ' '{print $5}' | tr -d '[]%')
|
||||
echo ${volume}
|
12
config
Normal file
12
config
Normal file
@ -0,0 +1,12 @@
|
||||
# general settings
|
||||
markup=none
|
||||
separator_block_width=15
|
||||
separator=false
|
||||
command=$HOME/.config/i3blocks/$BLOCK_NAME
|
||||
interval=5
|
||||
|
||||
[ram]
|
||||
[storage]
|
||||
[ip]
|
||||
interval=once
|
||||
[datetime]
|
5
datetime
Executable file
5
datetime
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
full=$(date '+%A, %_d.%_m. %_H:%M:%S')
|
||||
short=$(date '+%_H:%M')
|
||||
echo $full
|
||||
echo $short
|
5
ip
Executable file
5
ip
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
ip=$(curl ifconfig.me/ip)
|
||||
echo $ip
|
||||
echo ""
|
||||
echo "#04B431"
|
14
ram
Executable file
14
ram
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
gawk '
|
||||
/^MemFree:/ {
|
||||
mfg=$2/1024^2
|
||||
mfm=$2/1024
|
||||
} END {
|
||||
if (mfg > 2) { printf("%.1f GB", mfg) }
|
||||
else { printf( "%.0f MB", mfm ) }
|
||||
print("\n")
|
||||
if (mfg > 4) { print("#04B431\n") }
|
||||
else if (mfg > 2) { print("#FFA500\n") }
|
||||
else { print("#FF0000\n") }
|
||||
}' /proc/meminfo
|
||||
|
16
storage
Executable file
16
storage
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
df | gawk '
|
||||
/\/$/ {
|
||||
sfg=$4/1024^2
|
||||
sfm=$4/1024
|
||||
}
|
||||
END {
|
||||
if (sfg > 5) { printf("%.1f GB", sfg) }
|
||||
else { printf( "%.0f MB", sfm ) }
|
||||
print("\n")
|
||||
if (sfg > 15) { print("#04B431\n") }
|
||||
else if (sfg > 5) { print("#FFA500\n") }
|
||||
else if (sfg > 1) { print("#FF0000\n") }
|
||||
else { exit 33 }
|
||||
}'
|
||||
|
Reference in New Issue
Block a user