mirror of
https://bitbucket.org/skobkin/dotfiles.git
synced 2024-11-24 22:03:09 +00:00
Separate <machine-name>.screenrc for each machine. Common settings moved to common.screenrc.
This commit is contained in:
parent
bc90321e35
commit
a70b3ea0a2
|
@ -1,22 +1,10 @@
|
|||
# GNU Screen configuration
|
||||
|
||||
```bash
|
||||
cd ~/.dotfiles/screen
|
||||
```
|
||||
## Install
|
||||
|
||||
1. Create symbolic link for main config file:
|
||||
Create symbolic link for main config file:
|
||||
|
||||
```bash
|
||||
ln -s .screenrc ~/.screenrc
|
||||
```
|
||||
|
||||
2. Create symbolic links for [backtick](https://www.gnu.org/software/screen/manual/html_node/Backtick.html) scripts for each machine.
|
||||
|
||||
```bash
|
||||
# Choose desired backtick scripts for each (1-3) slot and create symbolic links
|
||||
# Suppose your current machine is 'desktop'
|
||||
cd backticks
|
||||
ln -s hwtemp-desktop.sh 1.sh
|
||||
ln -s loadavg.sh 2.sh
|
||||
ln -s memory.sh 3.sh
|
||||
ln -s ~/.dotfiles/screen/desktop.screenrc ~/.screenrc
|
||||
```
|
||||
|
|
|
@ -1,38 +1,24 @@
|
|||
screen -t bash4
|
||||
screen -t sudo1 sudo -i
|
||||
screen -t sudo2 sudo -i
|
||||
#screen -t bash7
|
||||
#screen -t bash8
|
||||
#screen -t bash9
|
||||
|
||||
# Selecting first window
|
||||
select 0
|
||||
altscreen on
|
||||
term screen-256color
|
||||
|
||||
# Huge scrollback
|
||||
defscrollback 16000
|
||||
|
||||
altscreen on
|
||||
term screen-256color
|
||||
# Binding window switching to "<" and ">" keys
|
||||
bind ',' prev
|
||||
bind '.' next
|
||||
|
||||
hardstatus alwayslastline
|
||||
|
||||
# Backtick commands to output in the hardstatus
|
||||
backtick 1 5 5 sh -c '~/.dotfiles/screen/backticks/1.sh'
|
||||
backtick 2 10 10 sh -c '~/.dotfiles/screen/backticks/2.sh'
|
||||
backtick 3 10 10 sh -c '~/.dotfiles/screen/backticks/3.sh'
|
||||
backtick 4 10 10 sh -c '~/.dotfiles/screen/backticks/4.sh'
|
||||
|
||||
# http://www.gnu.org/software/screen/manual/html_node/String-Escapes.html
|
||||
#
|
||||
# %H : hostname
|
||||
# %= : expand to fill all space (used here to make remaining content flush right)
|
||||
# %` : print output of 'backtick' command (defined elsewhere in .screenrc)
|
||||
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %1` ][ %2` ][ %3` ][ %4` ][%{B} %d-%m-%Y %{W}%c %{g}]'
|
||||
|
||||
# use hjkl keys to resize regions
|
||||
#bind -c rsz h eval "resize -h -5" "command -c rsz"
|
||||
#bind -c rsz j eval "resize -v -5" "command -c rsz"
|
||||
#bind -c rsz k eval "resize -v +5" "command -c rsz"
|
||||
#bind -c rsz l eval "resize -h +5" "command -c rsz"
|
||||
|
||||
hardstatus alwayslastline
|
||||
|
||||
# http://www.gnu.org/software/screen/manual/html_node/String-Escapes.html
|
||||
#
|
||||
# %H : hostname
|
||||
# %= : expand to fill all space (used here to make remaining content flush right)
|
||||
# %` : print output of 'backtick' command (defined elsewhere in .screenrc)
|
||||
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %1` ][ %2` ][ %3` ][ %4` ][%{B} %d-%m-%Y %{W}%c %{g}]'
|
17
screen/desktop.screenrc
Normal file
17
screen/desktop.screenrc
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Including common settings
|
||||
source ~/.dotfiles/screen/common.screenrc
|
||||
|
||||
# Creating default windows
|
||||
screen -t bash4
|
||||
screen -t sudo1 sudo -i
|
||||
screen -t sudo2 sudo -i
|
||||
|
||||
# Selecting first window
|
||||
select 0
|
||||
|
||||
# Backtick commands to output in the hardstatus
|
||||
backtick 1 5 5 sh -c '~/.dotfiles/screen/backticks/hwtemp-desktop.sh'
|
||||
backtick 2 10 10 sh -c '~/.dotfiles/screen/backticks/loadavg.sh'
|
||||
backtick 3 10 10 sh -c '~/.dotfiles/screen/backticks/memory.sh'
|
||||
|
||||
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %1` ][ %2` ][ %3` ][%{B} %d-%m-%Y %{W}%c %{g}]'
|
18
screen/laptop-xiaomi-air-13.screenrc
Normal file
18
screen/laptop-xiaomi-air-13.screenrc
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Including common settings
|
||||
source ~/.dotfiles/screen/common.screenrc
|
||||
|
||||
# Creating default windows
|
||||
screen -t bash4
|
||||
screen -t sudo1 sudo -i
|
||||
screen -t sudo2 sudo -i
|
||||
|
||||
# Selecting first window
|
||||
select 0
|
||||
|
||||
# Backtick commands to output in the hardstatus
|
||||
backtick 1 5 5 sh -c '~/.dotfiles/screen/backticks/hwtemp-laptop-xiaomi.sh'
|
||||
backtick 2 10 10 sh -c '~/.dotfiles/screen/backticks/loadavg.sh'
|
||||
backtick 3 10 10 sh -c '~/.dotfiles/screen/backticks/memory.sh'
|
||||
backtick 4 10 10 sh -c '~/.dotfiles/screen/backticks/battery-laptop-xiaomi.sh'
|
||||
|
||||
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %1` ][ %2` ][ %3` ][ %4` ][%{B} %d-%m-%Y %{W}%c %{g}]'
|
Loading…
Reference in a new issue