<commit_before>function move_all_workspaces --description="Move all workspaces to the currently focused output."
  set current_output (swaymsg -t get_outputs | jq '.[] | select(.focused==true) | .name')
  for ws in (swaymsg --raw --type get_workspaces | jq --raw-output '.[].name')
    swaymsg [workspace="$ws"] move workspace to output $current_output
  end
end<commit_msg>Allow from output to be specified, also fix case when output is empty<commit_after>function move_all_workspaces --description="Move all workspaces to the currently focused output."
 function print_help
    echo "Usage: move_all_workspaces [options]"
    echo "Options:"
    echo (set_color green)"--from"(set_color $fish_color_normal)": Specify output name from which workspaces are to be moved (defaults to all)."
  end

  argparse --name move_all_workspaces 'f/from=' 'h/help' -- $argv
  or return 1  #error

  if set -lq _flag_help
    print_help
    return
  end

  if set -lq _flag_from
    set from_output $_flag_from
  end

  set current_output (swaymsg -t get_outputs | jq '.[] | select(.focused==true) | .name')

  if set --query from_output
    set workspaces (swaymsg --raw --type get_workspaces | jq --raw-output ".[] | select(.representation != null and .output == \"$from_output\") | .name")
  else
    set workspaces (swaymsg --raw --type get_workspaces | jq --raw-output '.[] | select(.representation != null) | .name')
  end
  for ws in $workspaces
    swaymsg [workspace="$ws"] move workspace to output $current_output
  end
end
{'fraction_non_alphanumeric': 0.11776315789473685, 'fraction_numerical': 0.0006578947368421052, 'mean_word_length': 3.753125, 'pattern_counts': {'":': 1, '<': 3, '<?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': '1081269', 'n_tokens_mistral': 494, 'n_tokens_neox': 467, 'n_words': 161}