From 055c0c479770fb59346e836f936dff3de9f2f042 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 24 May 2012 00:40:14 -0400 Subject: [PATCH] add opacity support --- config.h | 4 ++++ termite.c | 1 + 2 files changed, 5 insertions(+) diff --git a/config.h b/config.h index 3eeb0a7..dafd6a8 100644 --- a/config.h +++ b/config.h @@ -2,6 +2,7 @@ #define CONFIG_H #include +#include #define URGENT_ON_BEEP #define DYNAMIC_TITLE @@ -12,6 +13,9 @@ static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*"; static const char *url_command = "/usr/bin/firefox"; #endif +// 0 -> completely transparent, 65535 -> completely opaque +static const uint16_t opacity = 65535; + static const char *font = "Monospace 9"; static const long scrollback_lines = 1000; diff --git a/termite.c b/termite.c index eeb1c85..f3bec59 100644 --- a/termite.c +++ b/termite.c @@ -128,6 +128,7 @@ int main(int argc, char **argv) { vte_terminal_set_audible_bell(VTE_TERMINAL(vte), audible_bell); vte_terminal_set_visible_bell(VTE_TERMINAL(vte), visible_bell); vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), mouse_autohide); + vte_terminal_set_opacity(VTE_TERMINAL(vte), opacity); // set colors GdkColor foreground, background;