Commit Graph

6 Commits (a9785b4e2d0f2252f0de96ccba6f306fab2d391c)

Author SHA1 Message Date
Sergei Gerasenko a9785b4e2d Remove bug in grep pattern
The pid the `grep -v` is trying to eliminate is not at the end
of the line.

`all_tmux_processes` produces the following output (for example):

```
tmux                        32069 29270
```

Here the first number is the pid and the second -- the uid. So, since
the idea of `number_tmux_processes_except_current_server` is to eliminate
32069 from consideration, it should look for "<SPACE>PID<SPACE>".
2021-04-24 23:25:11 -05:00
Sergei Gerasenko fc73e092e5 Use the `-u` switch of `ps` to limit `ps` scope to that of the current user. 2018-06-22 17:15:39 +00:00
Sergei Gerasenko 351b80109f Refactor `all_tmux_processes`
When counting the number of running tmux processes, count only those
that belong to the current user.

`tmux a` shows as a separate process (must be the client process) and
thus needs to be excluded from the calculation as well. The previous
exclusion of `tmux source` was also incorporated.
2018-04-29 02:19:23 +00:00
Bruno Sutic d6ac017d1d
Bugfix: do not count tmux source-file as tmux process
Do not count `tmux source-file .tmux.conf` as a tmux process when checking if
other tmux server is running.

Previously, this caused interpolation command not to be inserted into
`status-right` because `tmux source-file` was falsely detected as another tmux
server.
2015-03-14 15:55:00 +01:00
Bruno Sutic fb641881c2
Don't start auto-saving if another tmux server is running 2015-02-20 02:05:58 +01:00
Bruno Sutic 42ca2d4454
First working version 2015-02-11 15:43:37 +01:00