Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xxxterm and gtk themes
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Feb 04, 2012 2:44 pm    Post subject: xxxterm and gtk themes Reply with quote

Is it possible to force xxxterm to use the gtk style I've set for my system inside web pages, the way Firefox lets the user do in the prefs? I'd like something a bit better than hitting "s" in xxxterm. I also don't like that the url bar has a white background at all times, which doesn't work well when using a dark gtk theme with light text.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
bigbangnet
Apprentice
Apprentice


Joined: 11 Jun 2007
Posts: 174

PostPosted: Tue Feb 07, 2012 7:42 pm    Post subject: Reply with quote

If your talking about bash or the prompt, this might help you:

http://www.gentoo.org/doc/en/articles/prompt-magic.xml
_________________
I'm a noob, be gentle with me. TEACH ME
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Tue Feb 07, 2012 7:45 pm    Post subject: Reply with quote

bigbangnet wrote:
If your talking about bash or the prompt, this might help you:

http://www.gentoo.org/doc/en/articles/prompt-magic.xml

xxxterm is a web browser :). Has a simple gtk GUI and uses webkit-gtk as it's engine.
Back to top
View user's profile Send private message
bigbangnet
Apprentice
Apprentice


Joined: 11 Jun 2007
Posts: 174

PostPosted: Tue Feb 07, 2012 8:27 pm    Post subject: Reply with quote

lol, I thought you made a typo. sorry about that. This is a time where I feel like an idiot. Anyways i found this page which could help you about your problem.

https://opensource.conformal.com/fluxbb/viewtopic.php?id=42
It talks about using keybinding so you can switch tabs with your color scheme.
_________________
I'm a noob, be gentle with me. TEACH ME
Back to top
View user's profile Send private message
nafsaka
n00b
n00b


Joined: 16 Dec 2012
Posts: 6

PostPosted: Wed Feb 06, 2013 3:42 pm    Post subject: Reply with quote

I know this is an old thread. But i cannot find the solution out there. So i want to share my experience, hopefully this can help others.

You must change the color directly from the source code (because it is hard-coded):
1. ebuild /usr/portage/www-client/xxxterm/xxxterm-1.1103-r1.ebuild clean
2. ebuild /usr/portage/www-client/xxxterm/xxxterm-1.1103-r1.ebuild unpack
3. subl /var/tmp/portage/www-client/xxxterm-1.1103-r1/work/xxxterm-1.11.3/xxxterm.c
Change the color that suited your taste. Here is the output of diff:
Code:
--- /var/tmp/portage/www-client/xxxterm-1.1103-r1/work/xxxterm-1.11.3/xxxterm.c2012-03-02 04:21:23.000000000 +0700
+++ /usr/portage/distfiles/xxxterm.c.bak.im   2013-02-06 06:46:41.166976956 +0700
@@ -2637,7 +2637,7 @@
    DNPRINTF(XT_D_CMD, "%s: tab %d type %s\n", __func__, t->tab_id, s);
 
    gtk_entry_set_text(GTK_ENTRY(t->cmd), s);
-   gdk_color_parse(XT_COLOR_WHITE, &color);
+   gdk_color_parse(XT_COLOR_BLACK, &color);
    gtk_widget_modify_base(t->cmd, GTK_STATE_NORMAL, &color);
    show_cmd(t);
    gtk_widget_grab_focus(GTK_WIDGET(t->cmd));
@@ -3376,7 +3376,7 @@
 {
    GdkColor      color;
    struct tab      *tt, *t = p;
-   gchar         *col_str = XT_COLOR_WHITE;
+   gchar         *col_str = XT_COLOR_BLACK;
    const gchar      *uri, *u = NULL, *error_str = NULL;
 
 #ifdef USE_THREADS
@@ -3448,7 +3448,7 @@
    if (!strcmp(col_str, XT_COLOR_WHITE))
       statusbar_modify_attr(t, col_str, XT_COLOR_BLACK);
    else
-      statusbar_modify_attr(t, XT_COLOR_BLACK, col_str);
+      statusbar_modify_attr(t, XT_COLOR_WHITE, col_str);
 
    if (error_str && error_str[0] != '\0')
       show_oops(t, "%s", error_str);
@@ -3468,7 +3468,7 @@
 show_ca_status(struct tab *t, const char *uri)
 {
    GdkColor      color;
-   gchar         *col_str = XT_COLOR_WHITE;
+   gchar         *col_str = XT_COLOR_BLACK;
 
    DNPRINTF(XT_D_URL, "show_ca_status: %d %s %s\n",
        ssl_strict_certs, ssl_ca_file, uri);
@@ -3512,7 +3512,7 @@
       if (!strcmp(col_str, XT_COLOR_WHITE))
          statusbar_modify_attr(t, col_str, XT_COLOR_BLACK);
       else
-         statusbar_modify_attr(t, XT_COLOR_BLACK, col_str);
+         statusbar_modify_attr(t, XT_COLOR_WHITE, col_str);
    }
 }
 
@@ -3831,7 +3831,7 @@
       gtk_widget_set_sensitive(GTK_WIDGET(t->stop), TRUE);
 
       /* assume we are a new address */
-      gdk_color_parse("white", &color);
+      gdk_color_parse("black", &color);
       gtk_widget_modify_base(t->uri_entry, GTK_STATE_NORMAL, &color);
       statusbar_modify_attr(t, "white", XT_COLOR_BLACK);
 
@@ -6907,6 +6907,9 @@
    gdk_color_parse(XT_COLOR_CT_SEPARATOR, &color);
    gtk_widget_modify_bg(t->tab_elems.sep, GTK_STATE_NORMAL, &color);
 
+   gdk_color_parse(XT_COLOR_BLACK, &color);
+   gtk_widget_modify_base(t->uri_entry, GTK_STATE_NORMAL, &color);
+
    gtk_box_pack_start(GTK_BOX(t->tab_elems.box), t->tab_elems.favicon, FALSE,
        FALSE, 0);
    gtk_box_pack_start(GTK_BOX(t->tab_elems.box), t->tab_elems.label, TRUE,
@@ -7715,9 +7718,9 @@
    buffercmd_init();
 
    /* set default string settings */
-   home = g_strdup("https://www.cyphertite.com");
+   home = g_strdup("http://www.gentoo.org/");
    search_string = g_strdup("https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?Gw=%s");
-   resource_dir = g_strdup("/usr/local/share/xxxterm/");
+   resource_dir = g_strdup("/usr/share/xxxterm/");
    strlcpy(runtime_settings, "runtime", sizeof runtime_settings);
    cmd_font_name = g_strdup("monospace normal 9");
    oops_font_name = g_strdup("monospace normal 9");

4. ebuild /usr/portage/www-client/xxxterm/xxxterm-1.1103-r1.ebuild compile
5. ebuild /usr/portage/www-client/xxxterm/xxxterm-1.1103-r1.ebuild install
6. ebuild /usr/portage/www-client/xxxterm/xxxterm-1.1103-r1.ebuild qmerge
7. do step no1 to clean the temporary.

Note:
*) Above is the exact code i used, you should change it according to your system.
**) 'subl' is sublime text editor you could use other such as vim, leafpad, nano, etc.
***) To change the html theme when using dark mode (hitting 's'), you could modify the file /usr/share/ xxxterm/style.css.
Here is my style.css:
Code:
/*
 * NIGHTSHIFT - eye care:
 * A darkening style for all websites.
 * by vetinari - 2009
 * contact: vetinari.userstyles@inode.at
 */

body,html { min-height: 100%!important; }

html, body { background-color:#000!important }

body>*:not(:empty){ background-color:#111!important }

body>*>*:not(:empty){ background-color:#111!important }

body>*>*>*:not(:empty){ background-color:#181818!important }

body>*>*>*>*:not(:empty){ background-color:#181818!important }

body>*>*>*>*>*:not(:empty){ background-color:#282828!important }

body>*>*>*>*>* *{ background-color:#282828!important }

body table[border="0"] td{ background-color:#000!important }

body table table[border="0"] td{ background-color:#222!important }

body table table table[border="0"] td{ background-color:#111!important }

body table table table table[border="0"] td{ background-color:#333!important }

body *:empty{ background-color: #151515!important }

body p:not(:empty), body p *, body h1, body h1 *, body h2, body h2 *, body h3,
body h3 *, body h4, body h4 *, body h5, body h5 *, body strong>*, body b>*, body
em>*, body i>*,  body span>*:not(img) {
   background:transparent none!important
}

body h1, body h1 *, body h2, body h2 *, p>strong:only-of-type,
p>b:only-of-type {
   color: #a98!important
}

body h3, body h3 *, body h4, body h4 *{ color: #aaa!important }

*:not([onclick]):not(input):not(a):not(img):not([class^="UI"]), body
a:not(:empty), div:not([onclick]) {
   background-image:none!important;
   text-indent:0!important
}

*[onclick] { color:#79a!important }

*[onclick]:hover { color:#99a8aa!important }

body hr {
   background: #666 none!important;
   color: #666!important;
   border:1px solid #666!important;
   height: 1px!important;
   overflow:hidden!important;
   display: block!important
}

* { color: #c0c0c0!important; border-color:#666!important; }

* body a, body a * { color: #B6AA7B!important; }

body a:hover, body a:hover * {
   color: #D9C077!important;
   text-decoration: underline!important
}

body img,a[href] img, a[href] button, input[type="image"],*[onclick]:empty, body
a:empty {
   opacity:.5!important
}

body img:hover,a[href]:hover img, a[href]:hover button, *[onclick]:empty:hover,
body a:empty:hover {
   opacity:1!important
}

body input[type], body textarea[name], body input[name], body input[id], body
select[name]{
   -moz-appearance:none!important;
   color: #bbb!important;
   -moz-border-radius:4px !important;
   border-width: 1px!important;
   border-color: #778!important;
   border-style:solid!important;
   background:#555 none  !important
}

body select[name] {
   -moz-appearance:none!important;
   color: #bbb!important;
   -moz-border-radius:4px !important;
   border-width: 1px!important;
   border-color: #778!important;
   border-style:solid!important;
   background-color:#555!important
}

body input>*, body textarea>* {
   background:transparent none !important;
   color: #bbb!important;
   border-style:solid!important;
   border-width: 0px!important;
}

body select * {
   background-color:transparent !important;
   color: #bbb!important;
   border-style:solid!important;
   border-width: 0px!important;
}

pre:not(:empty), code:not(:empty) , cite:not(:empty), pre:not(:empty) *,
code:not(:empty) *, cite:not(:empty)
* {
   background-image:url(data:image/gif;base64,R0lGODlhBAAEAIAAABERESIiIiH5BAAAAAAALAAAAAAEAAQAAAIGTACXaHkFADs=)!important;
   color: #bcc8dc!important;}

_________________
There is only one God.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum