diff --git a/scripts/clean b/scripts/clean new file mode 100755 index 0000000..8e81b14 --- /dev/null +++ b/scripts/clean @@ -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 {} \; diff --git a/scripts/ghosts b/scripts/ghosts new file mode 100755 index 0000000..3b3c106 --- /dev/null +++ b/scripts/ghosts @@ -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 diff --git a/scripts/git-init b/scripts/git-init new file mode 100755 index 0000000..3236559 --- /dev/null +++ b/scripts/git-init @@ -0,0 +1,25 @@ +#!/bin/bash +# Help function +function show_help { +echo "Usage: git-init "; +} + +# 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; diff --git a/scripts/kodi-tv b/scripts/kodi-tv new file mode 100755 index 0000000..328d223 --- /dev/null +++ b/scripts/kodi-tv @@ -0,0 +1,9 @@ +#!/bin/bash +# Output on +xrandr --output HDMI-0 --auto + +# Start kodi +kodi + +# Tv output off +xrandr --output HDMI-0 --off diff --git a/scripts/rmount b/scripts/rmount new file mode 100755 index 0000000..28f2da4 --- /dev/null +++ b/scripts/rmount @@ -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 diff --git a/scripts/windows b/scripts/windows new file mode 100755 index 0000000..c637753 --- /dev/null +++ b/scripts/windows @@ -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 +