diff options
author | hut <hut@lavabit.com> | 2009-06-13 05:02:59 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-13 05:02:59 +0200 |
commit | 236fef23c8269a776c18378f66c1fd2d7d818eee (patch) | |
tree | a3e315d303c2c37557cbfa320aeadb1b3a28915c | |
parent | 92f17aeca4389141d780a67dd76a85dc8f1dc704 (diff) | |
download | ranger-236fef23c8269a776c18378f66c1fd2d7d818eee.tar.gz |
extended colorschemes to statusbar
-rw-r--r-- | code/color.rb | 7 | ||||
-rw-r--r-- | code/fm/draw.rb | 17 | ||||
-rw-r--r-- | data/colorscheme/default.rb | 14 |
3 files changed, 28 insertions, 10 deletions
diff --git a/code/color.rb b/code/color.rb index 3eb30977..3968207d 100644 --- a/code/color.rb +++ b/code/color.rb @@ -91,6 +91,13 @@ module Color use %w{currentdir top} use %w{currentfile top} + use %w{butt} + use %w{permissions butt} + use %w{allowed permissions butt} + use %w{denied permissions butt} + use %w{date butt} + use %w{info butt} + use %w{media file} use %w{video media file} use %w{sound media file} diff --git a/code/fm/draw.rb b/code/fm/draw.rb index 0b5b520a..f326ab23 100644 --- a/code/fm/draw.rb +++ b/code/fm/draw.rb @@ -266,9 +266,7 @@ module Fm end end -# bold false attr_set(Color.base) -# color(-1, -1) btm = lines - 1 case @buffer @@ -279,19 +277,28 @@ module Fm else # log(@pwd) # log "Buffer: #{@buffer}" + attr_set(Color.base) + attr_set(Color.info) puti btm, "#@buffer #{@pwd.file_size.bytes(false)},#{@pwd.size},#{@pwd.pos+1} ".rjust(cols) more = '' if cf.symlink? more = "#{cf.readlink}" end - puti btm, " #{Time.now.strftime("%H:%M:%S %a %b %d")} #{cf.rights} #{more}" -# color_at btm, 23, 10, (cf.writable? ? 6 : 5), -1 + attr_set(Color.date) + left = " #{Time.now.strftime("%H:%M:%S %a %b %d")} " + puti btm, left + + attr_set(cf.writable? ? Color.allowed : Color.denied) + second = "#{cf.rights} " + puti btm, left.size, second if more -# color_at btm, 34, more.size, (cf.exists? ? 6 : 1), -1 + attr_set(cf.exists? ? Color.allowed : Color.denied) + puti btm, left.size + second.size, "#{more} " end end + attr_set(Color.base) draw_bars unless @bars.empty? movi(@pwd.pos + 1 - get_offset(@pwd, lines), @cur_y) diff --git a/data/colorscheme/default.rb b/data/colorscheme/default.rb index c6258707..5b36433d 100644 --- a/data/colorscheme/default.rb +++ b/data/colorscheme/default.rb @@ -3,13 +3,17 @@ module Color @currentdir = blue, default, bold @currentfile = white, default, bold - @base = default, df + @base = default, df, none - @link = cyan, default - @directory = blue, default - @media = pink, default - @executable = green, default + @link = cyan, default, none + @directory = blue, default, none + @media = pink, default, none + @executable = green, default, none + @butt = default, default, none + @allowed = cyan, default, none + @denied = pink, default, none + @date = default, default, bold module Selected @base = blue, default, reverse |