# .tmuxp.unapologetic-world.yaml
# https://github.com/igorlima/unapologetic-thoughts/blob/master/_posts/2013-01-01-tmuxp.md
# https://igorlima.github.io/unapologetic-thoughts/technical/2013/01/01/tmuxp.html
description: >
  ---
  Unapologetic world
  ---

  # a few command for testing
  # 
  # tmuxp load .tmuxp.unapologetic-world.yaml -L unapologetic
  # ls -la /tmp/tmux*
  # tmux -L unapologetic ls
  # tmux -L unapologetic kill-server
  # 
  # tmux -S ~/workstation/tmux-socket-unapologetic ls
  # tmuxp load .tmuxp.yaml -S ~/workstation/tmux-socket-unapologetic
  # 
  # tmuxp load .tmuxp.unapologetic-world.yaml -L test
  # tmux -L test a -d
  # tmux -L test ls
  # tmux -L test kill-server
  ---

# :windo diffthis
# :windo diffoff
# :diffget :diffput
session_name: unapologetic
start_directory: ~/workstation/github/
windows:
  - window_name: cmd-thoughts
    start_directory: unapologetic-thoughts
    layout: even-horizontal
    shell_command_before:
      - bash
    focus: true
    panes:
      # https://igorlima.github.io/unapologetic-thoughts/technical/2013/01/01/technical.html
      - environment:
          MY_APP_ENVS: ENV=dev
        shell_command:
          - source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh
          - source $(brew --prefix)/opt/chruby/share/chruby/auto.sh
          - chruby ruby-3.1.3
          - cmd: bundle exec jekyll serve --config _config_dev.yml
            enter: false
        focus: true
      - git fetch --all -p
  - window_name: ide-thoughts
    start_directory: unapologetic-thoughts
    shell_command_before:
      - bash
    panes:
      - vim -c ":NERDTree"
  - window_name: cmd-snippets
    start_directory: unapologetic-snippets
    layout: even-horizontal
    shell_command_before:
      - bash
    panes:
      # https://igorlima.github.io/unapologetic-thoughts/technical/2013/01/01/technical.html
      - environment:
          MY_APP_ENVS: ENV=dev
        shell_command:
          - source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh
          - source $(brew --prefix)/opt/chruby/share/chruby/auto.sh
          - chruby ruby-3.1.3
          - cmd: bundle exec jekyll serve --config _config_dev.yml
            enter: false
      - git fetch --all -p
  - window_name: ide-snippets
    start_directory: unapologetic-snippets
    shell_command_before:
      - bash
    panes:
      - vim -c ":NERDTree"
  - window_name: term-reading
    start_directory: unapologetic-thoughts/snippets/python-llm-ai
    layout: even-horizontal
    shell_command_before:
      - bash
    panes:
      - shell_command:
        - mkdir -p ~/Downloads/terminal-reading/epub
        - mkdir -p ~/Downloads/terminal-reading/pdf
        - cd ~/Downloads/terminal-reading/epub
        - cmd: bookokrat
          enter: true
      - shell_command:
        - python3 -m venv my-test-env-2026a01m02d
        - source my-test-env-2026a01m02d/bin/activate
        - pip3 install -r requirements/gemini-pdf2md.requirements.txt
        - python3 gemini-pdf2md.py --help
      - shell_command:
        # to use custom tmux layout:
        # - tmux display-message -p '#{window_layout}'
        # - tmux select-layout -t . "6bea,163x62,0,0{81x62,0,0,106,81x62,82,0[81x31,82,0,107,81x30,82,32,108]}"
        - tmux move-pane -s unapologetic:term-reading.3 -t unapologetic:term-reading.2
        # set the pane height and width(y and x) with an relative value (percentage) - it also works with absolute values (number of lines/columns)
        - tmux resize-pane -x 50% -y 50% -t unapologetic:term-reading.3
        - tmux resize-window -a -t unapologetic:term-reading
        - sleep 5
        - vi gemini-pdf2md.py
  - window_name: notebook
    start_directory: unapologetic-thoughts/snippets/cli-and-tui
    layout: even-horizontal
    shell_command_before:
      - bash
    panes:
      - environment:
          EUPORIE_EXTERNAL_EDITOR: vim
        shell_command:
        - python3 -m venv tmp-env
        - source tmp-env/bin/activate
        - cmd: ls -la
          enter: true
      - environment:
          EUPORIE_EXTERNAL_EDITOR: vim
        shell_command:
        - python3 -m venv tmp-env
        - source tmp-env/bin/activate
        - pip3 install -r requirements/euporie.jupyter-terminal.requirements.txt
        - euporie-notebook ../../notebooks/files/py-basics.ipynb
      - shell_command:
        # to use custom tmux layout:
        # - tmux display-message -p '#{window_layout}'
        # - tmux select-layout -t . "6bea,163x62,0,0{81x62,0,0,106,81x62,82,0[81x31,82,0,107,81x30,82,32,108]}"
        - tmux move-pane -s unapologetic:notebook.2 -t unapologetic:notebook.3
        # set the pane height and width(y and x) with an relative value (percentage) - it also works with absolute values (number of lines/columns)
        - tmux resize-pane -x 50% -y 50% -t unapologetic:notebook.3
        - tmux resize-window -a -t unapologetic:notebook
        # focus back to first pane
        # or user: `tmux select-window -t 1`
        - tmux select-window -t unapologetic:cmd-thoughts
        - sleep 5
        - vi euporie.jupyter-terminal.md
  - window_name: audio
    start_directory: unapologetic-thoughts/snippets/cli-and-tui
    layout: even-horizontal
    shell_command_before:
      - bash
      - python3 -m venv tmp-env
      - source tmp-env/bin/activate
    panes:
      - shell_command:
        - pip3 install -r requirements/cmus.music-player.requirements.txt
        - mkdir -p ~/Downloads/yt-dlp
        - cd ~/Downloads/yt-dlp
        - cmd: cmus
          enter: false
      - shell_command:
        - vi cmus.music-player.md
      - shell_command:
        - vi scripts/audio.yt-batch-downloader.sh
      - shell_command:
        - tmux move-pane -s unapologetic:audio.3 -t unapologetic:audio.2
        - tmux move-pane -s unapologetic:audio.4 -t unapologetic:audio.1
        - tmux resize-pane -x 50% -y 50% -t unapologetic:audio.1
        - tmux resize-pane -x 50% -y 50% -t unapologetic:audio.2
        - tmux resize-pane -x 50% -y 50% -t unapologetic:audio.3
        - tmux resize-pane -x 50% -y 50% -t unapologetic:audio.4
        - tmux resize-window -a -t unapologetic:audio
        # focus back to first pane
        - tmux select-window -t unapologetic:cmd-thoughts
        - sleep 5
        - cmd: ./scripts/audio.yt-batch-downloader.sh
          enter: false
