--- Emacs: right half
win_class = get_class_instance_name()

if win_class == "emacs" or win_class == "Emacs" then
  os.execute("sleep 0.4")
  set_window_position(1720, 0)
  set_window_size(1720, 1391)
end

--- calibre: left half
if (get_application_name() == "calibre") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end

--- Proton Mail Bridge: left half
if (get_application_name() == "Proton Mail Bridge") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end

--- VLC media player: left half
if (get_application_name() == "VLC media player") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end

--- Wireshark: left half
if (get_application_name() == "The Wireshark Network Analyzer") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end

--- Discord: left half
if (get_application_name() == "Discord") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end

--- Podman Desktop: right half
if (get_application_name() == "Podman Desktop") then
  set_window_position(1720, 0)
  set_window_size(1720, 1391)
end

--- Lagrange: left half
if (get_application_name() == "Lagrange") then
  set_window_position(0, 0)
  set_window_size(1720, 1391)
end