From c4d10652e84359b96929e5067e244ffe87b9e5db Mon Sep 17 00:00:00 2001 From: maudin Date: Tue, 9 Apr 2019 16:27:19 +0200 Subject: [PATCH] include term-fontsize function --- hybris.zsh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hybris.zsh b/hybris.zsh index 44ff6be..e7ece53 100644 --- a/hybris.zsh +++ b/hybris.zsh @@ -1,11 +1,23 @@ +# resize term font +term-fontsize() { + if [ $# -ne 1 ]; then + exit 1 + else + printf '\33]710;%s%d\007' "xft:Source Code Pro:pixelsize=$1:antialias=true" + printf '\33]711;%s%d\007' "xft:Source Code Pro:pixelsize=$1:antialias=true" + printf '\33]712;%s%d\007' "xft:Source Code Pro:pixelsize=$1:antialias=true" + printf '\33]713;%s%d\007' "xft:Source Code Pro:pixelsize=$1:antialias=true" + fi +} + # bip at command end function precmd() { echo -n -e "\a" main_screen=$(echo "if require('awful.screen').focused().index == 1 then return('main-screen') end" | awesome-client) if [ $main_screen ]; then - /home/hybris/.scripts/term-fontsize $(cat ~/.config/term-fontsize_1) + term-fontsize $(cat ~/.config/term-fontsize_1) else - /home/hybris/.scripts/term-fontsize $(cat ~/.config/term-fontsize_2) + term-fontsize $(cat ~/.config/term-fontsize_2) fi }