guest@dotshare [~/groups/fms/ranger] $ ls ColorfulRanger/ | cat

ColorfulRanger (scrot)

kockahonza Mar 27, 2017 (fms/ranger)

ColorScheme.py(raw, dl)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *

class ColorScheme(ColorScheme):

    def use(self, context):
        fg, bg, attr = default_colors

        if context.reset:
            return default_colors

        elif context.in_browser:
            if context.selected:
                attr = reverse
            else:
                attr = normal
            if context.empty or context.error:
                fg = 6
                bg = 1
            if context.border:
                fg = white
            if context.image:
                fg = 201
            if context.video:
                fg = 13
            if context.audio:
                fg = 10
            if context.document:
                fg = 12
            if context.container:
                attr |= bold
                fg = 1
            if context.directory:
                attr |= normal
                fg = 3
            elif context.executable and not \
                    any((context.media, context.container,
                       context.fifo, context.socket)):
                attr |= bold
                fg = 2
            if context.socket:
                fg = 21
                attr |= bold
            if context.fifo or context.device:
                fg = 21
                if context.device:
                    attr |= bold
            if context.link:
                fg = context.good and 6 or 1
            if context.bad:
                fg = 0
                bg = 1
            if context.tag_marker and not context.selected:
                attr |= bold
                fg = 88
            if not context.selected and (context.cut or context.copied):
                attr = reverse
            if context.main_column:
                if context.selected:
                    attr |= bold
                if context.marked:
                    attr |= bold
                    fg = 8
            if context.badinfo:
                if attr & reverse:
                    bg = 1
                else:
                    fg = 7

        elif context.in_titlebar:
            attr |= bold
            if context.hostname:
                fg = context.bad and 1 or 5
            elif context.directory:
                fg = 5
            elif context.tab:
                if context.good:
                    bg = 2

        elif context.in_statusbar:
            if context.permissions:
                if context.good:
                    fg = 2
                    bg = 0
                elif context.bad:
                    fg = 1
            if context.marked:
                attr |= bold | reverse
                fg = 88
            if context.message:
                if context.bad:
                    attr |= bold
                    fg = 9
            if context.loaded:
                bg = 1


        if context.text:
            if context.highlight:
                attr |= reverse

        if context.in_taskview:
            if context.title:
                fg = 4

            if context.selected:
                attr |= reverse

            if context.loaded:
                if context.selected:
                    fg = 1
                else:
                    bg = 1

        return fg, bg, attr

CLICK TO VIEW

x

Xresources(raw, dl)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
!Darcula
!#define t_background       #2b2b2b
!#define t_current_line     #2b2b2b
!#define t_selection        #333333
!#define t_foreground       #a9b7c6
!#define t_comment          #c7dd0c
!#define t_red              #a02929
!#define t_yellow           #fe9b00
!#define t_bright_yellow    #ffc66d
!#define t_green            #619647
!#define t_bright_green     #7fb347
!#define t_aqua             #a9b7c6
!#define t_blue             #6897bb
!#define t_purple           #664975
!#define t_bright_purple	   #b777e0
!#define t_grey		   #2b2b2b
!#define t_bright_grey	   #888888

#define t_black		#2b2b2b
#define t_red		#a02929
#define t_green		#619647
#define t_yellow	#fe9b00
#define t_blue		#6897c6
#define t_magenta	#664975
#define t_cyan		#00b1b1
#define t_white		#a9b7c6
#define t_brightblack	#888888
#define t_brightred	#c70202
#define t_brightgreen	#4cd20c
#define t_brightyellow	#fadf1b
#define t_brightblue	#25a0fe
#define t_brightmagenta	#b029f7
#define t_brightcyan	#30f7f7
#define t_brightwhite	#e4e8ed

*.foreground:   t_white
*.background:   t_black
*.cursorColor:  t_white

*.color0:	t_black
*.color1:	t_red
*.color2:	t_green
*.color3:	t_yellow
*.color4:	t_blue
*.color5:	t_magenta
*.color6:	t_cyan
*.color7:	t_white
*.color8:	t_brightblack
*.color9:	t_brightred
*.color10:	t_brightgreen
*.color11:	t_brightyellow
*.color12:	t_brightblue
*.color13:	t_brightmagenta
*.color14:	t_brightcyan
*.color15:	t_brightwhite



!URXVT CONFIGURATION
URxvt.scrollBar: false
URxvt.font: xft:Ubuntu mono:size=12
URxvt.saveLines: 16384
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.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/firefox
URxvt.matcher.button: 1
URxvt.backgroundPixmap: /home/honza/Pictures/kitty1.jpg;style=centered
!Transparency with composite
!URxvt.depth: 32
!Fake transparency
!URxvt.transparent: true
!URxvt.shading: 5


!ROFI CONFIGURATION
rofi.run-shell-command: urxvt -e '{cmd}'
!States: bg, fg, bgalt, hlbg, hlfg
rofi.color-enabled: true
rofi.hide-scrollbar: true
rofi.color-normal: t_black,t_white,t_black,t_black,t_yellow
rofi.color-urgent: t_black,t_red,t_black,t_black,t_yellow
rofi.color-active: t_black,t_white,t_black,t_black,t_yellow
!states: background, border
rofi.color-window: t_black,t_magenta,t_magenta

!rofi.sidebar-mode: true
rofi.bw: 3
rofi.columns: 1
rofi.padding: 10
rofi.eh: 2

!rofi.fullscreen: true
!rofi.opacity: 90
!rofi.fake-transparency: true
rofi.location: 6
rofi.width: 100%
rofi.font: System San Francisco 12
rofi.lines: 6
rofi.separator-style: none
 

x

Notes

I use it with urxvt with configured colors (in the .Xresources file). My normaly used colortheme. Fits with my i3wm + polybar setup.