diff --git a/dot-conf/.tmuxifier/layouts/layouts/data-hoarding.session.sh b/dot-conf/.tmuxifier/layouts/layouts/data-hoarding.session.sh new file mode 100644 index 0000000..cfbfeed --- /dev/null +++ b/dot-conf/.tmuxifier/layouts/layouts/data-hoarding.session.sh @@ -0,0 +1,14 @@ +if initialize_session "data-hoarding"; then + new_window "gallery-dl" + run_cmd "cd /mnt/e/Windows/Documents/DataHoarding && clear" + split_v 50 + run_cmd "cd /mnt/e/Windows/Documents/DataHoarding && clear" + split_h 50 + run_cmd "cd /mnt/e/Windows/Documents/DataHoarding && clear" + select_pane 1 + split_h 50 + run_cmd "cd /mnt/e/Windows/Documents/DataHoarding && clear" + select_pane 1 +fi + +finalize_and_go_to_session diff --git a/dot-conf/.tmuxifier/layouts/layouts/telebot.session.sh b/dot-conf/.tmuxifier/layouts/layouts/telebot.session.sh new file mode 100644 index 0000000..a20b022 --- /dev/null +++ b/dot-conf/.tmuxifier/layouts/layouts/telebot.session.sh @@ -0,0 +1,11 @@ +session_root "~/repos/telegram-messages-manager" + +if initialize_session "telebot"; then + new_window "lunarvim" + split_v 20 + run_cmd "./runDev.sh" + select_pane 1 + run_cmd "lvim" +fi + +finalize_and_go_to_session diff --git a/dot-conf/.zshrc b/dot-conf/.zshrc index 4f96733..19b180d 100644 --- a/dot-conf/.zshrc +++ b/dot-conf/.zshrc @@ -43,6 +43,7 @@ alias rld="source ${HOME}/.zshrc" alias zshrc="lvim ${HOME}/.zshrc && rld" alias tm="tmux" alias tmf="tmuxifier" +alias tmn="tmuxinator" alias d="docker" alias dc="docker compose" alias k="kubectl" diff --git a/runBackup.sh b/runBackup.sh index 86a76ba..87252f9 100755 --- a/runBackup.sh +++ b/runBackup.sh @@ -1,11 +1,54 @@ -mkdir --parents dot-conf -mkdir --parents dot-conf/.config/lvim dot-conf/.tmuxifier/layouts +#!/bin/bash -cp ${HOME}/.zshrc ./dot-conf/ -cp ${HOME}/.tmux.conf ./dot-conf/ -cp --recursive ${HOME}/.config/lvim/ ./dot-conf/.config -cp --recursive ${HOME}/.tmuxifier/layouts/ ./dot-conf/.tmuxifier/layouts/ +only_backup=false +only_commit=false -fulltime=$(date +%y-%m-%d-%H-%M-%S) -git add . -git commit -m "Devboot update: ${fulltime}" +show_help() { + echo "Usage: $0 [--help|-h show help] [--only-commit]" + echo "Options:" + echo " --only-commit Makes the script only create a commit" + echo " --help|h Display this message" +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --help|-h) + show_help + exit 0 + ;; + --only-backup) + only_backup=true + shift + ;; + --only-commit) + only_commit=true + shift + ;; + *) + echo "Error: Unknown option '$1'" + show_help + exit 1 + ;; + esac +done + +if [ "$only_backup" = true ] && [ "$only_commit" = true ]; then + echo "Error: Cannot use both --only-backup and --only-commit together." + exit 1 +fi + +if [ "$only_commit" = false ]; then + mkdir --parents dot-conf + mkdir --parents dot-conf/.config/lvim dot-conf/.tmuxifier/layouts + + cp ${HOME}/.zshrc ./dot-conf/ + cp ${HOME}/.tmux.conf ./dot-conf/ + cp --recursive ${HOME}/.config/lvim/ ./dot-conf/.config + cp --recursive ${HOME}/.tmuxifier/layouts/ ./dot-conf/.tmuxifier/layouts/ +fi + +if [ "$only_backup" = false ]; then + fulltime=$(date +%y-%m-%d-%H-%M-%S) + git add . + git commit -m "Devboot update: ${fulltime}" +fi