summaryrefslogtreecommitdiff
path: root/Applications/Terminal
AgeCommit message (Collapse)Author
2020-04-04LibGUI: Add MenuBar::add_menu(name)Andreas Kling
This allows us to construct menus in a more natural way: auto& file_menu = menubar->add_menu("File"); file_menu.add_action(...); Instead of the old way: auto file_menu = GUI::Menu::construct(); file_menu->add_action(...); menubar->add_menu(file_menu);
2020-03-18Terminal: Remove working directory argumentItamar
Applications that want to spawn Terminal in a specific directory should chdir to it before execing it.
2020-03-15Terminal: Add -d option for specifying working directoryItamar
2020-03-11Terminal: Make the settings window unresizableTibor Nagy
2020-03-07LibGUI: Move Icon and FontDatabase into the GUI namespaceShannon Booth
We also clean up some old references to the old G prefixed GUI classes This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton) instead of C_OBJECT_ABSTRACT(AbstractButton)
2020-03-04LibCore: Make Core::Object::add<ChildType> return a ChildType&Andreas Kling
Since the returned object is now owned by the callee object, we can simply vend a ChildType&. This allows us to use "." instead of "->" at the call site, which is quite nice. :^)
2020-03-04LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clientsAndreas Kling
2020-03-04LibGUI: Use set_layout<LayoutType>() in lots of client codeAndreas Kling
2020-02-29Terminal: Put PAGER=more in the default environmentAndreas Kling
This should be done at some other level (shell rc script for example), this is just to make "git" stop complaining that I don't have "less".
2020-02-25Terminal: Open settings as a modal windowTibor Nagy
To prevent the settings window from getting orphaned when someone closes the main window behind it.
2020-02-25Terminal: Don't set an initial command_to_executejoshua stein
Otherwise we end up executing "/bin/Shell -c /bin/Shell" on a normal launch. With a null command_to_execute, we'll just execute /bin/Shell
2020-02-23Userspace: Use Core::Object::add() when building interfacesAndreas Kling
2020-02-15LibGUI: Reduce menu-related header dependenciesAndreas Kling
2020-02-15LibGUI: Remove some header dependencies from Application.hAndreas Kling
2020-02-14LibGUI: Remove some header dependencies from Widget.hAndreas Kling
2020-02-10Terminal: Set up a nice $PROMPT for the shell :^)Andreas Kling
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling
2020-02-06LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayoutAndreas Kling
2020-02-06LibGUI: Add HorizontalSlider and VerticalSlider convenience classesAndreas Kling
2020-02-06LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()Andreas Kling
Code that just wants to open a Gfx::Bitmap from a file should not be calling the PNG codec directly.
2020-02-06LibGfx: Rename from LibDraw :^)Andreas Kling
2020-02-06LibDraw: Put all classes in the Gfx namespaceAndreas Kling
I started adding things to a Draw namespace, but it somehow felt really wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename the library to LibGfx. :^)
2020-02-05LibC: Add posix_openpt(), grantpt() and unlockpt()Andreas Kling
This makes getting a pseudoterminal pair a little bit more portable. Note that grantpt() and unlockpt() are currently no-ops, since we've already granted the pseudoterminal slave to the calling user. We also accept O_CLOEXEC to posix_openpt(), unlike some systems. :^)
2020-02-02LibGUI: Put all classes in the GUI namespace and remove the leading GAndreas Kling
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-02-02Terminal: Remove an unused variableAndreas Kling
2020-02-02LibGUI: Add GHBoxLayout and GVBoxLayout convenience classesAndreas Kling
2020-01-28Userland+Terminal: Port to new CArgsParser APISergey Bugaev
While at it, also add some niceties and fix some things.
2020-01-25Terminal: Start a new session before exec'ing the shellAndreas Kling
This will put everything running inside the terminal in the same SID.
2020-01-25Terminal: Fetch the user shell from /etc/passwdAndreas Kling
This allows you to override the shell used by Terminal. :^)
2020-01-21Terminal: Unveil the user's config fileAndreas Kling
I mistakenly thought that we were keeping the config file open, but we don't. So we'll need to unveil the config path in case we need to write out a new configuration.
2020-01-21Terminal: Use unveil()Andreas Kling
This app needs ("/bin/Terminal", "x") in order to fork+exec itself when the user requests a new Terminal window. I really like how this reduces reduces the impact of pledging "exec". :^) It also needs ("/res", "r") like all GUI apps. We delay the first call to unveil until after we've already opened the app's config file, so there's no need to worry about that.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-17Kernel: Add "accept" pledge promise for accepting incoming connectionsAndreas Kling
This patch adds a new "accept" promise that allows you to call accept() on an already listening socket. This lets programs set up a socket for for listening and then dropping "inet" and/or "unix" so that only incoming (and existing) connections are allowed from that point on. No new outgoing connections or listening server sockets can be created. In addition to accept() it also allows getsockopt() with SOL_SOCKET and SO_PEERCRED, which is used to find the PID/UID/GID of the socket peer. This is used by our IPC library when creating shared buffers that should only be accessible to a specific peer process. This allows us to drop "unix" in WindowServer and LookupServer. :^) It also makes the debugging/introspection RPC sockets in CEventLoop based programs work again.
2020-01-12Applications+DevTools+MenuApplets: Drop "unix" pledge when possibleAndreas Kling
Now that the "unix" pledge is no longer required for socket I/O, we can drop it after making the connections we need in a program. In most GUI program cases, once we've connected to the WindowServer by instantiating a GApplication, we no longer need "unix" :^)
2020-01-11Kernel: fork()ed children should inherit pledge promises :^)Andreas Kling
Update various places that now need wider promises as they are not reset by fork() anymore.
2020-01-11Terminal: Use pledge()Andreas Kling
2020-01-08Terminal: Put the Font menu items in an action group :^)Andreas Kling
2019-12-25Build: support library and generator dependenciesjoshua stein
Instead of directly manipulating LDFLAGS, set LIB_DEPS in each subdirectory Makefile listing the libraries needed for building/linking such as "LIB_DEPS = Core GUI Draw IPC Core". This adds each library as an -L and -l argument in LDFLAGS, but also adds the library.a file as a link dependency on the current $(PROGRAM). This causes the given library to be (re)built before linking the current $(PROGRAM), but will also re-link any binaries depending on that library when it is modified, when running make from the root directory. Also turn generator tools like IPCCompiler into dependencies on the files they generate, so they are built on-demand when a particular directory needs them. This all allows the root Makefile to just list directories and not care about the order, as all of the dependency tracking will figure it out.
2019-12-24LibGUI+LibDraw: Add "Palette" concept for scoped color themingAndreas Kling
GApplication now has a palette. This palette contains all the system theme colors by default, and is inherited by a new top-level GWidget. New child widgets inherit their parents palette. It is possible to override the GApplication palette, and the palette of any GWidget. The Palette object contains a bunch of colors, each corresponding to a ColorRole. Each role has a convenience getter as well. Each GWidget now has a background_role() and foreground_role(), which are then looked up in their current palette when painting. This means that you no longer alter the background color of a widget by setting it directly, rather you alter either its background role, or the widget's palette.
2019-12-23WindowServer+LibGUI: Implement basic color themingAndreas Kling
Color themes are loaded from .ini files in /res/themes/ The theme can be switched from the "Themes" section in the system menu. The basic mechanism is that WindowServer broadcasts a SharedBuffer with all of the color values of the current theme. Clients receive this with the response to their initial WindowServer::Greet handshake. When the theme is changed, WindowServer tells everyone by sending out an UpdateSystemTheme message with a new SharedBuffer to use. This does feel somewhat bloated somehow, but I'm sure we can iterate on it over time and improve things. To get one of the theme colors, use the Color(SystemColor) constructor: painter.fill_rect(rect, SystemColor::HoverHighlight); Some things don't work 100% right without a reboot. Specifically, when constructing a GWidget, it will set its own background and foreground colors based on the current SystemColor::Window and SystemColor::Text. The widget is then stuck with these values, and they don't update on system theme change, only on app restart. All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-09LibGUI: Make GMenu inherit from CObjectAndreas Kling
This is primarily to make it possible to pass a GMenu* where a CObject* is expected.
2019-12-02Terminal: Ignore SIGCHLD with SA_NOCLDWAITAndreas Kling
Otherwise we'll accumulate a bunch of dead Terminal children if you open and close more terminal windows.
2019-11-20Terminal+LibVT: Switch Terminal to using explicit copy/paste actionsAndreas Kling
Instead of implicitly copying whatever you select, and pasting when you middle-click, let's have traditional copy and paste actions bound to Ctrl+Shift+C and Ctrl+Shift+V respectively.
2019-11-20Terminal: Add action to open a new terminal with Ctrl+Shift+NAndreas Kling
2019-11-13Terminal+HackStudio: Fix leaking PTM fd to child processesSergey Bugaev
The pseudoterminal *master* fd is not supposed to be inherited, so make sure to open it with O_CLOEXEC.
2019-10-22LibVT+Terminal: Give TerminalWidget a hook for EOF on the ptyAndreas Kling
Instead of quitting the application immediately when the pty gives an EOF, fire an on_command_exit hook so the TerminalWidget client can decide for himself what to do.
2019-10-21LibVT+Terminal: Don't set window title directly from TerminalWidgetAndreas Kling
Instead, have TerminalWidget provide an on_title_change hook. This allows embedders to decide for themselves what to do if we receive a "set terminal title" escape sequence.