Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Table des matières

Urxvt : création de commandes personnalisées

  • Objet : complément du wiki système urxvt sur l'emploi et la création de raccourcis claviers pouvant changer à la volée les propriétés du terminal. Ce tuto constituera un listing des paramètres pouvant être employés à la création de commandes.
  • Niveau requis : FIXME
  • Commentaires : Contexte d'utilisation du sujet du tuto. FIXME

Introduction

Installation

Utilisation

URxvt.keysym.C-0: command:\033]710;xft:Hack:size=10:antialias=true\007

means that when Ctrl-0 is pressed:

\033] - send fake keystroke ESC-] (this announces a terminal control sequence) 710; - terminal control: set normal font, followed by the font description \077 - end command

711; - set bold font 712; - set italic font 713; - set bold/italic font

URxvt.keysym.C-0: command:\033]710;xft:Hack:size=10:antialias=true\007\033]711;xft:Hack:size=10:bold:antialias=true\007

Thanks a lot for posting the solution!

'\33]50;%s%d\007'

Does anybody know what this means though? I have the following lines in my .Xdefaults

$ cat .Xdefaults | grep pixel urxvt*boldFont: xft:terminus:pixelsize=13 urxvt*font: xft:Terminus:pixelsize=13

And the result appears to be, that if I apply the solution in this thread, it will make bold fonts look wierd, like for example:

~ $ cat ~/bin/fsize #!/bin/bash printf '\33]50;%s%d\007' “xft:Terminus:pixelsize=” $1

printf '\33]50;%s\007' “xft:Terminus:pixelsize=20”

! :Bind C-0, C-+ and C-= to activate small, medium, and big font size resp. URxvt.keysym.C-0: command:\033]710;-*-dina-medium-r-normal–13-*-*-*-*-*-*-*\007 URxvt.keysym.C-minus: command:\033]710;-*-dina-medium-r-normal–15-*-*-*-*-*-*-*\007 URxvt.keysym.C-equal: command:\033]710;-*-dina-medium-r-normal–16-*-*-*-*-*-*-*\007

/*

  • XTerm escape sequences: ESC ] Ps;Pt (ST|BEL)
  • 0 = change iconName/title
  • 1 = change iconName
  • 2 = change title
  • 4 = change color

+ * 10 = change fg color + * 11 = change bg color

  • 12 = change text color
  • 13 = change mouse foreground color
  • 17 = change highlight character colour

@@ -2949,20 +3236,21 @@

  • 50 = change font
  • rxvt extensions:

- * 10 = menu (may change in future)

  • 20 = bg pixmap
  • 39 = change default fg color
  • 49 = change default bg color
  • 55 = dump scrollback buffer and all of screen
  • 701 = change locale
  • 702 = find font

+ * 703 = menu

  • /

#!/bin/sh printf '\033]10;red\007' printf '\033]11;green\007'

! change to red background URxvt.keysym.C-7: command:\033]11;#ff0000\007

! change to light background URxvt.keysym.C-8: command:\033]11;#ffffff\007

! change to dark gray background URxvt.keysym.C-9: command:\033]11;#777777\007

If you want to set foreground and background color at the same time, just concatenate the commands (some colors are defined by names):

! change to red background URxvt.keysym.C-7: command:\033]11;#ff0000\007\033]10;yellow\007

echo -e '\033]11;#ff0000\007\033]10;yellow\007' # changes to red background and yellow foreground I used code 11 for background color and code 10 for foreground color. The definitions for Urxvt cited by Thomas Dickey indicate to use 49 and 39 instead (which I tested and also work).

I don't like the key-bindings. How do I change them?

  There are some compile-time selections available via configure. Unless you have run configure with the CW--disable-resources option you can use the `keysym' resource to alter the keystrings associated with keysyms. Here's an example for a URxvt session started using CWurxvt -name URxvt
     URxvt.keysym.Home:          \033[1~
     URxvt.keysym.End:           \033[4~
     URxvt.keysym.C-apostrophe:  \033<C-'>
     URxvt.keysym.C-slash:       \033<C-/>
     URxvt.keysym.C-semicolon:   \033<C-;>
     URxvt.keysym.C-grave:       \033<C-`>
     URxvt.keysym.C-comma:       \033<C-,>
     URxvt.keysym.C-period:      \033<C-.>
     URxvt.keysym.C-0x60:        \033<C-`>
     URxvt.keysym.C-Tab:         \033<C-Tab>
     URxvt.keysym.C-Return:      \033<C-Return>
     URxvt.keysym.S-Return:      \033<S-Return>
     URxvt.keysym.S-space:       \033<S-Space>
     URxvt.keysym.M-Up:          \033<M-Up>
     URxvt.keysym.M-Down:        \033<M-Down>
     URxvt.keysym.M-Left:        \033<M-Left>
     URxvt.keysym.M-Right:       \033<M-Right>
     URxvt.keysym.M-C-0:         list \033<M-C- 0123456789 >
     URxvt.keysym.M-C-a:         list \033<M-C- abcdefghijklmnopqrstuvwxyz >
     URxvt.keysym.F12:           command:\033]701;zh_CN.GBK\007
     
     

urxvt -fn xft:Monospace-12

URxvt.font: xft:Monospace-12

echo -e '\033]50;xft:Monospace-12\007'

URxvt.keysym.Control-t: command:\033]11;[80]#000\007 URxvt.keysym.Control-M-t: command:\033]11;#000\007

URxvt.perl-ext-common: default,matcher URxvt.url-launcher: firefox URxvt.matcher.button: 3

http://pwet.fr/man/linux/conventions/urxvt/ https://wiki.archlinux.fr/Urxvt https://bbs.archlinux.org/extern.php?tid=44121&type=atom https://unix.stackexchange.com/questions/232881/urxvt-change-background-color-on-the-fly

utilisateurs/david5647/tutos/accueil.txt · Dernière modification: 31/10/2019 19:13 par David5647

Pied de page des forums

Propulsé par FluxBB