updates nvim sessions from tmux to wezterm

This commit is contained in:
2024-08-10 15:20:08 -07:00
parent f58ff37b78
commit 3f34effc6b
10 changed files with 63 additions and 48 deletions

28
sesh
View File

@@ -1,31 +1,33 @@
#!/bin/bash
directory=~/linux-setup/tmux-sessions
directory=~/linux-setup/sessions
alias wezterm='flatpak run org.wezfurlong.wezterm'
usage() {
echo "Usage: $0 [-t] <session>"
echo " -t: Add <session>"
exit 1
echo "Usage: $0 [-t] <session>"
echo " -t: Add <session>"
exit 1
}
# Check if no parameter is provided
if [ $# -eq 0 ]; then
usage
usage
fi
# Check for optional flag
if [ "$1" == "-t" ]; then
# Check if no session parameter is provided after the flag
if [ $# -lt 2 ]; then
usage
fi
flatpak run org.wezfurlong.wezterm start $directory/$2.sh
# Check if no session parameter is provided after the flag
if [ $# -lt 2 ]; then
usage
fi
flatpak run org.wezfurlong.wezterm start $directory/$2.sh
else
exec "$directory/$1.sh"
exec "$directory/$1.sh"
fi
# Check if no parameter is provided
if [ $# -eq 0 ]; then
echo "Error: No parameter provided. Please provide a session."
exit 1
echo "Error: No parameter provided. Please provide a session."
exit 1
fi