Skip to content

Instantly share code, notes, and snippets.

@starlocke
Forked from samuell/zoom_xfce4_terminal.sh
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save starlocke/8d0088c1b8ab0c3fb4f4 to your computer and use it in GitHub Desktop.
Save starlocke/8d0088c1b8ab0c3fb4f4 to your computer and use it in GitHub Desktop.
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