show run as user
This commit is contained in:
parent
8f273407ac
commit
9bcec50d7e
@ -15,7 +15,7 @@ import java.io.InputStreamReader;
|
|||||||
*/
|
*/
|
||||||
public class MainApp {
|
public class MainApp {
|
||||||
|
|
||||||
public static final String APP_VERSION = "1.4.3";
|
public static final String APP_VERSION = "1.4.4";
|
||||||
|
|
||||||
public enum OS {
|
public enum OS {
|
||||||
WINDOWS, LINUX, MACOS, UNKNOWN
|
WINDOWS, LINUX, MACOS, UNKNOWN
|
||||||
|
|||||||
@ -45,7 +45,7 @@ public class MainWindow extends JFrame {
|
|||||||
private int commandHistoryIndex = -1;
|
private int commandHistoryIndex = -1;
|
||||||
|
|
||||||
public MainWindow() {
|
public MainWindow() {
|
||||||
super("KF Manager v" + MainApp.APP_VERSION + " (" + MainApp.CURRENT_OS + ")");
|
super("KF Manager v" + MainApp.APP_VERSION + " (" + MainApp.CURRENT_OS + ") - " + getCurrentUser());
|
||||||
|
|
||||||
// Set application icon
|
// Set application icon
|
||||||
loadAppIcon();
|
loadAppIcon();
|
||||||
@ -96,6 +96,11 @@ public class MainWindow extends JFrame {
|
|||||||
// Setup auto-refresh timer from config
|
// Setup auto-refresh timer from config
|
||||||
updateAutoRefreshTimer();
|
updateAutoRefreshTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String getCurrentUser() {
|
||||||
|
String userName = System.getProperty("user.name");
|
||||||
|
return (userName == null || userName.isBlank()) ? "unknown user" : userName;
|
||||||
|
}
|
||||||
|
|
||||||
private void loadAppIcon() {
|
private void loadAppIcon() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user