aptitude-TUI auf schwarz auf weiß umstellen

Software besorgen und anwenden
Post Reply
Message
Author
eared

aptitude-TUI auf schwarz auf weiß umstellen

#1 Post by eared »

Hallo Leute,

kann man irgendwie dem aptitude-TUI beibringen, auf einem weißen Hintergrund schwarze Schrift zu präsentieren. Ich würde das als viel lesefreundlicher empfinden.

Zwar habe ich /usr/share/aptitude/aptitude.conf gefunden, aber da steht etwas völlig anderes drin als in der /etc/apt/aptitude.conf. Jetzt weiß ich nicht, was wie machen.

Ganz davon abgesehen, dass ich aus dem Inhalt von usr/share/aptitude/aptitude.conf nicht besonders schlau werde und keine der Optionen der Umstellung von schwarze Schrift auf weißem Hintergrund zuordnen kann.

Weiß einer, wie ich die gewünschte Funktion hinbekomme? Oder wo ich es nachlesen kann?


Eared

User avatar
Asa
Posts: 30
Joined: 11. Jul 2007 16:09

#2 Post by Asa »

hi,

hab mich damit zwar noch nicht ausführlich beschäftigt (komme mit den farben ganz gut klar ;-) ), aber schau mal in der /usr/share/doc/aptitude/README. da gibt es einen abschnitt über "customizing text colors and styles" ... ach was, wo ich es gerade vor mir habe, poste ich es mal mit (wenn's ganz passt):

Code: Select all

Customizing text colors and styles

The colors and visual styles used by aptitude to display text can be extensively
customized. Each visual element has an associated ``style'', which describes the
particular colors and visual attributes that will be used to display that
element. Styles take the form of a list of color and attribute settings. This
list is not necessarily exhaustive; if some colors or attributes are not
explicitly specified, their values will be taken from the surrounding visual
context. In fact, most visual elements have an ``empty'' style by default.

You can change the contents of a style by creating a configuration group of the
same name in the apt or aptitude configuration file. For instance, the
``MenuBorder'' style is used to draw the visual border around drop-down menus.
By default, this border is drawn bold and white-on-blue. Placing the following
text in the configuration file would change it to white-on-cyan:

Aptitude::UI::Styles {
  MenuBorder {fg white; bg cyan; set bold;};
};

As you can see, a style's configuration group consists of a sequence of
instructions. The general classes of instructions are:



  fg color
      Sets the text foreground to the given color. See below for a list of the
      colors known to aptitude.


  bg color
      Sets the text background to the given color. See below for a list of the
      colors known to aptitude.


  set attribute
      Enables the given text attribute. See below for a list of the text
      attributes known to aptitude.


  clear attribute
      Disables the given text attribute. See below for a list of the text
      attributes known to aptitude.


  flip attribute
      Toggles the given text attribute: if it is enabled in the surrounding
      element, it will be disabled, and vice versa. See below for a list of the
      text attributes known to aptitude.


The colors that aptitude recognizes are black, blue, cyan, green, magenta, red,
white, and yellow [15]. In addition, you may specify default in place of a
background color to use the default terminal background (this could be the
default color, an image file, or even ``transparent''). The styles that aptitude
recognizes are:



  blink
      Enables blinking text.


  bold
      Makes the foreground color of the text (or the background if reverse video
      is enabled) brighter.


  dim
      May cause text to be extra-dim on some terminals. No effect has been
      observed on common Linux terminals.


  reverse
      Swaps the foreground and background colors. Many visual elements flip this
      attribute to perform common highlighting tasks.


  standout
      This enables ``the best highlighting mode of the terminal''. In xterms it
      is similar, but not idential to, reverse video; behavior on other
      terminals may vary.


  underline
      Enables underlined text.


You can select several attributes at once by separating them with commas; for
instance, set bold,standout;.


 [Note]  Note

         As hinted at above, the interpretation of both styles and text
         attributes is highly terminal-dependent. You may need to experiment a
         bit to find out exactly what some settings do on your terminal.


The following styles can be customized in aptitude:

Figure 2.11. Customizable styles in aptitude

 ______________________________________________________________________________
|Style                     |Default                  |Description              |
|__________________________|_________________________|_________________________|
|Bullet                    |fg yellow; set bold;     |The style of the bullets |
|                          |                         |in bulleted lists.       |
|__________________________|_________________________|_________________________|
|                          |                         |The style of newer       |
|                          |                         |versions of the package  |
|                          |                         |in the changelog view.   |
|                          |                         |Note that aptitude will  |
|ChangelogNewerVersion     |set bold;                |only highlight newer     |
|                          |                         |versions of the package  |
|                          |                         |if you have the package  |
|                          |                         |libparse-debianchangelog-|
|                          |                         |perl installed.          |
|__________________________|_________________________|_________________________|
|Default                   |fg white; bg black;      |The basic style of the   |
|                          |                         |screen.                  |
|__________________________|_________________________|_________________________|
|DepBroken                 |fg black; bg red;        |The style of unfulfilled |
|                          |                         |dependencies.            |
|__________________________|_________________________|_________________________|
|                          |fg black; bg blue; set   |The style of menu entries|
|DisabledMenuEntry         |dim;                     |that are disabled and    |
|                          |                         |cannot be used.          |
|__________________________|_________________________|_________________________|
|                          |                         |The style used to        |
|                          |                         |indicate that a file was |
|DownloadHit               |fg black; bg green;      |``hit'': i.e., it has not|
|                          |                         |changed since the last   |
|                          |                         |time it was downloaded.  |
|__________________________|_________________________|_________________________|
|DownloadProgress          |fg blue; bg yellow;      |The style of the progress|
|                          |                         |indicator for a download.|
|__________________________|_________________________|_________________________|
|                          |                         |The style of line editors|
|EditLine                  |fg white; bg black; clear|(for instance, the entry |
|                          |reverse;                 |in the ``Search''        |
|                          |                         |dialog).                 |
|__________________________|_________________________|_________________________|
|Error                     |fg white; bg red; set    |The style of error       |
|                          |bold;                    |messages.                |
|__________________________|_________________________|_________________________|
|Header                    |fg white; bg blue; set   |The style of screen      |
|                          |bold;                    |headers.                 |
|__________________________|_________________________|_________________________|
|                          |fg white; bg blue; set   |The style of the         |
|HighlightedMenuBar        |bold,reverse;            |currently selected menu  |
|                          |                         |name in the menu bar.    |
|__________________________|_________________________|_________________________|
|                          |fg white; bg blue; set   |The style of the         |
|HighlightedMenuEntry      |bold,reverse;            |currently selected choice|
|                          |                         |in a menu.               |
|__________________________|_________________________|_________________________|
|                          |fg yellow; bg red; set   |The style of the dialog  |
|MediaChange               |bold;                    |used to ask the user to  |
|                          |                         |insert a new CD.         |
|__________________________|_________________________|_________________________|
|MenuBar                   |fg white; bg blue; set   |The style of the menu    |
|                          |bold;                    |bar.                     |
|__________________________|_________________________|_________________________|
|                          |fg white; bg blue; set   |The style of the borders |
|MenuBorder                |bold;                    |that surround a drop-down|
|                          |                         |menu.                    |
|__________________________|_________________________|_________________________|
|MenuEntry                 |fg white; bg blue;       |The style of each entry  |
|                          |                         |in a drop-down menu.     |
|__________________________|_________________________|_________________________|
|MineBomb                  |fg red; set bold;        |The style of bombs in    |
|                          |                         |Minesweeper.             |
|__________________________|_________________________|_________________________|
|                          |                         |The style of the border  |
|MineBorder                |set bold;                |drawn around a           |
|                          |                         |Minesweeper board.       |
|__________________________|_________________________|_________________________|
|MineFlag                  |fg red; set bold;        |The style of flags in    |
|                          |                         |Minesweeper.             |
|__________________________|_________________________|_________________________|
|                          |                         |The style of the number N|
|MineNumberN               |Various                  |in Minesweeper; N may    |
|                          |                         |range from 0 to 8.       |
|__________________________|_________________________|_________________________|
|                          |                         |The color used to display|
|MultiplexTab              |fg white; bg blue;       |``tabs'' other than the  |
|                          |                         |currently selected one.  |
|__________________________|_________________________|_________________________|
|                          |                         |The color used to display|
|MultiplexTabHighlighted   |fg blue; bg white;       |the currently selected   |
|                          |                         |``tab''.                 |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages in |
|PkgBroken                 |fg red; flip reverse;    |the package list which   |
|                          |                         |have unfulfilled         |
|                          |                         |dependencies.            |
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|PkgBrokenHighlighted      |fg red;                  |packages in the package  |
|                          |                         |list which have          |
|                          |                         |unfulfilled dependencies.|
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages    |
|PkgNotInstalled           |                         |which are not currently  |
|                          |                         |installed and will not be|
|                          |                         |installed.               |
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|PkgNotInstalledHighlighted|                         |packages which are not   |
|                          |                         |currently installed and  |
|                          |                         |will not be installed.   |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages    |
|PkgIsInstalled            |set bold;                |which are currently      |
|                          |                         |installed and for which  |
|                          |                         |no actions are scheduled.|
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|                          |                         |packages which are       |
|PkgIsInstalledHighlighted |set bold; flip reverse;  |currently installed and  |
|                          |                         |for which no actions are |
|                          |                         |scheduled.               |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages in |
|PkgToHold                 |fg white; flip reverse;  |the package list which   |
|                          |                         |are on hold.             |
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|PkgToHoldHighlighted      |fg white;                |packages in the package  |
|                          |                         |list which are on hold.  |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages in |
|PkgToInstall              |fg green; flip reverse;  |the package list which   |
|                          |                         |are being installed (not |
|                          |                         |upgraded) or reinstalled.|
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|                          |                         |packages in the package  |
|PkgToInstallHighlighted   |fg green;                |list which are being     |
|                          |                         |installed (not upgraded) |
|                          |                         |or reinstalled.          |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages in |
|PkgToRemove               |fg magenta; flip reverse;|the package list which   |
|                          |                         |will be removed or       |
|                          |                         |purged.                  |
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|PkgToRemoveHighlighted    |fg magenta;              |packages in the package  |
|                          |                         |list which will be       |
|                          |                         |removed or purged.       |
|__________________________|_________________________|_________________________|
|                          |                         |The style of packages in |
|PkgToUpgrade              |fg cyan; flip reverse;   |the package list which   |
|                          |                         |will be upgraded.        |
|__________________________|_________________________|_________________________|
|                          |                         |The style of highlighted |
|PkgToUpgradeHighlighted   |fg cyan;                 |packages in the package  |
|                          |                         |list which will be       |
|                          |                         |upgraded.                |
|__________________________|_________________________|_________________________|
|                          |                         |The style of progress    |
|                          |                         |indicators such as the   |
|Progress                  |fg blue; bg yellow;      |one that appears while   |
|                          |                         |the package cache is     |
|                          |                         |being loaded.            |
|__________________________|_________________________|_________________________|
|SolutionActionApproved    |bg green;                |The style of approved    |
|                          |                         |actions in a solution.   |
|__________________________|_________________________|_________________________|
|SolutionActionRejected    |bg red;                  |The style of rejected    |
|                          |                         |actions in a solution.   |
|__________________________|_________________________|_________________________|
|                          |fg white; bg blue; set   |The style of status lines|
|Status                    |bold;                    |at the bottom of the     |
|                          |                         |screen.                  |
|__________________________|_________________________|_________________________|
|TreeBackground            |                         |The basic color of all   |
|                          |                         |visual lists and trees.  |
|__________________________|_________________________|_________________________|
|                          |fg red; bg black; set    |The color used to display|
|TrustWarning              |bold;                    |warnings about package   |
|                          |                         |trust.                   |
|__________________________|_________________________|_________________________|
hoffe das hilft
gruß, asa
mihi enim liber esse non videtur, qui non aliquando nihil agit.
M. Tullius Cicero

eared

#3 Post by eared »

Hallo Asa,

ja, das habe ich gefunden. Aber wo packt man die Konfigurationsdatei hin? Es gibt eine /root/.aptitude/conf, gehören diese Anweisungen da rein? Irgendwo, meine ich, hätte ich gelesen, diese Anweisungen gehören nach /etc/aptitude/, doch da finde ich nichts passendes.

Sonst hat man doch als User immer eine .anwendungrc rumliegen, die man versuchen kann, anzupassen. Oder ein template mit einer klaren Anweisung, wie man sie behandeln muss, um eine eigene Konfiguration zu bekommen.


Eared

User avatar
Asa
Posts: 30
Joined: 11. Jul 2007 16:09

#4 Post by Asa »

hi,
also ich würde es in die /root/.aptitude/config packen (auf meinem debian-system heißt sie config, aber das kann in anderen distris auch abweichen, denke ich). faustregel ist doch auch: user-config überschreibt system-config. außerdem ist das nur eine datei (in /etc/apt legt debian gleich eine etwas komplexere struktur an)... die kann man bequem wegsichern, ändern und wenn es nicht klappt zurückdrehen.

viel erfolg! (und weil ich neugierig bin (kann man je genug lernen?): wenn es so geht, lass es uns hier wissen...)

gruß, asa
mihi enim liber esse non videtur, qui non aliquando nihil agit.
M. Tullius Cicero

Post Reply