Rxvt-unicode (Српски)

From ArchWiki
Revision as of 23:03, 2 June 2011 by TingoL (Talk | contribs)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

rxvt-unicode visoko prilagodljivi terminal emulator nastao od rxvt. Poznatiji kao urxvt, rxvt-unicode može biti daemonizovan tako da pokreće klijente u okviru jednog procesa kako bi smanjio korišćenje sistemskih resursa. Razvijen od strane Marc Lehmann-a, neke od značajnijih odlika rxvt-unicode uključuju internacionalnu podršku jezika kroz Unicode, mogućnost da prikaže različite tipove fonta i podrška za Perl ekstenzije.

Instalacija

Template:Package Official je dostupan u [extra] i uključuje podršku 256 boja:

# pacman -S rxvt-unicode

Template:Package AUR je dostupan u AUR i uključuje popravku za kvar širine fonta i dodaje podršku za ignorisanje hintova za veličinu prozora (zaključavanje veličine prozora na n_columns * column_width, itd.) bez mrtvog prostora.

Konfiguracija

Pogledajte rxvt-unicode dokumentaciju za kompletnu listu dostupnih podešavanja i vrednosti.

Kreiranje ~/.Xresources

Izgled, osećaj i funkcija rxvt-unicode je kontrolisana preko argumenata komandne linije i/ili X resources. X resources se može podesiti preko Template:Filename i xrdb, pogledajte wiki stranu za detalje.

Note: Argumenti u komandnoj liniji imaju prednost u odnosu na podešavanja resursa određenih u ovom fajlu.

Prava providnost

Za korišćenje prave providnosti morate koristiti menadžer prozora koji podržava compositing ili poseban compositor.

Iz komandne linije:

$ urxvt -depth 32 -bg rgba:3f00/3f00/3f00/dddd

Koristeći konfiguracioni fajl:

Template:File

Traka za pomeranje

Izgled trake za pomeranje može biti odabran kroz ovaj unos u Template:Filename:

# scrollbar style - rxvt (default), plain, next, ili xterm
URxvt*scrollstyle:rxvt

Od kojih je "plain" najkompaktniji.

Metode Deklaracije Fontova

URxvt.font:  9x15

je isto što i:

URxvt.font:  -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1

i:

URxvt.font:  9x15bold

je isto što i:

URxvt.font:  -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1

Kompletna lista skraćenica X core fontova se može naći u Template:Filename (takođe postoje neki fonts.alias u nekim od drugih poddirektorijuma Template:Filename, ali kako su oni pakovani odvojeno od pravih fontova, mogu prikazati fontove koje uopšte nemate instalirane). Treba reći i da ovi kratki alijasi biraju ISO-8859-1 verziju fonta pre nego ISO-10646-1 (Unicode) verzije, i 75 DPI pre nego 100 DPI verzije, pa je verovatno bolje izbegavati ih i birati fontove po njihovom punom, dužem imenu.

  • Pasus iznad važi samo za bitmap fontove. Xft fontovi mogu biti određeni koristeći sledeći format:
Urxvt.font: xft:monaco:size=10

Ili

Urxvt.font: xft:monaco:bold:size=10

Perl ekstenzije

Klikabilni URLovi

Možete podesiti klikabilne URLove u terminalu koristeći matcher ekstenziju. Na primer, za otvaranje linkova u Firefox dodajte sledeće u Template:Filename:

URxvt.perl-ext-common:  default,matcher
URxvt.urlLauncher:      /usr/bin/firefox
URxvt.matcher.button:   1 

Duplikatni URLovi (Bez Miša)

Kao dodatak, možete odibarati i otvarati URLove u vašem web pregledaču bez korišćenja miša.

Instalirajte Template:Package Official paket iz [community] repoa i podesite vaš Template:Filename prema potrebi. Primer je prikazan ispod:

URxvt.perl-ext:      default,url-select
URxvt.keysym.M-u:    perl:url-select:select_next
URxvt.urlLauncher:   firefox
URxvt.underlineURLs: true
Note: Ova ekstenzija menja Klikabilni URLovi ekstenziju pomenutu iznad pa matcher može biti uklonjen iz URxvt.perl-ext liste.

Key commands:

Template:Keypress + Template:Keypress Ulaz u odabirni modus. Poslednji URL na vašem ekranu će biti odabran. Možete ponoviti Alt+u da odaberete sledeći URL iznad.

Template:Keypress Odabir sledećeg URLa iznad

Template:Keypress Odabir sledećeg URLa ispod

Template:Keypress Otvaranje odabranog URLa u pregledaču i izlaz iz odabirnog modusa

Template:Keypress Otvaranje odabranog URLa u pregledaču bez izlaska iz odabirnog modusa

Template:Keypress Kopiranje (dupliranje) odabranog URLa i izlaz iz odabirnog modusa

Template:Keypress Izlaz iz odabirnog modusa

Tabovi

Za dodavanje tabova u urxvt, dodajte sledeće u vaš Template:Filename:

URxvt.perl-ext-common:  default,tabbed

To control tabs use:

Template:Keypress + Template:Keypress novi tab

Template:Keypress + Template:Keypress prelazak u tab levo

Template:Keypress + Template:Keypress prelazak u tab desno

Template:Keypress + Template:Keypress pomeranje taba u levo

Template:Keypress + Template:Keypress pomeranje taba u desno

Template:Keypress + Template:Keypress: zatvaranje taba

Možete promeniti boje tabova na sledeći način:

URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg:    3
URxvt.tabbed.tab-bg:    0

Boje moraju biti određene korišćenjem indeksa boja: 0 do 15 odgovaraju bojama iz rxvt uputstva sekcija "Boja i Grafika".

BOJA I GRAFIKA

Ako je grafička podrška omogućena u vreme kompajliranja, može biti pokrenut sa ANSI escape sekvencama i može prikazati individualne piksele umesto tekstualnih karaktera. Treba paziti jer se grafička podrška i dalje smatra beta kodom.

Kao dodatak osnovnim foreground i background bojama, rxvt može prikazati do 16 boja (8 ANSI boja plus visoko-intenzivna bold/blink
verzije istih). Evo liste boja sa njihovim rgb.txt imenima.

color0 	(crna)   	= Black
color1 	(crvena)        = Red3
color2 	(zelena) 	= Green3
color3 	(žuta) 	        = Yellow3
color4 	(plava)	        = Blue3
color5 	(purpurna)  	= Magenta3
color6 	(cyan) 	        = Cyan3
color7 	(bela) 	        = AntiqueWhite
color8 	(svetlo crna) 	= Grey25
color9 	(svetlo crvena)	= Red
color10 (svetlo zelena)	= Green
color11 (svetlo žuta)   = Yellow
color12 (svetlo plava) 	= Blue
color13 (sveto purpurna)= Magenta
color14 (svetlo cyan) 	= Cyan
color15 (svetlo bela) 	= White
foreground 		= Black
background 		= White

Takođe je moguće odrediti vrednost boje od foreground, background, cursorColor, cursorColor2, colorBD, colorUL kao broj 0-15, kao korisna skraćenica koja se odnosi na ime boje od color0-color15.

Komanda -rv ("reverseVideo: True") simulira obrnuti video tako što uvek menja foreground sa background bojom. Ovo je u kontrastu sa xterm(1)
gde su boje obrnute samo ako inače nisu bile određene. Na primer,

rxvt -fg Black -bg White -rv
    bi prikazao belu na crnoj,dok na xterm(1) bi prikazalo crnu na beloj. 

Za imenovane tabove, pogledajte ovaj paket u AUR, (Shift+Up: imenuje tab).

Improving Performance

  • Avoid the use of Xft fonts. If Xft fonts must be used, append Template:Codeline to the setting value.[1]

Cut and Paste

For users unfamiliar with Xorg data transfer methods, the exchange of information to and from rxvt-unicode can become a burden. Suffice to say that rxvt-unicode uses cut buffers which are typically loaded into the current PRIMARY selection by default.[4] Users are urged to review Wikipedia:X Window selection for additional information.

Clipboard Management

  • Parcellite is a GTK+ clipboard manager which can also run in the background as a daemon.
  • autocutsel provides command line and daemon interfaces to synchronize PRIMARY, CLIPBOARD and cut buffer selections.
  • Glipper is a GNOME panel applet with older versions available for use in environments other than GNOME.
  • Clipman (xfce-clipman-plugin) is a GUI clipboard manager plugin for the Xfce panel (xfpanel).

Automatic Script Management

Skottish[5] created a perl script to automatically copy any selection in urxvt to the X clipboard. Save the following as Template:Filename:

#! /usr/bin/perl

sub on_sel_grab {
    my $query=quotemeta $_[0]->selection;
    $query=~ s/\n/\\n/g;
    $query=~ s/\r/\\r/g;
    system( "echo -en " . $query . " | xsel -i -b -p" );
}

Xyne has also created his own variation of Skottish's script (which is also available in the AUR):

#! /usr/bin/perl

sub on_sel_grab {
    my $query = $_[0]->selection;
    open (my $pipe,'|-','xsel -ibp') or die;
    print $pipe $query;
    close $pipe;
}

It also requires Template:Codeline and needs to be enabled in the Template:Codeline or Template:Codeline field in Template:Filename. For example:

URxvt.perl-ext-common: default,clipboard

Improved Kuake-like Behavior in Openbox

This was originally posted on the forum by Xyne[6] and it relies on Template:Codeline which is available in the community repo.

Scriptlets

Save this scriptlet from the Template:Codeline man page somewhere on your system as Template:Filename (e.g., in Template:Filename):

#!/bin/sh
urxvtc "$@"
if [ $? -eq 2 ]; then
   urxvtd -q -o -f
   urxvtc "$@"
fi

and save this one as Template:Filename:

#!/bin/bash

wid=$(xdotool search --classname urxvtq)
if [ -z "$wid" ]; then
  /path/to/urxvtc -name urxvtq -geometry 80x28
  wid=$(xdotool search --classname urxvtq | head -1)
  xdotool windowfocus $wid
  xdotool key Control_L+l
else
  if [ -z "$(xdotool search --onlyvisible --classname urxvtq 2>/dev/null)" ]; then
    xdotool windowmap $wid
    xdotool windowfocus $wid
  else
    xdotool windowunmap $wid
  fi
fi

A previous version of xdotool introduced a bug which disabled recognition of visible windows and thus led some users to use the following scriptlet in place of the previous one. This is no longer necessary as xdotool>=1.20100416.2809, but it has been left here for future reference.

#!/bin/bash

wid=$(xprop -name urxvtq | grep 'WM_COMMAND' | awk -F ',' '{print $3}' | awk -F '"' '{print $2}')
if [ -z "$wid" ]; then
  /path/to/urxvtc -name urxvtq -geometry 200x28
  wid=$(xprop -name urxvtq | grep 'WM_COMMAND' | awk -F ',' '{print $3}' | awk -F '"' '{print $2}')
  xdotool windowfocus $wid
  xdotool key Control_L+l
else
  if [ -z "$(xprop -id $wid | grep 'window state: Normal' 2>/dev/null)" ]; then
    xdotool windowmap $wid
    xdotool windowfocus $wid
  else
    xdotool windowunmap $wid
  fi
fi

Make sure that you change Template:Filename to the actual path to the Template:Filename scriptlet that you saved above. We'll be using Template:Filename to launch both regular instances of Template:Codeline and the kuake-like instance.

urxvtq with tabbing

If you want to have tabs in your kuake-like Template:Filename (here called Template:Filename) just replace the third line in your Template:Filename:

wid=$(xdotool search --name urxvtq)

with:

wid=$(xdotool search --name urxvtq | grep -m 1 "" )

To activate the tab support, you can either replace the fifth line of your Template:Filename:

/path/to/urxvtc -name urxvtq -geometry 80x28

with:

/path/to/urxvtc -name urxvtq -pe tabbed -geometry 80x28

or replace this line of your Template:Filename:

URxvt.perl-ext-common: default,matcher

with

URxvt.perl-ext-common: default,matcher,tabbed

Tab control

<SHIFT>-Left: Switch to the tab left of current one

<SHIFT>-Right: Switch to the tab right of current one

<SHIFT>-Down: Create a new tab

You can also use your mouse to switch the tabs by clicking the wished one and create a new tab by clicking on [NEW].\\

To close a tab just enter 'exit' like you'll close a terminal.

Openbox configuration

Now add the following lines to the Template:Codeline section of Template:Filename:

<application name="urxvtq">
   <decor>no</decor>
   <position force="yes">
     <x>center</x>
     <y>0</y>
   </position>
   <desktop>all</desktop>
   <layer>above</layer>
   <skip_pager>yes</skip_pager>
   <skip_taskbar>yes</skip_taskbar>
   <maximized>Horizontal</maximized>
</application>

and add these lines to the Template:Codeline section:

<keybind key="W-t">
  <action name="Execute">
    <command>/path/to/urxvtc</command>
  </action>
</keybind>
<keybind key="W-grave">
  <action name="Execute">
    <execute>/path/to/urxvtq</execute>
  </action>
</keybind>

Here too you need to change the Template:Filename lines to point to the scripts that you saved above. Save the file and then reconfigure Openbox. You should now be able to launch regular instances of urxvt with the Windows/Super key + "t", and toggle the kuake-like console with Windows/Super+grave (`).

Further configuration

The advantage of this configuration over the urxvt kuake perl script is that Openbox provides more keybinding options such as modifier keys. The kuake script hijacks an entire physical key regardless of any modifier combination. Review the Openbox bindings documentation for the full range or possibilities.

The Openbox per-app settings can be used to further configure the behavior of the kuake-like console (e.g. screen position, layer, etc). You may need to change the "geometry" parameter in the Template:Filename scriptlet to adjust the height of the console.

Related scripts

Troubleshooting

Transparency not working after upgrade to V9.09

The rxvt-unicode devs removed compatibility code for a lot of non standard wallpaper setters with this update. Using a non compatible wallpaper setter will break transparency support. Recommended wallpaper setters:

  • feh
  • hsetroot
  • esetroot

To make true transparency work, make sure to comment urxvt*tintColor and urxvt*inheritPixmap.

Remote Hosts

If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by copying Template:Filename from your local machine to your host at Template:Filename.

Using rxvt-unicode as gmrun terminal

Unlike some other terminals, urxvt expects the arguments to -e to be given separately, rather than grouped together with quotes. This causes trouble with gmrun, which assumes the opposite behavior. This can be worked around by putting an "eval" in front of gmrun's "Terminal" variable in .gmrunrc:

Terminal = eval urxvt
TermExec = ${Terminal} -e

(gmrun uses /bin/sh to execute commands, so the "eval is understood here.) The "eval" has the side-effect of "breaking up" the argument to -e in the same way $@ does in bash, making the command intelligible to urxvt.

External resources