From 506b8adb7442f3762aeb2d14e47309f71d74a8e7 Mon Sep 17 00:00:00 2001 From: ViktorBarzin Date: Thu, 18 Jan 2018 12:00:02 +0000 Subject: [PATCH] Add new stuff --- .bash_aliases | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.bash_aliases b/.bash_aliases index f959db9..d1ba5e7 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -3,7 +3,6 @@ alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias py='python3.6' -alias bye='systemctl suspend' alias whatisopen='sudo netstat -pnlt' alias calc='gcalccmd' alias pmr='python manage.py runserver' @@ -38,6 +37,15 @@ function download_github_folder() { svn checkout $(echo $1 | sed "s/\/tree\/[a-zA-Z]\+/\/trunk/") } +function bye() { + if ps -p $(pidof rsync) > /dev/null + then + echo 'Rsync is running, not going to sleep.' + else + echo 'systemctl supend' + fi +} + alias sizeof="du -sh $1" alias mkdir="mkdir -pv"