Last active
October 18, 2016 15:10
-
-
Save Phaiax/647a359495f89a93a793b3a15e4159eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dateiname: .screenrc | |
# Speicherort: Homeverzeichnis | |
# Diese Datei enthaelt Befehle fuer screen. screen fuehrt sie beim starten aus. | |
# Jeden dieser Befehle kann man auch benutzen wenn screen schon gestartet ist. | |
# Mit <Strg+A :> startet man den Modus, der diese Befehle akzeptiert. | |
# Mehr Informationen im internen ITE Wiki | |
# und unter https://www.gnu.org/software/screen/manual/screen.html | |
#################################################################### | |
# hardstatus: Hiermit wird die unterste Zeile schoen farbig gemacht, der Hostname und Uhrzeit und Datum kommen dazu. | |
# https://www.gnu.org/software/screen/manual/screen.html#String-Escapes | |
# %{} sind farbcommandos | |
# %H ist der Hostname | |
# %? %? Eine Art if | |
# %1` Commando 1 ausfuehren: https://www.gnu.org/software/screen/manual/screen.html#Backtick | |
# %= padding (auffuellen mit nichts) | |
# %-w %+w Fenster vor bzw nach dem aktuellen Fenster auflisten | |
# %n Fensternr | |
# %t Fenstertitel | |
# %m %d %y %c %A : Monat Tag Jahr Uhrzeit | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%d.%m.%y %{W}%c%{g}]' | |
#################################################################### | |
# caption ist das gleiche wie hardstatus, aber fuer die unterregionen wenn man die konsole splittet (siehe unten) | |
# | |
caption splitonly '%{=r dd}%=%{-r}%?%F%{+b yK}%:%{+b wk}%? %n %t%?(%u)%? %{=r dd}%=' | |
#################################################################### | |
# huge scrollback buffer | |
defscrollback 5000 | |
#################################################################### | |
# no welcome message | |
startup_message off | |
#################################################################### | |
# 256 colors | |
attrcolor b ".I" | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
defbce on | |
#################################################################### | |
# mouse tracking allows to switch region focus by clicking | |
mousetrack on | |
#################################################################### | |
# Anfangs geoeffnete Fenster: | |
# screen -t <fenstername> <fensternummer> <programm> | |
screen -t cam1 1 bash | |
screen -t cam2 2 bash | |
screen -t Python 3 ipython3 | |
screen -t MAV 4 bash | |
screen -t Projects 5 bash | |
# Wieder zum ersten fenster gehen | |
select 0 | |
#################################################################### | |
# | |
# Neue Tastenkombination erstellen: | |
# bind: <Taste> <Befehl ...> | |
bind c screen 1 # window numbering starts at 1 not 0 | |
# normalerweise ist der standard fuer <Strg+A c> bind c screen 0 | |
# dann wird von 0 ausgehend die erste freie nummer gesucht. | |
# Die Nr 0 ist aber unpraktisch beim Screenwechseln <Strg+A 0> | |
bind 0 select 10 | |
#################################################################### | |
# get rid of silly xoff stuff | |
bind s split | |
#################################################################### | |
# Layout voreinstellungen | |
# Ein Layout ist eine Fensteranordnung innerhalb von screen. Man kann naemlich die | |
# den Bereich splitten und mehrere Konsolen nebeneinander anzeigen. | |
# Die folgenden Befehle erstellen neue layouts, splitten, fokussieren einen anderen | |
# splitbereich, splitten nochmal usw. Die Reihenfolge machts hier. | |
# Es kann parralel mehrere layouts geben, spaeter werden noch <Strg+F3> und <Strg+F4> | |
# definiert um zwischen den Layouts zu wechseln. | |
layout autosave on | |
layout new one | |
select 1 | |
layout new two | |
select 1 | |
split | |
resize -v +8 | |
focus down | |
select 4 | |
focus up | |
layout new three | |
select 1 | |
split | |
resize -v +7 | |
focus down | |
select 3 | |
split -v | |
resize -h +10 | |
focus right | |
select 4 | |
focus up | |
layout attach one | |
layout select one | |
#################################################################### | |
# Tastenkombinationen | |
# | |
# bind (siehe oben) erstellt eine Tastenkombination fuer <Strg+A __> | |
# bindkey erstellt eine Tastenkombination die auch ohne Strg+A funktioniert. | |
# | |
# Die kryptischen Werte fuer bindkey erhaelt man, wenn man in der konsole | |
# `read` ausfuehrt und dann die tastenkombination tippt. | |
# Bei gespitteten Fenstern mit <Strg+Rechts> usw navigieren | |
bindkey "^[[1;5D" focus left | |
bindkey "^[[1;5C" focus right | |
bindkey "^[[1;5A" focus up | |
bindkey "^[[1;5B" focus down | |
# Das Fenster der aktuellen Region wechseln mit F3 (prev) and F4 (next) | |
# (Geht auch mit <Strg+A NUMMER>) | |
bindkey "^[OR" prev | |
bindkey "^[OS" next | |
# Layouts wechseln mit <Strg+F3> (prev layout) und <Strg+F4> (next) | |
bindkey "^[[1;5R" layout prev | |
bindkey "^[[1;5S" layout next | |
#################################################################### | |
# Tastenkombinationen: Layout umdesignen | |
# F2 puts Screen into resize mode. Resize regions using hjkl keys. | |
bindkey "^[OQ" eval "command -c rsz" # enter resize mode | |
# Im Resize modus: 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" | |
# Im Resize modus: quickly switch between regions using tab and arrows | |
bind -c rsz \t eval "focus" "command -c rsz" # Tab | |
bind -c rsz -k kl eval "focus left" "command -c rsz" # Left | |
bind -c rsz -k kr eval "focus right" "command -c rsz" # Right | |
bind -c rsz -k ku eval "focus up" "command -c rsz" # Up | |
bind -c rsz -k kd eval "focus down" "command -c rsz" # Down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment