Skip to content

Commit

Permalink
⚡️
Browse files Browse the repository at this point in the history
  • Loading branch information
PatentLobster committed Sep 24, 2023
1 parent 1558419 commit bd9393d
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions scripts/vhs/tmux-vhs.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
#!/bin/bash -x
#
tmux set-option -p remain-on-exit
sudo npm install -g terminalizer
sudo apt update
sudo apt install libnss3 lsb-release xdg-utils wget ffmpeg bc
#sudo apt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget ffmpeg bc

x="${X:-180}"
y="${Y:-30}"
export IFS=$'\n'
session_name="my_session"
base_dir="$(dirname "$(chezmoi source-path)")"
base_dir="$(dirname "$(chez source-path)")"
terminalizer_config="${base_dir}/scripts/vhs/config.yml"
terminalizer record -c $terminalizer_config "${base_dir}/demo"



chez () {
if command -v chezmoi &> /dev/null; then
chezmoi $@
else
if [ -f "$HOME/bin/chezmoi" ]; then
$HOME/bin/chezmoi $@
fi
if [ -f "$HOME/.local/bin/chezmoi" ]; then
$HOME/.local/bin/chezmoi $@
fi
fi
}

sudo npm install -g terminalizer
sudo apt update
sudo apt install libnss3 lsb-release xdg-utils wget ffmpeg bc
sudo apt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget ffmpeg bc
#terminalizer record -c $terminalizer_config "${base_dir}/demo"
function record() {
tmux send-keys -t "$session_name" "terminalizer record -c $terminalizer_config demo"
tmux send-keys -t "$session_name" "terminalizer record -c $terminalizer_config \"${base_dir}/demo\""
tmux send-keys -t "$session_name" C-m
sleep 1
}
Expand Down Expand Up @@ -58,19 +74,14 @@ function emulate_human_typing() {
tmux send-keys -t "$session_name" C-m
}



function emulate_typing() {
local text_to_type="$1" # Text to type in the session

# Send the text to the specified tmux session
tmux send-keys -t "$session_name" "$text_to_type" C-m
}
RUNNER_TRACKING_ID="" && tmux new -s "$session_name" -d -x $x -y $y "zsh"
#exec tmux new -s "$session_name" -x $x -y $y "zsh" -d
tmux ls


#emulate_human_typing "$(cat input.sh)"
record
emulate_human_typing "echo 'Hello, world!'"
Expand Down

0 comments on commit bd9393d

Please sign in to comment.