diff options
Diffstat (limited to 'bin/.local')
-rwxr-xr-x | bin/.local/bin/fetch | 91 | ||||
-rwxr-xr-x | bin/.local/bin/lock | 6 | ||||
-rwxr-xr-x | bin/.local/bin/unblock | 2 |
3 files changed, 59 insertions, 40 deletions
diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch index 609850c..05cb71e 100755 --- a/bin/.local/bin/fetch +++ b/bin/.local/bin/fetch | |||
@@ -1,63 +1,76 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # ufetch-arch - tiny system info for arch | 3 | # ufetch-void - tiny system info for void |
4 | 4 | ||
5 | ## INFO | 5 | ## INFO |
6 | 6 | ||
7 | # user is already defined | 7 | # user is already defined |
8 | host="$(hostname)" | 8 | host="$(hostname)" |
9 | os='Arch Linux' | 9 | os='Void Linux' |
10 | kernel="$(uname -sr)" | 10 | kernel="$(uname -sr)" |
11 | uptime="$(uptime -p | sed 's/up //')" | 11 | uptime="$(uptime -p | sed 's/up //')" |
12 | packages="$(pacman -Q | wc -l)" | 12 | packages="$(xbps-query -l | wc -l)" |
13 | shell="$(basename ${SHELL})" | 13 | shell="$(basename "$SHELL")" |
14 | 14 | ||
15 | if [ -z "${WM}" ]; then | 15 | ## UI DETECTION |
16 | if [ "${XDG_CURRENT_DESKTOP}" ]; then | 16 | |
17 | envtype='DE' | 17 | if [ -n "${DE}" ]; then |
18 | WM="${XDG_CURRENT_DESKTOP}" | 18 | ui="${DE}" |
19 | elif [ "${DESKTOP_SESSION}" ]; then | 19 | uitype='DE' |
20 | envtype='DE' | 20 | elif [ -n "${WM}" ]; then |
21 | WM="${DESKTOP_SESSION}" | 21 | ui="${WM}" |
22 | else | 22 | uitype='WM' |
23 | envtype='WM' | 23 | elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then |
24 | WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" | 24 | ui="${XDG_CURRENT_DESKTOP}" |
25 | fi | 25 | uitype='DE' |
26 | elif [ -n "${DESKTOP_SESSION}" ]; then | ||
27 | ui="${DESKTOP_SESSION}" | ||
28 | uitype='DE' | ||
29 | elif [ -f "${HOME}/.xinitrc" ]; then | ||
30 | ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" | ||
31 | uitype='WM' | ||
32 | elif [ -f "${HOME}/.xsession" ]; then | ||
33 | ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)" | ||
34 | uitype='WM' | ||
26 | else | 35 | else |
27 | envtype='WM' | 36 | ui='unknown' |
37 | uitype='UI' | ||
28 | fi | 38 | fi |
29 | 39 | ||
30 | ## DEFINE COLORS | 40 | ## DEFINE COLORS |
31 | 41 | ||
32 | # probably don't change these | 42 | # probably don't change these |
33 | bold="$(tput bold)" | 43 | if [ -x "$(command -v tput)" ]; then |
34 | black="$(tput setaf 0)" | 44 | bold="$(tput bold)" |
35 | red="$(tput setaf 1)" | 45 | black="$(tput setaf 0)" |
36 | green="$(tput setaf 2)" | 46 | red="$(tput setaf 1)" |
37 | yellow="$(tput setaf 3)" | 47 | green="$(tput setaf 2)" |
38 | blue="$(tput setaf 4)" | 48 | yellow="$(tput setaf 3)" |
39 | magenta="$(tput setaf 5)" | 49 | blue="$(tput setaf 4)" |
40 | cyan="$(tput setaf 6)" | 50 | magenta="$(tput setaf 5)" |
41 | white="$(tput setaf 7)" | 51 | cyan="$(tput setaf 6)" |
42 | reset="$(tput sgr0)" | 52 | white="$(tput setaf 7)" |
53 | reset="$(tput sgr0)" | ||
54 | fi | ||
43 | 55 | ||
44 | # you can change these | 56 | # you can change these |
45 | lc="${reset}${bold}${cyan}" # labels | 57 | lc="${reset}${bold}${green}" # labels |
46 | nc="${reset}${bold}${cyan}" # user and hostname | 58 | nc="${reset}${bold}${green}" # user and hostname |
47 | ic="${reset}${bold}${white}" # info | 59 | ic="${reset}" # info |
48 | c0="${reset}${bold}${cyan}" # first color | 60 | c0="${reset}${bold}${green}" # first color |
49 | c1="${reset}${cyan}" # second color | 61 | c1="${reset}${green}" # second color |
50 | 62 | ||
51 | ## OUTPUT | 63 | ## OUTPUT |
52 | 64 | ||
53 | cat <<EOF | 65 | cat <<EOF |
54 | 66 | ||
55 | ${c0} /\ ${nc}${USER}${ic}@${nc}${host}${reset} | 67 | ${c0} _______ ${nc}${USER}${ic}@${nc}${host}${reset} |
56 | ${c0} /^^\ ${lc}OS: ${ic}${os}${reset} | 68 | ${c1} ${c0}\_____ \`- ${lc}OS: ${ic}${os}${reset} |
57 | ${c0} /\ \ ${lc}KERNEL: ${ic}${kernel}${reset} | 69 | ${c1} /\ ${c0}___ \`- \ ${lc}KERNEL: ${ic}${kernel}${reset} |
58 | ${c0} / ${c1}__ \ ${lc}UPTIME: ${ic}${uptime}${reset} | 70 | ${c1} | | ${c0}/ \ | | ${lc}UPTIME: ${ic}${uptime}${reset} |
59 | ${c1} / ( ) \ ${lc}PACKAGES: ${ic}${packages}${reset} | 71 | ${c1} | | ${c0}\___/ | | ${lc}PACKAGES: ${ic}${packages}${reset} |
60 | ${c1} / __| |__\\\\ ${lc}SHELL: ${ic}${shell}${reset} | 72 | ${c1} \ \`-_____ ${c0}\/ ${lc}SHELL: ${ic}${shell}${reset} |
61 | ${c1} /// \\\\\ ${lc}${envtype}: ${ic}${WM}${reset} | 73 | ${c1} \`-______\ ${lc}${uitype}: ${ic}${ui}${reset} |
62 | 74 | ||
63 | EOF | 75 | EOF |
76 | |||
diff --git a/bin/.local/bin/lock b/bin/.local/bin/lock new file mode 100755 index 0000000..d7dc632 --- /dev/null +++ b/bin/.local/bin/lock | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/bash | ||
2 | scrot /tmp/screen.png | ||
3 | convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png | ||
4 | [[ -f $1 ]] && convert /tmp/screen.png $1 -gravity center -composite -matte /tmp/screen.png | ||
5 | i3lock -u -i /tmp/screen.png | ||
6 | rm /tmp/screen.png | ||
diff --git a/bin/.local/bin/unblock b/bin/.local/bin/unblock index cf3aa81..1d0ea7f 100755 --- a/bin/.local/bin/unblock +++ b/bin/.local/bin/unblock | |||
@@ -4,6 +4,6 @@ set -e | |||
4 | printf "\033[0;35mSetting wlo1 down....\033[0m\n" | 4 | printf "\033[0;35mSetting wlo1 down....\033[0m\n" |
5 | sudo ip link set wlo1 down | 5 | sudo ip link set wlo1 down |
6 | printf "\033[0;36mChanging MAC address....\033[0m\n" | 6 | printf "\033[0;36mChanging MAC address....\033[0m\n" |
7 | sudo macchanger --mac=60:8E:08:B2:38:77 wlo1 | 7 | sudo macchanger -a wlo1 |
8 | printf "\033[0;32mEnjoy....\033[0m\n" | 8 | printf "\033[0;32mEnjoy....\033[0m\n" |
9 | 9 | ||