summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorroot <root@homer.(none)>2013-01-20 17:09:17 -0500
committerroot <root@homer.(none)>2013-01-20 17:09:17 -0500
commit18c785df079bddab43c181e8eb2162c5d7a909a2 (patch)
tree4dc5088fae1607e6d4ee9e1baebf1b6cd36e9302 /ranger
parent11e123d17c082270600440d9894f19c3a7b60f6d (diff)
downloadranger-18c785df079bddab43c181e8eb2162c5d7a909a2.tar.gz
Add option to draw status bar above the browser window with "status_bar_on_top" setting.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/rc.conf3
-rw-r--r--ranger/container/settingobject.py1
-rw-r--r--ranger/gui/ui.py4
3 files changed, 6 insertions, 2 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 42f73737..5b1f7abf 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -63,6 +63,9 @@ set collapse_preview true
 # Save the console history on exit?
 set save_console_history true
 
+# Draw the status bar on top of the browser window (default: bottom)
+set status_bar_on_top false
+
 # Draw a progress bar in the status bar which displays the average state of all
 # currently running tasks which support progress bars?
 set draw_progress_bar_in_status_bar True
diff --git a/ranger/container/settingobject.py b/ranger/container/settingobject.py
index a4dfe963..431d26e3 100644
--- a/ranger/container/settingobject.py
+++ b/ranger/container/settingobject.py
@@ -34,6 +34,7 @@ ALLOWED_SETTINGS = {
 	'show_cursor': bool,
 	'show_hidden_bookmarks': bool,
 	'show_hidden': bool,
+	'status_bar_on_top': bool,
 	'sort_case_insensitive': bool,
 	'sort_directories_first': bool,
 	'sort_reverse': bool,
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 8ebd9dd8..019f50da 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -275,11 +275,11 @@ class UI(DisplayableContainer):
 		self.termsize = self.win.getmaxyx()
 		y, x = self.termsize
 
-		self.browser.resize(1, 0, y - 2, x)
+		self.browser.resize(self.settings.status_bar_on_top and 2 or 1, 0, y - 2, x)
 		self.taskview.resize(1, 0, y - 2, x)
 		self.pager.resize(1, 0, y - 2, x)
 		self.titlebar.resize(0, 0, 1, x)
-		self.status.resize(y - 1, 0, 1, x)
+		self.status.resize(self.settings.status_bar_on_top and 1 or y-1, 0, 1, x)
 		self.console.resize(y - 1, 0, 1, x)
 
 	def draw(self):