New backup 2025-04-17 17:00:03
This commit is contained in:
parent
7a6b2f0637
commit
5753ad7ad6
3 changed files with 9 additions and 4 deletions
|
@ -13,8 +13,8 @@ function get_window_name() {
|
||||||
output="${icons[${s}]} ${output}"
|
output="${icons[${s}]} ${output}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ${#output} -ge 35 ];then
|
if [ ${#output} -ge 40 ];then
|
||||||
echo "${output:0:30}…"
|
echo "${output:0:35}…"
|
||||||
else
|
else
|
||||||
echo "${output}"
|
echo "${output}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
playerctl --follow metadata --format '{{ title }}' | {
|
playerctl --follow metadata --format '{{ title }}' | {
|
||||||
while read -r nowplaying_title; do
|
while read -r nowplaying_title; do
|
||||||
echo "${nowplaying_title}" | head -c 50;
|
if [ ${#nowplaying_title} -ge 45 ];then
|
||||||
|
echo "${nowplaying_title:0:40}…"
|
||||||
|
else
|
||||||
|
echo "${nowplaying_title}"
|
||||||
|
fi
|
||||||
|
# echo "${nowplaying_title}" | head -c 50;
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ fi
|
||||||
|
|
||||||
export prompt_prefix=`awk '{$1=$1};1' <<< "${prompt_prefix}"`
|
export prompt_prefix=`awk '{$1=$1};1' <<< "${prompt_prefix}"`
|
||||||
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\n\$ '
|
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\n\$ '
|
||||||
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]$(pwd)\[\e[00m\]\n\$ '
|
PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]$(pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\\/.*)(?=\\/.*\\/)/\\/…/s")\[\e[00m\]\n\$ '
|
||||||
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]$(pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\\/.*)(?=\\/.*\\/)/\\/…/s"|xargs printf "\\e]2;%s — Alacritty\007")\[\e[00m\]\n\$ '
|
#PS1='\[\e[1m\e[95m\]${prompt_prefix}\[\e[m\]${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]$(pwd|sed "s|${HOME}|~|"|perl -pe "s/(?<!(^~))(\\/.*)(?=\\/.*\\/)/\\/…/s"|xargs printf "\\e]2;%s — Alacritty\007")\[\e[00m\]\n\$ '
|
||||||
|
|
||||||
#Alacritty custom window title
|
#Alacritty custom window title
|
||||||
|
|
Loading…
Add table
Reference in a new issue