Bash Welcome Tweaking
-
Hi!
I've been looking around and have not found much information on tweaking the Bash Welcome message.
I've found that I can tweak the screen a little bit if I change the information in
/RetroPie-Setup/scriptmodules/supplementary/bashwelcometweak.sh
AND
/.bashrcI've succesfully made changes to these files... but the area I was trying to change, only created blank spaces and did not output the desired information.
What I'm trying to do is edit the Welcome Screen to look something like this (note the added 2 lines about /dev/sda1 and /dev/sda2:
.***. Monday, 5 September 2016, 06:01:38 PM ***** Linux 4.4.13-v7+ armv7l GNU/Linux `***' |*| Filesystem Size Used Avail Use% Mounted on |*| /dev/root 30G 5.0G 24G 18% / ..|*|.. /dev/sda1 1.8T 481G 1.3T 27% /mnt/ROMS .*** * ***. /dev/sda2 3.9G 2.1G 1.6G 56% /mnt/SWAP *******@@** Uptime.............: 0 days, 18h04m55s `*****@@**' Memory.............: 40508kB (Free) / 752872kB (Total) `*******' Running Processes..: 141 `"""' IP Address.........: 192.168.1.104 Temperature........: CPU: 69°C/156°F GPU: 69°C/156°F The RetroPie Project, https://retropie.org.uk
As I said, I got the display to place blank spaces where this information should be... and I think I've figured out how to get the information... I just don't know how to actually display the information.
To get my blank lines I added the following, updating the following code as necessary :
3) out+="${fgylw}${df_out[0]}" ;; 4) out+="${fgwht}${df_out[1]}" ;; 5) out+="${fgylw}${df_out[8]}" ;; 6) out+="${fgwht}${df_out[9]}"
But, my new data appears blank and the last two lines of the data (Temp and Project Link) disappear.
What am I doing wrong? How can I get this to work?
Thanks much in advance.
-
Anyone?
-
In /.bashrc, around line 142
local df_out=()
local line
while read line; do
df_out+=("$line")
done < <(df -h)
should look like that. still can only have so many lines though, might have to delete something. -
@ceedub Awesome! Thanks! Too bad there's a line limit... seems so... 1980s... :p
-
As you can see, it just iterates over the number of lines in the logo array:
for i in "${!logo[@]}"; do
And the logo array has 10 lines, so only 10 lines will be printed:
168 local logo=( 169 "${fgred} .***. " 170 "${fgred} ***${bfgwht}*${fgred}* " 171 "${fgred} \`***' " 172 "${bfgwht} |*| " 173 "${bfgwht} |*| " 174 " ${bfgred}..${bfgwht}|*|${bfgred}.. " 175 "${bfgred}.*** ${bfgwht}*${bfgred} ***." 176 "${bfgred}*******${fggrn}@@${bfgred}**" 177 "${fgred}\`*${bfgred}****${bfgylw}@@${bfgred}*${fgred}*'" 178 "${fgred} \`*******'${fgrst} " 179 "${fgred} \`\"\"\"'${fgrst} " 180 )
Assuming you've renumbered the
out
loop from 1 to 12 so that it ends:220 12) 221 out+="${fgwht}The RetroPie Project, https://retropie.org.uk" 222 ;;
Just add two more lines to the logo with the correct spacing:
180 " " 181 " " 182 )
Now it works fine:
pi@retropie:~ $ source .bashrc .***. Sunday, 18 September 2016, 10:39:06 PM ***** Linux 4.4.13-v7+ armv7l GNU/Linux `***' |*| Filesystem Size Used Avail Use% Mounted on |*| /dev/root 59G 14G 43G 24% / ..|*|.. Bachelor Chow .*** * ***. Now with flavor! *******@@** Uptime.............: 9 days, 18h56m29s `*****@@**' Memory.............: 28872kB (Free) / 752872kB (Total) `*******' Running Processes..: 125 `"""' IP Address.........: 192.168.1.202 Temperature........: CPU: 54°C/129°F GPU: 54°C/129°F The RetroPie Project, https://retropie.org.uk
Learn bash scripting and you can do many things on Linux :) http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.