cleanup and setup improvements
This commit is contained in:
parent
fe06256876
commit
4d6250e630
@ -1,99 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ufetch-arch - tiny system info for arch
|
||||
# based on https://gitlab.com/jschx/ufetch
|
||||
# @modified by @nevaforget
|
||||
|
||||
## INFO
|
||||
|
||||
# user is already defined
|
||||
host="$(cat /etc/hostname)"
|
||||
os='MonarchOS / Arch Linux'
|
||||
kernel="$(uname -sr)"
|
||||
uptime="$(uptime -p | sed 's/up //')"
|
||||
packages="$(pacman -Q | wc -l)"
|
||||
shell="$(basename "${SHELL}")"
|
||||
userspace="$(df -h $HOME | awk 'NR==2{print $3}') / $(df -h $HOME | awk 'NR==2{print $2}') ($(df -h $HOME | awk 'NR==2{print $5}'))"
|
||||
cpu="$(grep -m 1 'model name' /proc/cpuinfo | awk -F':' '{ print $2 }' | sed -e 's/^[[:space:]]*//')"
|
||||
gpu=$(lspci | grep VGA | cut -d ":" -f3)
|
||||
|
||||
|
||||
## UI DETECTION
|
||||
|
||||
parse_rcs() {
|
||||
for f in "${@}"; do
|
||||
wm="$(tail -n 1 "${f}" 2> /dev/null | cut -d ' ' -f 2)"
|
||||
[ -n "${wm}" ] && echo "${wm}" && return
|
||||
done
|
||||
}
|
||||
|
||||
rcwm="$(parse_rcs "${HOME}/.xinitrc" "${HOME}/.xsession")"
|
||||
|
||||
ui='unknown'
|
||||
uitype='UI'
|
||||
if [ -n "${DE}" ]; then
|
||||
ui="${DE}"
|
||||
uitype='DE'
|
||||
elif [ -n "${WM}" ]; then
|
||||
ui="${WM}"
|
||||
uitype='WM'
|
||||
elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then
|
||||
ui="${XDG_CURRENT_DESKTOP}"
|
||||
uitype='DE'
|
||||
elif [ -n "${DESKTOP_SESSION}" ]; then
|
||||
ui="${DESKTOP_SESSION}"
|
||||
uitype='DE'
|
||||
elif [ -n "${rcwm}" ]; then
|
||||
ui="${rcwm}"
|
||||
uitype='WM'
|
||||
elif [ -n "${XDG_SESSION_TYPE}" ]; then
|
||||
ui="${XDG_SESSION_TYPE}"
|
||||
fi
|
||||
|
||||
ui="$(basename "${ui}")"
|
||||
|
||||
## DEFINE COLORS
|
||||
|
||||
# probably don't change these
|
||||
if [ -x "$(command -v tput)" ]; then
|
||||
bold="$(tput bold 2> /dev/null)"
|
||||
black="$(tput setaf 0 2> /dev/null)"
|
||||
red="$(tput setaf 1 2> /dev/null)"
|
||||
green="$(tput setaf 2 2> /dev/null)"
|
||||
yellow="$(tput setaf 3 2> /dev/null)"
|
||||
blue="$(tput setaf 4 2> /dev/null)"
|
||||
magenta="$(tput setaf 5 2> /dev/null)"
|
||||
cyan="$(tput setaf 6 2> /dev/null)"
|
||||
white="$(tput setaf 7 2> /dev/null)"
|
||||
reset="$(tput sgr0 2> /dev/null)"
|
||||
fi
|
||||
|
||||
# you can change these
|
||||
lc="${reset}${bold}${blue}" # labels
|
||||
nc="${reset}${bold}${blue}" # user and hostname
|
||||
ic="${reset}" # info
|
||||
c0="${reset}${blue}" # first color
|
||||
|
||||
## OUTPUT
|
||||
|
||||
cat <<EOF
|
||||
|
||||
${c0} .oMc ${nc}${USER}${ic}@${nc}${host}${reset}
|
||||
${c0} .MMMMMP ${lc}╭───────────── Software ─────────────${reset}
|
||||
${c0} .MM888MM ${lc}│ OS › ${ic}${os}${reset}
|
||||
${c0} .... .MM88888MP ${lc}│ KERNEL › ${ic}${kernel}${reset}
|
||||
${c0} MMMMMMMMb. d8MM8tt8MM ${lc}│ PACKAGES › ${ic}${packages}${reset}
|
||||
${c0} MM88888MMMMc I' dMME8ttt8MM ${lc}│ SHELL › ${ic}${shell}${reset}
|
||||
${c0} MM88tt888EMMcIdMM8E88tt88MP ${lc}│ ${uitype} › ${ic}${ui}${reset}
|
||||
${c0} MM8ttt888EEM8MMEEE8E888MC ${lc}├───────────── Hardware ─────────────${reset}
|
||||
${c0} MM888t8EEEM8MMEEE8t8888Mb ${lc}│ DISK › ${ic}${userspace}${reset}
|
||||
${c0} "MM88888tEM8"MME88ttt88MM ${lc}│ CPU › ${ic}${cpu}${reset}
|
||||
${c0} dM88ttt8EM8"MMM888ttt8MM ${lc}│ GPU › ${ic}${gpu}${reset}
|
||||
${c0} MM8ttt88MM" " "MMNICKMM" ${lc}├────────────── Uptime ──────────────${reset}
|
||||
${c0} 3M88888MM" "MMMP" ${lc}│ ${ic}${uptime}${reset}
|
||||
${c0} "MNICKM" ${lc}╰────────────────────────────────────${reset}
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
40
setup.sh
40
setup.sh
@ -60,14 +60,14 @@ function inst_ufw {
|
||||
function inst_configs {
|
||||
echo "-"
|
||||
echo "Overwrite some ${BOLD}configs${NORMAL}"
|
||||
echo "kitty, dunst, btop, lsd"
|
||||
echo "alacritty, dunst, btop, lsd"
|
||||
echo -n "${BOLD}Continue?${NORMAL} (Y/N) "
|
||||
read confirm_configs
|
||||
if [[ $confirm_configs == "Y" ]];
|
||||
then
|
||||
|
||||
cp -Rf $MOONARCH_DIR/home/config/kitty $HOME/.config/kitty
|
||||
chown $USER:$USER $HOME/.config/kitty
|
||||
cp -Rf $MOONARCH_DIR/home/config/alacritty $HOME/.config/alacritty
|
||||
chown $USER:$USER $HOME/.config/alacritty
|
||||
|
||||
cp -Rf $MOONARCH_DIR/home/config/dunst $HOME/.config/dunst
|
||||
chown $USER:$USER $HOME/.config/dunst
|
||||
@ -112,17 +112,18 @@ function inst_basic_pkgs {
|
||||
if [[ $confirm_basics == "Y" ]];
|
||||
then
|
||||
|
||||
declare -a pkg_list=(jq dunst network-manager-applet alarm-clock-applet man-db hardinfo networkmanager-openvpn udisks2 plocate vim kitty gettext-hostname neovim lsd alsa-utils ponymix btop powertop polkit lxsession timeshift timeshift-autosnap stacer-bin)
|
||||
declare -a pkg_list=(jq dunst network-manager-applet alarm-clock-applet man-db hardinfo networkmanager-openvpn udisks2 plocate vim alacritty gettext-hostname neovim lsd alsa-utils ponymix btop powertop polkit lxsession timeshift timeshift-autosnap pcmanfm librewolf)
|
||||
|
||||
for key in "${pkg_list[@]}"
|
||||
do
|
||||
pkg_inst $key
|
||||
done
|
||||
|
||||
cp $MOONARCH_DIR/usr/local/bin/volnote /usr/local/bin
|
||||
|
||||
paru -S informant
|
||||
sudo informant read --all
|
||||
|
||||
cp $MOONARCH_DIR/home/local/bin/* $HOME/.local/bin/
|
||||
fi
|
||||
}
|
||||
|
||||
@ -163,8 +164,6 @@ function inst_paru {
|
||||
|
||||
function post_always {
|
||||
|
||||
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
@ -176,7 +175,6 @@ function post_always {
|
||||
echo " "
|
||||
echo " "
|
||||
echo "Here are some optional packages... "
|
||||
echo "visual-studio-code-bin"
|
||||
echo "ungoogled-chromium"
|
||||
echo "filezilla"
|
||||
echo "lutris"
|
||||
@ -251,7 +249,7 @@ function inst_resources {
|
||||
|
||||
function inst_clamav {
|
||||
echo "-"
|
||||
echo "Installing ClamAV - Anti-Virus Scanner"
|
||||
echo "Installing ClamAV - Anti-Virus Scanner with freshclam and fangfrisch"
|
||||
echo -n "${BOLD}Continue?${NORMAL} (Y/N) "
|
||||
read confirm_clamav
|
||||
if [[ $confirm_clamav == "Y" ]];
|
||||
@ -267,6 +265,12 @@ function inst_clamav {
|
||||
sudo freshclam
|
||||
sudo -u clamav /usr/bin/fangfrisch --conf /etc/fangfrisch/fangfrisch.conf initdb
|
||||
sudo systemctl enable fangfrisch.timer
|
||||
|
||||
if command -v nemo &> /dev/null
|
||||
then
|
||||
cp -Rf $MONARCHOS_DIR/usr/share/nemo/actions/clamscan.nemo_action /usr/share/nemo/actions
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
@ -278,7 +282,7 @@ function set_gui {
|
||||
read confirm_gui
|
||||
if [[ $confirm_gui == "Y" ]];
|
||||
then
|
||||
declare -a pkg_list=(celluloid playerctl audacious font-manager viewnior thunar tumbler ffmpegthumbnailer pavucontrol viewnior ttf-hack-nerd ttf-joypixels sweet-cursor-theme-git arc-solid-gtk-theme flatery-icon-theme-git)
|
||||
declare -a pkg_list=(celluloid playerctl audacious font-manager viewnior thunar tumbler ffmpegthumbnailer pavucontrol viewnior ttf-hack-nerd ttf-joypixels sweet-cursor-theme-git catppuccin-gtk-theme-mocha flatery-icon-theme-git)
|
||||
for key in "${pkg_list[@]}"
|
||||
do
|
||||
pkg_inst $key
|
||||
@ -296,7 +300,7 @@ function set_gui {
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Catppuccin-Mocha-Standard-Lavender-Dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
gsettings set org.gnome.desktop.interface cursor-theme Sweet-cursors
|
||||
gsettings set org.cinnamon.desktop.default-applications.terminal exec kitty
|
||||
gsettings set org.cinnamon.desktop.default-applications.terminal exec alacritty
|
||||
|
||||
sudo mkdir -p /usr/local/share/fonts/
|
||||
sudo install -C $MOONARCH_DIR/usr/local/share/fonts/MonarchOS.ttf /usr/local/share/fonts/MonarchOS.ttf
|
||||
@ -367,7 +371,7 @@ function inst_screenshot {
|
||||
pkg_inst $key
|
||||
done
|
||||
|
||||
cp -Rf $MOONARCH_DIR/usr/local/bin/hyprm-screenshot /usr/local/bin
|
||||
cp -f $MOONARCH_DIR/usr/local/bin/hyprm-screenshot /usr/local/bin/
|
||||
fi
|
||||
}
|
||||
|
||||
@ -378,7 +382,7 @@ function inst_hypr {
|
||||
read confirm_hypr
|
||||
if [[ $confirm_hypr == "Y" ]];
|
||||
then
|
||||
declare -a pkg_list=(wayland xorg-xwayland hyprland swaybg waypaper-git xdg-desktop-portal-hyprland wdisplays waybar-cava nwg-look cliphist slurp grim hyprland-interactive-screenshot satty-bin swappy swaylock-effects cava)
|
||||
declare -a pkg_list=(wayland xorg-xwayland hyprland swaybg waypaper-git xdg-desktop-portal-hyprland wdisplays waybar nwg-look cliphist swaylock-effects)
|
||||
for key in "${pkg_list[@]}"
|
||||
do
|
||||
pkg_inst $key
|
||||
@ -477,7 +481,7 @@ function inst_sddm {
|
||||
|
||||
function inst_nemo {
|
||||
echo "-"
|
||||
echo "Installing Nemo - Cinnamon File Manager"
|
||||
echo "Installing Nemo - Cinnamon File Manager with extensions"
|
||||
echo -n "${BOLD}Continue?${NORMAL} (Y/N) "
|
||||
read confirm_nemo
|
||||
if [[ $confirm_nemo == "Y" ]];
|
||||
@ -512,14 +516,15 @@ function init {
|
||||
type paru >/dev/null 2>&1 || { echo >&2 "I require paru but it's not installed. Aborting."; exit 1; }
|
||||
|
||||
inst_basic_pkgs
|
||||
inst_nemo
|
||||
inst_zsh
|
||||
|
||||
inst_sddm
|
||||
inst_bspwm
|
||||
inst_hypr
|
||||
inst_bspwm
|
||||
set_gui
|
||||
|
||||
inst_rofi
|
||||
inst_nemo
|
||||
inst_zsh
|
||||
|
||||
inst_ufw
|
||||
inst_clamav
|
||||
@ -531,7 +536,6 @@ function init {
|
||||
inst_screenshot
|
||||
inst_code
|
||||
|
||||
set_gui
|
||||
post_always
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user