Assorted shell and Python scripts

~split_man.sh

+3 -64
-33
.zed/settings.json
··· 1 1 { 2 2 "show_edit_predictions": false, 3 - "file_types": { 4 - "Bash": [ 5 - "amimullvad", 6 - "archivebox_schedule", 7 - "awkuptime", 8 - "backup_podvol", 9 - "bluebuild_iso", 10 - "encrypt_mail", 11 - "gumssh", 12 - "moonshadow_openbsd_backup", 13 - "natpmpcd", 14 - "quickinfo", 15 - "split_dict", 16 - "split_man", 17 - "swivel", 18 - "sync_files", 19 - "systemd_syscall_filter", 20 - ], 21 - "Perl": ["check_wg_handshake", "feed_count.raku"], 22 - "Python": [ 23 - "blog2gemlog", 24 - "dl-wp-pdf", 25 - "fetch_combined_trackers_list", 26 - "get-def", 27 - "list_torrents", 28 - "print-wp-sources", 29 - "pyuptime", 30 - "qbt_helper", 31 - "qbt_sum_size", 32 - "scihub_knapsack", 33 - "seed_armbian_torrents", 34 - ], 35 - }, 36 3 }
-24
split_dict.sh
··· 1 - #!/usr/bin/env bash 2 - 3 - # Check if gum is available 4 - if ! command -v gum >/dev/null; then 5 - echo "Missing dependency: gum" 6 - echo "See https://github.com/charmbracelet/gum" 7 - exit 1 8 - fi 9 - 10 - # Check if get-def is available 11 - if ! command -v get-def >/dev/null; then 12 - echo "Missing dependency: get-def" 13 - echo "Run pipx install get-def" 14 - exit 1 15 - fi 16 - 17 - WORD=$(gum input --placeholder="word") 18 - 19 - if [[ -n "$ZELLIJ" ]]; then 20 - zellij action new-pane -- get-def "$WORD" 21 - else 22 - echo "No Zellij sessions detected." 23 - exit 1 24 - fi
+3 -7
split_man.sh
··· 9 9 10 10 CMD=$(gum input --placeholder="command") 11 11 12 - if [[ -n "$BYOBU_BACKEND" && "$BYOBU_BACKEND" = "tmux" ]]; then 13 - byobu-tmux split-window -h man "$CMD" 14 - elif [[ -n "$TMUX" ]]; then 15 - tmux split-window -h man "$CMD" 16 - elif [[ -n "$ZELLIJ" ]]; then 17 - zellij action new-pane -- man "$CMD" 12 + if [[ -n "$ZELLIJ" ]]; then 13 + zellij action new-pane -c -f --height 38 --width 150 -x 50 -y 3 -- batman "$CMD" 18 14 else 19 - echo "No byobu, tmux, or Zellij sessions detected" 15 + echo "No Zellij sessions detected" 20 16 exit 1 21 17 fi