# create new post in the directory post/$year/$title tmux send-keys -t website:1.1 "hugo new -k post \"post/ $year / $title \"" C-m # split the 0th pane in the 0th window of the 'website' vertically tmux split-window -v -t website:1.1 -p 70 # get current year year = $(date '%Y' ) # make all letters lowercase and substitute all spaces with dash in the post title title = $( echo " $1 " | tr '' '' | tr -s ' ' '-' ) # change directory to the site root tmux send-keys -t website:1.1 "cd $SITE_ROOT " C-m SITE_ROOT = '/home/yury/PROJECTS/PERSONAL/zyrikby_webpage/website/' # check if the session called exactly 'website' exist if ! tmux has-session -t =website then # if it does not exist # create a new session (new -s) called 'website' detached (-d flag) tmux new -s website -d
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |