mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:57:34 +00:00
Terminal: Add action to open a new terminal with Ctrl+Shift+N
This commit is contained in:
parent
3df521e2b7
commit
ef552add6c
1 changed files with 6 additions and 0 deletions
|
@ -185,6 +185,12 @@ int main(int argc, char** argv)
|
||||||
auto menubar = make<GMenuBar>();
|
auto menubar = make<GMenuBar>();
|
||||||
|
|
||||||
auto app_menu = make<GMenu>("Terminal");
|
auto app_menu = make<GMenu>("Terminal");
|
||||||
|
app_menu->add_action(GAction::create("Open new terminal", { Mod_Ctrl | Mod_Shift, Key_N }, GraphicsBitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
|
||||||
|
if (!fork()) {
|
||||||
|
execl("/bin/Terminal", "Terminal", nullptr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}));
|
||||||
app_menu->add_action(GAction::create("Settings...", load_png("/res/icons/gear16.png"),
|
app_menu->add_action(GAction::create("Settings...", load_png("/res/icons/gear16.png"),
|
||||||
[&](const GAction&) {
|
[&](const GAction&) {
|
||||||
if (!settings_window) {
|
if (!settings_window) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue