Moved scripts
This commit is contained in:
parent
0bee7afa7c
commit
c3c1fde15f
6
scripts/clean
Executable file
6
scripts/clean
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Remove all downloads older than 2 days
|
||||||
|
find /home/tim/Downloads -mtime +2 -exec rm -R {} \;
|
||||||
|
|
||||||
|
# Remove all empty folders
|
||||||
|
find /home/tim/Download/* -type d -empty -exec rmdir {} \;
|
31
scripts/ghosts
Executable file
31
scripts/ghosts
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# ANSI color scheme script by pfh
|
||||||
|
#
|
||||||
|
# Initializing mod by lolilolicon from Archlinux
|
||||||
|
#
|
||||||
|
|
||||||
|
f=3 b=4
|
||||||
|
for j in f b; do
|
||||||
|
for i in {0..7}; do
|
||||||
|
printf -v $j$i %b "\e[${!j}${i}m"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
bld=$'\e[1m'
|
||||||
|
rst=$'\e[0m'
|
||||||
|
inv=$'\e[7m'
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄
|
||||||
|
$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄
|
||||||
|
$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀
|
||||||
|
$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████
|
||||||
|
$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄
|
||||||
|
$bld
|
||||||
|
$f1 ▄▄▄ $f2 ▄▄▄ $f3 ▄▄▄ $f4 ▄▄▄ $f5 ▄▄▄ $f6 ▄▄▄
|
||||||
|
$f1 ▀█▀██ ▄ $f2 ▀█▀██ ▄ $f3 ▀█▀██ ▄ $f4 ▀█▀██ ▄ $f5 ▀█▀██ ▄ $f6 ▀█▀██ ▄
|
||||||
|
$f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄██████▀ $f4 ▀▄██████▀ $f5 ▀▄██████▀ $f6 ▀▄██████▀
|
||||||
|
$f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████
|
||||||
|
$f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄
|
||||||
|
$rst
|
||||||
|
EOF
|
25
scripts/git-init
Executable file
25
scripts/git-init
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Help function
|
||||||
|
function show_help {
|
||||||
|
echo "Usage: git-init <url>";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Checking if url is specified
|
||||||
|
if [ -z "$1" ]; then show_help; exit 0; fi;
|
||||||
|
|
||||||
|
# Making README.md
|
||||||
|
touch README.md
|
||||||
|
echo "#$(basname $PWD)" >> README.md
|
||||||
|
|
||||||
|
# Make .gitignore
|
||||||
|
touch .gitignore
|
||||||
|
printf "*~\n*.swp" >> .gitignore
|
||||||
|
|
||||||
|
# Initializing git and making first commit
|
||||||
|
git init
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
|
||||||
|
# Set origin and push the first commit
|
||||||
|
git remote add origin $1;
|
||||||
|
git push -u origin master;
|
9
scripts/kodi-tv
Executable file
9
scripts/kodi-tv
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Output on
|
||||||
|
xrandr --output HDMI-0 --auto
|
||||||
|
|
||||||
|
# Start kodi
|
||||||
|
kodi
|
||||||
|
|
||||||
|
# Tv output off
|
||||||
|
xrandr --output HDMI-0 --off
|
23
scripts/rmount
Executable file
23
scripts/rmount
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# THIS IS AN OLD SCRIPT
|
||||||
|
case "$1" in
|
||||||
|
"mount") case "$2" in
|
||||||
|
"ares") host="root@ares:/mnt/shell/emulated/0"; path="$HOME/Ares"; make="true";; #set mounting variables
|
||||||
|
"dionysos") host="pi@dionysos:/home/pi/"; path="$HOME/Dionysos"; make="true";;
|
||||||
|
"muziek") host="pi@dionysos:/media/usb/Muziek"; path="$HOME/Muziek";;
|
||||||
|
* ) echo "Error: That location does not exist."; exit;; #give error if location is unknown.
|
||||||
|
esac;;
|
||||||
|
"umount") case "$2" in
|
||||||
|
"ares") path="$HOME/Ares"; make="true";; #set unmounting variables
|
||||||
|
"dionysos") path="$HOME/Dionysos"; make="true";;
|
||||||
|
"muziek") path="$HOME/Muziek";;
|
||||||
|
* ) echo "Error: That location does not exist." #give error if location is unknown.
|
||||||
|
esac;;
|
||||||
|
* ) echo "Usage: remote [mount/umount] [location]."; exit;; #give usage if arguments are used wrong.
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"mount") echo "Mounting '$2'."; if [ -n "$make" ]; then mkdir "$path"; fi; sshfs -o idmap=user "$host" "$path"; if [ $? -eq 0 ]; then echo "Mount succesful."; else echo "Mount failed."; fi;; #execute mount
|
||||||
|
|
||||||
|
"umount") echo "Unmounting '$2'."; fusermount -u "$path"; if [ $? -eq 0 ]; then echo "Unmount succesful."; else echo "Unmount failed."; exit; fi; if [ -n "$make" ]; then rmdir "$path"; fi;; #exexute unmount
|
||||||
|
esac
|
13
scripts/windows
Executable file
13
scripts/windows
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Acquire root
|
||||||
|
if [ $EUID != 0 ]; then
|
||||||
|
sudo "$0" "$@"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set bootnext
|
||||||
|
efibootmgr --bootnext 0000 #0000 is windows bootloader
|
||||||
|
|
||||||
|
# Reboot
|
||||||
|
systemctl reboot
|
||||||
|
|
Loading…
Reference in New Issue
Block a user