Improve: Show suggestions in bash
This commit is contained in:
@ -19,6 +19,7 @@ import java.util.List;
|
|||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
|
import io.neoterm.R;
|
||||||
import io.neoterm.backend.EmulatorDebug;
|
import io.neoterm.backend.EmulatorDebug;
|
||||||
import io.neoterm.customize.NeoTermPath;
|
import io.neoterm.customize.NeoTermPath;
|
||||||
import io.neoterm.preference.NeoTermPreference;
|
import io.neoterm.preference.NeoTermPreference;
|
||||||
@ -35,7 +36,7 @@ public final class BaseFileInstaller {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(activity, null, "Installing", true, false);
|
final ProgressDialog progress = ProgressDialog.show(activity, null, activity.getString(R.string.installer_message), true, false);
|
||||||
new Thread() {
|
new Thread() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -101,6 +101,7 @@ object NeoTermPreference {
|
|||||||
return arrayOf(termEnv, homeEnv, androidRootEnv, androidDataEnv, externalStorageEnv, pathEnv)
|
return arrayOf(termEnv, homeEnv, androidRootEnv, androidDataEnv, externalStorageEnv, pathEnv)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
val ps1Env = "PS1=$ "
|
val ps1Env = "PS1=$ "
|
||||||
val ldEnv = "LD_LIBRARY_PATH=${NeoTermPath.USR_PATH}/lib"
|
val ldEnv = "LD_LIBRARY_PATH=${NeoTermPath.USR_PATH}/lib"
|
||||||
val langEnv = "LANG=en_US.UTF-8"
|
val langEnv = "LANG=en_US.UTF-8"
|
||||||
@ -111,4 +112,11 @@ object NeoTermPreference {
|
|||||||
return arrayOf(termEnv, homeEnv, ps1Env, ldEnv, langEnv, pathEnv, pwdEnv, androidRootEnv, androidDataEnv, externalStorageEnv, tmpdirEnv)
|
return arrayOf(termEnv, homeEnv, ps1Env, ldEnv, langEnv, pathEnv, pwdEnv, androidRootEnv, androidDataEnv, externalStorageEnv, tmpdirEnv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
* To print the job name about to be executed in bash:
|
||||||
|
* $ trap 'echo -ne "\e]0;${BASH_COMMAND%% *}\x07"' DEBUG
|
||||||
|
* $ PS1='$(echo -ne "\e]0;$PWD\x07")\$ '
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ import android.view.KeyEvent;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.GridLayout;
|
import android.widget.GridLayout;
|
||||||
import android.widget.Toast;
|
|
||||||
import android.widget.ToggleButton;
|
import android.widget.ToggleButton;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -40,11 +39,6 @@ public final class ExtraKeysView extends GridLayout {
|
|||||||
public static final ControlButton TAB = new ControlButton(KEY_TAB);
|
public static final ControlButton TAB = new ControlButton(KEY_TAB);
|
||||||
public static final StatedControlButton CTRL = new StatedControlButton(KEY_CTRL);
|
public static final StatedControlButton CTRL = new StatedControlButton(KEY_CTRL);
|
||||||
|
|
||||||
// public static final ControlButton ARROW_UP = new ControlButton("▲");
|
|
||||||
// public static final ControlButton ARROW_DOWN = new ControlButton("▼");
|
|
||||||
// public static final ControlButton ARROW_LEFT = new ControlButton("◀");
|
|
||||||
// public static final ControlButton ARROW_RIGHT = new ControlButton("▶");
|
|
||||||
|
|
||||||
public static final ControlButton ARROW_UP = new ControlButton("▲");
|
public static final ControlButton ARROW_UP = new ControlButton("▲");
|
||||||
public static final ControlButton ARROW_DOWN = new ControlButton("▼");
|
public static final ControlButton ARROW_DOWN = new ControlButton("▼");
|
||||||
public static final ControlButton ARROW_LEFT = new ControlButton("◀");
|
public static final ControlButton ARROW_LEFT = new ControlButton("◀");
|
||||||
@ -176,12 +170,7 @@ public final class ExtraKeysView extends GridLayout {
|
|||||||
button = new Button(getContext(), null, android.R.attr.buttonBarButtonStyle);
|
button = new Button(getContext(), null, android.R.attr.buttonBarButtonStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
button.setTypeface(FontManager.INSTANCE.getDefaultFont());
|
button.setTypeface(FontManager.INSTANCE.getDefaultFont());
|
||||||
} catch (Throwable e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Toast.makeText(getContext(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
button.setText(extraButton.buttonText);
|
button.setText(extraButton.buttonText);
|
||||||
button.setTextColor(NORMAL_TEXT_COLOR);
|
button.setTextColor(NORMAL_TEXT_COLOR);
|
||||||
button.setAllCaps(false);
|
button.setAllCaps(false);
|
||||||
|
@ -30,4 +30,5 @@
|
|||||||
<string name="toggle_tab_switcher_menu_item">切换窗口</string>
|
<string name="toggle_tab_switcher_menu_item">切换窗口</string>
|
||||||
<string name="ui_settings">界面设置</string>
|
<string name="ui_settings">界面设置</string>
|
||||||
<string name="shell_not_found">Shell %s 未找到, 请先安装.</string>
|
<string name="shell_not_found">Shell %s 未找到, 请先安装.</string>
|
||||||
|
<string name="installer_message">正在安装</string>
|
||||||
</resources>
|
</resources>
|
@ -13,6 +13,8 @@
|
|||||||
<string name="ui_settings">UI Settings</string>
|
<string name="ui_settings">UI Settings</string>
|
||||||
<string name="package_settings">Package Settings</string>
|
<string name="package_settings">Package Settings</string>
|
||||||
|
|
||||||
|
<string name="installer_message">Installing</string>
|
||||||
|
|
||||||
<string name="pref_general_bell">Bell</string>
|
<string name="pref_general_bell">Bell</string>
|
||||||
<string name="pref_general_bell_desc">Bell when receiving \'\\a\'</string>
|
<string name="pref_general_bell_desc">Bell when receiving \'\\a\'</string>
|
||||||
<string name="pref_general_vibrate">Vibrate</string>
|
<string name="pref_general_vibrate">Vibrate</string>
|
||||||
|
Reference in New Issue
Block a user