[solved]: rxvt-unicode configuration examples

Forum Forums antiX-development antiX Respins [solved]: rxvt-unicode configuration examples

  • This topic has 10 replies, 4 voices, and was last updated Feb 11-9:09 pm by techore.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #132746
    Member
    techore

      I am considering replacing kitty with rxvt-unicode on my spin. I have read gentoo and arch’s wikis, but looking to get a feel for what I should use as sane defaults including integrations if appropriate.

      Would you share with me your configuration and recommendations?

      #132747
      Member
      Robin

        Would you share with me your configuration and recommendations?

        I would immediately, but unfortunately I have no clue about this terminal emulator and it’s settings. I just use it as it is set up in antiX, like also roxterm. Sorry.

        Windows is like a submarine. Open a window and serious problems will start.

        #132754
        Forum Admin
        BitJam

          You might want to take a look at urxvt-style included in antiX. It was written a number of years ago so it may not be fully up to date. It’s an easy, extensible way to configure urxvt. If nothing else, it should make it very easy for you to quickly try different configurations. Here is the usage:

          Usage: urxvt-style [options] styles [[:|--] urxvt-args]
          Configure the style of urxvt via simple style directives.  Styles
          accumulate until you "reset".  Use an optional ":" or "--" to separate
          the urxvt arguments (usually not needed).
          Options:
              -d --dir=<dir>    Use <dir> as the resource directory instead of
                                /usr/local/lib/urxvt/Xresources
              -f --file <file>  Use <file> as the default file instead of 
                                /home/jbowlin/.Xresources
              -h --help     Show this help
              -l --list     List available styles
              -o --only     Only change the style, don't open a urxvt window
              -s --show     Show current defaults (could be long)
              -v --verbose  Display the contents of the styles as they are used
          Styles:
          meta:
              orig          Restore the original default
              reset         Go back to the current default in the file:
                              /home/jbowlin/.Xresources
              save          Save the current settings as the new default in:
                              /home/jbowlin/.Xresources
          color scheme:
              def-colors    The default colors 
              sorbet        More colorful version of zenburn
              zenburn       Subtle, low-contrast colors
          NOTE:
          Use the ansi-bars, ansi-colors, and ansi-tput programs to demo
          the curent color scheme.
          special features:
              font-size     Adjust font size with Ctrl-Shift-Up/Down 
              plain         Disable fontsize and tabbed
              tabbed        Use Shift-Down for new tab, Shift-Left/Right to move
                              between tabs, or use mouse on the tab bar
          geometry:
              small        80 x 28
              medium       90 x 32
              large       100 x 45
              xlarge      120 x 55
          other:
              sizeNN        Font size: 10 -- 18
              fadeNN        Dim text when window loses focus 10 -- 90
          scrollbar:
              sbar-left     Put scrollbar on left side of terminal
              sbar-off      Turn off scrollbar
              sbar-right    Put scrollbar on right side of terminal
          NOTE: 
          Use alt-s (the letter "s") to search scrollbuffer with a Perl
          regular expression.  use Up and Down to visit different matches.
          background:
              blackbg       Use black background
              transbg       Use pseudo-transparent background
              zenbg         Use zenburn background
              shadeNN       Darken or lighten transparent background
                              0: all-black   100: off   200: all-white
              blurNN        Blur the transparent background (uses CPU!)
                              by NN pixels 0 -- 20
              wipeNN        Blur vertically by NN pixels 10 -- 60
              swipeNN       Blur horizontally by NN pixels 10 -- 60
          NOTE: 
          Use blur0 to disable blur, wipe and swipe.
          If your ~/.Xresources file is not being loaded automatically then you
          need to start the first invocation of urxvt-style with the "reset" style to
          get that file read.  Normally, you only need to do this once.
          Examples:
              urxvt-style reset sorbet blur5 tabbed size15
              urxvt-style large zenburn transbg size12

          Context is worth 80 IQ points -- Alan Kay

          #132773
          Member
          Robin

            @bitjam
            I just noticed the default antiX style is merely applied when calling it without a command to execute:
            $ urxvt
            This comes up in the expected antiX style. But:
            $ urxvt -e "bash -c 'testscript.sh'"
            This time it comes up in a completely different style. (testscript.sh e.g. expecting the user to enter something; the cursor a steady yellow square, not a blinking underscore etc.)
            Is there a trick to control whether the antiX style is applied or the obviously default builtin, when calling it from either within another script or command line using the -e command line option? I searched the man for this, but couldn’t find out how to control this. Do you happen to know how this could be controlled?

            Windows is like a submarine. Open a window and serious problems will start.

            #132800
            Member
            techore

              You might want to take a look at urxvt-style included in antiX.

              Thank you, I will. Great suggestion!

              #132812
              Member
              anti-apXos

                It’s probably not what you’re looking for since I basically disable everything, but here’s my config:

                !!!--- urxvt settings
                !--- Font and General Settings 
                URxvt*.font: xft:Monospace:antialias=true:hinting=true:autohint=true:size=10.5
                URxvt*.letterSpace:           0
                URxvt*.lineSpace:             0
                URxvt*.geometry:              96x32
                URxvt*.buffered:              true
                URxvt*.iso14755:              false
                URxvt*.iso14755_52:           false
                URxvt*.tripleclickwords:      true
                URxvt*.cursorBlink:           true
                URxvt*.cursorUnderline:       true
                !--- Colors
                urxvt.background:             #000020
                urxvtx.background:            #002000
                URxvt*.foreground:            #c0e0e0
                URxvt*.underlineColor:        #30d0e0
                URxvt*.highlightColor:        #808030
                URxvt*.pointerColor:          #d080d0
                URxvt*.cursorColor:           #e0e0e0
                !--- Scrolling
                URxvt*.scrollBar:             false
                !URxvt*.scrollBar_right:       true
                !URxvt*.scrollBar_floating:    true
                URxvt*.scrollstyle:           plain
                URxvt*.scrollTtyOutput:       false
                URxvt*.scrollWithBuffer:      false
                URxvt*.scrollTtyKeypress:     true
                URxvt*.secondaryScroll:       true
                URxvt*.saveLines:             4096
                !-- Shading and Fading
                URxvt*.transparent:           false
                URxvt*.shading:               48
                URxvt*.fading:                24
                !URxvt*.blurRadius:            0
                !!!--- perl scripts
                URxvt*.perl-ext:              
                URxvt*.perl-ext-common:       
                !URxvt*.perl-ext-common:       default,font-size,matcher,tabbed
                !URxvt*.perl-lib:              /usr/local/lib/urxvt/perl
                !URxvt*.keysym.M-s:            searchable-scrollback:start
                !URxvt.keysym.C-equal:         perl:font-size:increase
                !URxvt.keysym.C-minus:         perl:font-size:decrease
                !--- URL Matcher
                !URxvt*.url-launcher:          /etc/alternatives/x-www-browser
                !URxvt*.matcher.button:        1
                !URxvt*.keysym.C-Delete:       matcher:last
                !URxvt*.keysym.M-Delete:       matcher:list
                !--- Tabbing Menu colors
                !URxvt*.tabbed.tabbar-bg:      0
                !URxvt*.tabbed.tabbar-fg:      2
                !URxvt*.tabbed.tab-bg:         8
                !URxvt*.tabbed.tab-fg:         10
                
                #132813
                Member
                techore

                  Perfect!

                  I would rather disable then enable features to obtain desired state.

                  Excellent timing. I just finished the color scheme and was onto fonts and other items.

                  Thank you, @anti-apxos.

                  #132818
                  Member
                  techore

                    Thank you @robin, @bitjam, and @anti-apxos for responding to my post.

                    I need to put urxvt through its paces and tweak for a variety of cli/tui applications, however, I am hopeful it will meet my needs. I am wondering how well urxvt will do image previews–one of the reasons I was using kitty, but I will test that among a bunch of other items.

                    Edit:
                    One of my goals was to reduce the terminal memory footprint. urxvt is very nice in this regard.

                    $ sudo ps_mem.py
                    [sudo] password for techore: 
                     Private  +   Shared  =  RAM used	Program
                    100.0 KiB +  23.5 KiB = 123.5 KiB	pause
                    116.0 KiB +  21.5 KiB = 137.5 KiB	runit
                    112.0 KiB +  25.5 KiB = 137.5 KiB	bpfilter_umh
                    132.0 KiB +  24.5 KiB = 156.5 KiB	runsvdir
                    160.0 KiB +  45.5 KiB = 205.5 KiB	seatd
                    240.0 KiB +  43.5 KiB = 283.5 KiB	startx
                    212.0 KiB +  92.5 KiB = 304.5 KiB	slstatus
                    300.0 KiB +  43.5 KiB = 343.5 KiB	acpid
                    316.0 KiB + 168.5 KiB = 484.5 KiB	xinit
                    392.0 KiB + 176.5 KiB = 568.5 KiB	dbus-launch
                    624.0 KiB + 239.5 KiB = 863.5 KiB	login
                    724.0 KiB + 458.0 KiB =   1.2 MiB	dbus-daemon (2)
                    708.0 KiB + 513.5 KiB =   1.2 MiB	getty (5)
                    848.0 KiB + 925.0 KiB =   1.7 MiB	sudo (2)
                      1.4 MiB + 470.0 KiB =   1.9 MiB	runsv (16)
                    916.0 KiB +   1.5 MiB =   2.4 MiB	udevd (2)
                      2.4 MiB +   1.1 MiB =   3.5 MiB	dusk
                      3.7 MiB + 455.5 KiB =   4.2 MiB	connmand
                      2.5 MiB +   1.7 MiB =   4.2 MiB	sshd
                      3.3 MiB +   1.5 MiB =   4.8 MiB	bash (2)
                      5.1 MiB +   1.5 MiB =   6.6 MiB	wpa_supplicant
                      8.1 MiB +   1.5 MiB =   9.6 MiB	dunst
                      9.7 MiB +   1.9 MiB =  11.6 MiB	urxvtd (2)
                     30.9 MiB +   2.8 MiB =  33.7 MiB	cmst
                    109.1 MiB +   2.2 MiB = 111.3 MiB	Xorg
                    ---------------------------------
                                            201.5 MiB
                    =================================
                    • This reply was modified 2 weeks, 4 days ago by techore.
                    Attachments:
                    #132825
                    Member
                    anti-apXos

                      urxvt is especially great on memory if you take advantage of the urxvtd mode, which it looks like you’re doing. Basically, if you’re someone who always has at least one terminal open like I do, it means additional terminals have almost no memory cost.

                      For the font, I wish I could have just the same font that’s used on the tty consoles. It looks so much better, in my opinion. I don’t even know what kind of font that is and I assume there’s no way of using it directly, but does anyone know of something equivalent that would work? I like how clean it looks with no hinting/antialiasing.

                      #132828
                      Member
                      anti-apXos

                        Is there a trick to control whether the antiX style is applied or the obviously default builtin, when calling it from either within another script or command line using the -e command line option?

                        I don’t get this same behavior. For me, running urxvt with the -e option gives the same style as without.

                        If by “antiX style,” you mean options you set using the urxvt-style command bitjam mentioned, then that could be lost if the script you run with -e does something to reload the .Xresources file. It looks like urxvt-style only merges the new options in, but doesn’t by default save them anything to .Xresources.

                        #132838
                        Member
                        techore

                          urxvt is especially great on memory if you take advantage of the urxvtd mode, which it looks like you’re doing. Basically, if you’re someone who always has at least one terminal open like I do, it means additional terminals have almost no memory cost.

                          For the font, I wish I could have just the same font that’s used on the tty consoles. It looks so much better, in my opinion. I don’t even know what kind of font that is and I assume there’s no way of using it directly, but does anyone know of something equivalent that would work? I like how clean it looks with no hinting/antialiasing.

                          I originally started on VAX terminals. I don’t believe there is a “font” so much as each manufacturer created their own so it was hardware/firmware. Actually, I do not KNOW that is true. Now I will have to go hunt for information. lol

                          I am partial to Source Code Pro (monotype font). So much so, I created a package and another for its sibling and dynamic font, Source Sans.

                          https://adobe-fonts.github.io/source-code-pro/
                          https://adobe-fonts.github.io/source-sans/

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.