Closed farhansadik closed 3 years ago
termux-notification --title 'Pop up notification' --sound --content 'this is a content'
--action "termux-toast hello "
Usage: termux-volume stream volume
Change volume of audio stream
Valid audio streams are: alarm, music, notification, ring, system, call
Call w/o arguments to show information about each audio stream
~ $ termux-volume music
Invalid argument count
Usage: termux-volume stream volume
Change volume of audio stream
Valid audio streams are: alarm, music, notification, ring, system, call
Call w/o arguments to show information about each audio stream
~ $ termux-volume music 15
~ $ termux-volume music 11
~ $ termux-volume music 12
termux-notification
song=/sdcard/MP3/test_song.mp3
termux-media-player play $song
termux-notification --id 1 --title "Music Player" --content "playing music using termux-media-player" \
--button1 'play' --button1-action "termux-media-player play; termux-toast 'playing song' " \
--button2 'pause' --button2-action "termux-media-player pause" \
--button3 'stop' --button3-action "termux-media-player stop; termux-toast 'quit' ; termux-notification-remove 1";
How a general user gonna choose his desire song for media player ?
what if we use termux-dialog
? or dialog
declare list;
list=('song1.mp3' 'song2.mp3' 'song3.mp3' 'song3.mp3' 'song3.mp3');
loc=/sdcard/MP3;
# locating file
# ls $loc/${list[2]}
# termux-dialog -t 'title'
dialog --title "list of dir " --fselect /sdcard/MP3 20 50
Pass a variable through termux-dialog
myvariable="$(termux-dialog -t "Please enter some text" | jq '.text' -r)"
# To test this has worked:
echo "$myvariable
Using Ranger Ranger uses stdout to display its interface and $() redirects stdout to a variable, because of that you don't see the interface. You need to redirect stdout to stderr to display interface:
ranger --show-only-dirs --choosedir="$TMP" 1>&2
https://gist.github.com/gsmitheidw/56541d3117e10cecc1cb9b0ebde78656 https://stackoverflow.com/questions/59692211/selecting-folder-using-ranger-file-manager-using-bash-hanging
There is now way to show file list in termux-dialog
. So we're going to let user to input the song name from /sdcard/MP3
New patch on the way! code has been tested in real device! farhansadik/echominal#35 and tested code will be deployed very soon! @squaredevops @farhansadik @batasu
Task
termux-media-player
option will be added inmain > 2 > 4 > 12
.https://wiki.termux.com/wiki/Termux-notification https://wiki.termux.com/wiki/Termux:API https://wiki.termux.com/wiki/Termux-dialog