]> git.wincent.com - clipper.git/log
clipper.git
17 months agofix: update images that had missing arrows on them main master
Greg Hurrell [Thu, 16 Dec 2021 21:31:23 +0000 (22:31 +0100)] 
fix: update images that had missing arrows on them

17 months agodocs: move media into media/ subdirectory
Greg Hurrell [Thu, 16 Dec 2021 21:24:31 +0000 (22:24 +0100)] 
docs: move media into media/ subdirectory

Seeing as selective rendering doesn't work on another branch. Seems host
dependent: relative paths like this work, and GitHub has this example
working:

    https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/

using this host:

    https://user-images.githubusercontent.com/

I can't say I am thrilled about the `gh-` prefix on this thing, because
it means the README is going to look good on GitHub, but not on other
mirrors, like GitLab, unless they decide to also support this particular
"vendor prefix".

17 months agodocs: fix dark/light images
Greg Hurrell [Thu, 16 Dec 2021 21:18:43 +0000 (22:18 +0100)] 
docs: fix dark/light images

This:

    https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/

shows an example working on:

    https://user-images.githubusercontent.com/

Not sure if there is some host-specific check going on here, so trying a
local path instead.

17 months agodocs: add dark-mode variant of example topology diagram
Greg Hurrell [Thu, 16 Dec 2021 21:12:59 +0000 (22:12 +0100)] 
docs: add dark-mode variant of example topology diagram

17 months agochore: add media to .gitignore
Greg Hurrell [Thu, 16 Dec 2021 20:52:49 +0000 (21:52 +0100)] 
chore: add media to .gitignore

Ignores worktree created with:

    git worktree add media media

17 months agochore: update .mailmap
Greg Hurrell [Thu, 9 Dec 2021 18:02:24 +0000 (19:02 +0100)] 
chore: update .mailmap

According to `git shortlog -s -e`, some discrepant email addresses had
crept in.

17 months agodocs: improve formatting of email address link in Markdown
Greg Hurrell [Thu, 9 Dec 2021 17:59:54 +0000 (18:59 +0100)] 
docs: improve formatting of email address link in Markdown

18 months agodocs: add info on OSC-52
Greg Hurrell [Mon, 22 Nov 2021 16:01:32 +0000 (17:01 +0100)] 
docs: add info on OSC-52

21 months agodocs: fix missing whitespace in README.md
Greg Hurrell [Fri, 13 Aug 2021 21:46:16 +0000 (23:46 +0200)] 
docs: fix missing whitespace in README.md

Closes: https://github.com/wincent/clipper/issues/25
22 months agodocs: add diagram showing example
Greg Hurrell [Thu, 22 Jul 2021 08:18:02 +0000 (10:18 +0200)] 
docs: add diagram showing example

Makes it a little easier to explain what this thing does.

23 months agochore: move from "master" to "main"
Greg Hurrell [Mon, 14 Jun 2021 20:00:17 +0000 (22:00 +0200)] 
chore: move from "master" to "main"

2 years agodocs: add another reference to vim-clipper
Greg Hurrell [Sat, 20 Jun 2020 13:28:56 +0000 (15:28 +0200)] 
docs: add another reference to vim-clipper

2 years agodocs: add tip to use `-N` switch with `nc` if required
Greg Hurrell [Sat, 20 Jun 2020 13:26:09 +0000 (15:26 +0200)] 
docs: add tip to use `-N` switch with `nc` if required

As suggested here:

https://github.com/wincent/vim-clipper/pull/3#issuecomment-646926371

2 years agoMerge branch 'pull/21'
Greg Hurrell [Tue, 16 Jun 2020 22:04:23 +0000 (00:04 +0200)] 
Merge branch 'pull/21'

Closes: https://github.com/wincent/clipper/pull/21
* pull/21:
  docs: update "Authors" and "History" sections
  refactor: make log file directory on all platforms
  feat: automatically create the default log directory if required

2 years agodocs: update "Authors" and "History" sections
Greg Hurrell [Tue, 16 Jun 2020 22:04:06 +0000 (00:04 +0200)] 
docs: update "Authors" and "History" sections

2 years agorefactor: make log file directory on all platforms
Greg Hurrell [Tue, 16 Jun 2020 20:18:24 +0000 (22:18 +0200)] 
refactor: make log file directory on all platforms

I don't see any reason why this should be limited to Linux, so remove
the platform check.

Additionally, check the error condition and blow up if we can't make the
directory. Finally, remove "config" from the variable name because it
may not be a `~/.config` directory at all.

And finally, avoid calling `expandPath` twice.

2 years agofeat: automatically create the default log directory if required
Daniel [Mon, 15 Jun 2020 11:09:14 +0000 (12:09 +0100)] 
feat: automatically create the default log directory if required

3 years agostyle: format Markdown with Prettier
Greg Hurrell [Mon, 6 Apr 2020 16:03:15 +0000 (18:03 +0200)] 
style: format Markdown with Prettier

With: `npx prettier --write README.md`

3 years agodocs: fix linebreaks in "Authors" section of README
Greg Hurrell [Mon, 6 Apr 2020 16:01:34 +0000 (18:01 +0200)] 
docs: fix linebreaks in "Authors" section of README

4 years agoDocument use of socat
Greg Hurrell [Tue, 18 Dec 2018 21:13:07 +0000 (22:13 +0100)] 
Document use of socat

As noted in the related issue, this can be useful (or necessary) on
systems without `nc` or with version of `nc` (GNU, for example) that
doesn't support the `-U` switch.

Closes: https://github.com/wincent/clipper/issues/19
4 years agoPrepare for v2.0.0 release 2.0.0
Greg Hurrell [Thu, 4 Oct 2018 11:29:54 +0000 (13:29 +0200)] 
Prepare for v2.0.0 release

Bumping the major version because there *may* be somebody out there
relying on the old behavior (ie. they have an empty `--flags` value and
are getting the default).

4 years agoOverhaul flag/config handling to deal with empty values
Greg Hurrell [Thu, 4 Oct 2018 11:18:30 +0000 (13:18 +0200)] 
Overhaul flag/config handling to deal with empty values

We were previously conflating non-emptiness of flags and config values
with being-set. This meant that you couldn't explicitly set a value to
an empty string, because we would interpret that as the value not being
set and we would fall back to the default. This is a problem if you
want, for example, to suppress all `--flags` being sent to the
underlying `--executable`.

Fix this by replacing our simple string and int variables with struct
wrappers that contain both the value and an explicit boolean that
indicates whether the value was provided. This requires us to implement
the `flag.Value` interface on our wrapper structs, and also the
`json.Unmarsheler` interface so that we can unpack from the JSON config
file into these custom structs.

In addition to fixing the issue, these changes make the code in the
`mergeSettings()` function look simpler and more fool-proof now. Only
downside is we need a bit of boilerplate-ish code to implement those
interfaces. Error messages when providing malformed JSON are about as
good as they used to be:

    clipper: 2018/10/04 13:15:31 json: cannot unmarshal object into Go
    struct field Options.Address of type string

Closes: https://github.com/wincent/clipper/issues/15
5 years agoPrepare for 1.0 release 1.0
Greg Hurrell [Thu, 28 Dec 2017 21:11:39 +0000 (13:11 -0800)] 
Prepare for 1.0 release

5 years agoAutomatically clean up stale socket files at startup
Greg Hurrell [Thu, 28 Dec 2017 21:11:14 +0000 (13:11 -0800)] 
Automatically clean up stale socket files at startup

These can get left behind after a crash, for example.

5 years agodoc: make it clear that StreamLocalBindUnlink should be set on the server
Greg Hurrell [Fri, 17 Nov 2017 16:31:09 +0000 (08:31 -0800)] 
doc: make it clear that StreamLocalBindUnlink should be set on the server

I've never found it to work on the client, but it does work on the
server. It wasn't clear to me from the docs that this would be the case
because the wording is almost identical for both `sshd_config`:

  StreamLocalBindUnlink
          Specifies whether to remove an existing Unix-domain
          socket file for local or remote port for- warding before
          creating a new one.  If the socket file already exists and
          StreamLocalBindUnlink is not enabled, sshd will be unable to
          forward the port to the Unix- domain socket file.  This option
          is only used for port forwarding to a Unix-domain socket file.

          The argument must be yes or no.  The default is no.

and `ssh_config`:

  StreamLocalBindUnlink
          Specifies whether to remove an existing Unix-domain
          socket file for local or remote port for- warding before
          creating a new one.  If the socket file already exists and
          StreamLocalBindUnlink is not enabled, ssh will be unable to
          forward the port to the Unix- domain socket file.  This option
          is only used for port forwarding to a Unix-domain socket file.

          The argument must be yes or no (the default).

I'm thinking that perhaps the client side config only applies to
port-forwarding (or the socket on the local side), and the server config
applies to reverse port forwarding (or the the socket on the remote
side).

5 years agoMerge branch 'pull/14'
Greg Hurrell [Sat, 23 Sep 2017 05:36:22 +0000 (22:36 -0700)] 
Merge branch 'pull/14'

Closes: https://github.com/wincent/clipper/pull/14
* pull/14:
  doc: update AUTHORS section
  fix readme typo

5 years agodoc: update AUTHORS section
Greg Hurrell [Sat, 23 Sep 2017 05:34:20 +0000 (22:34 -0700)] 
doc: update AUTHORS section

5 years agofix readme typo
Paul Choi [Wed, 5 Jul 2017 22:52:50 +0000 (15:52 -0700)] 
fix readme typo

5 years agoAdd note about use of 'TextYankPost' in vim-clipper
Greg Hurrell [Fri, 25 Aug 2017 14:28:52 +0000 (07:28 -0700)] 
Add note about use of 'TextYankPost' in vim-clipper

5 years agodoc: Note changes in tmux post-v2.5
Greg Hurrell [Fri, 9 Jun 2017 14:25:37 +0000 (07:25 -0700)] 
doc: Note changes in tmux post-v2.5

Currently only on the master branch, but will be in 2.6:

https://github.com/tmux/tmux/commit/78352fdd328b611d93

5 years agoMerge branch 'pull/12'
Greg Hurrell [Fri, 9 Jun 2017 14:22:56 +0000 (07:22 -0700)] 
Merge branch 'pull/12'

Closes: https://github.com/wincent/clipper/pull/12
* pull/12:
  doc: Update "Authors" section
  Library/Logs instead of Library/Log in README

5 years agodoc: Update "Authors" section
Greg Hurrell [Fri, 9 Jun 2017 14:22:27 +0000 (07:22 -0700)] 
doc: Update "Authors" section

5 years agoLibrary/Logs instead of Library/Log in README
Jannis Hermanns [Fri, 9 Jun 2017 12:16:17 +0000 (14:16 +0200)] 
Library/Logs instead of Library/Log in README

6 years agodoc: Add troubleshooting tip about `nc -N`
Greg Hurrell [Mon, 29 May 2017 06:22:39 +0000 (23:22 -0700)] 
doc: Add troubleshooting tip about `nc -N`

Closes: https://github.com/wincent/clipper/issues/11
6 years agodoc: apply updates for compatibility with tmux 2.4
Greg Hurrell [Mon, 8 May 2017 14:09:58 +0000 (07:09 -0700)] 
doc: apply updates for compatibility with tmux 2.4

Closes: https://github.com/wincent/clipper/issues/10
6 years agoFix variable expansion in Makefile tag target 0.4.2
Greg Hurrell [Sat, 15 Apr 2017 02:19:44 +0000 (19:19 -0700)] 
Fix variable expansion in Makefile tag target

6 years agoUpdate docs for 0.4.2 release
Greg Hurrell [Sat, 15 Apr 2017 02:04:17 +0000 (19:04 -0700)] 
Update docs for 0.4.2 release

6 years agoDon't do pass by reference
Greg Hurrell [Sat, 15 Apr 2017 01:51:26 +0000 (18:51 -0700)] 
Don't do pass by reference

According to this:

    http://stackoverflow.com/a/39993797/2103996

Slices are passed by value, but the value is just a pointer to the
underlying array, which does not change, so the listeners are not
copied.

6 years agoAdd a filter function to keep main body cleaner
Greg Hurrell [Sat, 15 Apr 2017 01:45:17 +0000 (18:45 -0700)] 
Add a filter function to keep main body cleaner

So I've now done this three ways to see which one sucks less. The lack
of generics makes this one feel a bit ridiculous, but at least the main
body reads nicely now.

Note also the pass-by-reference shennanigans to avoid making a copy of
the listener objects (I don't even know what that would mean, although I
want to try it out and find out: maybe Go only makes a copy of the
slice, not the slice items, when you pass a slice by value).

6 years agoImplement separate loop for determining `listenerCount`
Greg Hurrell [Sat, 15 Apr 2017 01:32:44 +0000 (18:32 -0700)] 
Implement separate loop for determining `listenerCount`

Still ugly, because we still need the `nil` check in the second loop.

6 years agoBail if we failed to set up any listeners
Greg Hurrell [Sat, 15 Apr 2017 01:29:46 +0000 (18:29 -0700)] 
Bail if we failed to set up any listeners

Normally we only try to set up one listener.

But in the case where we try to listen on the IPv4 and IPv6 loopback
addresses, we're fine with up to one of those failing, but not both.
This `listenerCount` variable is ugly, but I don't know Go idioms. I
think I might just pull it out into a separate loop for clarity (in a
language with a generic `filter` function I would just use that to strip
out `nil` and then look at the `len`).

6 years agoReduce duplication of listener set-up
Greg Hurrell [Sat, 15 Apr 2017 01:14:42 +0000 (18:14 -0700)] 
Reduce duplication of listener set-up

Note if somebody passes a crazy port-number (like a negative one)
`net.Listen` will blow up for us, but it would have done that before
anyway.

6 years agoFold two loops together
Greg Hurrell [Sat, 15 Apr 2017 01:04:55 +0000 (18:04 -0700)] 
Fold two loops together

6 years agoRemove unnecessary anonymous goroutine
Greg Hurrell [Sat, 15 Apr 2017 01:04:01 +0000 (18:04 -0700)] 
Remove unnecessary anonymous goroutine

6 years agoDon't listen on all interfaces
Greg Hurrell [Sat, 15 Apr 2017 00:52:31 +0000 (17:52 -0700)] 
Don't listen on all interfaces

This is the dumb fix for the face-palm bug reported here:

  https://github.com/wincent/clipper/issues/9

wherein our attempt to listening on IPv4 and IPv6 loopback interfaces
when available was actually causing us to listen on all interfaces
(ugh).

I'll remove the duplication in the next commit, and also try to
gracefully handle systems which might not have IPv6 interfaces up.

6 years agodoc: Fix typo in README
Greg Hurrell [Wed, 14 Dec 2016 18:03:18 +0000 (10:03 -0800)] 
doc: Fix typo in README

6 years agoCreate socket with tighter permissions 0.4.1
Greg Hurrell [Wed, 14 Dec 2016 07:16:13 +0000 (23:16 -0800)] 
Create socket with tighter permissions

6 years agodoc: Note that Apple has reverted to pre-Yosemite behavior in Sierra
Greg Hurrell [Wed, 14 Dec 2016 07:16:04 +0000 (23:16 -0800)] 
doc: Note that Apple has reverted to pre-Yosemite behavior in Sierra

6 years agodoc: trim down description in README
Greg Hurrell [Wed, 30 Nov 2016 15:16:40 +0000 (07:16 -0800)] 
doc: trim down description in README

"or as a process" was grammatically invalid; in fixing it, decided to
make the whole sentence more concise.

6 years agocontrib: Drop --address and --port from sample config
Greg Hurrell [Wed, 30 Nov 2016 15:13:46 +0000 (07:13 -0800)] 
contrib: Drop --address and --port from sample config

Seeing as these are the defaults, and the options are voluminously
documented elsewhere anyway, may as well drop them from the config.

6 years agoMerge branch 'pull/4'
Greg Hurrell [Wed, 30 Nov 2016 14:58:58 +0000 (06:58 -0800)] 
Merge branch 'pull/4'

Closes: https://github.com/wincent/clipper/pull/4
* pull/4:
  doc: Engage in word-smithery
  doc: Fix Linux set-up instructions
  Move Linux contrib files under contrib/linux
  update linux service script
  add systemd script support for linux

6 years agodoc: Engage in word-smithery
Greg Hurrell [Wed, 30 Nov 2016 14:53:37 +0000 (06:53 -0800)] 
doc: Engage in word-smithery

- Add some explicit headings.
- Slight reorder of some things.
- Minor edits for flow.

6 years agodoc: Fix Linux set-up instructions
Greg Hurrell [Wed, 30 Nov 2016 14:46:22 +0000 (06:46 -0800)] 
doc: Fix Linux set-up instructions

- Typo: "cliper" -> "clipper".
- Fix paths: service expects clipper to be in `/usr/local/bin`, not
  `~/bin`.
- Note likely need to use `sudo`.
- Kill off unnecessary blank lines.

6 years agoMove Linux contrib files under contrib/linux
Greg Hurrell [Wed, 30 Nov 2016 14:43:50 +0000 (06:43 -0800)] 
Move Linux contrib files under contrib/linux

Mirroring what we did for Darwin in 40b0f3a.

6 years agoupdate linux service script
Nelson Fernandez [Wed, 30 Nov 2016 13:56:39 +0000 (10:56 -0300)] 
update linux service script

6 years agoadd systemd script support for linux
Nelson Fernandez [Tue, 29 Nov 2016 19:46:22 +0000 (16:46 -0300)] 
add systemd script support for linux

6 years agoMove Darwin contrib files into contrib/darwin
Greg Hurrell [Wed, 30 Nov 2016 05:23:25 +0000 (21:23 -0800)] 
Move Darwin contrib files into contrib/darwin

Because we already have a pending PR (#4) for Linux, we'll want to
organize these by platform.

6 years agoAdd .mailmap file
Greg Hurrell [Tue, 29 Nov 2016 07:39:45 +0000 (23:39 -0800)] 
Add .mailmap file

6 years agoUpdate usage sample in docs
Greg Hurrell [Tue, 29 Nov 2016 07:37:47 +0000 (23:37 -0800)] 
Update usage sample in docs

6 years agoFix variable references in Makefile
Greg Hurrell [Tue, 29 Nov 2016 07:32:31 +0000 (23:32 -0800)] 
Fix variable references in Makefile

6 years agoPrepare for 0.4 release 0.4
Greg Hurrell [Tue, 29 Nov 2016 07:27:54 +0000 (23:27 -0800)] 
Prepare for 0.4 release

6 years agoAdd Git-powered version number at build time
Greg Hurrell [Tue, 29 Nov 2016 07:27:14 +0000 (23:27 -0800)] 
Add Git-powered version number at build time

As demonstrated here:

- https://gist.github.com/TheHippo/7e4d9ec4b7ed4c0d7a39839e6800cc16
- https://github.com/Masterminds/glide/blob/master/Makefile

6 years agoDrop "shorthand" from usage
Greg Hurrell [Tue, 29 Nov 2016 07:00:53 +0000 (23:00 -0800)] 
Drop "shorthand" from usage

Mostly so I can add "default" information to the `--address`/`-a`
option, even though the actual default is an empty string and so usually
wouldn't show.

6 years agoListen on IPv4 and IPv6 by default
Greg Hurrell [Tue, 29 Nov 2016 06:54:58 +0000 (22:54 -0800)] 
Listen on IPv4 and IPv6 by default

As noted [here](https://github.com/golang/go/issues/9334#issuecomment-67098831), the "correct way" to listen on both IPv4 and IPv6 loopback interfaces is to omit the address part.

Closes: https://github.com/wincent/clipper/issues/2
And will also close: https://github.com/wincent/vim-clipper/issues/1

6 years agoFix broken HTML entity in README
Greg Hurrell [Tue, 29 Nov 2016 06:39:01 +0000 (22:39 -0800)] 
Fix broken HTML entity in README

6 years agoMerge branch 'pull/3'
Greg Hurrell [Tue, 29 Nov 2016 06:36:48 +0000 (22:36 -0800)] 
Merge branch 'pull/3'

Closes: https://github.com/wincent/clipper/pull/3
* pull/3:
  Rename --args/-r to --flags/-f
  Add --executable and --args flags
  Rename ClipApp{,Args} to Executable,Args
  doc: update for OS X -> macOS, and Linux support
  Treat ClipAppArgs independently of ClipApp
  Handle variable whitespace in ClipAppArgs
  Reformat some comments for consistency
  Kill an excess empty line in the Makefile
  doc: Update "Authors" and "History" sections
  add support for linux clipboard

6 years agoRename --args/-r to --flags/-f
Greg Hurrell [Tue, 29 Nov 2016 06:30:49 +0000 (22:30 -0800)] 
Rename --args/-r to --flags/-f

I don't want to reimplement `flag.PrintDefaults` in order to get
appropriately grouped usage information, so I am renaming this flag to
so that the long and short forms both begin with the same letter.

"Flag" is unfortunately pretty overloaded at this point, and we already
have a bit of a cluster going on with "Settings", "Options", "Defaults",
and "Flags", but this is the way things are for now: because of the way
JSON marshalling works, we have to have names which match the desired
options.

6 years agoAdd --executable and --args flags
Greg Hurrell [Tue, 29 Nov 2016 06:20:21 +0000 (22:20 -0800)] 
Add --executable and --args flags

Alas, `--args` must break with the pattern of having the short option
start with the same letter as the long option (ie. `-a`); instead it
uses `-r`. This makes the `--help`/`-h` output a bit "meh"; not sure if
there's a way to fix that. If I can't find one I might need to rename
this option to `--flags`/`-f` or `--options`/`-o`.

6 years agoRename ClipApp{,Args} to Executable,Args
Greg Hurrell [Tue, 29 Nov 2016 06:11:42 +0000 (22:11 -0800)] 
Rename ClipApp{,Args} to Executable,Args

Going to expose these as command-line options, so want to get names
right.

6 years agodoc: update for OS X -> macOS, and Linux support
Greg Hurrell [Tue, 29 Nov 2016 02:28:22 +0000 (18:28 -0800)] 
doc: update for OS X -> macOS, and Linux support

Not sure whether `clipApp` and `clipAppArgs` should be exposed on the
command-line as well, for consistency. Will think about it.

6 years agoTreat ClipAppArgs independently of ClipApp
Greg Hurrell [Tue, 29 Nov 2016 02:05:36 +0000 (18:05 -0800)] 
Treat ClipAppArgs independently of ClipApp

You might conceivably want to set one without setting the other. For
example, on OS X, you might want to keep `pbcopy`, but instead use
`-pboard find` (for some crazy reason).

This isn't exposed as a command-line flag right now, so the only way you
could do such a thing would be to provide a custom JSON config file.

6 years agoHandle variable whitespace in ClipAppArgs
Greg Hurrell [Tue, 29 Nov 2016 01:39:56 +0000 (17:39 -0800)] 
Handle variable whitespace in ClipAppArgs

- Trim leading/trailing whitespace
- Split on runs of consecutive whitespace, so that "x     y" will split
  the same as "x y".

6 years agoReformat some comments for consistency
Greg Hurrell [Tue, 29 Nov 2016 01:34:08 +0000 (17:34 -0800)] 
Reformat some comments for consistency

6 years agoKill an excess empty line in the Makefile
Greg Hurrell [Tue, 29 Nov 2016 01:21:56 +0000 (17:21 -0800)] 
Kill an excess empty line in the Makefile

6 years agodoc: Update "Authors" and "History" sections
Greg Hurrell [Tue, 29 Nov 2016 01:19:29 +0000 (17:19 -0800)] 
doc: Update "Authors" and "History" sections

6 years agoadd support for linux clipboard
Nelson Fernandez [Fri, 25 Nov 2016 16:58:52 +0000 (13:58 -0300)] 
add support for linux clipboard

6 years agoPrepare for 0.3 release 0.3
Greg Hurrell [Sat, 4 Jun 2016 01:37:28 +0000 (18:37 -0700)] 
Prepare for 0.3 release

6 years agoFix documentation issues discovered through proof-reading
Greg Hurrell [Fri, 3 Jun 2016 16:22:41 +0000 (09:22 -0700)] 
Fix documentation issues discovered through proof-reading

6 years agoUpdate docs with domain socket info
Greg Hurrell [Fri, 3 Jun 2016 16:16:26 +0000 (09:16 -0700)] 
Update docs with domain socket info

Haven't proof-read this yet, so it is probably a bit rough.

6 years agoAdd real -h and --help flags
Greg Hurrell [Fri, 3 Jun 2016 15:39:34 +0000 (08:39 -0700)] 
Add real -h and --help flags

You would get help output before this if you typed "-h" or "--help" (or "-help")
but only because you were seeing the failure output. In other words,
"--random-crap" would show you exactly the same output.

Let's use real flags here instead, and exit cleanly with a 0 exit code.

6 years agoSplit plist files into two
Greg Hurrell [Fri, 3 Jun 2016 15:20:36 +0000 (08:20 -0700)] 
Split plist files into two

Homebrew has it's own custom fork:

  https://github.com/Homebrew/homebrew-core/blob/409a67fbf587e4346235cb7ee71eab0d65adc88f/Formula/clipper.rb

So I am not worried about breaking that, but I do want to show a couple of clear
examples of how to set this up via TCP ports or UNIX domain sockets.

Note that I also updated the paths to use `/usr/local/bin` instead of `/usr/bin`
or a relative PATH because of Apple's SIP (System Integrity Protection) that
makes it much less likely that people will be able to write to the latter.

6 years agoComplain if given --port with UNIX domain socket --address
Greg Hurrell [Fri, 3 Jun 2016 06:19:53 +0000 (23:19 -0700)] 
Complain if given --port with UNIX domain socket --address

6 years agoRejig settings handling to get desired precedence
Greg Hurrell [Fri, 3 Jun 2016 02:39:34 +0000 (19:39 -0700)] 
Rejig settings handling to get desired precedence

Flags beat config file which beats defaults.

This is very verbose, but this is the Go way, I think.

6 years agoMake option overrides a little more predictable
Greg Hurrell [Fri, 3 Jun 2016 01:43:43 +0000 (18:43 -0700)] 
Make option overrides a little more predictable

Switching to structs instead of independent variables to make it more obvious
what's going on with overrides. Note the motivating use case here, which is
making sure that only things which look like paths end up getting converted to
absolute paths and used.

6 years agoUpdate links in README
Greg Hurrell [Thu, 2 Jun 2016 16:03:59 +0000 (09:03 -0700)] 
Update links in README

Promote GitHub project page to "official" status, simplify `go build`
invocatioe, mention other mirrors, and drop references to binary builds, which I
am unlikely to offer moving forward, given the prevalence of Homebrew in the
target market for which those executables existed (OS X power users).

6 years agoOptionally listen on a UNIX domain socket
Greg Hurrell [Thu, 2 Jun 2016 16:03:29 +0000 (09:03 -0700)] 
Optionally listen on a UNIX domain socket

If `--address` (or "address" in the config file) looks like a path (ie. starts
with "/" or "~") then Clipper will listen on a UNIX domain socket at that path
rather than on a port.

Motivation: better security, because the socket can be protected via filesystem
permissions, whereas the TCP port is accessible to any user that has access to
localhost.

Netcat can be configured to talk to a UNIX socket (via `-U`), and it's possible
to forward local sockets using SSH as well, given a sufficiently recent version
of SSH, so everything can continue to work as before.

I'm going to run with this instead of my half-made passphrase-based solution,
for now, because the latter has a bunch of issues (need to exchange a shared
secret at start-time, and updating it may be tricky in the presence of
long-lived tmux sessions etc).

This is still a WIP, however, as we have some issues to work through. For
example, command-line options should trump config file options (we currently do
the opposite) and it all needs to be documented still. Also, the code is
frickin' ugly (it's been so long since I programmed in Go, I had to Google "how
do I X?" about 20 times while preparing this tiny change).

6 years agoCatch signals in order to perform exit cleanup
Greg Hurrell [Thu, 2 Jun 2016 15:22:16 +0000 (08:22 -0700)] 
Catch signals in order to perform exit cleanup

Want to do this because I'm about to add support for listening on UNIX domain
sockets, and those need to be cleaned up at exit in order to avoid havoc.

Based on:

  http://stackoverflow.com/a/25242964/2103996

6 years agoFuture-proof copyright year ranges
Greg Hurrell [Thu, 2 Jun 2016 14:29:44 +0000 (07:29 -0700)] 
Future-proof copyright year ranges

7 years agodoc: Mention changes to execution context in Yosemite
Greg Hurrell [Sat, 18 Jul 2015 00:02:06 +0000 (17:02 -0700)] 
doc: Mention changes to execution context in Yosemite

Note that the stuff about execution context only applies pre-Yosemite.
Clipper is still useful, however, even on Yosemite, because it provides
you with a uniform interface to the clipboard for both local and remote
hosts.

7 years agodoc: Fix Markdown fail
Wincent Colaiuta [Tue, 7 Jul 2015 04:32:46 +0000 (21:32 -0700)] 
doc: Fix Markdown fail

7 years agodoc: Mention the vim-clipper plug-in
Wincent Colaiuta [Tue, 7 Jul 2015 04:31:45 +0000 (21:31 -0700)] 
doc: Mention the vim-clipper plug-in

7 years agoRemove Donations section from README
Wincent Colaiuta [Tue, 7 Jul 2015 04:26:38 +0000 (21:26 -0700)] 
Remove Donations section from README

7 years agoUpdate copyright headers and author information
Wincent Colaiuta [Tue, 7 Jul 2015 04:26:24 +0000 (21:26 -0700)] 
Update copyright headers and author information

8 years agoCrop logo
Wincent Colaiuta [Mon, 20 Apr 2015 14:34:10 +0000 (07:34 -0700)] 
Crop logo

8 years agoAdd logo to README
Wincent Colaiuta [Mon, 20 Apr 2015 14:28:57 +0000 (07:28 -0700)] 
Add logo to README

8 years agoAdd "Reverse" Clipper section to README
Wincent Colaiuta [Tue, 31 Mar 2015 19:56:09 +0000 (12:56 -0700)] 
Add "Reverse" Clipper section to README

8 years agodoc: Remove references to Gitorious
Wincent Colaiuta [Sat, 21 Mar 2015 22:13:28 +0000 (15:13 -0700)] 
doc: Remove references to Gitorious

Soon to be defunct:

  https://about.gitlab.com/2015/03/03/gitlab-acquires-gitorious/

9 years agoAdd section about Mosh to the docs
Wincent Colaiuta [Mon, 10 Feb 2014 04:02:32 +0000 (20:02 -0800)] 
Add section about Mosh to the docs

This commit adds some tips on getting Mosh, SSH and Clipper playing
nicely together. I include the section about the various `Control*`
settings because they are a complicating variable which needs to be
dealt with.

(In general, the `Control*` settings are a great time saver, but they
can make trouble-shooting difficult and we can simplify the business of
setting up a "pure-forwarder" for use with Mosh by keeping them out of
the picture.)

Signed-off-by: Wincent Colaiuta <win@wincent.com>
9 years agoAdd a tip for the bold and lazy to the docs
Wincent Colaiuta [Mon, 10 Feb 2014 04:00:23 +0000 (20:00 -0800)] 
Add a tip for the bold and lazy to the docs

A slightly bolder and more lazy tip that I'm not including is that you
can just do:

  killall sshd

Unless you are foolhardily running as root, in which case that will
lock you out of your server. Let's not encourage people to be too
heavy-handed.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
9 years agoFix oversize heading
Wincent Colaiuta [Sun, 3 Nov 2013 03:19:57 +0000 (20:19 -0700)] 
Fix oversize heading

This heading was a little horrid to look at with the non-wrapping
pre-formatted text. Make it smaller; hopefully it will wrap.

Signed-off-by: Wincent Colaiuta <win@wincent.com>