-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.screenrc
70 lines (55 loc) · 2.55 KB
/
.screenrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# .screenrc
# Lloyd Dilley
# https://github.com/ldilley/dotfiles
# Display notification when activity is detected for a window
activity "Activity detected in %t (%n)!"
# Do not show remnants of previously opened programs such as editors
altscreen on
# Ensure session is saved on hangup
autodetach on
# Periodically execute the defined command
# This can be used to update the status line using "%1`".
#backtick 1 0 5 /bin/date
# Display notification when bell is detected for a window
bell_msg "Bell detected in %t (%n)!"
# Set window titles
caption always
caption string "%n %t"
# Start session using my home directory as the working directory
chdir
# Detect activity in new windows
defmonitor on
# Set status bar
hardstatus alwayslastline
hardstatus string "%{= kg}[%{c}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{m}%m/%d/%Y %{r}%c%{g}]"
# Start with a few named windows and configure the layout
# Navigate windows using ctrl+a+<window_number> and areas using ctrl+a+<tab>.
# Or use the custom keybinds defined at the bottom of this file.
screen -t shell_0 0 bash # start a bash shell in the larger top area
split # split horizontally, creating a top and bottom area
focus down # set focus to new bottom area
screen -t shell_1 1 bash # start another bash shell in this bottom area
split -v # split vertically, creating two smaller bottom areas
focus right # set focus to new bottom-right area
screen -t htop 2 htop # start htop in this new bottom-right area
focus top # reset focus to the larger top area
select 0 # ensure the larger top area is using the first bash shell
# Set this many lines of scrollback
scrollback 10000
# Disable copyright notice on startup
startup_message off
# Terminal emulation type
term screen-256color
#term xterm-256color
# Disable visual bell to prevent the screen flash
vbell off
# Custom keybinds
# These may need to be re-defined depending on your terminal.
# For PuTTY, enable "Xterm R6" function keys under Terminal -> Keyboard to use the F3 and F4 key codes defined below.
# You can use "showkey -a" to capture the key definitions for your terminal.
bindkey "^[OR" prev # F3 = previous window
bindkey "^[OS" next # F4 = next window
bindkey "^[[A" focus top # ctrl+up_arrow = large top area
bindkey "^[[B" focus down # ctrl+down_arrow = bottom-left area
bindkey "^[[C" focus bottom # ctrl+right_arrow = bottom-right area
bindkey "^[[D" focus left # ctrl+left_arrow = back to bottom-left area from bottom-right area