summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/fetch91
-rwxr-xr-xbin/.local/bin/lock6
-rwxr-xr-xbin/.local/bin/unblock2
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
8host="$(hostname)" 8host="$(hostname)"
9os='Arch Linux' 9os='Void Linux'
10kernel="$(uname -sr)" 10kernel="$(uname -sr)"
11uptime="$(uptime -p | sed 's/up //')" 11uptime="$(uptime -p | sed 's/up //')"
12packages="$(pacman -Q | wc -l)" 12packages="$(xbps-query -l | wc -l)"
13shell="$(basename ${SHELL})" 13shell="$(basename "$SHELL")"
14 14
15if [ -z "${WM}" ]; then 15## UI DETECTION
16 if [ "${XDG_CURRENT_DESKTOP}" ]; then 16
17 envtype='DE' 17if [ -n "${DE}" ]; then
18 WM="${XDG_CURRENT_DESKTOP}" 18 ui="${DE}"
19 elif [ "${DESKTOP_SESSION}" ]; then 19 uitype='DE'
20 envtype='DE' 20elif [ -n "${WM}" ]; then
21 WM="${DESKTOP_SESSION}" 21 ui="${WM}"
22 else 22 uitype='WM'
23 envtype='WM' 23elif [ -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'
26elif [ -n "${DESKTOP_SESSION}" ]; then
27 ui="${DESKTOP_SESSION}"
28 uitype='DE'
29elif [ -f "${HOME}/.xinitrc" ]; then
30 ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
31 uitype='WM'
32elif [ -f "${HOME}/.xsession" ]; then
33 ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)"
34 uitype='WM'
26else 35else
27 envtype='WM' 36 ui='unknown'
37 uitype='UI'
28fi 38fi
29 39
30## DEFINE COLORS 40## DEFINE COLORS
31 41
32# probably don't change these 42# probably don't change these
33bold="$(tput bold)" 43if [ -x "$(command -v tput)" ]; then
34black="$(tput setaf 0)" 44 bold="$(tput bold)"
35red="$(tput setaf 1)" 45 black="$(tput setaf 0)"
36green="$(tput setaf 2)" 46 red="$(tput setaf 1)"
37yellow="$(tput setaf 3)" 47 green="$(tput setaf 2)"
38blue="$(tput setaf 4)" 48 yellow="$(tput setaf 3)"
39magenta="$(tput setaf 5)" 49 blue="$(tput setaf 4)"
40cyan="$(tput setaf 6)" 50 magenta="$(tput setaf 5)"
41white="$(tput setaf 7)" 51 cyan="$(tput setaf 6)"
42reset="$(tput sgr0)" 52 white="$(tput setaf 7)"
53 reset="$(tput sgr0)"
54fi
43 55
44# you can change these 56# you can change these
45lc="${reset}${bold}${cyan}" # labels 57lc="${reset}${bold}${green}" # labels
46nc="${reset}${bold}${cyan}" # user and hostname 58nc="${reset}${bold}${green}" # user and hostname
47ic="${reset}${bold}${white}" # info 59ic="${reset}" # info
48c0="${reset}${bold}${cyan}" # first color 60c0="${reset}${bold}${green}" # first color
49c1="${reset}${cyan}" # second color 61c1="${reset}${green}" # second color
50 62
51## OUTPUT 63## OUTPUT
52 64
53cat <<EOF 65cat <<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
63EOF 75EOF
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
2scrot /tmp/screen.png
3convert /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
5i3lock -u -i /tmp/screen.png
6rm /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
4printf "\033[0;35mSetting wlo1 down....\033[0m\n" 4printf "\033[0;35mSetting wlo1 down....\033[0m\n"
5sudo ip link set wlo1 down 5sudo ip link set wlo1 down
6printf "\033[0;36mChanging MAC address....\033[0m\n" 6printf "\033[0;36mChanging MAC address....\033[0m\n"
7sudo macchanger --mac=60:8E:08:B2:38:77 wlo1 7sudo macchanger -a wlo1
8printf "\033[0;32mEnjoy....\033[0m\n" 8printf "\033[0;32mEnjoy....\033[0m\n"
9 9