summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-06-11 20:04:21 -0400
committerDrew DeVault <sir@cmpwn.com>2018-06-11 20:04:21 -0400
commit6728a11fdf863f7a33eb14e84421b828ab28c09f (patch)
treec9e1dcb85e34273b3f166f50a84e608aafe4e502 /widgets
parentd67c8a60ef9a326ba7e2ff0b5755d8eba629d4eb (diff)
downloadaerc-6728a11fdf863f7a33eb14e84421b828ab28c09f.tar.gz
Apply gofmt
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go10
-rw-r--r--widgets/exline.go6
-rw-r--r--widgets/status.go4
3 files changed, 10 insertions, 10 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 798a4dd..cc93d92 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -69,10 +69,10 @@ func NewAerc(logger *log.Logger) *Aerc {
 	})()
 
 	return &Aerc{
-		grid:        mainGrid,
-		statusbar:   statusbar,
-		statusline:  statusline,
-		tabs:        tabs,
+		grid:       mainGrid,
+		statusbar:  statusbar,
+		statusline: statusline,
+		tabs:       tabs,
 	}
 }
 
@@ -94,7 +94,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool {
 		if event.Rune() == ':' {
 			exline := NewExLine(func(command string) {
 				aerc.statusline.Push(fmt.Sprintf("TODO: execute %s", command),
-					3 * time.Second)
+					3*time.Second)
 				aerc.statusbar.Pop()
 				aerc.interactive = nil
 			}, func() {
diff --git a/widgets/exline.go b/widgets/exline.go
index de652ba..ae83933 100644
--- a/widgets/exline.go
+++ b/widgets/exline.go
@@ -1,8 +1,8 @@
 package widgets
 
 import (
-	"github.com/mattn/go-runewidth"
 	"github.com/gdamore/tcell"
+	"github.com/mattn/go-runewidth"
 
 	"git.sr.ht/~sircmpwn/aerc2/lib/ui"
 )
@@ -21,7 +21,7 @@ type ExLine struct {
 	onInvalidate func(d ui.Drawable)
 }
 
-func NewExLine(commit func (cmd string), cancel func()) *ExLine {
+func NewExLine(commit func(cmd string), cancel func()) *ExLine {
 	return &ExLine{
 		cancel:  cancel,
 		commit:  commit,
@@ -43,7 +43,7 @@ func (ex *ExLine) Draw(ctx *ui.Context) {
 	ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
 	ctx.Printf(0, 0, tcell.StyleDefault, ":%s", string(ex.command))
 	cells := runewidth.StringWidth(string(ex.command[:ex.index]))
-	ctx.SetCursor(cells + 1, 0)
+	ctx.SetCursor(cells+1, 0)
 }
 
 func (ex *ExLine) insert(ch rune) {
diff --git a/widgets/status.go b/widgets/status.go
index 3b4dbcc..b7d9490 100644
--- a/widgets/status.go
+++ b/widgets/status.go
@@ -31,7 +31,7 @@ func NewStatusLine() *StatusLine {
 	}
 }
 
-func (status *StatusLine) OnInvalidate(onInvalidate func (d ui.Drawable)) {
+func (status *StatusLine) OnInvalidate(onInvalidate func(d ui.Drawable)) {
 	status.onInvalidate = onInvalidate
 }
 
@@ -68,7 +68,7 @@ func (status *StatusLine) Push(text string, expiry time.Duration) *StatusMessage
 		message: text,
 	}
 	status.stack = append(status.stack, msg)
-	go (func () {
+	go (func() {
 		time.Sleep(expiry)
 		for i, m := range status.stack {
 			if m == msg {
Installing
==========

You don't need to install anything.

You can run ranger by simply starting the executable file ranger.py
in the top directory of this package.
Use the --clean option and it will leave no trace whatsoever on your system.


If you insist on conventionally install it, use the package manager
of your operating system.  If there is no package or it is out of date,
you can also follow these instructions:


Step by step
============

(This is all done automagically if you type `sudo make install',
though you might want to read the Makefile first)

0. Make sure you have a recent version of python, including the
   curses module, which is the case if this shell command prints no errors:
   python -c 'import curses'


1. Copy the file "ranger.py" into any of the directories in the PATH
   environment variable, for example to "/usr/bin/ranger"


2. Copy the directory "ranger" into one of the python module search
   paths, for example to "/usr/lib/python2.6/site-packages/ranger".

   Ensure that the path is listed by the command:
   python -c 'import sys; print("\n".join(sys.path))'


3. Optionally, you can activate an extra feature: When you exit ranger,
   the directory of the current shell can be changed to the last visited
   directory in ranger.  To do so, add this alias to your shell rc file:

   alias rng="source ranger ranger"

   (Unfortunately this feature is shell dependent.  It has been
   successfully tested with BASH and ZSH only.)


Uninstalling
============

Use your package manager to uninstall ranger.  If you manually installed
it, revert the steps described above.

Ranger can also create a configuration directory at ~/.ranger which
you might want to remove as well.