diff options
Diffstat (limited to 'code')
-rw-r--r-- | code/color.rb | 7 | ||||
-rw-r--r-- | code/fm/draw.rb | 17 |
2 files changed, 19 insertions, 5 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) |