Last active
April 10, 2019 15:13
-
-
Save maurice-audin/692fddf6056761824cb2f2f3e5087915 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ which precmd | |
precmd () { | |
echo -n -e "\a" | |
/home/hybris/.scripts/term-fontsize | |
} | |
$ cat /home/hybris/.scripts/term-fontsize | |
#! /bin/bash | |
for output in $(ls ~/.config/term-fontsize_* | sed 's/.*term-fontsize_//'); do | |
is_screen=$(echo "return(require('awful.screen').focused().outputs['${output}'])" | awesome-client) | |
font_size=$(cat ~/.config/term-fontsize_${output}) | |
if [ -n "${is_screen}" ]; then | |
printf '\33]710;%s%d\007' "xft:Source Code Pro:pixelsize=${font_size}:antialias=true" | |
printf '\33]711;%s%d\007' "xft:Source Code Pro:pixelsize=${font_size}:antialias=true" | |
printf '\33]712;%s%d\007' "xft:Source Code Pro:pixelsize=${font_size}:antialias=true" | |
printf '\33]713;%s%d\007' "xft:Source Code Pro:pixelsize=${font_size}:antialias=true" | |
fi | |
done | |
$ cat ~/.config/term-fontsize_eDP1 | |
16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment