Skip to content

Commit f98d457

Browse files
committed
add real status
1 parent 87cdfc6 commit f98d457

13 files changed

Lines changed: 85 additions & 29 deletions

File tree

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ clean {
133133
task downloadBootstraps(){
134134
doLast {
135135
def version = 20
136-
downloadBootstrap("aarch64", "e3a36a6e58c3fd0d2e62646474cc50c072e53749b96a41760663a26da60bc046", version)
137-
downloadBootstrap("arm", "941c03d82e27090f293263157a01ccc9a15ffe940088606f6a63f4d384732c4e", version)
138-
downloadBootstrap("i686", "bc5d461aa19c7cf55533c8b41cf74f7ffe6bb792ea1869e81d0cd0533dd63104", version)
139-
downloadBootstrap("x86_64", "dbe08a067f2cc76af50cec92fc1f0bb66aaaaf939189a9c2981ff2490020e5cc", version)
136+
downloadBootstrap("aarch64", "3d635cb51750f8002011cf7b129586837314991e83daf52bfba4cfc77144407e", version)
137+
downloadBootstrap("arm", "3c44130c33b38f051077c74e9673257fb8e409e9e2c4babced06da16670ada99", version)
138+
downloadBootstrap("i686", "f8d7279ab1e3f2a2f5c2c3c8422606d69732bc09d63e181e14aaf192b1fa67fa", version)
139+
downloadBootstrap("x86_64", "5881d8aa291fdfad63115a77ee9b9318fbdad8528db36de378288bd2c0fa6083", version)
140140
}
141141
}
142142

bootstrap/bootstrap-aarch64.zip

2.47 KB
Binary file not shown.

bootstrap/bootstrap-arm.zip

2.47 KB
Binary file not shown.

bootstrap/bootstrap-i686.zip

2.47 KB
Binary file not shown.

bootstrap/bootstrap-x86_64.zip

2.47 KB
Binary file not shown.

bootstrap/changes.zip

2.47 KB
Binary file not shown.
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
bol=True
1+
#!/data/data/com.termux/files/usr/bin/sh
2+
3+
#TEL config is stored in this file.
4+
5+
STATUS_CENTER=true #center status output [true/false]
6+
STATUS_SPACING_CHAR=" " #char to create spacing if center is enabled, try =
7+
STATUS_RELOAD=1m #time to sleep before reloading status

bootstrap/changes/tel/.tel/helpers.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#!/bin/bash
1+
#!/data/data/com.termux/files/usr/bin/sh
2+
3+
#TEL helper functions
24

35
# Function "center_text": center the text with a surrounding border
46

57
# first argument: text to center
68
# second argument: glyph which forms the border
79
# third argument: width of the padding
8-
910
center_text()
1011
{
1112

@@ -50,3 +51,4 @@ center_text()
5051
# displays the text in the center of the screen, surrounded by borders.
5152
printf "${left_border}${spacing}${text}${spacing}${right_border}\n"
5253
}
54+
Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
1-
#! /bin/bash
1+
#!/data/data/com.termux/files/usr/bin/sh
22

3+
#TEL status script, gets executed by byobu in the top panel
4+
#prints the output of all scripts stored in ~/.tel/status_scripts/active, sorted by their filenames
5+
#todo: add color options
6+
. ~/.tel/config.sh #load config
7+
. ~/.tel/helpers.sh #load helper functions
8+
SCRIPT_DIR=~/.tel/status_scripts/active/* #define script dir
39

4-
. ~/.tel/config.sh
5-
. ~/.tel/helpers.sh
6-
while [ true ]
10+
while [ true ] #run forever
711
do
8-
center_text " 3.1 / 7.33 GB (42.02%%)" " "
9-
center_text " 34.2 / 109.34 GB (31.27%%)" " "
10-
center_text " 192.168.0.420" " "
11-
sleep 10m
12-
clear
12+
13+
for script in $SCRIPT_DIR #iterate over all scripts in script dir
14+
do
15+
if [ $STATUS_CENTER = true ];
16+
then
17+
center_text "$(. $script)" "${STATUS_SPACING_CHAR}" #print the text centered if enabled in the config, use the given spacing char
18+
else
19+
echo "$(. $script)" #print the text on the left
20+
fi
21+
#todo: add setting for printing on the right
22+
done
23+
sleep $STATUS_RELOAD #sleep for the configured time
24+
clear #clear the screen before reloading
1325
done
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/data/data/com.termux/files/usr/bin/sh
2+
pretext="" #text before the time string
3+
posttext="" #text after the time string
4+
time=$(date '+%H:%M')
5+
6+
printf "%s %s %s" "${pretext}" "${time}" "${posttext}"

0 commit comments

Comments
 (0)