[gnome 3] utiliser Adwaita dark y compris gtk2 (résolu)

Questions et astuces concernant l'installation et la configuration d'archlinux
psychoslave
Hankyu
Messages : 23
Inscription : mer. 11 mars 2009, 18:18

[gnome 3] utiliser Adwaita dark y compris gtk2 (résolu)

Message par psychoslave »

Hop, en fait j'ai déjà trouvé la solution, je vous poste le sujet pour la fournir.

Si vous utilisez gnome 3, vous aurez peut être remarqué que certaines fenêtres apparaissent avec un thème sombre (comme l'application de visualisation d'images). Si vous aimez ce thème, voici comment faire pour l'utiliser dans toutes vos fenêtres.

Tout d'abord votre fichier $HOME/.config/gtk-3.0/settings.ini (créez le répertoire et le fichier s'il n'existe pas) doit contenir :

Code : Tout sélectionner

[Settings]
gtk-application-prefer-dark-theme=true
Relancez le moteur de thème (alt+F2 et saisissez r), vous y êtes (relancer les applis au besoin).

Seulement vous aurez sans doute encore pas mal d'appli gtk2 dans les pattes, et là, point de thème sombre ! La solution que j'ait trouvé est de modifier à la manu militari /usr/share/themes/Adwaita/gtk-2.0/gtkrc :

Code : Tout sélectionner

# ça vous n'en voulez plus :
# gtk-color-scheme = "base_color:#ffffff\nfg_color:#000000\ntooltip_fg_color:#000000\nselected_bg_color:#86ABD9\nselected_fg_color:#ffffff\ntext_color:#1A1A1A\nbg_color:#EDECEB\ntooltip_bg_color:#E7F3FD"
# Voilà qui est mieux :
gtk-color-scheme = "base_color:#2E3436\nfg_color:#ffffff\ntooltip_fg_color:#ffffff\nselected_bg_color:#888A85\nselected_fg_color:#000000\ntext_color:#D3D7CF\nbg_color:#414747\ntooltip_bg_color:#33393A"
Voilà, coté navigateur web j'utilise firefox, pour l'instant j'ai choisi des couleurs dans la palette que propose les préférences (pas moyen de spécifier une valeur hexa précise) et décoché « autoriser les sites à choisir leurs propres couleurs »). Il faudra d'abord que je me documente pour proposer un style adwaita-dark pour le contenu des pages.
psychoslave
Hankyu
Messages : 23
Inscription : mer. 11 mars 2009, 18:18

Re: [gnome 3] utiliser Adwaita dark y compris gtk2 (résolu)

Message par psychoslave »

Et voilà le userContent.css à palcé dans vote $HOME/.Mozilla/$ID_PROFIL/chrome/ (seul le début est de mon fait, et je commence tout juste à l’utiliser, donc je ne garantie pas que tout fonctionne bien tout partout…) :

Code : Tout sélectionner

/* Obviate need to zoom on many sites. */
body {
  font-size: 100% !important;
  line-height: normal !important;
  background:#2E3436 !important;
  color:#eeeeec !important;
}
* {
  background:#2E3436 !important;
  /* #555753 */
}

h1, h2, h3, h4, h5, h6 {
    color:#729fcf;
}

blockquote{
            /*line-height:12px;*/
/*    border-left:#585A55 solid 5px !important;*/
    clear:both;
    padding-left:4% !important;
    padding-right:6% !important;



}
blockquote, blockquote p {
    clear:both;
    background:none  !important;
    /*background:#888a85  !important;*/
    color:#eeeeec !important;
    position:relative !important;
}
blockquote>p:firstline {
    margin-top:3% !important;
}

blockquote:before, blockquote:after { 
    font-size: 400% !important;
    line-height:1px !important;
    display:block; float:left;
    color:#6D706E !important;
    color:#384042 !important;
    
    margin:0px !important;
    padding:0px !important;
    position:absolute !important;

}

blockquote:before { 
    content:"« ";
    margin-left:-6%  !important;
    margin-top:-1%  !important;
}

blockquote:after { 
    text-align:right !important;
    content:' »';
    margin-left:86%  !important;
    margin-top:-6%  !important;
    clear:both !important;
}

*>a {
    color:#729fcf !important;
    text-decoration:none !important;
    /*border-bottom:dotted #729fcf 1px;*/
}

*>a:visited {
    color:#ad7fa8 !important;
}

*>a:hover {
    color:#3465a4 !important;
    /*border:1px #729fcf dotted;*/
    /*background:#2e3236  !important;*/
}

a.new { /* wikimedia : create page */
  color:#ef2929  !important;
}

/*
 * Disable the deprecated HTML <font> tag. (Like above,
 * reduces need to zoom.)
 */
font {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}

/* Put a thin black border around all dropdown forms like NS4.x */
:-moz-dropdown-list {
  border: 1px solid black !important;
  border-top-style: solid !important;
}

/* Disable marquee display */
marquee {
  -moz-binding: none; display: block; height: auto !important;
  /* This is better than just display:none !important;
   * because you can still see the text in the marquee,
   * but without scrolling.
   */
}

/*
 * Until bug 105547 is fixed, a helpful workaround to
 * highlight some links which would pop up a new window:
 */
:link:hover[target="_blank"],:visited:hover[target="_blank"] {
  color: white !important; background: red !important;
}
:link:hover[target="_new"],:visited:hover[target="_new"] {
  color: white !important; background: red !important;
}

/*
 * Many input forms have typing areas so small it's hard to use
 * them. On many of them, this sets a minimum width of about 50
 * characters, and a miniumum height of about 12 characters.
 */
textarea {
  min-width: 50ex !important;
  min-height: 12em !important;
}

/* Improve scroll performance on slow machines on some sites. */
* {
  background-attachment: scroll !important;
}

/*
 * Ignore user-specified style in mail messages.
 * See http://bugzilla.mozilla.org/show_bug.cgi?id=18427 for details.
 */
.moz-text-html font, .moz-text-html div, .moz-text-html body {
  font-size: inherit !important;
  font-family: inherit !important;
  color: inherit !important;
  background-color: inherit !important;
  background-image: inherit !important;
  text-align: inherit !important;
  text-indent: inherit !important;
}

/*
 * These are for chatzilla:
 */

/* defaults for anything in the chatzilla content area */
.output-window {
    background: #555 !important;
    color: white !important;
    font-weight: bold !important;

    /* for testing CSS syntax:
    border-style: solid;
    border-width: thick;
    border-color: #0f0 !important;
     */
}

/* messages I type */
.msg[msg-user$="ME!"] .msg-data {
    color: orange !important;
    background: #555 !important;
}

/* every other message can have a different color,
 * to make it easier to follow conversations
 */
.msg[mark="odd"] .msg-data {
    color: white !important;
    background: #666 !important;
}

/* messages directed to me */
.msg[important] .msg-data {
    color: yellow !important;
    /* background: gray !important; */
}

/* messages when people leave the channel */
.msg[msg-type="QUIT"] .msg-data {
    background: #444 !important;
    color: yellow !important;
}

Répondre