Posted 10 August 2015 - 04:56 PM
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
How to change shell tab color?
Started by raxteeze, 10 August 2015 - 02:56 PMPosted 10 August 2015 - 05:09 PM
You can't as far as I've heard, as its hardcoded into the background program.
To be sure, you could look at the code, but I'm fairly certain that you'd have to make a modified version of it to change the colors.
To be sure, you could look at the code, but I'm fairly certain that you'd have to make a modified version of it to change the colors.
Posted 10 August 2015 - 05:17 PM
You can't as far as I've heard, as its hardcoded into the background program.
To be sure, you could look at the code, but I'm fairly certain that you'd have to make a modified version of it to change the colors.
But I 've seen it in OneOS …
Posted 10 August 2015 - 05:28 PM
After glancing at the multishell file, I found this:
(Starts at line 102)
I don't think you can change it without modifying the program.
So you'll have to copy and paste this into a program of your own, and change the colors to your likeing.
You'll run that when you want to use multishell, instead of the default one.
(Starts at line 102)
-- Setup the main menu
local menuMainTextColor, menuMainBgColor, menuOtherTextColor, menuOtherBgColor
if parentTerm.isColor() then
menuMainTextColor, menuMainBgColor = colors.yellow, colors.black
menuOtherTextColor, menuOtherBgColor = colors.black, colors.gray
else
menuMainTextColor, menuMainBgColor = colors.white, colors.black
menuOtherTextColor, menuOtherBgColor = colors.black, colors.white
end
I don't think you can change it without modifying the program.
So you'll have to copy and paste this into a program of your own, and change the colors to your likeing.
You'll run that when you want to use multishell, instead of the default one.
Posted 10 August 2015 - 05:28 PM
But I 've seen it in OneOS …
They run a custom shell. If you copy /rom/programs/advanced/multishell you can edit that.
Or if you want something hacky, use this:
local oldSet = term.setForegroundColor
function term.setForegroundColor(color)
if color == colors.yellow and select(2, pcall(error, "", 3)):match("multishell") then
color == colors.red
end
oldSet(color)
end
Edit: Ninja'd
Edited on 10 August 2015 - 03:29 PM