Add scripts & configs

This commit is contained in:
Smirnov Olexandr 2020-10-16 22:55:26 +03:00
parent f8ffdbda2e
commit 734af357dd
33 changed files with 1432 additions and 957 deletions

View file

@ -0,0 +1,2 @@
#/bin/sh
ffmpeg -i $1 -b:a 192K -vn ~/$directory/$2.mp3

5
scripts/gitpush.sh Normal file
View file

@ -0,0 +1,5 @@
#!/bin/sh
git add ./
read -p "Commit message: " msg
git commit -am "$msg"
git push origin master

35
scripts/manjaro-fetch.sh Normal file
View file

@ -0,0 +1,35 @@
host="$(hostname)"
os='Manjaro'
kernel="$(uname -r)"
uptime="$(uptime -p | sed 's/up //')"
packages="$(pacman -Q | wc -l)"
shell="$(basename "$SHELL")"
ui="$(basename ${XDG_CURRENT_DESKTOP})"
if [ -x "$(command -v tput)" ]; then
bold="$(tput bold)"
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
reset="$(tput sgr0)"
fi
lc="${reset}${bold}${green}"
nc="${reset}${bold}${green}"
ic="${reset}"
c0="${reset}${green}"
cat <<EOF
${c0} ||||||||| |||| ${nc}${USER}${ic}@${nc}${host}${reset}
${c0} ||||||||| |||| ${lc}OS: ${ic}${os}${reset}
${c0} |||| |||| ${lc}KERNEL: ${ic}${kernel}${reset}
${c0} |||| |||| |||| ${lc}PACKAGES: ${ic}${packages}${reset}
${c0} |||| |||| |||| ${lc}SHELL: ${ic}${shell}${reset}
${c0} |||| |||| |||| ${lc}UPTIME: ${ic}${uptime}${reset}
${c0} |||| |||| |||| ${lc}DE/WM: ${ic}${ui}${reset}
EOF

9
scripts/sceenshot.sh Normal file
View file

@ -0,0 +1,9 @@
#!/bin/sh
fileDate=`date +%Y-%m-%d-%H-%M-%S`
machineName=`hostname`
fileName=".png"
FILENAME=$fileDate"-"$machineName$fileName
SHORT=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 7 | head -n 1)
FILENAMESHORT=$fileDate$fileName
import $FILENAMESHORT

View file

@ -0,0 +1,4 @@
#!/bin/sh
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision
do; sudo snap remove "$snapname" --revision="$revision"; done

View file

@ -0,0 +1,3 @@
#!/bin/sh
tar -czf "../${PWD##*/}.tar.gz" .
echo -e "\033[32mThe archive was created successfully"

3
scripts/targz-folder.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
tar -czf "$1.tar.gz" $1
echo -e "\033[32mThe archive was created successfully"

View file

@ -0,0 +1,9 @@
#!/bin/bash
WALLPAPERS=/home/sasha/Изображения/Walpapper
SLEEP_TIME=60
while true; do
feh --randomize --bg-scale $WALLPAPERS/*
sleep $SLEEP_TIME;
done