diff options
author | Shubham Saini <shubham6405@gmail.com> | 2020-02-23 12:50:14 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2020-02-23 12:50:14 +0000 |
commit | 4186d162bd2cc3b9b45851c12462f1acba090852 (patch) | |
tree | 0af2951ccd9b252df8c2f9eb9115552fe010278d /bin | |
parent | be33df44d5893ac9576d937c30176e8840a8035e (diff) |
gentoo:time wasted
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/.local/bin/dotstow | 21 | ||||
-rwxr-xr-x | bin/.local/bin/fetch | 63 | ||||
-rwxr-xr-x | bin/.local/bin/gitit | 10 | ||||
-rwxr-xr-x | bin/.local/bin/unblock | 9 |
4 files changed, 103 insertions, 0 deletions
diff --git a/bin/.local/bin/dotstow b/bin/.local/bin/dotstow new file mode 100755 index 0000000..bcadc5e --- /dev/null +++ b/bin/.local/bin/dotstow | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # This script will Stow all the dotfiles located in the ~/dotfiles folder. | ||
4 | # The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow. | ||
5 | |||
6 | echo "Stowing Dotfiles..."; | ||
7 | |||
8 | cd ~/dotfiles | ||
9 | for file in ~/dotfiles/*; do | ||
10 | # Only run Stow on the directories in the dotfiles folder and not the individual files. | ||
11 | # Using 'basename' strips the filepath from the directory name. | ||
12 | if [ -d ${file} ]; then | ||
13 | stow -R $(basename $file) | ||
14 | echo "$(basename $file) stowed."; | ||
15 | fi | ||
16 | done | ||
17 | |||
18 | # Return back to the your PWD from before you ran the script | ||
19 | cd ~- | ||
20 | |||
21 | echo 'All stowed'; | ||
diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch new file mode 100755 index 0000000..609850c --- /dev/null +++ b/bin/.local/bin/fetch | |||
@@ -0,0 +1,63 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # ufetch-arch - tiny system info for arch | ||
4 | |||
5 | ## INFO | ||
6 | |||
7 | # user is already defined | ||
8 | host="$(hostname)" | ||
9 | os='Arch Linux' | ||
10 | kernel="$(uname -sr)" | ||
11 | uptime="$(uptime -p | sed 's/up //')" | ||
12 | packages="$(pacman -Q | wc -l)" | ||
13 | shell="$(basename ${SHELL})" | ||
14 | |||
15 | if [ -z "${WM}" ]; then | ||
16 | if [ "${XDG_CURRENT_DESKTOP}" ]; then | ||
17 | envtype='DE' | ||
18 | WM="${XDG_CURRENT_DESKTOP}" | ||
19 | elif [ "${DESKTOP_SESSION}" ]; then | ||
20 | envtype='DE' | ||
21 | WM="${DESKTOP_SESSION}" | ||
22 | else | ||
23 | envtype='WM' | ||
24 | WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" | ||
25 | fi | ||
26 | else | ||
27 | envtype='WM' | ||
28 | fi | ||
29 | |||
30 | ## DEFINE COLORS | ||
31 | |||
32 | # probably don't change these | ||
33 | bold="$(tput bold)" | ||
34 | black="$(tput setaf 0)" | ||
35 | red="$(tput setaf 1)" | ||
36 | green="$(tput setaf 2)" | ||
37 | yellow="$(tput setaf 3)" | ||
38 | blue="$(tput setaf 4)" | ||
39 | magenta="$(tput setaf 5)" | ||
40 | cyan="$(tput setaf 6)" | ||
41 | white="$(tput setaf 7)" | ||
42 | reset="$(tput sgr0)" | ||
43 | |||
44 | # you can change these | ||
45 | lc="${reset}${bold}${cyan}" # labels | ||
46 | nc="${reset}${bold}${cyan}" # user and hostname | ||
47 | ic="${reset}${bold}${white}" # info | ||
48 | c0="${reset}${bold}${cyan}" # first color | ||
49 | c1="${reset}${cyan}" # second color | ||
50 | |||
51 | ## OUTPUT | ||
52 | |||
53 | cat <<EOF | ||
54 | |||
55 | ${c0} /\ ${nc}${USER}${ic}@${nc}${host}${reset} | ||
56 | ${c0} /^^\ ${lc}OS: ${ic}${os}${reset} | ||
57 | ${c0} /\ \ ${lc}KERNEL: ${ic}${kernel}${reset} | ||
58 | ${c0} / ${c1}__ \ ${lc}UPTIME: ${ic}${uptime}${reset} | ||
59 | ${c1} / ( ) \ ${lc}PACKAGES: ${ic}${packages}${reset} | ||
60 | ${c1} / __| |__\\\\ ${lc}SHELL: ${ic}${shell}${reset} | ||
61 | ${c1} /// \\\\\ ${lc}${envtype}: ${ic}${WM}${reset} | ||
62 | |||
63 | EOF | ||
diff --git a/bin/.local/bin/gitit b/bin/.local/bin/gitit new file mode 100755 index 0000000..af3eeec --- /dev/null +++ b/bin/.local/bin/gitit | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | printf "\033[0;32mDeploying updates to GitHub...\033[0m\n" | ||
4 | git add . | ||
5 | msg="changes" | ||
6 | if [ -n "$*" ]; then | ||
7 | msg="$*" | ||
8 | fi | ||
9 | git commit -m "$msg" | ||
10 | git push origin master | ||
diff --git a/bin/.local/bin/unblock b/bin/.local/bin/unblock new file mode 100755 index 0000000..cf3aa81 --- /dev/null +++ b/bin/.local/bin/unblock | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | #whitelist escape | ||
3 | set -e | ||
4 | printf "\033[0;35mSetting wlo1 down....\033[0m\n" | ||
5 | sudo ip link set wlo1 down | ||
6 | printf "\033[0;36mChanging MAC address....\033[0m\n" | ||
7 | sudo macchanger --mac=60:8E:08:B2:38:77 wlo1 | ||
8 | printf "\033[0;32mEnjoy....\033[0m\n" | ||
9 | |||