xyb3rt / urxvt-perls

Perl extensions for the rxvt-unicode terminal emulator
GNU General Public License v2.0
754 stars 110 forks source link

keyboard-select: Cursor not visible in ranger / htop #91

Closed x3rAx closed 6 years ago

x3rAx commented 6 years ago

Hi,

I started to use urxvt yesterday so I apologize if what I describe here is not an issue but a misconfiguration on my site.

I just realized, that the cursor is not visible when I use keyboard-select within ranger file manager or htop. When I press v and then j the selection appears but the cursor stays invisible.

I think this is because ranger / htop somehow hide the cursor.

Is there anything that I can do to fix this?

My .Xresource:

!! Scrollback size
URxvt.saveLines: 819200

!! Set font and font size
URxvt.font: xft:monospace:size=10:antialias=true

!! 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

!! Switch buffer for things like vim or less and enable scrolling
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0

!! Put scrollbar to right side
URxvt.scrollBar_right: 1
URxvt*scrollstyle: plain

!! Enable transparentcy (need compton)
urxvt*depth: 32

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! KEY BINDINGS

URxvt.keysym.Control-V: eval:paste_clipboard
URxvt.keysym.Control-C: eval:selection_to_clipboard
URxvt.keysym.C-C: perl:clipboard:copy

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! EXTENSIONS

! Load extensions (separate with comma and no space: ext_1,ext_2,...)
URxvt.perl-ext-common: default,vtwheel,matcher,url-select,keyboard-select

!! matcher / url-select:
URxvt.matcher.button: 3
URxvt.keysym.M-u:           perl:url-select:select_next
URxvt.url-launcher:         /usr/bin/xdg-open
URxvt.url-select.underline: true
!! keyboard-select:
URxvt.keysym.M-Escape:      perl:keyboard-select:activate

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! THEME

! Based on:
!   Base16 Gooey
!   Scheme: Alex Booker <alexbooker@fastmail.im>
! Thanks for that!

URxvt*background:                     [90]#101218
URxvt*foreground:                     #92949d
URxvt*cursorColor:                    #d1d4e0

URxvt*scrollColor:                    [90]#303648
URxvt*highlightColor:                 #252936
URxvt*highlightTextColor:             #C0C5CE

URxvt*color0:                         #101218
URxvt*color1:                         #ee829f
URxvt*color2:                         #a5ffe1
URxvt*color3:                         #ffefcc
URxvt*color4:                         #97bbf7
URxvt*color5:                         #c0b7f9
URxvt*color6:                         #97e0ff
URxvt*color7:                         #d1d4e0
URxvt*color8:                         #7780a1
URxvt*color9:                         #ee829f
URxvt*color10:                        #a5ffe1
URxvt*color11:                        #ffefcc
URxvt*color12:                        #97bbf7
URxvt*color13:                        #c0b7f9
URxvt*color14:                        #97e0ff
URxvt*color15:                        #ffffff

URxvt*color16:                        #f99170
URxvt*color17:                        #fcc09e
URxvt*color18:                        #1f222d
URxvt*color19:                        #252936
URxvt*color20:                        #C0C5CE
URxvt*color21:                        #C9CCDB

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! ???

!! Disable strange "keycap" mode when pressing Ctrl+Shift
URxvt.iso14755: true
URxvt.iso14755_52: false
xyb3rt commented 6 years ago

This is a duplicate of issue #10. AguirreIF provides a fix for the issue in the last comment. However, I'm hesitant to include it, because there's no way to tell if we have to hide the cursor again when quiting keyboard-select-mode.

x3rAx commented 6 years ago

I understand. Thanks for the reference. I find this comment, describing the following key bindings very helpful:

URxvt.keysym.C-0:           command:\033[?25l
URxvt.keysym.M-C-0:         command:\033[?25h

BTW: Thanks, great extension :+1: