added ssh, git, ohmyposh; start tmux only on alacritty
This commit is contained in:
@@ -98,7 +98,7 @@ blinking = "Always"
|
||||
hide_when_typing = true
|
||||
|
||||
[shell]
|
||||
program = "/bin/zsh"
|
||||
program = "/bin/tmux"
|
||||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
182
.config/ohmyposh/zen.toml
Normal file
182
.config/ohmyposh/zen.toml
Normal file
@@ -0,0 +1,182 @@
|
||||
version = 2
|
||||
final_space = true
|
||||
console_title_template = '{{ .Shell }} in {{ .Folder }}'
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'session'
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
trailing_diamond = ''
|
||||
template = ' {{ if .SSHSession }} {{ end }}{{ .UserName }} '
|
||||
background = 'p:yellow'
|
||||
foreground = 'p:black'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'path'
|
||||
style = 'powerline'
|
||||
powerline_symbol = ''
|
||||
template = ' {{ path .Path .Location }} '
|
||||
background = 'p:orange'
|
||||
foreground = 'p:white'
|
||||
|
||||
[blocks.segments.properties]
|
||||
style = 'folder'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'git'
|
||||
style = 'powerline'
|
||||
powerline_symbol = ''
|
||||
foreground_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}', '{{ if gt .Ahead 0 }}p:white{{ end }}']
|
||||
background_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}', '{{ if gt .Ahead 0 }}#49416D{{ end }}', '{{ if gt .Behind 0 }}#7A306C{{ end }}']
|
||||
template = ' {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }} '
|
||||
background = 'p:green'
|
||||
foreground = 'p:black'
|
||||
|
||||
[blocks.segments.properties]
|
||||
branch_max_length = 25
|
||||
fetch_status = true
|
||||
fetch_upstream_icon = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'root'
|
||||
style = 'powerline'
|
||||
powerline_symbol = ''
|
||||
template = ' '
|
||||
background = 'p:yellow'
|
||||
foreground = 'p:white'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'status'
|
||||
style = 'diamond'
|
||||
background_templates = ['{{ if gt .Code 0 }}p:red{{ end }}']
|
||||
leading_diamond = '<transparent,background></>'
|
||||
trailing_diamond = ''
|
||||
template = ' {{ if gt .Code 0 }}{{ else }}{{ end }} '
|
||||
background = 'p:blue'
|
||||
foreground = 'p:white'
|
||||
|
||||
[blocks.segments.properties]
|
||||
always_enabled = true
|
||||
|
||||
[[blocks]]
|
||||
type = 'prompt'
|
||||
alignment = 'left'
|
||||
newline = true
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'text'
|
||||
style = 'plain'
|
||||
foreground_templates = [
|
||||
"{{if gt .Code 0}}red{{end}}",
|
||||
"{{if eq .Code 0}}magenta{{end}}",
|
||||
]
|
||||
background = 'transparent'
|
||||
template = '❯'
|
||||
|
||||
[[blocks]]
|
||||
type = 'rprompt'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'node'
|
||||
style = 'plain'
|
||||
template = ' '
|
||||
background = 'transparent'
|
||||
foreground = 'p:green'
|
||||
|
||||
[blocks.segments.properties]
|
||||
display_mode = 'files'
|
||||
fetch_package_manager = false
|
||||
home_enabled = false
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'go'
|
||||
style = 'plain'
|
||||
template = ' '
|
||||
background = 'transparent'
|
||||
foreground = 'p:blue'
|
||||
|
||||
[blocks.segments.properties]
|
||||
fetch_version = false
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'python'
|
||||
style = 'plain'
|
||||
template = ' '
|
||||
background = 'transparent'
|
||||
foreground = 'p:yellow'
|
||||
|
||||
[blocks.segments.properties]
|
||||
display_mode = 'files'
|
||||
fetch_version = false
|
||||
fetch_virtual_env = false
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'shell'
|
||||
style = 'plain'
|
||||
template = 'in <p:blue><b>{{ .Name }}</b></> '
|
||||
background = 'transparent'
|
||||
foreground = 'p:white'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'time'
|
||||
style = 'plain'
|
||||
template = 'at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>'
|
||||
background = 'transparent'
|
||||
foreground = 'p:white'
|
||||
|
||||
[[blocks.segments]]
|
||||
type = 'executiontime'
|
||||
style = 'plain'
|
||||
foreground = 'yellow'
|
||||
background = 'transparent'
|
||||
template = ' ({{ .FormattedMs }})'
|
||||
|
||||
[[tooltips]]
|
||||
type = 'aws'
|
||||
tips = ['aws']
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
trailing_diamond = ''
|
||||
template = ' {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} '
|
||||
background = 'p:orange'
|
||||
foreground = 'p:white'
|
||||
|
||||
[tooltips.properties]
|
||||
display_default = true
|
||||
|
||||
[[tooltips]]
|
||||
type = 'az'
|
||||
tips = ['az']
|
||||
style = 'diamond'
|
||||
leading_diamond = ''
|
||||
trailing_diamond = ''
|
||||
template = ' {{ .Name }} '
|
||||
background = 'p:blue'
|
||||
foreground = 'p:white'
|
||||
|
||||
[tooltips.properties]
|
||||
display_default = true
|
||||
|
||||
[transient_prompt]
|
||||
template = '<p:yellow,transparent></><,p:yellow> {{ .Folder }} </><p:yellow,transparent></> '
|
||||
background = 'transparent'
|
||||
foreground = 'p:black'
|
||||
|
||||
[secondary_prompt]
|
||||
template = '<p:yellow,transparent></><,p:yellow> > </><p:yellow,transparent></> '
|
||||
background = 'transparent'
|
||||
foreground = 'p:black'
|
||||
|
||||
[palette]
|
||||
black = '#262B44'
|
||||
blue = '#4B95E9'
|
||||
green = '#59C9A5'
|
||||
orange = '#F07623'
|
||||
red = '#D81E5B'
|
||||
white = '#E0DEF4'
|
||||
yellow = '#F3AE35'
|
||||
5
.gitconfig
Normal file
5
.gitconfig
Normal file
@@ -0,0 +1,5 @@
|
||||
[user]
|
||||
email = info@it-thaler.de
|
||||
name = Heinrich Thaler
|
||||
[credential]
|
||||
helper = store
|
||||
16
.ssh/config
Normal file
16
.ssh/config
Normal file
@@ -0,0 +1,16 @@
|
||||
Host mcusw
|
||||
HostName mcusw.de
|
||||
User usw
|
||||
Host www
|
||||
HostName www.usw.lan
|
||||
User usw
|
||||
ProxyJump mcusw
|
||||
|
||||
Host ux5
|
||||
HostName ux5.edvschule-plattling.de
|
||||
User hthaler
|
||||
Host ux4
|
||||
HostName ux4.edvschule-plattling.de
|
||||
User hthaler
|
||||
Host *
|
||||
User usw
|
||||
14
.zshrc
14
.zshrc
@@ -41,9 +41,9 @@ bindkey '^n' history-search-forward
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
# Ohne Tmux
|
||||
#bindkey "^[[H" beginning-of-line
|
||||
#bindkey "^[[F" end-of-line
|
||||
#bindkey "^[[2~" delete-char
|
||||
bindkey "^[[H" beginning-of-line
|
||||
bindkey "^[[F" end-of-line
|
||||
bindkey "^[[2~" delete-char
|
||||
# Mit Tmux
|
||||
bindkey "^[[1~" beginning-of-line
|
||||
bindkey "^[[4~" end-of-line
|
||||
@@ -76,7 +76,7 @@ alias c='clear'
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
|
||||
# Automatically start Tmux
|
||||
if [ -x "$(command -v tmux)" ] && [ -n "${DISPLAY}" ] && [ -z "${TMUX}" ] && [[ "$TERM_PROGRAM" != "vscode" ]]; then
|
||||
exec tmux new-session -A -s ${USER} >/dev/null 2>&1
|
||||
fi
|
||||
# Automatically start Tmux (currently handled in Alacritty)
|
||||
#if [ -x "$(command -v tmux)" ] && [ -n "${DISPLAY}" ] && [ -z "${TMUX}" ] && [[ "$TERM_PROGRAM" != "vscode" ]]; then
|
||||
# exec tmux new-session -A -s ${USER} >/dev/null 2>&1
|
||||
#fi
|
||||
|
||||
Reference in New Issue
Block a user