Solved URXVT issues, part 2.

rigoletto@

Developer
Hello,

I am experiencing a few issues with x11/rxvt-unicode/ and I am not find the way to solve them.

  1. [SOLVED] the first one is some slowness, I not know what is causing it but trying to fix I found the second one.
  2. [SOLVED] I have x11-fonts/terminus-font installed and I am using it on urxvt, how ever I can't find a way to set it up without using xft:. I tryied -xos4-terminus-*-*-*-12-*, -terminus-*-*-*-12-*, and some variations and all didn't work¹.
  3. [SEPARATED THREAD] from time to time I have the PS1/pointer messed up as pointed in this image, however it is the less messed it usually goes. EDIT: this particular issue seem to happen only when using tcsh.

.tcshrc
Code:
#
# .tcshrc - tcsh resource script, read at beginning of execution by each shell
#

setenv    LANG            en_US.UTF-8
setenv    LC_MONETARY        pt_BR.UTF-8
setenv    LC_COLLATE        C

setenv    BLOCKSIZE        M
setenv     CLICOLOR        1
setenv    PAGER            more

setenv    TERMINAL        urxvtc
setenv    QT_QPA_PLATFORMTHEME    qt5ct
setenv    XDG_MENU_PREFIX        lxde-


if ( -X vim ) then
    setenv    EDITOR    vim
    alias    vi    vim
else if (-X vi) then
    setenv    EDITOR    vi
endif


if ($?prompt) then

    set autoexpand
    set autolist     = ambiguous
    set autorehash
    set color
    set correct     = cmd
    set filec
    set history     = 2048
    set histfile     = ~/.tcsh_history
    set mail     = (/var/mail/$USER)
    set savehist    = (2048 merge)

    set grey     = "%{\033[1;30m%}"
    set red     = "%{\033[1;31m%}"
    set green     = "%{\033[1;32m%}"
    set yellow     = "%{\033[1;33m%}"
    set blue     = "%{\033[1;34m%}"
    set magenta     = "%{\033[1;35m%}"
    set cyan     = "%{\033[1;36m%}"
    set white     = "%{\033[1;37m%}"

    set end     = "%{\033[0m%}"

        if ( $USER == root ) then
            set prompt = "\n${blue}%~ ${red}%N@%m: \n❯❯❯${end} "
        else
            set prompt = "\n${red}%~ ${blue}%m: \n❯❯❯${end} "
        endif

    unset grey red green yellow blue magenta cyan white end
 
    if ( $?tcsh ) then
            bindkey "^[Od"        backward-word        # rxvt
            bindkey "^[Oc"        forward-word        # rxvt
            bindkey    "\e[2~"        overwrite-mode
            bindkey    "\e[3~"        delete-char
            bindkey    "\e[1;5C"    forward-word
            bindkey    "\e[1;5D"    backward-word
            bindkey    "\e[5~"        history-search-backward
            bindkey    "\e[6~"        history-search-forward
            bindkey    "^W"        backward-delete-word
    endif
 
endif


alias h        history 25
alias j        jobs -l
alias la    ls -aF
alias lf    ls -FA
alias ll    ls -lAF

.Xresources
Code:
!!! Font Tweaks !!!
Xft.rgba:    none
Xft.hintstyle:    full
Xft.lcdfilter:    lcddefault
Xft.antialias:    1
Xft.hinting:    1
Xft.autohint:    1


!!! Visual Tweaks !!!
Xcursor.theme: Capitaine Cursors


!!! URXVT Tweaks !!!
URxvt.font:            xft:Terminus:size=11
URxvt.boldFont:         xft:Terminus:bold:size=11

URxvt.termName:                 rxvt-unicode-256color

URxvt.depth:            32
URxvt.background:        [75]#000000

URxvt.cursorBlink:        1

URxvt.scrollBar:        false
URxvt.scrollBar_right:        false
URxvt.scrollBar_floating:    false
!URxvt*scrollstyle:         rxvt
URxvt.saveLines:        8192

! do not scroll with output
URxvt.scrollTtyOutput:         false

! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt.scrollWithBuffer:     true

! scroll back to the bottom on keypress
URxvt.scrollTtyKeypress:     true

URxvt.secondaryScreen:        1
URxvt.secondaryScroll:        0

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

URxvt.keysym.M-c:           perl:clipboard:copy
URxvt.keysym.M-v:           perl:clipboard:paste
URxvt.keysym.M-C-v:         perl:clipboard:paste_escaped

URxvt.keysym.Control-Up:    \033[1;5A
URxvt.keysym.Control-Down:    \033[1;5B
URxvt.keysym.Control-Left:    \033[1;5D
URxvt.keysym.Control-Right:    \033[1;5C

URxvt.url-launcher:        /usr/local/bin/xdg-open
URxvt.matcher.button:        1


!!! Colour Tweaks !!!
*background:            #0F0F0F
*foreground:            #C8C8C8

¹due to the terminus font being currently called xos4 Terminus and the alias pointing to an unrelated font (it is fixed upstream already), I've created an alias:

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Fix the name of Terminus font -->
  <alias>
    <family>Terminus</family>
    <prefer><family>xos4 Terminus</family></prefer>
    <default><family>fixed</family></default>
  </alias>
</fontconfig>

EDIT: I also suspect the urxvt slowness is indeed caused by compton, because I have some sporadic mouse lag what seem to not happens when not using compton. But this specific issue will have its own topic later.

11.0-RELEASE-p1

Thanks!
 
Last edited:
Some more info:

Code:
# Options for rxvt-unicode-9.22
_OPTIONS_READ=rxvt-unicode-9.22
_FILE_COMPLETE_OPTIONS_LIST=256_COLOR BACKSPACE_KEY COMBINING DELETE_KEY DOCS GDK_PIXBUF IMLOCALE_FIX ISO14755 MOUSEWHEEL NEXT_SCROLLBAR NOTIFY PERL RXVT_SCROLLBAR SMART_RESIZE UNICODE3 XIM XTERM_SCROLLBAR
OPTIONS_FILE_SET+=256_COLOR
OPTIONS_FILE_SET+=BACKSPACE_KEY
OPTIONS_FILE_SET+=COMBINING
OPTIONS_FILE_SET+=DELETE_KEY
OPTIONS_FILE_UNSET+=DOCS
OPTIONS_FILE_UNSET+=GDK_PIXBUF
OPTIONS_FILE_SET+=IMLOCALE_FIX
OPTIONS_FILE_UNSET+=ISO14755
OPTIONS_FILE_SET+=MOUSEWHEEL
OPTIONS_FILE_UNSET+=NEXT_SCROLLBAR
OPTIONS_FILE_UNSET+=NOTIFY
OPTIONS_FILE_SET+=PERL
OPTIONS_FILE_UNSET+=RXVT_SCROLLBAR
OPTIONS_FILE_SET+=SMART_RESIZE
OPTIONS_FILE_UNSET+=UNICODE3
OPTIONS_FILE_SET+=XIM
OPTIONS_FILE_UNSET+=XTERM_SCROLLBAR

Code:
# Options for terminus-font-4.40
_OPTIONS_READ=terminus-font-4.40
_FILE_COMPLETE_OPTIONS_LIST=AO2 DV1 GE2 GQ2 HI2 IJ1 KA2 LL2 TD1
OPTIONS_FILE_UNSET+=AO2
OPTIONS_FILE_UNSET+=DV1
OPTIONS_FILE_UNSET+=GE2
OPTIONS_FILE_UNSET+=GQ2
OPTIONS_FILE_UNSET+=HI2
OPTIONS_FILE_UNSET+=IJ1
OPTIONS_FILE_UNSET+=KA2
OPTIONS_FILE_UNSET+=LL2
OPTIONS_FILE_SET+=TD1

Thanks!
 
Perhaps my reply here is not constructive...
In two computers with FreeBSD 11 (11.0-RELEASE-p8 and 11.0-STABLE) urxvt (installed with pkg(8)) works fine with ~/.Xresources:
Code:
....
URxvt.font: -*-terminus-medium-*-*-*-16-*-*-*-*-*-iso10646-*, \
            -*-unifont-*-r-*-*-16-*-*-*-*-*-iso10646-*
....
However, I remember that had to use xos4 instead of the first asterisk somewhere, but not with urxvt.
Cannot tell anything about PS1, it's good with bash(1).
 
Perhaps my reply here is not constructive...
In two computers with FreeBSD 11 (11.0-RELEASE-p8 and 11.0-STABLE) urxvt (installed with pkg(8)) works fine with ~/.Xresources:
Code:
....
URxvt.font: -*-terminus-medium-*-*-*-16-*-*-*-*-*-iso10646-*, \
            -*-unifont-*-r-*-*-16-*-*-*-*-*-iso10646-*
....
However, I remember that had to use xos4 instead of the first asterisk somewhere, but not with urxvt.
Cannot tell anything about PS1, it's good with bash(1).

Didn't work either, even replacing the first asterisk with xos4. :(

Code:
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.

Good to point out, I didn't had this problem (PS1 problem) with bash (with a equivalent PS1) when still using Linux, but when using tcsh the problem was also reproductive in there.
 
Have you tried xfontsel(1) to check whether such font spec is valid?
Also I have its path explicitly set in /usr/local/etc/X11/xorg.conf.d/10-fonts.conf:
Code:
Section "Files"
        FontPath      "/usr/local/share/fonts/terminus-font/"
        FontPath      "/usr/local/share/fonts/msttcorefonts/"
        FontPath      "/usr/local/share/fonts/GentiumBasic/"
        FontPath      "/usr/local/share/fonts/LinLibertineG/"
        FontPath      "/usr/local/share/fonts/Caladea/"
EndSection
 
aragats I do not have the font.conf file in there, I am using a minimal configuration. I will try add in it and x11-fonts/xfontsel too. However I have synth building 200+ ports now, and so I would need to let it due tomorrow to be able to install xfontsel.

Thanks you!
 
Also I have its path explicitly set in /usr/local/etc/X11/xorg.conf.d/10-fonts.conf
I have that as well:
Code:
dice@williscorto:~> cat /usr/local/etc/X11/xorg.conf.d/files-fonts.conf
Section "Files"
        #ModulePath   "/usr/local/lib/xorg/modules"
        #FontPath     "/usr/local/share/fonts/misc/"
        #FontPath     "/usr/local/share/fonts/TTF/"
        #FontPath     "/usr/local/share/fonts/OTF/"
        #FontPath     "/usr/local/share/fonts/Type1/"
        #FontPath     "/usr/local/share/fonts/100dpi/"
        #FontPath     "/usr/local/share/fonts/75dpi/"
        FontPath     "/usr/local/share/fonts/bitstream-vera/"
        FontPath     "/usr/local/share/fonts/cyrillic/"
        FontPath     "/usr/local/share/fonts/webfonts/"
        FontPath     "/usr/local/share/fonts/dejavu/"
        FontPath     "/usr/local/share/fonts/terminus-font/"
EndSection
Probably have a bit too much in there.

I have this in my ~/.Xresources, note the lowercase first letters.

Code:
!  - use a bitmap font
urxvt*font:        -xos4-terminus-medium-*-*-*-20-*-*-*-*-*-*-*
urxvt*boldFont:    -xos4-terminus-bold-*-*-*-20-*-*-*-*-*-*-*
 
aragats and SirDice that did the trick. :D

Now I need to find out what is the PS1 problem with urxvt/tcsh, because it seem to not happen when using sh or bash.

Thank you! :beer:
 
Back
Top