Skip to content
Snippets Groups Projects
Commit 2cdddf21 authored by Administrator's avatar Administrator
Browse files

Merge branch 'default' into 'main'

Add default .screenrc

See merge request !2
parents d0bf47d4 d50a7c89
1 merge request!2Add default .screenrc
# instead Ctrl-a use Ctrl-g
# second g is used if you really need to sent Ctrl-g
# keep Ctrl+a on servers with ssh access only so you can switch from main screen
escape ^Gf
# https://github.com/tpope/dotfiles/blob/master/.screenrc
startup_message off
shell -$SHELL
bind j next
bind ^J next
bind k prev
# ctrl+g+y copy above line
bind ^Y eval "copy" "stuff kY" "paste ."
bind y eval "copy" "stuff kY" "paste ."
defscrollback 99999
scrollback 99999
# https://unix.stackexchange.com/a/96022/150895
# bindkey ^C kill
#
# create new region ctrl-a+|
# go to next region with ctrl-a + Tab
# close a region with ctrl-a + X (windows will stay)
# bind ' ' layout next # <- actually means Ctrl-a + Space, go to next layout
# (currenyl bind ' ' next # ctrl-a + space is go to next window)
# with ctrl-a + " you can see all available windows
# ctrl-a + k is to kill window (and it's proccess)
# https://superuser.com/a/331181
# copy the screen pastbuffer to the MacOSX pastebord
# create tmp file which will be a buffer location
screen bash -c "touch /tmp/please-touch-me; exec bash"
bufferfile /tmp/please-touch-me
bindkey -m ' ' eval 'stuff \040' 'writebuf' 'exec sh -c "[ -f /usr/bin/pbcopy ] && /usr/bin/pbcopy < /tmp/please-touch-me || ([ -f /usr/bin/xsel ] && /usr/bin/xsel --clipboard --input < /tmp/please-touch-me)"'
# http://superuser.com/questions/126606/how-to-get-mac-os-x-terminal-app-and-screen-vim-scrolling-to-play-nice/316900#316900
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti@:te@
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Change the hardstatus settings to give an window list at the bottom of the
# screen with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}%{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}'
# GNU screen remote multiuser access help using ssh command
# Screen tips
Simple bash script which user can run to temporary change password and
User can initialy ssh
## Default configuration
Clone repo
```
mkdir ~/trk.tools/sh
cd ~/trk.tools/sh
git clone https://trk.tools/sh/screen-tips.git
```
and link the file
```
ln -s ~/trk.tools/sh/screen-tips/.screenrc ~/.screenrc
```
## Development
## Remote multiuser access help using ssh and GNU screen
Simple bash script which user can run to temporary change password and
User can initialy ssh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment