summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/dotstow21
-rwxr-xr-xbin/.local/bin/fetch63
-rwxr-xr-xbin/.local/bin/gitit10
3 files changed, 94 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
6echo "Stowing Dotfiles...";
7
8cd ~/dotfiles
9for 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
16done
17
18# Return back to the your PWD from before you ran the script
19cd ~-
20
21echo '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
8host="$(hostname)"
9os='Arch Linux'
10kernel="$(uname -sr)"
11uptime="$(uptime -p | sed 's/up //')"
12packages="$(pacman -Q | wc -l)"
13shell="$(basename ${SHELL})"
14
15if [ -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
26else
27 envtype='WM'
28fi
29
30## DEFINE COLORS
31
32# probably don't change these
33bold="$(tput bold)"
34black="$(tput setaf 0)"
35red="$(tput setaf 1)"
36green="$(tput setaf 2)"
37yellow="$(tput setaf 3)"
38blue="$(tput setaf 4)"
39magenta="$(tput setaf 5)"
40cyan="$(tput setaf 6)"
41white="$(tput setaf 7)"
42reset="$(tput sgr0)"
43
44# you can change these
45lc="${reset}${bold}${cyan}" # labels
46nc="${reset}${bold}${cyan}" # user and hostname
47ic="${reset}${bold}${white}" # info
48c0="${reset}${bold}${cyan}" # first color
49c1="${reset}${cyan}" # second color
50
51## OUTPUT
52
53cat <<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
63EOF
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
2set -e
3printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
4git add .
5msg="changes"
6if [ -n "$*" ]; then
7 msg="$*"
8fi
9git commit -m "$msg"
10git push origin master