initial commit
This commit is contained in:
1 parent
d4234ebf6a
commit
f2ee1ea3ed
1017 files changed
-117961
No files matched your search
-48
@@ -1,48 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
Green='\033[0;32m'
|
||||
Color_off='\033[0m'
|
||||
Red='\033[0;31m'
|
||||
Yellow='\033[1;33m'
|
||||
|
||||
batteries=$(ls /sys/class/power_supply/ | grep BAT)
|
||||
|
||||
case "$1" in
|
||||
"-c")
|
||||
if [[ "$batteries" == "" ]]; then
|
||||
printf "$Yellow**$Red error:$Color_off no battery found\n"
|
||||
exit 1;
|
||||
fi
|
||||
for i in $batteries; do
|
||||
batfull=$(cat /sys/class/power_supply/$i/energy_full)
|
||||
batnow=$(cat /sys/class/power_supply/$i/energy_now)
|
||||
batperc=$((($batnow/($batfull/100))))
|
||||
|
||||
if [[ "$batperc" -le "20" ]]; then
|
||||
printf "$Yellow**$Color_off $i: $Red$batperc$Color_off\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$batperc" -le "70" ]]; then
|
||||
printf "$Yellow**$Color_off $i: $Yellow$batperc$Color_off\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "$Yellow**$Color_off $i: $Green$batperc$Color_off\n"
|
||||
done
|
||||
;;
|
||||
"-j")
|
||||
if [[ "$batteries" == "" ]]; then
|
||||
echo no
|
||||
exit 1;
|
||||
fi
|
||||
for i in $batteries; do
|
||||
batfull=$(cat /sys/class/power_supply/$i/energy_full)
|
||||
batnow=$(cat /sys/class/power_supply/$i/energy_now)
|
||||
batperc=$((($batnow/($batfull/100))))
|
||||
|
||||
printf "$batperc \n"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
batperc=$(~/dotfiles/bin/batperc -j)
|
||||
|
||||
echo $batperc
|
||||
|
||||
if [[ "$batperc" != "no" ]]; then
|
||||
while true; do
|
||||
for i in $batperc; do
|
||||
if [[ "$i" -le "20" ]]; then
|
||||
notify-send "Battery low: $i%" -u critical
|
||||
sleep 60
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true; do
|
||||
BAT=$(acpi -S | cut -d' ' -f4 | sed 's/.$//')
|
||||
|
||||
if [ $BAT -le 9 ]; then
|
||||
notify-send "Низкий заряд батареи!!!" -u critical
|
||||
sleep 60s
|
||||
fi
|
||||
sleep 5s
|
||||
done &
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_arch_updates() {
|
||||
official_updates=0
|
||||
aur_updates=0
|
||||
|
||||
if [ "$1" = "-y" ]; then
|
||||
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
|
||||
elif [ "$1" = "-p" ]; then
|
||||
official_updates=$(checkupdates 2>/dev/null | wc -l)
|
||||
else
|
||||
official_updates=$(checkupdates 2>/dev/null | wc -l)
|
||||
aur_updates=$(yay -Qum 2>/dev/null | wc -l)
|
||||
fi
|
||||
|
||||
total_updates=$((official_updates + aur_updates))
|
||||
|
||||
echo $total_updates
|
||||
}
|
||||
|
||||
check_ubuntu_updates() {
|
||||
result=$(apt-get -s -o Debug::NoLocking=true upgrade | grep -c ^Inst)
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
check_fedora_updates() {
|
||||
result=$(dnf check-update -q | grep -v '^Loaded plugins' | grep -v '^No match for' | wc -l)
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-arch)
|
||||
check_arch_updates "$2"
|
||||
;;
|
||||
-ubuntu)
|
||||
check_ubuntu_updates
|
||||
;;
|
||||
-fedora)
|
||||
check_fedora_updates
|
||||
;;
|
||||
*)
|
||||
echo "0"
|
||||
;;
|
||||
esac
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# ---- colors ----
|
||||
RESET='\033[0m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
RED='\033[0;31m'
|
||||
BLUE='\033[0;34m'
|
||||
# ----------------
|
||||
|
||||
interface=$1
|
||||
bytes=$2
|
||||
|
||||
prev_tx_traffic=0
|
||||
prev_rx_traffic=0
|
||||
|
||||
while true; do
|
||||
clear
|
||||
tx_traffic=$(cat /sys/class/net/${interface}/statistics/tx_bytes)
|
||||
rx_traffic=$(cat /sys/class/net/${interface}/statistics/rx_bytes)
|
||||
tx_traffic_speed=$(($tx_traffic-$prev_tx_traffic))
|
||||
rx_traffic_speed=$(($rx_traffic-$prev_rx_traffic))
|
||||
# echo $tx_traffic_speed
|
||||
# echo $rx_traffic_speed
|
||||
prev_tx_traffic=$tx_traffic
|
||||
prev_rx_traffic=$rx_traffic
|
||||
|
||||
traffic_color=$GREEN
|
||||
if [[ $(echo $(($rx_traffic/1024/1024/1024))) > 5 ]]; then
|
||||
traffic_color=$YELLOW
|
||||
elif [[ $(echo $(($rx_traffic/1024/1024/1024))) > 10 ]]; then
|
||||
traffic_color=$RED
|
||||
fi
|
||||
|
||||
if [[ $bytes == 'k' ]] || [[ $bytes == 'K' ]]; then
|
||||
printf "$BLUE tx traffic speed$RESET = $(($tx_traffic_speed/1024)) Kb/s\n"
|
||||
printf "$BLUE tx traffic$RESET = $(($tx_traffic/1024)) Kb\n"
|
||||
printf "$BLUE rx traffic speed$RESET = $(($rx_traffic_speed/1024)) Kb/s\n"
|
||||
printf "$traffic_color rx traffic$RESET = $(($rx_traffic/1024)) Kb\n"
|
||||
fi
|
||||
|
||||
if [[ $bytes == 'm' ]] || [[ $bytes == 'M' ]]; then
|
||||
printf "$BLUE tx traffic speed$RESET = $(($tx_traffic_speed/1024/1024)) Mb/s\n"
|
||||
printf "$BLUE tx traffic$RESET = $(($tx_traffic/1024/1024)) Mb\n"
|
||||
printf "$BLUE rx traffic speed$RESET = $(($rx_traffic_speed/1024/1024)) Mb/s\n"
|
||||
printf "$traffic_color rx traffic$RESET = $(($rx_traffic/1024/1024)) Mb\n"
|
||||
fi
|
||||
|
||||
if [[ $bytes == 'g' ]] || [[ $bytes == 'G' ]]; then
|
||||
if [[ $(echo $(($tx_traffic/1024/1024/1024))) == 0 ]]; then
|
||||
printf "$BLUE tx traffic$RESET = $(($tx_traffic/1024/1024)) Mb\n"
|
||||
else
|
||||
printf "$BLUE tx traffic$RESET = $(($tx_traffic/1024/1024/1024)) Gb\n"
|
||||
fi
|
||||
if [[ $(echo $(($rx_traffic/1024/1024/1024))) == 0 ]]; then
|
||||
printf "$traffic_color rx traffic$RESET = $(($rx_traffic/1024/1024)) Mb\n"
|
||||
else
|
||||
printf "$traffic_color rx traffic$RESET = $(($rx_traffic/1024/1024/1024)) Gb\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $bytes == 'b' ]] || [[ $bytes == '' ]]; then
|
||||
printf "$BLUE tx traffic$RESET = $(($tx_traffic)) b\n"
|
||||
printf "$traffic_color rx traffic$RESET = $(($rx_traffic)) b\n"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
HD=$1
|
||||
|
||||
if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
|
||||
echo "usage: $0 [HD]"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sudo hdparm -Tt $HD
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
xset -dpms
|
||||
xset s off
|
||||
|
||||
-266
@@ -1,266 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# fet.sh
|
||||
# a fetch in pure POSIX shell
|
||||
#
|
||||
|
||||
# supress errors
|
||||
exec 2>/dev/null
|
||||
set --
|
||||
eq() { # equals | [ a = b ] with globbing
|
||||
case $1 in
|
||||
$2) ;;
|
||||
*) return 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
## DE
|
||||
wm=$XDG_CURRENT_DESKTOP
|
||||
[ "$wm" ] || wm=$DESKTOP_SESSION
|
||||
|
||||
## Distro
|
||||
# freedesktop.org/software/systemd/man/os-release.html
|
||||
# a common file that has variables about the distro
|
||||
for os in /etc/os-release /usr/lib/os-release; do
|
||||
# some POSIX shells exit when trying to source a file that doesn't exist
|
||||
[ -f $os ] && . $os && break
|
||||
done
|
||||
|
||||
if [ -e /proc/$$/comm ]; then
|
||||
## Terminal
|
||||
while [ ! "$term" ]; do
|
||||
# loop over lines in /proc/pid/status until it reaches PPid
|
||||
# then save that to a variable and exit the file
|
||||
while read -r line; do
|
||||
eq "$line" 'PPid*' && ppid=${line##*:?} && break
|
||||
done < "/proc/${ppid:-$PPID}/status"
|
||||
|
||||
# Make sure not to do an infinite loop
|
||||
[ "$pppid" = "$ppid" ] && break
|
||||
pppid=$ppid
|
||||
|
||||
# get name of binary
|
||||
read -r name < "/proc/$ppid/comm"
|
||||
|
||||
case $name in
|
||||
*sh|"${0##*/}") ;; # skip shells
|
||||
*[Ll]ogin*|*init|*systemd*) break;; # exit when the top is reached
|
||||
# anything else can be assumed to be the terminal
|
||||
# this has the side affect of catching tmux, but tmux
|
||||
# detaches from the terminal and therefore ignoring that
|
||||
# will just make the init the term
|
||||
*) term=$name
|
||||
esac
|
||||
done
|
||||
|
||||
## WM/DE
|
||||
[ "$wm" ] ||
|
||||
# loop over all processes and check the binary name
|
||||
for i in /proc/*/comm; do
|
||||
read -r c < "$i"
|
||||
case $c in
|
||||
*bar*|*rc) ;;
|
||||
awesome|xmonad*|qtile|sway|i3|[bfo]*box|*wm*) wm=${c%%-*}; break;;
|
||||
esac
|
||||
done
|
||||
|
||||
## Memory
|
||||
# loop over lines in /proc/meminfo until it reaches MemTotal,
|
||||
# then convert the amount (second word) from KB to MB
|
||||
while read -r line; do
|
||||
eq "$line" 'MemTotal*' && set -- $line && break
|
||||
done < /proc/meminfo
|
||||
mem="$(( $2 / 1000 ))MB"
|
||||
|
||||
## Processor
|
||||
while read -r line; do
|
||||
case $line in
|
||||
vendor_id*) vendor="${line##*: } ";;
|
||||
model\ name*) cpu=${line##*: }; break;;
|
||||
esac
|
||||
done < /proc/cpuinfo
|
||||
|
||||
## Uptime
|
||||
# the simple math is shamefully stolen from aosync
|
||||
IFS=. read -r uptime _ < /proc/uptime
|
||||
d=$((uptime / 60 / 60 / 24))
|
||||
up=$(printf %02d:%02d $((uptime / 60 / 60 % 24)) $((uptime / 60 % 60)))
|
||||
[ "$d" -gt 0 ] && up="${d}d $up"
|
||||
|
||||
## Kernel
|
||||
read -r _ _ version _ < /proc/version
|
||||
kernel=${version%%-*}
|
||||
eq "$version" '*Microsoft*' && ID="fake $ID"
|
||||
|
||||
## Motherboard // laptop
|
||||
read -r model < /sys/devices/virtual/dmi/id/product_name
|
||||
# invalid model handling
|
||||
case $model in
|
||||
# alternate file with slightly different info
|
||||
# on my laptop it has the device model (instead of 'hp notebook')
|
||||
# on my desktop it has the extended motherboard model
|
||||
'System '*|'Default '*|'To Be Filled'*)
|
||||
read -r model < /sys/devices/virtual/dmi/id/board_name
|
||||
esac
|
||||
|
||||
## Packages
|
||||
# clean environment, then make every file in the dir an argument,
|
||||
# then save the argument count to $pkgs
|
||||
set --
|
||||
# kiss, arch, debian, void, gentoo
|
||||
for i in '/var/db/kiss/installed/*' '/var/lib/pacman/local/[0-9a-z]*' \
|
||||
'/var/lib/dpkg/info/*.list' '/var/db/xbps/.*' '/var/db/pkg/*/*'; do
|
||||
set -- $i
|
||||
[ $# -gt 1 ] && pkgs=$# && break
|
||||
done
|
||||
|
||||
read -r host < /proc/sys/kernel/hostname
|
||||
elif [ -f /var/run/dmesg.boot ]; then
|
||||
# Both OpenBSD and FreeBSD use this file, however they're formatted differently
|
||||
read -r bsd < /var/run/dmesg.boot
|
||||
case $bsd in
|
||||
Open*)
|
||||
## OpenBSD cpu/mem/name
|
||||
while read -r line; do
|
||||
case $line in
|
||||
'real mem'*)
|
||||
# use the pre-formatted value which is in brackets
|
||||
mem=${line##*\(}
|
||||
mem=${mem%\)*}
|
||||
;;
|
||||
# set $cpu to everything before a comma and after the field name
|
||||
cpu0:*)
|
||||
cpu=${line#cpu0: }
|
||||
# Remove excess info after the actual CPU name
|
||||
cpu=${cpu%%,*}
|
||||
# Set the CPU Manufacturer to the first word of the cpu
|
||||
# variable [separated by '(' or ' ']
|
||||
vendor=${cpu%%[\( ]*}
|
||||
# We got all the info we want, stop reading
|
||||
break
|
||||
;;
|
||||
# First 2 words in the file are OpenBSD <version>
|
||||
*) [ "$ID" ] || { set -- $line; ID="$1 $2"; }
|
||||
esac
|
||||
done < /var/run/dmesg.boot
|
||||
[ -d /var/db/pkg ] && set -- /var/db/pkg/* && pkgs=$#
|
||||
read -r host < /etc/myname
|
||||
host=${host%.*}
|
||||
;;
|
||||
# Everything else, assume FreeBSD (first line is ---<<BOOT>> or something)
|
||||
*)
|
||||
# shellcheck source=/dev/null
|
||||
. /etc/rc.conf
|
||||
# shut shellcheck up without disabling the warning
|
||||
host=${hostname:-}
|
||||
|
||||
while read -r line; do
|
||||
case $line in
|
||||
# os version
|
||||
FreeBSD*)
|
||||
# If the OS is already set, no need to set it again
|
||||
[ "$ID" ] && continue
|
||||
ID=${line%%-R*}
|
||||
;;
|
||||
|
||||
CPU:*)
|
||||
cpu=${cpu#CPU: }
|
||||
# Remove excess info from after the actual CPU name
|
||||
cpu=${line%\(*}
|
||||
;;
|
||||
*Origin=*)
|
||||
# CPU Manufacturer
|
||||
vendor=${line#*Origin=\"}
|
||||
vendor="${vendor%%\"*} "
|
||||
;;
|
||||
|
||||
'real memory'*)
|
||||
# Get the pre-formatted amount which is inside brackets
|
||||
mem=${line##*\(}
|
||||
mem=${mem%\)*}
|
||||
# This appears to be the final thing we need from the file,
|
||||
# no need to read it more.
|
||||
break
|
||||
esac
|
||||
done < /var/run/dmesg.boot
|
||||
;;
|
||||
esac
|
||||
elif v=/System/Library/CoreServices/SystemVersion.plist; [ -f "$v" ]; then
|
||||
## Macos
|
||||
# make sure this variable is empty as to not break the following loop
|
||||
temp=
|
||||
while read -r line; do
|
||||
case $line in
|
||||
# set a variable so the script knows it's on the correct line
|
||||
# (the line after this one is the important one)
|
||||
*ProductVersion*) temp=.;;
|
||||
*)
|
||||
# check if the script is reading the derired line, if not
|
||||
# don't do anything
|
||||
[ "$temp" ] || continue
|
||||
# Remove everything before and including the first '>'
|
||||
ID=${line#*>}
|
||||
# Remove the other side of the XML tag, and insert the actual OS name
|
||||
ID="MacOS ${ID%<*}"
|
||||
# We got the info we want, end the loop.
|
||||
break
|
||||
esac
|
||||
done < "$v"
|
||||
fi
|
||||
|
||||
eq "$0" '*fetish' && printf 'Step on me daddy\n' && exit
|
||||
|
||||
# help i dont know if it's a capital consistently
|
||||
eq "$wm" '*[Gg][Nn][Oo][Mm][Ee]*' && wm='foot DE'
|
||||
|
||||
## GTK
|
||||
while read -r line; do
|
||||
eq "$line" 'gtk-theme*' && gtk=${line##*=} && break
|
||||
done < "${XDG_CONFIG_HOME:=$HOME/.config}/gtk-3.0/settings.ini"
|
||||
|
||||
# Shorten $cpu and $vendor
|
||||
# this is so messy due to so many inconsistencies in the model names
|
||||
vendor=${vendor##*Authentic}
|
||||
vendor=${vendor##*Genuine}
|
||||
cpu=${cpu##*) }
|
||||
cpu=${cpu%% @*}
|
||||
cpu=${cpu%% CPU}
|
||||
cpu=${cpu##CPU }
|
||||
cpu=${cpu##*AMD }
|
||||
cpu=${cpu%% with*}
|
||||
cpu=${cpu% *-Core*}
|
||||
|
||||
col() {
|
||||
printf ' '
|
||||
for i in 1 2 3 4 5 6; do
|
||||
printf '\033[9%sm%s' "$i" "${colourblocks:-▅▅}"
|
||||
done
|
||||
printf '\033[0m\n'
|
||||
}
|
||||
|
||||
print() {
|
||||
[ "$2" ] && printf '\033[9%sm%6s\033[0m%b%s\n' \
|
||||
"${accent:-4}" "$1" "${separator:- ~ }" "$2"
|
||||
}
|
||||
|
||||
# default value
|
||||
: "${info:=n user os sh wm up gtk cpu mem host kern pkgs term col n}"
|
||||
|
||||
for i in $info; do
|
||||
case $i in
|
||||
n) echo;;
|
||||
os) print os "$ID";;
|
||||
sh) print sh "${SHELL##*/}";;
|
||||
wm) print wm "${wm##*/}";;
|
||||
up) print up "$up";;
|
||||
gtk) print gtk "${gtk# }";;
|
||||
cpu) print cpu "$vendor$cpu";;
|
||||
mem) print mem "$mem";;
|
||||
host) print host "$model";;
|
||||
kern) print kern "$kernel";;
|
||||
pkgs) print pkgs "$pkgs";;
|
||||
term) print term "$term";;
|
||||
user) printf '%7s@%s\n' "$USER" "$host";;
|
||||
col) col;;
|
||||
esac
|
||||
done
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
xrandr --output eDP1 --primary --mode 1366x768 --pos 1440x0 --rotate normal --output DP1 --off --output DP2 --off --output HDMI1 --off --output HDMI2 --mode 1440x900 --pos 0x0 --rotate normal --output VIRTUAL1 --off
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=$1
|
||||
SHELL=$2
|
||||
|
||||
#------- Check root func -------------------
|
||||
check_root() {
|
||||
if [ $(/usr/bin/id -u) -ne 0 ]; then
|
||||
printf "** You must be root\n"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
#----------- checking or create dirs -------
|
||||
check_or_mkdir() {
|
||||
[ ! -d $PATH/dev ] && mkdir -pv $PATH/dev
|
||||
[ ! -d $PATH/proc ] && mkdir -pv $PATH/proc
|
||||
[ ! -d $PATH/sys ] && mkdir -pv $PATH/sys
|
||||
[ ! -d $PATH/run ] && mkdir -pv $PATH/run
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
#-------- mount virtual filesystems --------
|
||||
mount_virtual() {
|
||||
/usr/bin/mount -v --bind /dev $PATH/dev
|
||||
/usr/bin/mount -vt devpts devpts -o gid=5,mode=0620 $PATH/dev/pts
|
||||
/usr/bin/mount -vt proc proc $PATH/proc
|
||||
/usr/bin/mount -vt sysfs sysfs $PATH/sys
|
||||
/usr/bin/mount -vt tmpfs tmpfs $PATH/run
|
||||
if [ -h $PATH/dev/shm ]; then
|
||||
/usr/bin/install -v -d -m 1777 $PATH$(/usr/bin/realpath /dev/shm)
|
||||
else
|
||||
/usr/bin/mount -vt tmpfs -o nosuid,nodev tmpfs $PATH/dev/shm
|
||||
fi
|
||||
/usr/bin/cp -v /etc/resolv.conf $PATH/etc/resolv.conf
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
#------ umount virtual filesystems ---------
|
||||
umount_virtual() {
|
||||
/usr/bin/mountpoint -q $PATH/dev/shm && /usr/bin/umount $PATH/dev/shm
|
||||
/usr/bin/umount $PATH/dev/pts
|
||||
/usr/bin/umount $PATH/{sys,proc,run,dev}
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
#------ get shell path func ----------------
|
||||
get_shell() {
|
||||
if [[ "$SHELL" != "" ]]; then
|
||||
echo $SHELL
|
||||
fi
|
||||
echo "/bin/sh"
|
||||
}
|
||||
#-------------------------------------------
|
||||
|
||||
check_root
|
||||
check_or_mkdir
|
||||
mount_virtual
|
||||
/usr/bin/chroot \
|
||||
$PATH \
|
||||
/usr/bin/env -i \
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin \
|
||||
$(get_shell)
|
||||
umount_virtual
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
xrandr --output HDMI-0 --mode 1680x1050
|
||||
|
||||
cvt 1920 1200 60
|
||||
xrandr --newmode "1920x1200_60.00" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
|
||||
|
||||
xrandr --addmode DVI-0 1920x1200_60.00
|
||||
xrandr --output DVI-0 --mode 1920x1200_60.00
|
||||
|
||||
~/dotfiles/bin/lisascreenslayout.sh
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
xrandr --output DisplayPort-0 --off --output HDMI-0 --mode 1680x1050 --pos 0x0 --rotate normal --output DVI-0 --mode 1920x1200_60.00 --pos 1680x0 --rotate normal --output DVI-1 --off
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
ls --color /sys/class/net
|
||||
|
||||
-1958
File diff suppressed because it is too large.
Load diff
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo killall ags
|
||||
ags &
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
hypridle &
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
killall waybar
|
||||
waybar &
|
||||
|
||||
@@ -1,428 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
esc() {
|
||||
case $1 in
|
||||
# vt100 (IL is vt102) (DECTCEM is vt520)
|
||||
CUD) printf '%s[%sB' "$esc_c" "$2" ;; # cursor down
|
||||
CUP) printf '%s[%s;%sH' "$esc_c" "$2" "$3" ;; # cursor home
|
||||
CUU) printf '%s[%sA' "$esc_c" "$2" ;; # cursor up
|
||||
DECAWM) printf '%s[?7%s' "$esc_c" "$2" ;; # line wrap
|
||||
DECRC) printf '%s8' "$esc_c" ;; # cursor restore
|
||||
DECSC) printf '%s7' "$esc_c" ;; # cursor save
|
||||
DECSTBM) printf '%s[%s;%sr' "$esc_c" "$2" "$3" ;; # scroll region
|
||||
DECTCEM) printf '%s[?25%s' "$esc_c" "$2" ;; # cursor visible
|
||||
ED[0-2]) printf '%s[%sJ' "$esc_c" "${1#ED}" ;; # clear screen
|
||||
EL[0-2]) printf '%s[%sK' "$esc_c" "${1#EL}" ;; # clear line
|
||||
IL) printf '%s[%sL' "$esc_c" "$2" ;; # insert line
|
||||
SGR) printf '%s[%s;%sm' "$esc_c" "$2" "$3" ;; # colors
|
||||
|
||||
# xterm (since 1988, supported widely)
|
||||
screen_alt) printf '%s[?1049%s' "$esc_c" "$2" ;; # alternate buffer
|
||||
esac
|
||||
}
|
||||
|
||||
term_setup() {
|
||||
stty=$(stty -g)
|
||||
stty -icanon -echo
|
||||
esc screen_alt h
|
||||
esc DECAWM l
|
||||
esc DECTCEM l
|
||||
esc ED2
|
||||
esc DECSTBM 1 "$((LINES - 2))"
|
||||
}
|
||||
|
||||
term_reset() {
|
||||
esc DECAWM h >&2
|
||||
esc DECTCEM h >&2
|
||||
esc ED2 >&2
|
||||
esc DECSTBM >&2
|
||||
esc screen_alt l >&2
|
||||
stty "$stty"
|
||||
|
||||
# needed for cd-on-exit
|
||||
printf '%s\n' "$PWD" >&1
|
||||
}
|
||||
|
||||
term_resize() {
|
||||
# false-positive, behavior intentional, globbing is disabled.
|
||||
# shellcheck disable=2046
|
||||
{
|
||||
set -f
|
||||
set +f -- $(stty size)
|
||||
}
|
||||
|
||||
LINES=$1 COLUMNS=$2
|
||||
|
||||
# space for status_line
|
||||
bottom=$((LINES - 2))
|
||||
}
|
||||
|
||||
term_scroll_down() {
|
||||
case $((y - $#)) in
|
||||
[0-9]*) return
|
||||
esac
|
||||
|
||||
y=$((y + 1))
|
||||
y2=$((y2 + 1 < bottom ? y2 + 1 : bottom))
|
||||
|
||||
line_print "$((y - 1))" "$@"
|
||||
printf '\n'
|
||||
line_print "$y" "$@"
|
||||
status_line "$#"
|
||||
}
|
||||
|
||||
term_scroll_up() {
|
||||
case $y in
|
||||
-*|0|1) return
|
||||
esac
|
||||
|
||||
y=$((y - 1))
|
||||
|
||||
line_print "$((y + 1))" "$@"
|
||||
|
||||
case $y2 in
|
||||
1) esc IL ;;
|
||||
*) esc CUU; y2=$((y2 > 1 ? y2 - 1 : 1))
|
||||
esac
|
||||
|
||||
line_print "$y" "$@"
|
||||
status_line "$#"
|
||||
}
|
||||
|
||||
cmd_run() {
|
||||
stty "$stty"
|
||||
esc DECTCEM h
|
||||
esc DECSTBM
|
||||
esc ED2
|
||||
"$@" ||:
|
||||
esc DECSTBM 1 "$((LINES - 2))"
|
||||
esc DECTCEM l
|
||||
stty -icanon -echo
|
||||
hist=2
|
||||
}
|
||||
|
||||
file_escape() {
|
||||
tmp=$1 safe=
|
||||
|
||||
# loop over string char by char
|
||||
while c=${tmp%"${tmp#?}"}; do
|
||||
case $c in
|
||||
'') return ;;
|
||||
[[:cntrl:]]) safe=$safe\? ;;
|
||||
*) safe=$safe$c ;;
|
||||
esac
|
||||
|
||||
tmp=${tmp#?}
|
||||
done
|
||||
}
|
||||
|
||||
hist_search() {
|
||||
hist=0 j=1
|
||||
|
||||
for file do
|
||||
case ${PWD%%/}/$file in
|
||||
"$old_pwd") y=$j y2=$((j >= bottom ? mid : j)) cur=$file
|
||||
esac
|
||||
|
||||
j=$((j + 1))
|
||||
done
|
||||
}
|
||||
|
||||
list_print() {
|
||||
esc ED2
|
||||
esc CUP
|
||||
|
||||
i=1
|
||||
end=$((bottom + 1))
|
||||
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
||||
|
||||
case $# in
|
||||
1) [ -e "$1" ] || [ "$1" = 'no results' ] || set -- empty
|
||||
esac
|
||||
|
||||
case $hist in
|
||||
2) # redraw after cmd run
|
||||
shift "$((y > y2 ? y - y2 : 0))"
|
||||
;;
|
||||
|
||||
1) # redraw after go-to-parent
|
||||
hist_search "$@"
|
||||
shift "$((y >= bottom ? y - mid : 0))"
|
||||
;;
|
||||
|
||||
*) # everything else
|
||||
shift "$((y >= bottom ? y - bottom : 0))"
|
||||
;;
|
||||
esac
|
||||
|
||||
for file do
|
||||
case $i in
|
||||
"$y2") esc SGR 0 7
|
||||
esac
|
||||
|
||||
case $((i - end)) in
|
||||
-*)
|
||||
line_format "$file"
|
||||
esc CUD
|
||||
;;
|
||||
esac
|
||||
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
esc CUP "$((y > y2 ? y2 : y))"
|
||||
}
|
||||
|
||||
redraw() {
|
||||
list_print "$@"
|
||||
status_line "$#"
|
||||
}
|
||||
|
||||
status_line() {
|
||||
esc DECSC
|
||||
esc CUP "$LINES"
|
||||
|
||||
case $USER in
|
||||
root) esc SGR 31 7 ;;
|
||||
*) esc SGR 34 7 ;;
|
||||
esac
|
||||
|
||||
printf '%*s\r%s ' "$COLUMNS" "" "($y/$1)"
|
||||
|
||||
case $ltype in
|
||||
'') printf %s "$PWD" ;;
|
||||
*) printf %s "$ltype"
|
||||
esac
|
||||
|
||||
esc SGR 0 0
|
||||
esc DECRC
|
||||
}
|
||||
|
||||
prompt() {
|
||||
esc DECSC
|
||||
esc CUP "$LINES"
|
||||
printf %s "$1"
|
||||
esc DECTCEM h
|
||||
esc EL0
|
||||
|
||||
case $2 in
|
||||
r)
|
||||
stty icanon echo
|
||||
read -r ans ||:
|
||||
stty -icanon -echo
|
||||
;;
|
||||
esac
|
||||
|
||||
esc DECRC
|
||||
esc DECTCEM l
|
||||
status_line "($y/$#) $PWD"
|
||||
}
|
||||
|
||||
line_print() {
|
||||
offset=$1
|
||||
|
||||
case $offset in
|
||||
"$y") esc SGR 0 7
|
||||
esac
|
||||
|
||||
shift "$offset"
|
||||
|
||||
case $offset in
|
||||
"$y") cur=$1
|
||||
esac
|
||||
|
||||
line_format "$1"
|
||||
}
|
||||
|
||||
line_format() {
|
||||
file_escape "$1"
|
||||
[ -d "$1" ] && esc SGR 1 31
|
||||
printf %s "$safe"
|
||||
[ -d "$1" ] && printf /
|
||||
esc SGR 0 0
|
||||
esc EL0
|
||||
printf '\r'
|
||||
}
|
||||
|
||||
main() {
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
-h|--help)
|
||||
printf 'shfm -[hv] <starting dir>\n'
|
||||
exit 0
|
||||
;;
|
||||
|
||||
-v|--version)
|
||||
printf 'shfm 0.4.2\n'
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
cd -- "${1:-"$PWD"}"
|
||||
;;
|
||||
esac
|
||||
|
||||
esc_c=$(printf '\033')
|
||||
bs_char=$(printf '\177')
|
||||
|
||||
set -- *
|
||||
cur=$1
|
||||
|
||||
term_resize
|
||||
term_setup
|
||||
|
||||
trap 'term_reset' EXIT INT
|
||||
trap 'term_resize; term_setup; y=1 y2=1; redraw "$@"' WINCH
|
||||
|
||||
y=1 y2=1
|
||||
redraw "$@"
|
||||
|
||||
while key=$(dd ibs=1 count=1 2>/dev/null); do
|
||||
case $key${esc:=0} in
|
||||
k?|A2)
|
||||
term_scroll_up "$@"
|
||||
;;
|
||||
|
||||
j?|B2)
|
||||
term_scroll_down "$@"
|
||||
;;
|
||||
|
||||
l?|C2|"$esc") # ARROW RIGHT
|
||||
if [ -d "$cur" ] && cd -- "$cur" >/dev/null 2>&1; then
|
||||
set -- *
|
||||
y=1 y2=1 cur=$1 ltype=
|
||||
redraw "$@"
|
||||
|
||||
elif [ -e "$cur" ]; then
|
||||
cmd_run "${SHFM_OPENER:="${EDITOR:=vi}"}" "$cur"
|
||||
redraw "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
h?|D2|"$bs_char"?) # ARROW LEFT
|
||||
old_pwd=$PWD
|
||||
|
||||
case $ltype in
|
||||
'') cd .. || continue ;;
|
||||
*) ltype= ;;
|
||||
esac
|
||||
|
||||
set -- *
|
||||
y=1 y2=1 cur=$1 hist=1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
g?)
|
||||
case $y in
|
||||
1) continue
|
||||
esac
|
||||
|
||||
y=1 y2=1 cur=$1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
G?)
|
||||
y=$#
|
||||
y2=$(($# < bottom ? $# : bottom))
|
||||
line_print "$y" "$@"
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
.?)
|
||||
case ${hidden:=1} in
|
||||
1) hidden=0; set -- .* ;;
|
||||
0) hidden=1; set -- *
|
||||
esac
|
||||
|
||||
y=1 y2=1 cur=$1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
:?)
|
||||
prompt "cd: " r
|
||||
|
||||
# false positive, behavior intentional
|
||||
# shellcheck disable=2088
|
||||
case $ans in
|
||||
'~') ans=$HOME ;;
|
||||
'~/'*) ans=$HOME/${ans#"~/"}
|
||||
esac
|
||||
|
||||
cd -- "${ans:="$0"}" >/dev/null 2>&1|| continue
|
||||
set -- *
|
||||
y=1 y2=1 cur=$1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
/?)
|
||||
prompt / r
|
||||
|
||||
IFS=
|
||||
# globbing intentional, word splitting is disabled.
|
||||
# shellcheck disable=2086
|
||||
set -- $ans*
|
||||
unset IFS
|
||||
|
||||
case $1$# in
|
||||
"$ans*1") set -- 'no results'
|
||||
esac
|
||||
|
||||
y=1 y2=1 cur=$1 ltype="search $PWD/$ans*"
|
||||
redraw "$@"
|
||||
status_line "$#"
|
||||
;;
|
||||
|
||||
-?)
|
||||
cd -- "$OLDPWD" >/dev/null 2>&1|| continue
|
||||
set -- *
|
||||
y=1 y2=1 cur=$1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
\~?)
|
||||
cd || continue
|
||||
set -- *
|
||||
y=1 y2=1 cur=$1
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
\!?)
|
||||
export SHFM_LEVEL
|
||||
SHFM_LEVEL=$((SHFM_LEVEL + 1))
|
||||
cmd_run "${SHELL:=/bin/sh}"
|
||||
redraw "$@"
|
||||
;;
|
||||
|
||||
\??)
|
||||
set -- 'j - down' \
|
||||
'k - up' \
|
||||
'l - open file or directory' \
|
||||
'h - go up level' \
|
||||
'g - go to top' \
|
||||
'G - go to bottom' \
|
||||
'q - quit' \
|
||||
': - cd to <input>' \
|
||||
'/ - search current directory <input>*' \
|
||||
'- - go to last directory' \
|
||||
'~ - go home' \
|
||||
'! - spawn shell' \
|
||||
'. - toggle hidden files' \
|
||||
'? - show keybinds'
|
||||
|
||||
y=1 y2=1 cur=$1 ltype=keybinds
|
||||
redraw "$@"
|
||||
status_line "$#"
|
||||
;;
|
||||
|
||||
q?) exit 0 ;;
|
||||
|
||||
# handle keys which emit escape sequences
|
||||
"$esc_c"*) esc=1 ;;
|
||||
'[1') esc=2 ;;
|
||||
*) esc=0 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
main "$@" >/dev/tty
|
||||
Binary file not shown.
-233
@@ -1,233 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
_user_host(){
|
||||
local username hostname
|
||||
|
||||
username="${USER:-$(id -un)}"
|
||||
hostname="${HOSTNAME:-$(</etc/hostname)}"
|
||||
|
||||
userHost="$username@${hostname:-$(uname -n)}\n"
|
||||
}
|
||||
|
||||
_uptime(){
|
||||
local rawSeconds seconds days hours minutes
|
||||
|
||||
read -r rawSeconds _ </proc/uptime
|
||||
|
||||
seconds="${rawSeconds%.*}"
|
||||
((days=seconds/86400))|| days=''
|
||||
((hours=seconds%86400/3600))|| hours=''
|
||||
((minutes=seconds%3600/60))|| minutes=''
|
||||
|
||||
days="${days:+$days days, }"
|
||||
hours="${hours:+$hours hours, }"
|
||||
minutes="${minutes:+$minutes minutes}"
|
||||
uptime="${minutes:+\e[32mUptime\e[m: ${days}${hours}${minutes}\n}"
|
||||
}
|
||||
|
||||
_kernel_arch(){
|
||||
read -r kernel kernelRelease architecture < <(uname -srm)
|
||||
architecture="${architecture:-$HOSTTYPE}"
|
||||
kernelArch="${kernel:+\e[32mKernel\e[m: $kernel $kernelRelease $architecture\n}"
|
||||
}
|
||||
|
||||
_operating_system(){
|
||||
operatingSystem="${OSTYPE:-$(uname -o)}"
|
||||
|
||||
operatingSystem="${operatingSystem:+\e[32mOS\e[m: $operatingSystem\n}"
|
||||
}
|
||||
|
||||
_cpu(){
|
||||
local line processor freqDir curFreq maxFreq frequency
|
||||
|
||||
while read -r line; do
|
||||
[[ $line =~ ^'model name' ]]&&{ processor="${line#*: }"; break; }
|
||||
done </proc/cpuinfo
|
||||
|
||||
freqDir='/sys/devices/system/cpu/cpu0/cpufreq'
|
||||
|
||||
read -r maxFreq <"$freqDir/scaling_max_freq"
|
||||
maxFreq="${maxFreq::2}"
|
||||
: "${maxFreq#[0-9]}"
|
||||
maxFreq="${maxFreq%[0-9]}.$_"
|
||||
|
||||
read -r curFreq <"$freqDir"/scaling_cur_freq
|
||||
curFreq="${curFreq::2}"
|
||||
: "${curFreq#0-9}"
|
||||
curFreq="${curFreq%[0-9]}.$_"
|
||||
|
||||
frequency="${curFreq:+ $maxFreq@$curFreq}"
|
||||
cpu="${processor:+\e[32mCPU\e[m: $processor $frequency\n}"
|
||||
}
|
||||
|
||||
_gpu(){
|
||||
local line
|
||||
|
||||
while read -r line; do
|
||||
[[ $line =~ 'VGA'|'3D' ]]&&{ gpu="${line##*: }"; break; }
|
||||
done < <(lspci)
|
||||
|
||||
gpu="${gpu:+\e[32mGPU\e[m: $gpu\n}"
|
||||
}
|
||||
|
||||
_mobo(){
|
||||
local moboDir moboVendor moboName
|
||||
|
||||
moboDir='/sys/devices/virtual/dmi/id'
|
||||
read -r moboVendor <"$moboDir"/board_vendor
|
||||
read -r moboName <"$moboDir"/board_name
|
||||
|
||||
mobo="${moboVendor:+\e[32mMobo\e[m: $moboVendor $moboName\n}"
|
||||
}
|
||||
|
||||
_disk(){
|
||||
local line blockPath blockDevice blockSize blocksTotal blocksAvailable diskModel rawDiskTotal diskTotal
|
||||
|
||||
while read -r line; do
|
||||
[[ $line =~ '0 1'$ ]]&&{ blockPath="${line%% *}"; break; }
|
||||
done </etc/fstab
|
||||
blockDevice="${blockPath#/dev/}"
|
||||
|
||||
: "/sys/class/block/${blockDevice%[0-9]}/device/model"
|
||||
[[ -f $_ ]]&& read -r diskModel <"$_"
|
||||
|
||||
read -r _ _ _ _ blockSize _ blocksTotal _ blocksAvailable _ _ < <(stat --file-system --terse /)
|
||||
((partAvail=blockSize*blocksAvailable/1073741824))
|
||||
((partTotal=blockSize*blocksTotal/1073741824))
|
||||
((partUsed=partTotal-partAvail))
|
||||
|
||||
while read -r line; do
|
||||
[[ $line =~ sda$ ]]&&{ line="${line% *}" rawDiskTotal="${line##* }"; break; }
|
||||
done </proc/partitions
|
||||
((diskTotal=rawDiskTotal/1048576))
|
||||
|
||||
disk="${partAvail:+\e[32mDisk\e[m: $diskModel $diskTotal $partUsed/$partTotal GiB\n}"
|
||||
}
|
||||
|
||||
_ram(){
|
||||
local line rawMemory memActive memTotal memUsage
|
||||
|
||||
while read -r line; do
|
||||
case $line in
|
||||
MemTot*) rawMemory=("${line#*: }");;
|
||||
Active:*) rawMemory+=("${line#*:}"); break;;
|
||||
esac
|
||||
done </proc/meminfo
|
||||
|
||||
((memActive=${rawMemory[1]% kB}/1024))
|
||||
((memTotal=${rawMemory[0]% kB}/1024))
|
||||
|
||||
memUsage="$(awk 'BEGIN{printf "%.0f\n", ('$memActive'/'$memTotal')*100}')%"
|
||||
|
||||
ram="${memUsage:+\e[32mRAM\e[m: $memActive/$memTotal MiB $memUsage\n}"
|
||||
}
|
||||
|
||||
_kernel(){
|
||||
local kernelName kernelRel
|
||||
|
||||
read -r kernelName _ kernelRel _ </proc/version
|
||||
|
||||
kernel="${kernelName:+\e[32mKernel\e[m: $kernelName $kernelRel\n}"
|
||||
}
|
||||
|
||||
_distro(){
|
||||
local line
|
||||
|
||||
while read -r line; do
|
||||
[[ $line =~ ^'PRETTY'|^'NAME' ]]&&{
|
||||
line="${line#*=}" distro="${line//\"}"; break
|
||||
}
|
||||
done </etc/os-release
|
||||
|
||||
distro="${distro:+\e[32mDistro\e[m: $distro\n}"
|
||||
}
|
||||
|
||||
_genv(){
|
||||
local line
|
||||
|
||||
genv="${XDG_CURRENT_DESKTOP:-$DESKTOP_SESSION}"
|
||||
[[ ! $genv ]]&& hash wmctrl&&{
|
||||
while read -r line; do
|
||||
[[ $line =~ Name: ]]&&{ genv="${line#*: }"; break; }
|
||||
done < <(wmctrl -m)
|
||||
}
|
||||
|
||||
genv="${genv:+\e[32mGENV\e[m: $genv\n}"
|
||||
}
|
||||
|
||||
_packages(){
|
||||
local pkgCnt=0
|
||||
|
||||
pkgPath='/var/lib/pacman/local'
|
||||
[[ -d $pkgPath ]]&&{
|
||||
for _ in "$pkgPath"/*; do ((++pkgCnt)); done
|
||||
}
|
||||
|
||||
packages="${pkgCnt:+\e[32mPackages\e[m: $pkgCnt\n}"
|
||||
}
|
||||
|
||||
_swap(){
|
||||
local line curSwap maxSwap
|
||||
|
||||
while read -ra line; do
|
||||
(( ${i:=0} ))&&{
|
||||
((curSwap+=line[3]/1024))
|
||||
((maxSwap+=line[2]/1024))
|
||||
}|| ((++i))
|
||||
done </proc/swaps
|
||||
|
||||
swap="${curSwap:+\e[32mSwap\e[m: $curSwap/$maxSwap\n}"
|
||||
}
|
||||
|
||||
main(){
|
||||
_user_host
|
||||
_uptime
|
||||
_kernel_arch
|
||||
_operating_system
|
||||
_cpu
|
||||
_gpu
|
||||
_mobo
|
||||
_disk
|
||||
_ram
|
||||
_kernel
|
||||
_distro
|
||||
_genv
|
||||
_packages
|
||||
_swap
|
||||
|
||||
printf '\e[?7l'
|
||||
printf '%b' \
|
||||
"$userHost" \
|
||||
"$uptime" \
|
||||
"$kernelArch" \
|
||||
"$operatingSystem" \
|
||||
"$cpu" \
|
||||
"$gpu" \
|
||||
"$mobo" \
|
||||
"$disk" \
|
||||
"$ram" \
|
||||
"$kernel" \
|
||||
"$distro" \
|
||||
"$genv" \
|
||||
"$packages" \
|
||||
"$swap"
|
||||
printf '\e[?7h'
|
||||
}
|
||||
|
||||
stty -echo
|
||||
|
||||
if (( ${1:-0} > 0 )); then
|
||||
trap 'printf "\e[?1049l"; stty echo; exit' 2
|
||||
|
||||
printf '\e[?1049h'
|
||||
|
||||
for((;;)){
|
||||
printf '\e[2J\e[H'
|
||||
main
|
||||
sleep "$1"
|
||||
}
|
||||
else
|
||||
main
|
||||
fi
|
||||
|
||||
stty echo
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
print_little_tux() {
|
||||
echo " .--."
|
||||
echo " |o_o |"
|
||||
echo " |:_/ |"
|
||||
echo " // \ \ "
|
||||
echo " (| | )"
|
||||
echo "/'\_ _/\`\ "
|
||||
echo "\___)=(___/"
|
||||
}
|
||||
|
||||
print_big_tux() {
|
||||
echo " .88888888:."
|
||||
echo " 88888888.88888."
|
||||
echo " .8888888888888888."
|
||||
echo " 888888888888888888"
|
||||
echo " 88' _\`88'_ \`88888"
|
||||
echo " 88 88 88 88 88888"
|
||||
echo " 88_88_::_88_:88888"
|
||||
echo " 88:::,::,:::::8888"
|
||||
echo " 88\`:::::::::'\`8888"
|
||||
echo " .88 \`::::' 8:88."
|
||||
echo " 8888 \`8:888."
|
||||
echo " .8888' \`888888."
|
||||
echo " .8888:.. .::. ...:'8888888:."
|
||||
echo " .8888.' :' \`'::\`88:88888"
|
||||
echo " .8888 ' \`.888:8888."
|
||||
echo " 888:8 . 888:88888"
|
||||
echo " .888:88 .: 888:88888:"
|
||||
echo " 8888888. :: 88:888888"
|
||||
echo " \`.::.888. :: .88888888"
|
||||
echo " .::::::.888. :: :::\`8888'.:."
|
||||
echo " ::::::::::.888 ' .::::::::::::"
|
||||
echo " ::::::::::::.8 ' .:8::::::::::::."
|
||||
echo " .::::::::::::::. .:888:::::::::::::"
|
||||
echo " :::::::::::::::88:.__..:88888:::::::::::'"
|
||||
echo " \`'.:::::::::::88888888888.88:::::::::'"
|
||||
echo " \`':::_:' -- '' -'-' \`':_::::'\`"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
big|b|-b)
|
||||
print_big_tux
|
||||
;;
|
||||
little|l|-l)
|
||||
print_little_tux
|
||||
;;
|
||||
*)
|
||||
print_little_tux
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo reflector --protocol https --latest 5 --age 24 --sort rate --save /etc/pacman.d/mirrorlist
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [[ "$(id -u)" != "0" ]]; then
|
||||
echo "You must be root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#ip route del default via 172.17.132.1 dev enp3s0
|
||||
ip route add 172.17.0.0/16 via 172.17.132.1 dev eno1
|
||||
|
||||
#ip route del default via 192.168.48.1 dev enp3s0
|
||||
#ip route add 172.17.0.0/16 via 192.168.48.1 dev enp3s0
|
||||
#ip route add 192.168.48.0/23 via 192.168.48.1 dev enp3s0
|
||||
|
||||
Reference in new issue
Block a user