-
-
Save starlocke/8d0088c1b8ab0c3fb4f4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
zi() { | |
if [[ ! -z $1 ]]; then | |
steps=$1; | |
SIZE=`grep 'FontName' ~/.config/Terminal/terminalrc | cut -d' ' -f 2` | |
NEWSIZE=$((SIZE + steps)) | |
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g' | |
sed -i "$REGEXPR" ~/.config/Terminal/terminalrc | |
else | |
echo "Usage: zi [zoom steps]"; | |
fi; | |
} | |
zo() { | |
if [[ ! -z $1 ]]; then | |
steps=$1; | |
SIZE=`grep 'FontName' ~/.config/Terminal/terminalrc | cut -d' ' -f 2` | |
NEWSIZE=$((SIZE - steps)) | |
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g' | |
sed -i "$REGEXPR" ~/.config/Terminal/terminalrc | |
else | |
echo "Usage: zi [zoom steps]"; | |
fi; | |
} | |
z() { | |
if [[ ! -z $1 ]]; then | |
SIZE=$1; | |
REGEXPR='s/FontName.*/FontName=Monospace '$SIZE'/g' | |
sed -i "$REGEXPR" ~/.config/Terminal/terminalrc | |
else | |
echo "Usage: z [font size]" | |
fi; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment