The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

20

Yes, finally found my mistake. It seems like you need to install the package rxvt-unicode-256color to get 256 color support. sudo apt-get install rxvt-unicode-256color is the answer to my problems.


20

For pasting text, in urxvt/rxvt-unicode you can use middle button to paste PRIMARY selection and Alt/Meta+middle button to paste CLIPBOARD. For copying, just marking the text in the terminal copies it to the PRIMARY selection. Some work is needed for copying to the CLIPBOARD selection though. I combined the information from the Archlinux page you linked ...


20

The eval extension shipped with rxvt-unicode has paste_clipboard and selection_to_clipboard actions for this, that can be bound to any keysym (see here). In your .Xresources add: URxvt.keysym.Shift-Control-V: eval:paste_clipboard URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard To disable the previous keybindings, you'll also need: URxvt.keysym....


16

Unfortunately, the X window system has several different copy-paste mechanisms. Rxvt, like most old-school X applications, uses the primary selection. Generally, when you select something with the mouse, it's automatically copied to the primary selection, and when you middle-click to paste, that pastes the primary selection. Ctrl+C and Ctrl+V (or other key ...


14

There are built-in mechanisms for copying/pasting to/from PRIMARY (is used when the user selects some data) and CLIPBOARD (is used when the user selects some data and explicitly requests it to be "copied" to the clipboard, such as by invoking "Copy" under the "Edit" menu of an application). More about different clipboards in X. For CLIPBOARD buffer it is ...


13

According to the manual, setting URxvt.boldFont to empty will disable the bold font, and uses regular font instead. This is the preferred way I think. URxvt.boldFont:


13

I'm currently using this version of #1 solution # save path on cd function cd { builtin cd $@ pwd > ~/.last_dir } # restore last saved path if [ -f ~/.last_dir ] then cd `cat ~/.last_dir` fi inside my .zshrc


13

urxvt 2.6 in 2004 added support for xterm's dynamic colors feature. In XTerm Control Sequences, this is OSC 11. OSC 10 sets the default text color. The changelog mentioned part of the change: 2.6 Fri Apr 2 03:24:10 CEST 2004 - minor doc corrections. - WARNING: changed menu sequence from ESC ] 10 to ESC ] 703 to avoid clashes ...


13

You've disabled keycap picture insert mode but not basic ISO 14755 mode. To disable both, set both to false. URxvt.iso14755: false URxvt.iso14755_52: false After changing ~/.Xresources, reload the file with xrdb -merge <~/.Xresources


12

This is actually pretty trivial; if you run urxvt from within your existing urxvt window, the new window will be in the same directory. I have dup aliased to urxvt & for this reason. If you want it bound to a hotkey, you can use bash's bind command. For example, to bind it to F1: $ bind '"\e[11~": "urxvt &\n"'


12

Shift+PageUp (and PageDown) works here, without any special settings... Have a look at man urxvt: pointerBlank: boolean True: blank the pointer when a key is pressed or after a set number of seconds of inactivity. False: the pointer is always visible [default]. [...] pointerBlankDelay: number Specifies number of seconds before blanking the ...


12

You can make urxvt copy to both Primary and Clipboard with the selection-to-clipboard perl extenion. This keeps them in sync, so you just copy once in urxvt and it should work in applications that use either. URxvt.perl-ext-common: selection-to-clipboard


10

For historical reasons, there are two selections¹, with different usage conventions: The PRIMARY selection automatically changes when you highlight some text with the mouse. There is no “copy” command, it's automatic. The CLIPBOARD selection changes only when you issue a “copy” command (keyboard shortcut or icon or menu entry). Classic X11 applications ...


10

In short: you cannot with the current version of Emacs (checked with 23.2), but see below for a possible workaround. Longer story: support for italics is encoded in the terminfo database as the sitm (enter italics) and ritm (exit italics) capabilities (also called ZH and ZR for termcap compatibility); you can check that your terminal supports them via: ...


10

First of all, there is a significant difference between the terminals types rxvt and unicode-rxvt (often abbreviated to urxvt). You have indicated that the terminal you are using is "URXVT Version 9.22", so to avoid confusion, please use the correct name which is not rxvt but urxvt. As Mikel has pointed out, the Xresources file is telling urxvt to use the ...


9

I see three solutions using .last_dir. You can place the echo $PWD > ~/.last_dir either: In a special function that would be a wrapper for cd: function cd_ { [[ -d "$@" ]] || return 1 echo "$@" > ~/.last_dir cd "$@" } Place this in your ~/.bashrc and then use cd_ instead of cd every time you want your new working directory to be stored. In ...


9

You can effectively disable bold fonts by just applying the same font string for both urxvt's regular and bold fonts in .Xresources, for example: URxvt.font:xft:droid sans mono slashed:size=10.5 URxvt.boldFont:xft:droid sans mono slashed:size=10.5


7

You can use urxvt-perls to enable keyboards shortcuts for copy and paste in urxvt. Place the required scripts in /usr/lib/urxvt/perl/ and add these lines to your .X{resources,defaults}: URxvt.perl-ext-common: ...,keyboard-select URxvt.keysym.M-Escape: perl:keyboard-select:activate


7

That sounds like keyseq-timeout, which is 500 (milliseconds). You could decrease it, e.g., to 50 (milliseconds). Setting it to zero would be a bad idea (see for example Re: How does one disable completion when nothing but tabs or spaces is on the line?). Not a duplicate, but one of the answers in How do I switch to vi editing mode in readline? uses the ...


6

There is no specific .Xresources to examine, so only general advice is possible. The .Xresources file is usually loaded by xrdb (a prop for desktop settings). You can test this file by simply loading directly with xrdb, e.g., xrdb -merge ~/.Xresources or just xrdb ~/.Xresources if you do not care for the desktop-designer's choices. If there is some ...


6

Agreeing with the comment by @meuh, terminals don't generate a distinct code for control; (normally). The link suggested by @tijagi is for xterm and does not apply to urxvt. Using the manual page for urxvt shows that you can start here: keysym.sym: string Compile frills: Associate string with keysym sym. The intervening resource name ...


6

This is explained in the X manual (man 7 X): When an application looks for the value of a resource, it specifies a complete path in the hierarchy, with both class and instance names. However, resource values are usually given with only partially specified names and classes, using pattern matching constructs. An ...


5

For hysterical historical reasons. Hardware manufacturers didn't always standardize on common single control sequence for the same key, and neither did software writers when glass terminals were replaced by terminal emulators. You can find out what control sequence a key generates in a particular terminal by typing Ctrl+V then the key (in most shells, or in ...


5

The ~/.inputrc file is a bash thing, not a zsh thing as far as I know. It controls the behavior of readline, the zsh equivalent of which is zle. You can modify its behavior using the bindkey command. So, to get Ctrl Left and Right back, add these lines to your ~/.zshrc (there might be a better place for them, an equivalent to ~/.inputrc but I don't know it ...


5

When you make an <A-x> mapping in Vim when x is a printable character (i.e., not a cursor or arrow key), it tells Vim to expect that character with the 8th/high bit set (aka, add 128 to the ASCII value). In your example, <A-h> means Vim will trigger the mapping when you type è. The ASCII value of h is 104 (binary 01101000) and when you set the ...


5

I added the following to my ~/.Xresources file to change to colors on the fly pressing Ctrl and 7 or 8 or 9. ! 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 ...


5

This is a Z Shell module known as "url-quote-magic" in action. It is trying to ensure that you end up with what you intended even though you completely ignored shell metacharacters and quoting. It detects when (in ZLE) an unquoted word looks like a URL, with a schema on the front, and changes the way that character self-insertion happens to the rest of the ...


5

This seems to be due to a change in the default behavior of GNU cpp, which xrdb uses as its default preprocessor. Specifically, according to The C Preprocessor: 10.1 Traditional lexical analysis: Generally speaking, in traditional mode an opening quote need not have a matching closing quote. However cpp provides a command line option to operate in ...


5

How about this. Starts a new bash process that is piped into awk, where every line piped in gets a couple of spaces printed before $0 (the input line) $ bash | awk '{print " " $0}' $ id uid=500(ec2-user) gid=500(ec2-user) groups=500(ec2-user),10(wheel) $ uname -a Linux ip-172-31-37-61 4.9.38-16.33.amzn1.x86_64 #1 SMP Thu Jul 20 01:31:29 UTC 2017 ...


5

The tic program is reporting that the capabilities are unknown. Use the -x option to tell tic to treat those as user-defined capabilities. The ad hoc fix to make is in doc/Makefile, where it says something like tic $(srcdir)/etc/rxvt-unicode.terminfo change that to tic -x $(srcdir)/etc/rxvt-unicode.terminfo There are other ways to achieve the same goal,...


Only top voted, non community-wiki answers of a minimum length are eligible