Skip to content

Commit

Permalink
fix mode script to get theme and font size
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonmestevao committed Jan 4, 2024
1 parent e846e3d commit fcbfed8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mode
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ function set_editor_font_size() {
}

function set_terminal_font_size() {
declare -r alacritty_config="$DOTFILES/alacritty/alacritty.yml"
declare -r alacritty_config="$DOTFILES/alacritty/alacritty.toml"
declare -r size="$1"

sed -i "s/size:.*/size: ${size}/g" "${alacritty_config}"
sed -i "s/size =.*/size = ${size}/g" "${alacritty_config}"
}

function change_theme_to() {
Expand Down Expand Up @@ -108,9 +108,9 @@ function change_theme_to() {
}

function get_theme() {
declare -r config_file="$DOTFILES/alacritty/alacritty.yml"
declare -r config_file="$DOTFILES/alacritty/alacritty.toml"

grep 'colors: *' $config_file | awk -F '*' '{ print $2 }'
grep 'import = *' $config_file | awk -F '.' '{ print $3 }'
}

function change_screen_to() {
Expand Down

0 comments on commit fcbfed8

Please sign in to comment.