Skip to content

Simple GNU/Linux terminal emulator based on vte3 lib.

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

cedlemo/Tortosa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tortosa

Vte Terminal Emulator

Screenshot

Install/remove

sh build.sh
make
sudo make install

Tortosa is by default installed in:

~ ls /usr/local/share/glib-2.0/schemas
com.github.cedlemo.tortosa.gschema.xml  gschemas.compiled
~ whereis tortosa
tortosa: /usr/local/bin/tortosa

Expected Functionnalities

Done

  • Window with a terminal
  • Css theming for all the widgets
  • Setup unit testing environment
  • define rules to memory managment
  • add an application menu
  • Enforce a coding style (use clang linter ?)
  • GSettings
    • load gschema
    • adapt makefile to install gschema
  • Add terminal right-click menu
    • add copy action
    • add paste action
  • Display the title of the current terminal in the header bar
  • Window with multiple terminals managment
    • multiple terminals in tabs (one terminal in one tab, GtkNotebook)
    • add shortcuts to manage tabs
      • ctrl+shift + t : new terminal
      • ctrl+shift + left : previous terminal
      • ctrl+shift + right : next terminal

To Do

  • Window with multiple terminals managment
    • multiple terminals in tabs (one terminal in one tab, GtkNotebook)
    • multiple terminals in pans (multiple terminal in one tab)
    • add shortcuts to manage tabs
  • Terminal colors / Palette managment
  • GSettings
    • specify the Css theme file
    • specify the shell to use
    • specify the Palette color
    • specify the Vte configuration
  • Vte Regexp + actions
  • Unit testing

Development Notes

Build, clean test:

aclocal
automake --add-missing --foreign
autoconf
./configure
make
./src/tortosa

Use sh build.sh

Launch tortosa to test it:

make launch

Clean the repository after build:

make clean
make maintainer-clean

Generates the compile_commands.json for ccls/clang used with coc.

# after having buildt everything
bear make

Debug

Gdb

Valgrind:

libtool exec valgrind --tool=memcheck --leak-check=full --suppressions=./gtk.supp ./src/tortosa
G_SLICE=debug-blocks valgrind --tool=memcheck --leak-check=full --suppressions=./gtk.supp ./src/tortos
  • G_SLICE=debug-blocks will turn off gtk's advanced memory management to allow valgrind to show correct results.
  • --leak-check=full will show stack traces for the leaked memory blocks.
  • You can also use --show-reachable=yes to see stack traces for all memory blocks that haven't been free when the program exits.
  • There is also the massif valgrind tool that tracks memory usage to show which parts of the program are using the most memory.

Run program under massif:

G_SLICE=always-malloc valgrind --tool=massif --detailed-freq=2 --max-snapshots=400 --num-callers=20 ./src/tortosa

Global Structure:

Classes hierarchy

The structure should be the following:

TortosaApplication
    |
     ---> TortosaWindowApplication
             |
	      ---> TortosaHeaderBar
	     |
	      ---> TortosaNotebook
	      		|
			 ---> TortosaTab (1 to n)
			       |
			        ---> TortosaPan (1 to n)

Tortosa Shell

The application uses a single instance of a TortosaShell class to store all of its runtime information. This instance is stored as a global variable and is accessible in all the different parts of the code thanks to the tortosa_shell_get_default constructor which implements the singleton pattern.

This design is shamelessly stolen from Epiphany:

* https://gitlab.gnome.org/GNOME/epiphany/blob/master/HACKING.md
* https://gitlab.gnome.org/GNOME/epiphany/blob/master/src/ephy-shell.h
* https://gitlab.gnome.org/GNOME/epiphany/blob/master/src/ephy-shell.c

Style:

Generates the parser configuration file:

```
clang-format -style=google -dump-config > .clang-format
```

Format the files:

```
clang-format -i file.c
```

About

Simple GNU/Linux terminal emulator based on vte3 lib.

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published