aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/weltschmerz.vala
diff options
context:
space:
mode:
authorWolfgang Müller2019-07-20 21:58:18 +0200
committerWolfgang Müller2019-07-20 21:58:18 +0200
commit9703e09fb5cd151217ad17dbafd25338585b7ed7 (patch)
treec74f4f7697d4a7de5c92e06c5cb82cf55e945049 /weltschmerz.vala
downloadweltschmerz-1.0.0.tar.gz (sig)
Initial public release1.0.0
Diffstat (limited to '')
-rw-r--r--weltschmerz.vala36
1 files changed, 36 insertions, 0 deletions
diff --git a/weltschmerz.vala b/weltschmerz.vala
new file mode 100644
index 0000000..dac2291
--- /dev/null
+++ b/weltschmerz.vala
@@ -0,0 +1,36 @@
+const string PROGRAM_NAME = "weltschmerz";
+
+void warning(string message) {
+ stderr.printf("%s: %s\n", PROGRAM_NAME, message);
+}
+
+static int main(string[] args) {
+ unowned string[]? nullargs = null;
+ Gtk.init(ref nullargs);
+
+ var window = new Gtk.Window();
+
+ window.destroy.connect(Gtk.main_quit);
+ window.set_icon_name("utilities-terminal");
+
+ var visual = window.screen.get_rgba_visual();
+ if (visual != null) {
+ window.set_visual(visual);
+ }
+
+ var css_provider = new Gtk.CssProvider();
+ css_provider.load_from_resource("/weltschmerz/css/terminal.css");
+ Gtk.StyleContext.add_provider_for_screen(window.screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER);
+
+ var terminal = new Terminal(args, window, window);
+
+ Unix.signal_add(Posix.Signal.USR1, () => {
+ terminal.load_config(true);
+ return Source.CONTINUE;
+ });
+
+ window.show_all();
+
+ Gtk.main();
+ return 0;
+}