diff --git a/.all-contributorsrc b/.all-contributorsrc index 1c004b9..7173df8 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -65,6 +65,15 @@ "bug", "code" ] + }, + { + "login": "ductrantrong", + "name": "ductrantrong", + "avatar_url": "https://avatars.githubusercontent.com/u/96020037?v=4", + "profile": "https://github.com/ductrantrong", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/README.en.md b/README.en.md index 30a43bf..a009637 100644 --- a/README.en.md +++ b/README.en.md @@ -34,7 +34,7 @@ Issues - All Contributors + All Contributors Ask DeepWiki

@@ -724,6 +724,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Nguyễn Hồng Hiệp
Nguyễn Hồng Hiệp

📖 Đặng Quang Hiển
Đặng Quang Hiển

📖 💻 Zebra2711
Zebra2711

🐛 💻 + ductrantrong
ductrantrong

💻 diff --git a/README.md b/README.md index 5b856c6..4b343f4 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Issues - All Contributors + All Contributors Ask DeepWiki

@@ -715,6 +715,7 @@ Cảm ơn những con người tuyệt vời ([chú thích emoji](https://allcon Nguyễn Hồng Hiệp
Nguyễn Hồng Hiệp

📖 Đặng Quang Hiển
Đặng Quang Hiển

📖 💻 Zebra2711
Zebra2711

🐛 💻 + ductrantrong
ductrantrong

💻 diff --git a/src/lotus-engine.cpp b/src/lotus-engine.cpp index dcee7fe..d0413cb 100644 --- a/src/lotus-engine.cpp +++ b/src/lotus-engine.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -96,6 +97,8 @@ namespace fcitx { } LotusEngine::LotusEngine(Instance* instance) : instance_(instance), factory_([this](InputContext& ic) { return new LotusState(this, &ic); }) { //NOLINT + const char* desktop = std::getenv("XDG_CURRENT_DESKTOP"); + isGnome_ = (desktop != nullptr) && std::string(desktop).find("GNOME") != std::string::npos; startMonitoringOnce(); Init(); { @@ -781,7 +784,7 @@ namespace fcitx { switch (realMode) { case LotusMode::Off: return _("Lotus - Off"); case LotusMode::Emoji: return "😄"; - default: return "🪷"; + default: return isGnome_ ? "vi" : "🪷"; } } diff --git a/src/lotus-engine.h b/src/lotus-engine.h index 804e985..fa2fd78 100644 --- a/src/lotus-engine.h +++ b/src/lotus-engine.h @@ -216,6 +216,7 @@ namespace fcitx { std::vector toggleActions_; std::vector connections_; CGoObject dictionary_; + bool isGnome_; bool isSelectingAppMode_ = false; std::string currentConfigureApp_; FCITX_ADDON_DEPENDENCY_LOADER(emoji, instance_->addonManager());