diff options
author | Timo Wilken | 2024-07-11 17:11:25 +0200 |
---|---|---|
committer | Timo Wilken | 2024-07-11 17:11:25 +0200 |
commit | e6f26581bf22e266c5056eddfb264eca2efb6ef4 (patch) | |
tree | 08c436f4b5d4fe66bbf9b6a67bb1020568737e93 /tw/home/files/zshrc | |
parent | c2c6421d3f8db9920fe50f07eff226641586f87a (diff) |
Wayland-based desktop support
Add a separate home service to configure a Wayland-based desktop instead of an
X11 one.
Screensharing in Zoom doesn't work unfortunately, but it worked (at least for
a while) through OBS.
Waybar might need some work to bring it in line with the previous polybar
configuration, especially in terms of aesthetics.
Diffstat (limited to 'tw/home/files/zshrc')
-rw-r--r-- | tw/home/files/zshrc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tw/home/files/zshrc b/tw/home/files/zshrc index ca4481e2..8a658173 100644 --- a/tw/home/files/zshrc +++ b/tw/home/files/zshrc @@ -189,3 +189,27 @@ fi load_plugin fast-syntax-highlighting || load_plugin zsh-syntax-highlighting + +## Terminal integration with foot +# https://codeberg.org/dnkl/foot/wiki#shell-integration +if [ "$TERM" = foot ]; then + function foot-osc7-pwd () { + (( ZSH_SUBSHELL )) && return 0 + emulate -L zsh # also sets localoptions for us + setopt extendedglob + local LC_ALL=C + printf '\e]7;file://%s%s\e\' "$HOST" "${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}}" + } + function foot-precmd () { + print -Pn '\e]133;A\e\' + if ! builtin zle; then + print -n '\e]133;D\e\' + fi + } + function foot-preexec () { + print -n '\e]133;C\e\' + } + add-zsh-hook -Uz chpwd foot-osc7-pwd + add-zsh-hook -Uz precmd foot-precmd + add-zsh-hook -Uz preexec foot-preexec +fi |