Change the prompt again.
As expected there was a lot of bikeshedding. Just change the color of the path, green on success, red on failure. Constraints taken into account: - Keep the > for now - Prompt should be as compact as possible for those of us using 80 column terminals. - Prompt should not change size between success and error cases Not taken into account: - The feature should be accessible to colorblind people (we could replace the > with another char but we couldn't find something that looks suitable)
This commit is contained in:
parent
6ec69f4426
commit
9a152c9cb0
|
@ -6,15 +6,15 @@
|
||||||
ARCH=`getarch 2>/dev/null`
|
ARCH=`getarch 2>/dev/null`
|
||||||
if [ "$ARCH" = "`getarch -p 2>/dev/null`" ] ; then
|
if [ "$ARCH" = "`getarch -p 2>/dev/null`" ] ; then
|
||||||
echo -e "\nWelcome to the Haiku shell.\n"
|
echo -e "\nWelcome to the Haiku shell.\n"
|
||||||
PS1="\w "
|
PS1="\w"
|
||||||
else
|
else
|
||||||
echo -e "\nSwitching to architecture `getarch`\n"
|
echo -e "\nSwitching to architecture `getarch`\n"
|
||||||
PS1="[$ARCH] \w "
|
PS1="[$ARCH] \w"
|
||||||
fi
|
fi
|
||||||
unset ARCH
|
unset ARCH
|
||||||
|
|
||||||
PS1="$PS1"'`if [ $? = 0 ]; then echo "\e[32m:)\e[0m\]"; else \
|
PS1='`if [ $? = 0 ]; then echo "\e[32m";
|
||||||
echo "\e[31;1m\]:(\e[0m\]"; fi` \e[0m\]$ '
|
else echo "\e[31m\]"; fi`'"$PS1\e[0m\]> "
|
||||||
|
|
||||||
export USER=`id -un`
|
export USER=`id -un`
|
||||||
export GROUP=`id -gn`
|
export GROUP=`id -gn`
|
||||||
|
|
|
@ -298,6 +298,7 @@ probe_ports()
|
||||||
|
|
||||||
gInfo->port_count = 0;
|
gInfo->port_count = 0;
|
||||||
for (int i = INTEL_PORT_A; i <= INTEL_PORT_D; i++) {
|
for (int i = INTEL_PORT_A; i <= INTEL_PORT_D; i++) {
|
||||||
|
TRACE("Probing DisplayPort %d", i);
|
||||||
Port* displayPort = new(std::nothrow) DisplayPort((port_index)i);
|
Port* displayPort = new(std::nothrow) DisplayPort((port_index)i);
|
||||||
if (displayPort == NULL)
|
if (displayPort == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
@ -311,6 +312,8 @@ probe_ports()
|
||||||
// Digital Display Interface
|
// Digital Display Interface
|
||||||
if (gInfo->shared_info->device_type.HasDDI()) {
|
if (gInfo->shared_info->device_type.HasDDI()) {
|
||||||
for (int i = INTEL_PORT_A; i <= INTEL_PORT_E; i++) {
|
for (int i = INTEL_PORT_A; i <= INTEL_PORT_E; i++) {
|
||||||
|
TRACE("Probing DDI %d", i);
|
||||||
|
|
||||||
Port* ddiPort
|
Port* ddiPort
|
||||||
= new(std::nothrow) DigitalDisplayInterface((port_index)i);
|
= new(std::nothrow) DigitalDisplayInterface((port_index)i);
|
||||||
|
|
||||||
|
@ -325,6 +328,7 @@ probe_ports()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure DP_A isn't already taken (or DDI)
|
// Ensure DP_A isn't already taken (or DDI)
|
||||||
|
TRACE("Probing eDP");
|
||||||
if (!has_connected_port((port_index)INTEL_PORT_A, INTEL_PORT_TYPE_ANY)) {
|
if (!has_connected_port((port_index)INTEL_PORT_A, INTEL_PORT_TYPE_ANY)) {
|
||||||
// also always try eDP, it'll also just fail if not applicable
|
// also always try eDP, it'll also just fail if not applicable
|
||||||
Port* eDPPort = new(std::nothrow) EmbeddedDisplayPort();
|
Port* eDPPort = new(std::nothrow) EmbeddedDisplayPort();
|
||||||
|
@ -337,6 +341,7 @@ probe_ports()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = INTEL_PORT_B; i <= INTEL_PORT_D; i++) {
|
for (int i = INTEL_PORT_B; i <= INTEL_PORT_D; i++) {
|
||||||
|
TRACE("Probing HDMI %d", i);
|
||||||
if (has_connected_port((port_index)i, INTEL_PORT_TYPE_ANY)) {
|
if (has_connected_port((port_index)i, INTEL_PORT_TYPE_ANY)) {
|
||||||
// Ensure port not already claimed by something like DDI
|
// Ensure port not already claimed by something like DDI
|
||||||
continue;
|
continue;
|
||||||
|
@ -352,6 +357,7 @@ probe_ports()
|
||||||
delete hdmiPort;
|
delete hdmiPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE("Probing DVI");
|
||||||
if (!has_connected_port(INTEL_PORT_ANY, INTEL_PORT_TYPE_ANY)) {
|
if (!has_connected_port(INTEL_PORT_ANY, INTEL_PORT_TYPE_ANY)) {
|
||||||
// there's neither DisplayPort nor HDMI so far, assume DVI B
|
// there's neither DisplayPort nor HDMI so far, assume DVI B
|
||||||
Port* dviPort = new(std::nothrow) DigitalPort(INTEL_PORT_B);
|
Port* dviPort = new(std::nothrow) DigitalPort(INTEL_PORT_B);
|
||||||
|
@ -366,6 +372,7 @@ probe_ports()
|
||||||
}
|
}
|
||||||
|
|
||||||
// always try the LVDS port, it'll simply fail if not applicable
|
// always try the LVDS port, it'll simply fail if not applicable
|
||||||
|
TRACE("Probing LVDS");
|
||||||
Port* lvdsPort = new(std::nothrow) LVDSPort();
|
Port* lvdsPort = new(std::nothrow) LVDSPort();
|
||||||
if (lvdsPort == NULL)
|
if (lvdsPort == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
@ -381,6 +388,7 @@ probe_ports()
|
||||||
delete lvdsPort;
|
delete lvdsPort;
|
||||||
|
|
||||||
// then finally always try the analog port
|
// then finally always try the analog port
|
||||||
|
TRACE("Probing Analog");
|
||||||
Port* analogPort = new(std::nothrow) AnalogPort();
|
Port* analogPort = new(std::nothrow) AnalogPort();
|
||||||
if (analogPort == NULL)
|
if (analogPort == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
@ -396,6 +404,7 @@ probe_ports()
|
||||||
// Activate reference clocks if needed
|
// Activate reference clocks if needed
|
||||||
if (gInfo->shared_info->pch_info == INTEL_PCH_IBX
|
if (gInfo->shared_info->pch_info == INTEL_PCH_IBX
|
||||||
|| gInfo->shared_info->pch_info == INTEL_PCH_CPT) {
|
|| gInfo->shared_info->pch_info == INTEL_PCH_CPT) {
|
||||||
|
TRACE("Activating clocks");
|
||||||
// XXX: Is LVDS the same as Panel?
|
// XXX: Is LVDS the same as Panel?
|
||||||
refclk_activate_ilk(foundLVDS);
|
refclk_activate_ilk(foundLVDS);
|
||||||
}
|
}
|
||||||
|
@ -407,6 +416,7 @@ probe_ports()
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
TRACE("Probing complete.");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -695,6 +695,7 @@ ieee80211_sysctl_vattach(struct ieee80211vap* vap)
|
||||||
| IEEE80211_MSG_WME
|
| IEEE80211_MSG_WME
|
||||||
| IEEE80211_MSG_DOTH
|
| IEEE80211_MSG_DOTH
|
||||||
| IEEE80211_MSG_INACT
|
| IEEE80211_MSG_INACT
|
||||||
|
| IEEE80211_MSG_11N
|
||||||
| IEEE80211_MSG_ROAM;
|
| IEEE80211_MSG_ROAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue