summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.md2
-rw-r--r--doc/ranger.14
-rw-r--r--doc/ranger.pod2
-rw-r--r--doc/release-checklist.txt27
-rw-r--r--doc/screenshot.pngbin0 -> 55571 bytes
-rw-r--r--ranger/colorschemes/solarized.py132
-rw-r--r--ranger/config/rc.conf3
-rw-r--r--ranger/config/rifle.conf1
-rw-r--r--ranger/container/settings.py1
-rwxr-xr-xranger/ext/rifle.py7
-rw-r--r--ranger/gui/colorscheme.py5
-rw-r--r--ranger/gui/widgets/console.py27
-rw-r--r--ranger/gui/widgets/titlebar.py3
14 files changed, 197 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 8c110f00..55687146 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *.pyc
 *.pyo
 stuff/*
+doc/ranger.1.html
diff --git a/README.md b/README.md
index a517add3..56565c46 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@ minimalistic and nice curses interface with a view on the directory hierarchy.
 It ships with "rifle", a file launcher that is good at automatically finding
 out which program to use for what file type.
 
+![screenshot](doc/screenshot.png)
+
 This file describes ranger and how to get it to run.  For instructions on the
 usage, please read the man page.  See doc/HACKING for development specific
 information.  For configuration, check the files in ranger/config/.  They
diff --git a/doc/ranger.1 b/doc/ranger.1
index ed94b064..2c19a1a5 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.6.1" "08/26/2014" "ranger manual"
+.TH RANGER 1 "ranger-1.6.1" "10/15/2014" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -1201,6 +1201,8 @@ provided along with the source code.
 .IX Item "The project page: <http://ranger.nongnu.org/>"
 .IP "The mailing list: <http://savannah.nongnu.org/mail/?group=ranger>" 4
 .IX Item "The mailing list: <http://savannah.nongnu.org/mail/?group=ranger>"
+.IP "\s-1IRC\s0 channel: #ranger on freenode.net" 4
+.IX Item "IRC channel: #ranger on freenode.net"
 .PD
 .PP
 ranger is maintained with the git version control system.  To fetch a fresh
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 7662d26a..07c6a3bc 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -1311,6 +1311,8 @@ GNU General Public License 3 or (at your option) any later version.
 
 =item The mailing list: L<http://savannah.nongnu.org/mail/?group=ranger>
 
+=item IRC channel: #ranger on freenode.net
+
 =back
 
 ranger is maintained with the git version control system.  To fetch a fresh
diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt
new file mode 100644
index 00000000..2ef99afe
--- /dev/null
+++ b/doc/release-checklist.txt
@@ -0,0 +1,27 @@
+( ) test everything one last time:
+( ) * make test
+( ) * ./ranger.py [--clean]
+( ) * ranger/ext/rifle.py
+( ) * make install
+( ) make a release commit:
+( ) * update the number in the README
+( ) * update the number in ranger/__init__.py
+( ) * update the version number in ranger/ext/rifle.py
+( ) * rebuild the man page with the updated number
+( ) * write changelog entry
+( ) * think of a witty commit message
+( ) * change VERSION in ranger/__init__.py to something with "stable"
+( ) * push the commit
+( ) build .tar.gz with "make snapshot"
+( ) make, make install and test the snapshot one last time
+( ) update the website:
+( ) * add the new version as ranger-stable.tar.gz
+( ) * add the new version as ranger-X.Y.Z.tar.gz
+( ) * update both signatures (gpg -sb <file>)
+( ) * update the changelog
+( ) * update the man page
+( ) * rerun boobies.py
+( ) announce the update
+( ) * to the mailing list
+( ) * in the arch linux forum
+( ) * write a news entry on savannah
diff --git a/doc/screenshot.png b/doc/screenshot.png
new file mode 100644
index 00000000..42f13bcf
--- /dev/null
+++ b/doc/screenshot.png
Binary files differdiff --git a/ranger/colorschemes/solarized.py b/ranger/colorschemes/solarized.py
new file mode 100644
index 00000000..7d209ef9
--- /dev/null
+++ b/ranger/colorschemes/solarized.py
@@ -0,0 +1,132 @@
+# Joseph Tannhuber <sepp.tannhuber@yahoo.de>, 2013
+# Solarized like colorscheme, similar to solarized-dircolors
+# from https://github.com/seebi/dircolors-solarized.
+# This is a modification of Roman Zimbelmann's default colorscheme.
+# This software is distributed under the terms of the GNU GPL version 3.
+
+from ranger.gui.colorscheme import ColorScheme
+from ranger.gui.color import *
+
+class Solarized(ColorScheme):
+    progress_bar_color = 33
+
+    def use(self, context):
+        fg, bg, attr = default_colors
+
+        if context.reset:
+            return default_colors
+
+        elif context.in_browser:
+            fg = 244
+            if context.selected:
+                attr = reverse
+            else:
+                attr = normal
+            if context.empty or context.error:
+                fg = 235
+                bg = 160
+            if context.border:
+                fg = default
+            if context.media:
+                if context.image:
+                    fg = 136
+                else:
+                    fg = 166
+            if context.container:
+                fg = 61
+            if context.directory:
+                fg = 33
+            elif context.executable and not \
+                    any((context.media, context.container,
+                        context.fifo, context.socket)):
+                fg = 64
+                attr |= bold
+            if context.socket:
+                fg = 136
+                bg = 230
+                attr |= bold
+            if context.fifo:
+                fg = 136
+                bg = 230
+                attr |= bold
+            if context.device:
+                fg = 244
+                bg = 230
+                attr |= bold
+            if context.link:
+                fg = context.good and 37 or 160
+                attr |= bold
+                if context.bad:
+                    bg = 235
+            if context.tag_marker and not context.selected:
+                attr |= bold
+                if fg in (red, magenta):
+                    fg = white
+                else:
+                    fg = red
+            if not context.selected and (context.cut or context.copied):
+                fg = 234
+                attr |= bold
+            if context.main_column:
+                if context.selected:
+                    attr |= bold
+                if context.marked:
+                    attr |= bold
+                    bg = 237
+            if context.badinfo:
+                if attr & reverse:
+                    bg = magenta
+                else:
+                    fg = magenta
+
+        elif context.in_titlebar:
+            attr |= bold
+            if context.hostname:
+                fg = context.bad and 16 or 255
+                if context.bad:
+                    bg = 166
+            elif context.directory:
+                fg = 33
+            elif context.tab:
+                fg = context.good and 47 or 33
+                bg = 239
+            elif context.link:
+                fg = cyan
+
+        elif context.in_statusbar:
+            if context.permissions:
+                if context.good:
+                    fg = 93
+                elif context.bad:
+                    fg = 160
+                    bg = 235
+            if context.marked:
+                attr |= bold | reverse
+                fg = 237
+                bg = 47
+            if context.message:
+                if context.bad:
+                    attr |= bold
+                    fg = 160
+                    bg = 235
+            if context.loaded:
+                bg = self.progress_bar_color
+
+        if context.text:
+            if context.highlight:
+                attr |= reverse
+
+        if context.in_taskview:
+            if context.title:
+                fg = 93
+
+            if context.selected:
+                attr |= reverse
+
+            if context.loaded:
+                if context.selected:
+                    fg = self.progress_bar_color
+                else:
+                    bg = self.progress_bar_color
+
+        return fg, bg, attr
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 9e886e19..644706e8 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -166,6 +166,9 @@ set cd_bookmarks true
 # disable this feature.
 set preview_max_size 0
 
+# Add the highlighted file to the path in the titlebar
+set show_selection_in_titlebar true
+
 # ===================================================================
 # == Local Options
 # ===================================================================
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index c61abfee..4776cdf9 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -87,6 +87,7 @@ mime ^text,  label pager  = "$PAGER" -- "$@"
 
 ext 1                         = man "$1"
 ext s[wmf]c, has zsnes, X     = zsnes "$1"
+ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
 ext nes, has fceux, X         = fceux "$1"
 ext exe                       = wine "$1"
 name ^[mM]akefile$            = make
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 90b6f7ce..0d8b6906 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -39,6 +39,7 @@ ALLOWED_SETTINGS = {
     'scroll_offset': int,
     'shorten_title': int,
     'show_cursor': bool,  # TODO: not working?
+    'show_selection_in_titlebar': bool,
     'show_hidden_bookmarks': bool,
     'show_hidden': bool,
     'sort_case_insensitive': bool,
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index 1cc2dcf8..4033d639 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -210,7 +210,12 @@ class Rifle(object):
         elif function == 'mime':
             return bool(re.search(argument, self._get_mimetype(files[0])))
         elif function == 'has':
-            return argument in get_executables()
+            if argument.startswith("$"):
+                if argument[1:] in os.environ:
+                    return os.environ[argument[1:]] in get_executables()
+                return False
+            else:
+                return argument in get_executables()
         elif function == 'terminal':
             return _is_terminal()
         elif function == 'number':
diff --git a/ranger/gui/colorscheme.py b/ranger/gui/colorscheme.py
index f7eb22b6..6710d8b1 100644
--- a/ranger/gui/colorscheme.py
+++ b/ranger/gui/colorscheme.py
@@ -20,9 +20,8 @@ path/to/ranger/colorschemes/
 context is a struct which contains all entries of CONTEXT_KEYS,
 associated with either True or False.
 
-define which colorscheme to use by having this to your options.py:
-from ranger import colorschemes
-colorscheme = "name"
+Define which colorscheme in your settings (e.g. ~/.config/ranger/rc.conf):
+set colorscheme yourschemename
 """
 
 import os
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 91366e7c..8dd201e5 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -214,20 +214,23 @@ class Console(Widget):
                 return unicode_buffer, line, pos
 
         if self.fm.py3:
-            unicode_buffer += key
-            try:
-                decoded = unicode_buffer.encode("latin-1").decode("utf-8")
-            except UnicodeDecodeError:
-                return unicode_buffer, line, pos
-            except UnicodeEncodeError:
-                return unicode_buffer, line, pos
-            else:
+            if len(unicode_buffer) >= 4:
                 unicode_buffer = ""
-                if pos == len(line):
-                    line += decoded
+            if ord(key) in range(0, 256):
+                unicode_buffer += key
+                try:
+                    decoded = unicode_buffer.encode("latin-1").decode("utf-8")
+                except UnicodeDecodeError:
+                    return unicode_buffer, line, pos
+                except UnicodeEncodeError:
+                    return unicode_buffer, line, pos
                 else:
-                    line = line[:pos] + decoded + line[pos:]
-                pos += len(decoded)
+                    unicode_buffer = ""
+                    if pos == len(line):
+                        line += decoded
+                    else:
+                        line = line[:pos] + decoded + line[pos:]
+                    pos += len(decoded)
         else:
             if pos == len(line):
                 line += key
diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py
index 38a99a92..fa10a744 100644
--- a/ranger/gui/widgets/titlebar.py
+++ b/ranger/gui/widgets/titlebar.py
@@ -115,7 +115,8 @@ class TitleBar(Widget):
             bar.add(path.basename, clr, directory=path)
             bar.add('/', clr, fixed=True, directory=path)
 
-        if self.fm.thisfile is not None:
+        if self.fm.thisfile is not None and \
+                self.settings.show_selection_in_titlebar:
             bar.add(self.fm.thisfile.basename, 'file')
 
     def _get_right_part(self, bar):