show window title in swaybar. set title in prompt
This commit is contained in:
parent
150e21bd03
commit
c385720f58
4 changed files with 15 additions and 5 deletions
|
@ -1,6 +1,12 @@
|
|||
separator=true
|
||||
separator_block_width=40
|
||||
|
||||
[window]
|
||||
align=left
|
||||
command=swaymsg -t subscribe -m '["window"]' | jq --unbuffered -M -r '.container.name' | stdbuf -oL cut -c -80 | stdbuf -oL sed -e 's/ *$//'
|
||||
interval=persist
|
||||
background=#000000cc
|
||||
|
||||
[battery]
|
||||
background=#000000cc
|
||||
command=~/.config/i3blocks/battery-plus
|
||||
|
|
|
@ -49,7 +49,7 @@ bindsym Mod4+Shift+c kill
|
|||
bindsym Mod4+Shift+q exit
|
||||
bindsym Mod4+Return exec $term
|
||||
bindsym Mod4+Shift+Return exec $term tmux attach -t0
|
||||
bindsym Mod4+Control+Return exec "autossh -M21001 -f -A -T home-dev sleep inf; alacritty -e mosh -p 2022 home tmux attach"
|
||||
bindsym Mod4+Control+Return exec "autossh -M21001 -f -A -T home-dev sleep inf; $term mosh -p 2022 home tmux attach"
|
||||
bindsym Mod4+p exec rofi -show run
|
||||
bindsym Mod4+e exec rofi -show emoji -modi emoji
|
||||
bindsym Mod4+l exec $lock
|
||||
|
|
|
@ -25,8 +25,8 @@ setw -g mode-keys vi
|
|||
set -g status-justify left
|
||||
set -g status-left-length 30
|
||||
set -g status-right-length 90
|
||||
set -g set-titles off
|
||||
set -g set-titles-string "###I : #T"
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
|
||||
# Key bindings
|
||||
bind -n M-Left select-pane -L
|
||||
|
@ -80,7 +80,7 @@ bind C-k clear-history
|
|||
bind -n C-l send-keys C-l \; clear-history
|
||||
|
||||
setw -g window-status-format ""
|
||||
setw -g window-status-current-format "#W"
|
||||
setw -g window-status-current-format "#T"
|
||||
setw -g window-status-separator ""
|
||||
|
||||
set -g status-fg "#B0BEC5"
|
||||
|
|
6
.zshrc
6
.zshrc
|
@ -187,13 +187,17 @@ export PROMPT_LEAN_COLOR1=78
|
|||
export PROMPT_LEAN_COLOR2=67
|
||||
|
||||
local ret_status="%(?:%B%F{#607D8B]}%%:%B%F{#F4511E}%%)"
|
||||
PROMPT='%F{#455A64}${HOST}:%F{#78909C}%}$(short_pwd)%f$(git_prompt_info)%f${ret_status}%f%b '
|
||||
PROMPT='$(_title_prompt)%F{#455A64}${HOST}:%F{#78909C}%}$(short_pwd)%f$(git_prompt_info)%f${ret_status}%f%b '
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %F{#795548}⟨%F{#8D6E63}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%F{#795548}⟩%f"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%F{#F57F17}⋆"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||
|
||||
function _title_prompt() {
|
||||
print -Pn "\033]0;${HOST}:${PWD}\007"
|
||||
}
|
||||
|
||||
# Outputs current branch info in prompt format
|
||||
function git_prompt_info() {
|
||||
local ref
|
||||
|
|
Loading…
Reference in a new issue