Skip to content

Commit

Permalink
update through script - 2024-10-27 09:39:35
Browse files Browse the repository at this point in the history
  • Loading branch information
oasido committed Oct 27, 2024
1 parent 2022e55 commit 5e9794b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export DOTFILES="$HOME/dot"
export BLITZ="/run/media/oasido/blitz"
export EXTERNAL="/run/media/oasido/External"


if [[ $- == *i* ]]; then
bind '"\C-f":"tmux-sessionizer\n"'
fi
Expand All @@ -39,7 +38,7 @@ alias vim="nvim"
alias c="clear"
alias pn="pnpm"
alias rm="trash"
alias sysupdate="sudo zypper ref && sudo zypper update"
alias sysupdate="sudo zypper ref && sudo zypper update && sudo zypper dup"
alias lg="lazygit"
alias flatls="flatpak list --app --columns=size,name|sort -g | grep MB"
alias fpe="fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}' | xargs nvim"
Expand Down Expand Up @@ -209,3 +208,7 @@ case ":$PATH:" in
esac
# pnpm end

# >>> b2v4 autocomplete >>>
# This section is managed by b2v4 . Manual edit may break automated updates.
source /home/oasido/.bash_completion.d/b2v4
# <<< b2v4 autocomplete <<<
13 changes: 7 additions & 6 deletions .local/bin/scripts/tmux-session
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dump() {
}

save() {
dump > ~/.tmux-session
dump >~/.tmux-session
}

terminal_size() {
Expand All @@ -26,7 +26,7 @@ add_window() {

new_session() {
cd "$3" &&
tmux new-session -d -s "$1" -n "$2" $4
tmux new-session -d -s "$1" -n "$2" $4
}

restore() {
Expand All @@ -40,19 +40,20 @@ restore() {
add_window "$session_name" "$window_name" "$dir"
else
new_session "$session_name" "$window_name" "$dir" "$dimensions"
count=$(( count + 1 ))
count=$((count + 1))
fi
fi
done < ~/.tmux-session
done <~/.tmux-session

echo "restored $count sessions"
}

case "$1" in
save | restore )
save | restore)
$1
;;
* )
*)
echo "valid commands: save, restore" >&2
exit 1
;;
esac

0 comments on commit 5e9794b

Please sign in to comment.