<commit_before>module Swm
  class ResizeCommand < Command

    def run
      x1 = get_x_percentage :x1
      x2 = get_x_percentage :x2
      y1 = get_y_percentage :y1
      y2 = get_y_percentage :y2

      screen_dimensions = Screen.dimensions
      window = Swm::Window.current

      x = y = width = height = nil
      x =       (screen_dimensions[0] * x1 / 100.0).to_i if x1
      y =       (screen_dimensions[1] * y1 / 100.0).to_i if y1
      width =   (screen_dimensions[0] * x2 / 100.0).to_i - (x || window.pos_x) if x2
      height =  (screen_dimensions[1] * y2 / 100.0).to_i - (y || window.pos_y) if y2

      puts "x: #{x}"
      puts "y: #{y}"
      puts "width: #{width}"
      puts "height: #{height}"

      window.set x, y, width, height
    end

  end
end<commit_msg>Removed debug info<commit_after>module Swm
  class ResizeCommand < Command

    def run
      x1 = get_x_percentage :x1
      x2 = get_x_percentage :x2
      y1 = get_y_percentage :y1
      y2 = get_y_percentage :y2

      screen_dimensions = Screen.dimensions
      window = Swm::Window.current

      x = y = width = height = nil
      x =       (screen_dimensions[0] * x1 / 100.0).to_i if x1
      y =       (screen_dimensions[1] * y1 / 100.0).to_i if y1
      width =   (screen_dimensions[0] * x2 / 100.0).to_i - (x || window.pos_x) if x2
      height =  (screen_dimensions[1] * y2 / 100.0).to_i - (y || window.pos_y) if y2

      window.set x, y, width, height
    end

  end
end
{'fraction_non_alphanumeric': 0.11732605729877217, 'fraction_numerical': 0.04911323328785812, 'mean_word_length': 2.148068669527897, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4493261', 'n_tokens_mistral': 593, 'n_tokens_neox': 561, 'n_words': 141}