summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorNick Vella <nick@nxk.io>2021-01-13 23:10:31 +1100
committerAndreas Kling <kling@serenityos.org>2021-01-16 09:05:01 +0100
commitd1e3193339524ea65da146757fc5160cbf2a907f (patch)
treea9f9a438a020f46afd061134e79fffce442bb6ef /Userland/Services
parent40083444a0f3c2d3a8834eec8696f54eebf10935 (diff)
downloadserenity-d1e3193339524ea65da146757fc5160cbf2a907f.zip
SystemMenu: add Run to system menu above About
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/SystemMenu/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Services/SystemMenu/main.cpp b/Userland/Services/SystemMenu/main.cpp
index 7181b39095..8bde6872a5 100644
--- a/Userland/Services/SystemMenu/main.cpp
+++ b/Userland/Services/SystemMenu/main.cpp
@@ -202,6 +202,16 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
}
system_menu->add_separator();
+ system_menu->add_action(GUI::Action::create("Run...", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-run.png"), [](auto&) {
+ pid_t child_pid;
+ const char* argv[] = { "/bin/Run", nullptr };
+ if ((errno = posix_spawn(&child_pid, "/bin/Run", nullptr, nullptr, const_cast<char**>(argv), environ))) {
+ perror("posix_spawn");
+ } else {
+ if (disown(child_pid) < 0)
+ perror("disown");
+ }
+ }));
system_menu->add_action(GUI::Action::create("About SerenityOS", Gfx::Bitmap::load_from_file("/res/icons/16x16/ladybug.png"), [](auto&) {
pid_t child_pid;
const char* argv[] = { "/bin/About", nullptr };