Adding bin files
tmuxssh allow to connect and attach or create a tmux session.
This commit is contained in:
		
							
								
								
									
										13
									
								
								bin/.bin/auto-presel
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								bin/.bin/auto-presel
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,13 @@ | ||||
| #! /bin/sh | ||||
| # Original script by https://github.com/ikn/ , modified to use splitting method of | ||||
| # https://github.com/baskerville/bspwm/tree/master/examples/external_rules/pseudo_automatic_mode | ||||
| fwid=$(bspc query -N -n focused) | ||||
|  | ||||
| wattr wh $fwid | { | ||||
| 	read width height | ||||
| 	if [ $width -gt $height ] ; then | ||||
| 		bspc node -p \~east | ||||
| 	else | ||||
| 		bspc node -p \~south | ||||
| 	fi | ||||
| } | ||||
							
								
								
									
										11
									
								
								bin/.bin/sshtmux
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								bin/.bin/sshtmux
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,11 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| # A name for the session | ||||
| session_name="$(whoami)_sess" | ||||
|  | ||||
| if [ ! -z $1 ]; then | ||||
| 	ssh -t "$1" "tmux attach -t $session_name || tmux new -s $session_name" | ||||
| else | ||||
| 	echo "Usage: sshtmux HOSTNAME" | ||||
| 	echo "You must specify a hostname" | ||||
| fi | ||||
		Reference in New Issue
	
	Block a user