Compare commits

...

2 Commits

Author SHA1 Message Date
af0d0bd59c git prompt details implemented 2023-09-30 09:31:45 +02:00
117730b82c firewall and test added to ssh config 2023-09-30 09:02:54 +02:00
3 changed files with 51 additions and 2 deletions

View File

@ -88,6 +88,50 @@ Host leyk_ext
ProxyJump jump@hettingen_jumphost
# RemoteCommand tmux attach-session -t default_ssh || tmux new-session -s default_ssh
Host firewall_tmux
HostName firewall
User dirk
Port 22
RequestTTY yes
RemoteCommand tmux attach-session -t default_ssh || tmux new-session -s default_ssh
Host firewall_ext
HostName firewall
User dirk
Port 22
RequestTTY yes
ProxyJump dirk@multimedia_ext
Host firewall_ext_tmux
HostName firewall
User dirk
Port 22
RequestTTY yes
RemoteCommand tmux attach-session -t default_ssh || tmux new-session -s default_ssh
ProxyJump dirk@multimedia_ext
Host test_tmux
HostName test
User dirk
Port 22
RequestTTY yes
RemoteCommand tmux attach-session -t default_ssh || tmux new-session -s default_ssh
Host test_ext
HostName test
User dirk
Port 22
RequestTTY yes
ProxyJump dirk@multimedia_ext
Host test_ext_tmux
HostName test
User dirk
Port 22
RequestTTY yes
RemoteCommand tmux attach-session -t default_ssh || tmux new-session -s default_ssh
ProxyJump dirk@multimedia_ext
Host mm_tmux
HostName mount-mockery.de
User root

View File

@ -30,9 +30,14 @@ configure_prompt() {
[ "$EUID" -eq 0 ] && prompt_symbol='%F{white}☠%B%F{%(#.red.blue)}'
case "$PROMPT_ALTERNATIVE" in
twoline)
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n`giti -n`%F{%(#.blue.green)}└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
export GIT_PROMPT_DETAILS="off"
PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n`giti -p`%F{%(#.blue.green)}└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} '
# Right-side prompt with exit codes and background processes
RPROMPT=$'%(?.. %? %F{red}%B⚡%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)'
# Add mechanism to switch git details for prompt
gitp() {
[[ "$GIT_PROMPT_DETAILS" == "on" ]] && export GIT_PROMPT_DETAILS="off" || export GIT_PROMPT_DETAILS="on"
}
;;
oneline)
PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) '

2
bin

@ -1 +1 @@
Subproject commit bb3fb18730e1579db828f574d85e0d6ca18d8039
Subproject commit 7354bb9e3a2555bd95d67480846cfadcac009059