Skip to content

Commit 4056417

Browse files
committed
move station info display and update layout in info function
1 parent 592af81 commit 4056417

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

shelldio.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,22 @@ info() {
238238
welcome_screen
239239
tput civis # Εξαφάνιση cursor
240240

241+
# Display initial station info
242+
echo ""
243+
echo -ne " Ακούτε: $stathmos_name\n"
244+
echo ""
245+
241246
last_title=""
242247
last_time=""
243248

244249
while kill -0 "$mpv_pid" 2>/dev/null; do
245250
current_title=$(get_current_title)
246251
current_time=$(date +"%T")
247252

248-
# Update title only when it changes
253+
# Update title only when it changes
249254
if [[ "$current_title" != "$last_title" ]]; then
250-
tput cup 6 0 # Move to title line
251-
tput el # Clear line
255+
tput cup 21 0 # Move to title line (after welcome screen)
256+
tput el # Clear line
252257
if [[ -n "$current_title" && "$current_title" != "null" && "$current_title" != "radio" ]]; then
253258
echo -ne " Τίτλος: $current_title"
254259
else
@@ -257,20 +262,20 @@ info() {
257262
last_title="$current_title"
258263
fi
259264

260-
# Update time display
265+
# Update time display at the bottom
261266
if [[ "$current_time" != "$last_time" ]]; then
262-
tput cup 1 0 # Move to time line
263-
tput el # Clear line
267+
tput cup 23 0 # Move to time line (bottom area)
268+
tput el # Clear line
264269
echo -ne " Σταθμός: [$selected_play] Η ώρα είναι $current_time"
265270
last_time="$current_time"
266271
fi
267272

268-
# Move cursor back to menu
269-
tput cup 8 0
273+
# Move cursor to menu at the bottom
274+
tput cup 24 0
270275
echo -ne " ____________ ___________"
271-
tput cup 9 0
276+
tput cup 25 0
272277
echo -ne " [Έξοδος (Q/q)].___________.[Πίσω (R/r)]"
273-
tput cup 10 0
278+
tput cup 26 0
274279
echo -ne " "
275280

276281
# Check for user input

0 commit comments

Comments
 (0)