dotfiles/.custom_bash_scripts

48 lines
890 B
Plaintext
Raw Normal View History

2020-06-25 06:00:58 +08:00
#!/bin/bash
#screenshots using scrot
scrot_dir=$HOME/screenshots/
date_format='%Y-%m-%d_%H-%M-%S'
2020-06-25 06:00:58 +08:00
s_scrot() {
name=$(date +${date_format}_sel.png)
2020-06-25 06:00:58 +08:00
path="${scrot_dir}${name}"
scrot -s $path
xclip -sel clip $path -t image/png
2020-06-25 06:00:58 +08:00
}
f_scrot() {
name=$(date +${date_format}_full.png)
2020-06-25 06:00:58 +08:00
path="${scrot_dir}${name}"
scrot $path
xclip -sel clip $path -t image/png
2020-06-25 06:00:58 +08:00
}
#cd into config dir
cfdir()
{
cd $HOME/.config/$1
}
#sshfs into newnumyspace
nnms_fs()
{
dir_name="newnumyspace"
path="${HOME}/dev"
if [ ! -d $path/$dir_name ]
then
mkdir $path/$dir_name
echo "Created new directory $dir_name at $path"
fi
sshfs unn_w19014537@newnumyspace.co.uk:/home/unn_w19014537/ $path/$dir_name/
if [ $? -eq 0 ]
then
echo "Mounted at $path/$dir_name."
fi
}
#pacman list sizes
pacsizes()
{
pacman -Qi $1 | awk '/^Name/{name=$3} /^Installed Size/{size=$4$5; print size, name;}' | sort -h
}