123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- .. _Customization:
- =============
- Customization
- =============
- Aliases
- =======
- If you use an option of Ducker very often, you
- should consider making a shortcut for it in your shell.
- In Bash-like shells, you can make aliases. Let's say we want
- to add an option to search for articles in Wikipedia;
- we can create a Bash alias for that.
- ``alias wikipedia='ducker \!w'``
- After that, calling ``wikipedia`` in the shell will open the main
- page of wikipedia, and calling ``wikipedia free software``
- would open the `"Free software" article from wikipedia`_.
- Note that we're using `DuckDuckGo bangs`_ and that the
- exclamation mark (!) must be escaped in Bash. To make Bash
- remember your alias for your next sessions you must add
- it to your ``.bashrc`` file.
- .. _colors-of-the-interactive-mode:
- Colors of the interactive mode
- ==============================
- Ducker allows you to customize the color scheme via a six-letter string,
- reminiscent of BSD LSCOLORS. The six letters represent the colors of:
- - indices,
- - titles,
- - URLs,
- - nothing (may probably be used in a later version),
- - abstracts,
- - and prompts
- respectively. The six-letter string is passed in either as the argument
- to the --colors option.
- We offer the following colors/styles:
- ====== =================================================
- Letter Color/Style
- ====== =================================================
- a black
- b red
- c green
- d yellow
- e blue
- f magenta
- g cyan
- h white
- i bright black
- j bright red
- k bright green
- l bright yellow
- m bright blue
- n bright magenta
- o bright cyan
- p bright white
- A-H bold version of the lowercase-letter color
- I-P bold version of the lowercase-letter bright color
- x normal
- X bold
- y reverse video
- Y bold reverse video
- ====== =================================================
- The default colors string is GKlgxy, which stands for
- - bold bright cyan indices
- - bold bright green titles
- - bright yellow URLs
- - cyan metadata/publishing info
- - normal abstracts
- - reverse video prompts
- Note that:
- - Bright colors (implemented as \x1b[90m - \x1b[97m) may not be available in all color-capable terminal emulators;
- - Some terminal emulators draw bold text in bright colors instead;
- - Some terminal emulators only distinguish between bold and bright colors via a default-off switch.
- Please consult the manual of your terminal emulator as well as
- https://en.wikipedia.org/wiki/ANSI_escape_code for details.
- .. _DuckDuckGo bangs: https://duckduckgo.com/bang
- .. _"Free software" article from wikipedia: https://en.wikipedia.org/wiki/Free_software
|