Re: How to switch window without loading the shell init?

2015-05-06 Thread Chas. Owens
It sounds like your heavy weight initializing is being done in .bashrc as
opposed to .bash_profile or .profile.  The .bashrc config file is intended
to barely bootstrap your environment and .bash_profile (or .profile) is
intended to make an interactive shell usable.  One option would be to use a
different shell like sh to run your commands: sh -c "ls | percol
--initial-index `tmux ls | awk '/attached.$/ {print NR-1}'` | cut -d':' -f
1 | xargs tmux switch-client -t" another would be to specify a different
.bashrc: bash --rcfile ".bashrc_light" -c "tmux ls | blah".

On Wed, May 6, 2015 at 10:49 AM Kaushal  wrote:

> Hi,
>
> I use the tmux split-window function only temporarily at times to do some
> quick selections from a list using percol.
>
> Examples:
>
> # switch to another session by name
> bind   S split-window "tmux ls | percol --initial-index `tmux ls | awk
> '/attached.$/ {print NR-1}'` | cut -d':' -f 1 | xargs tmux switch-client -t"
> # switch to ANY window in ANY session by name
>
> # switch to ANY window in ANY session by name
> bind   s split-window "tmux ls | cut -d: -f1 | xargs -I SESSION tmux lsw
> -F 'SESSION:#{window_name}' -t SESSION | percol --initial-index `tmux ls |
> cut -d: -f1 | xargs -I SESSION tmux lsw -F
> '___#{session_attached}#{window_active}___' -t SESSION | awk '/___11___/
> {print NR-1}'` | xargs tmux switch-client -t"
>
> These work except that when creating a new window, it also load my shell
> init script.
>
> For a new terminal, window, my shell init always loads a bunch of
> environment manipulation that I need to run certain company programs when I
> am actually working in a terminal. I don't need those in the above
> temporary split-window cases.
>
> I can also skip the time consuming environment setup if I can set an env
> var SHELL_CONFIG_LOADED before calling split-window.
>
> So the questions I have are:
>
> - How can I make split-window not load my default shell init (*rc) script?
> - Alternatively, how can I set an env var SHELL_CONFIG_LOADED before my
> shell init gets loaded on doing split-window?
>
> Thanks.
>
>
>
>
>
> --
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: tmux complete documentation.

2015-05-04 Thread Chas. Owens
On the command line: man tmux

On the Internet:
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux&sec=1

The specific section you are looking for:

split-window [-bdhvP] [-c start-directory] [-l size | -p percentage]
[-ttarget-pane] [shell-command] [-F format]

(alias: splitw)

Create a new pane by splitting target-pane: -h does a horizontal split
and -v a vertical split; if neither is specified, -v is assumed.
The -l and -p options specify the size of the new pane in lines (for
vertical split) or in cells (for horizontal split), or as a percentage,
respectively. The -b option causes the new pane to be created to the left
of or above target-pane. All other options have the same meaning as for
the new-window command.

On Mon, May 4, 2015, 04:46 Sinbad  wrote:

> hi,
> i'm unable to find the complete documentation of tmux, detailing the
> syntax of each and every
> aspect of tmux. for instance i'm trying to look for complete command
> syntax of 'split-window'
> command i'm unable to find it anywhere. when i type the command under tmux
> the syntax
> briefly appears and goes away. any pointers to complete documentation will
> be helpful.
>
> thanks
>
>
> --
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: tmux, vim, and the x-selection

2015-04-21 Thread Chas. Owens
Yanking to the * or + registers in vim won't work because the vim instance
is on a remote machine that doesn't support X.  I am not sure what w/e is.

The problem exists regardless of whether mode-mouse, etc. are on or off.
Quick tip for people with mode-mouse, etc. on: holding down shift disables
them allowing you to perform an X selection (of course, X knows nothing
about any splits, so you might want to zoom the pane, resize-pane -Z, if
you have splits).

On Tue, Apr 21, 2015 at 11:24 AM shawn wilson  wrote:

> Any reason not to "+y or w/e?
>
> I think you want to disable mode-mouse, mouse-select-pane,
> mouse-select-window, (and maybe) mouse-resize-pane. I generally keep these
> off unless I want to interact with tmux with the mouse (hardly never - mmm,
> so maybe enable - like I said, I don't do this).
> On Apr 21, 2015 9:59 AM, "Chas. Owens"  wrote:
>
>> When I run vim in tmux and select a several lines I get space padding on
>> the shorter lines to length of the the longest line.
>>
>> When I do the same without tmux, the terminal somehow knows were the
>> lines stop.
>>
>> Is there some way to fix this (ie let the information about where lines
>> end from vim passthrough to the terminal)?
>>
>> I am using tmux 1.9, vim 7.4.273, and a variety of terminals:
>> gnome-terminal 3.6.2, urxvt 9.20, xterm 304.
>>
>>
>> --
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live
>> exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
>> event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> ___
>> tmux-users mailing list
>> tmux-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tmux-users
>>
>>
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


tmux, vim, and the x-selection

2015-04-21 Thread Chas. Owens
When I run vim in tmux and select a several lines I get space padding on
the shorter lines to length of the the longest line.

When I do the same without tmux, the terminal somehow knows were the lines
stop.

Is there some way to fix this (ie let the information about where lines end
from vim passthrough to the terminal)?

I am using tmux 1.9, vim 7.4.273, and a variety of terminals:
gnome-terminal 3.6.2, urxvt 9.20, xterm 304.
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Attach a tmux session to a remote instance of tmux

2015-04-09 Thread Chas. Owens
A proof of concept exists as a fork: http://tmate.io/

I don't know if there are any plans to implement something similar in tmux
itself.  It is possible the stuff done for iTerm 2 integration might be
repurposed to allow control of a remote tmux server.

On Tue, Apr 7, 2015 at 3:37 AM Pierre Gaxatte 
wrote:

> Hello,
>
> I usually have tmux sessions on differents hosts and was wondering if
> there is a way to switch between them inside the same terminal.
>
> When I have multiple sessions on the same host, I use CTRL-b + s to switch
> between them.
>
> Is it possible to have a session on a remote machine seen as one of them
> and switch to them in the same way?
>
> I guess this could pose some configuration problems but I keep identical
> configuration across my remote machines.
>
> Thanks in advance.
>
> Regards,
>
> --
> Pierre Gaxatte
>  
> --
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_
> campaign=VA_SF___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
>
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Garbage characters printed to screen after a mouse selection

2015-02-28 Thread Chas. Owens
Garbage characters show up when I set mode-mouse to on and select a potion
of the screen.  The seem to appear one the line after my selection and
start at the border of the pane to the right (wrapping around for the
rightmost pane).  The length of the garbage text is proportional to the
copied text.

Does anyone know how I can fix this?

I am using 64-bit Ubuntu 14.10, the tmux that is in Ubuntu's repos (1.9),
and gnome-terminal (that is in Ubuntu's repos: 3.6.2).

Screenshot: http://imgur.com/g3fdmpc
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: tmux causing kernel panics on Mac OS X 10.7

2011-07-24 Thread Chas. Owens
On Sat, Jul 23, 2011 at 22:23, Tim Gray  wrote:
> On Jul 24, 2011 at 03:18 AM +0100, Nicholas Marriott wrote:
>>maybe try putting it on a memory FS
>>
>>do you have anything tmux uses on something other than HFS+?
>
> Not that I know of.  I've not done anything at all to the standard OS X
> Macbook install.  One main partition that everything is on.
>
> I'm not sure how I'd even go about doing a memory FS...

This works on 10.5 and 10.6, hopefully it hasn't changed in 10.7:

diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1024`

The size is controlled by ram://num where num is the number of 512
byte blocks you want, so the command above creates a ramdisk whose
size is half a megabyte.  Note that a portion of the disk must hold
the filesystem, so you don't get to store half a megabyte on it (more
like 377 kilobytes).



-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Provide command line arguments with arguments

2011-06-16 Thread Chas. Owens
On Thu, Jun 16, 2011 at 06:32, Helmut Schneider  wrote:
snip
> Although I don't like the idea to construct a script to make other
> scripts work with tmux I must admit that it works fine.
snip

I am confused, isn't that what you are doing already with
check_for_root_and_start_screen.sh?  All you have to do is move the
root checking logic into tmuxify, or better yet into a separate
function (since they are orthogonal), and then say

source ~/.function_definitions

tmuxify $0 "$@"
rootify $0 "$@"

at the top of your scripts.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Provide command line arguments with arguments

2011-06-11 Thread Chas. Owens
On Sat, Jun 11, 2011 at 17:16, Helmut Schneider  wrote:
> Chas. Owens wrote:
>
>> On Sun, May 29, 2011 at 04:23, Helmut Schneider 
>> wrote:  snip
>> > I have a script, more a wrapper, that checks for screen and sudo
>> > and if neither screen or sudo are active the script is restarted
>> > using screen and/or sudo:
>>
>> snip
>>
>> I have found a setup like this to work:
>
> Yes, but this only works with bash. I require a portable solution.
> Unfortunatly bashisms aren't and probably will never be.
>
>>               for arg in "$@"; do
>>                       command="$command '$arg'"
>>               done
>
> If you use bash use arrays.
>
> Thanks anyway.
snip

As far as I can see, the only bash specific things in that script are
the function definition, source, and [[ ]] instead of [ ].  Just
replace "function tmuxify" with "tmuxify()", source with . and [[ ]]
with [].


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Provide command line arguments with arguments

2011-06-11 Thread Chas. Owens
On Sun, May 29, 2011 at 04:23, Helmut Schneider  wrote:
snip
> I have a script, more a wrapper, that checks for screen and sudo and if
> neither screen or sudo are active the script is restarted using screen
> and/or sudo:
>
snip

I have found a setup like this to work:

in ~/func:

function tmuxify {
if [[ -z "$TMUX" ]]; then
command=""
for arg in "$@"; do
command="$command '$arg'"
done
exec tmux new "$command"
fi
}

In the shell script you want to run in tmux

#!/bin/bash

source ~/func

tmuxify $0 "$@"

echo $1
echo $2
echo hit enter
read;

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Prefix key preference [Was: Run long commands in Vim]

2011-05-30 Thread Chas. Owens
On Mon, May 30, 2011 at 10:06, Randy Stauner
 wrote:
snip
> As another example, when I tried to teach myself to stop using "vi" and type
> out "vim" i simply aliased "vi" to echo me a reminder to use "vim" and then
> do nothing.  I quickly learned to stop doing that and have since removed my
> alias.
snip

Why type out vim instead of vi?  I always just alias vi to be vim.



-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Prefix key preference [Was: Run long commands in Vim]

2011-05-28 Thread Chas. Owens
On Sat, May 28, 2011 at 14:49, Stroller  wrote:
>
> On 28/5/2011, at 9:24am, Julien Jehannet wrote:
>>> ...
>>> I use CTRL-a, which is the same as screen's prefix key.
>>> A lot of blogs and introductions to tmux suggest this, so I assumed it was 
>>> what most people use.
>>
>> But with the same drawback often complained by screen users then.
>
> What drawback would that be, then?
>
> Stroller.
snip

At the very least it clashes with bash's emacs mode C-a command to
move the cursor to the begging of the line.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Is there some way to send an escape code to the terminal from inside tmux?

2011-03-10 Thread Chas. Owens
I want to sent an escape code to my controlling terminal.  tmux seems
to be eating them.  Is there some method of asking tmux to send an
escape code for me?

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: ESC key seems slow in tmux

2011-03-08 Thread Chas. Owens
On Tue, Mar 8, 2011 at 11:26, Thomas Adam  wrote:
> On 8 March 2011 15:42, Chas. Owens  wrote:
>> I use vi bindings in bash and I have notice a significant delay
>> between pressing ESC and bash seeing the ESC, is there some timeout in
>> tmux that is waiting to see if I send anything else after the ESC
>> before passing it on to bash?  If so, is there any way to decrease
>> that timeout?
>
> In tmux, this is what the escape-time is for,
>
> -- Thomas Adam
>

Thanks, that seems to have done the trick.  So, what danger is there
to setting it 50 milliseconds vs the default 500?  Under what
circumstances should I need half a second to enter an escape sequence?


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


ESC key seems slow in tmux

2011-03-08 Thread Chas. Owens
I use vi bindings in bash and I have notice a significant delay
between pressing ESC and bash seeing the ESC, is there some timeout in
tmux that is waiting to see if I send anything else after the ESC
before passing it on to bash?  If so, is there any way to decrease
that timeout?

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users