mirror of
https://github.com/szymon-jozef/superior_dotfiles.git
synced 2026-10-27 19:20:38 +01:00
Update .config/mimeapps.list
Update .local/bin/system_setup.sh
This commit is contained in:
@@ -18,19 +18,19 @@ x-scheme-handler/nxm-protocol=ModOrganizer-steamtinkerlaunch-dl.desktop
|
|||||||
image/png=feh.desktop
|
image/png=feh.desktop
|
||||||
image/jpeg=feh.desktop
|
image/jpeg=feh.desktop
|
||||||
x-scheme-handler/freetube=FreeTube.desktop
|
x-scheme-handler/freetube=FreeTube.desktop
|
||||||
audio/hx-aac-adts=vlc.desktop
|
audio/hx-aac-adts=mpv.desktop
|
||||||
audio/*=vlc.desktop
|
audio/*=mpv.desktop
|
||||||
image/*=feh.desktop
|
image/*=feh.desktop
|
||||||
image/webp=feh.desktop
|
image/webp=feh.desktop
|
||||||
image/gif=feh.desktop
|
image/gif=feh.desktop
|
||||||
image/bmp=feh.desktop
|
image/bmp=feh.desktop
|
||||||
image/svg+xml=feh.desktop
|
image/svg+xml=feh.desktop
|
||||||
audio/mpeg=vlc.desktop
|
audio/mpeg=mpv.desktop
|
||||||
audio/flac=vlc.desktop
|
audio/flac=mpv.desktop
|
||||||
audio/ogg=vlc.desktop
|
audio/ogg=mpv.desktop
|
||||||
audio/wav=vlc.desktop
|
audio/wav=mpv.desktop
|
||||||
audio/aac=vlc.desktop
|
audio/aac=mpv.desktop
|
||||||
audio/x-hx-aac-adts=vlc.desktop
|
audio/x-hx-aac-adts=mpv.desktop
|
||||||
application/pdf=org.pwmt.zathura.desktop
|
application/pdf=org.pwmt.zathura.desktop
|
||||||
|
|
||||||
[Added Associations]
|
[Added Associations]
|
||||||
|
|||||||
@@ -8,150 +8,287 @@ RESET='\033[0m'
|
|||||||
|
|
||||||
# functions
|
# functions
|
||||||
function install_yay() {
|
function install_yay() {
|
||||||
echo "Yay is not installed, installing..."
|
echo "Checking if yay is installed..."
|
||||||
sudo pacman -S --needed git base-devel
|
if ! command -v yay &> /dev/null; then
|
||||||
tmpdir="$(mktemp -d)"
|
echo "Yay is not installed, installing..."
|
||||||
git clone https://aur.archlinux.org/yay.git "$tmpdir"
|
sudo pacman -S --needed git base-devel
|
||||||
cd "$tmpdir"
|
tmpdir="$(mktemp -d)"
|
||||||
makepkg -si
|
git clone https://aur.archlinux.org/yay.git "$tmpdir"
|
||||||
cd -
|
cd "$tmpdir"
|
||||||
rm -rf "$tmpdir"
|
makepkg -si || { echo "Yay installation failed!"; exit 1; }
|
||||||
|
cd -
|
||||||
|
rm -rf "$tmpdir"
|
||||||
|
fi
|
||||||
|
echo "Yay is installed!"
|
||||||
}
|
}
|
||||||
# pkgs lists
|
# pkgs lists
|
||||||
HYPR_PKGS="
|
|
||||||
hyprcursor
|
HYPRLAND_UI="
|
||||||
hyprgraphics
|
|
||||||
hypridle
|
|
||||||
hyprland
|
hyprland
|
||||||
hyprland-qt-support
|
hyprland-protocols
|
||||||
hyprland-qtutils
|
|
||||||
hyprlang
|
|
||||||
hyprlock
|
|
||||||
swww
|
|
||||||
waypaper
|
|
||||||
hyprpolkitagent
|
|
||||||
hyprsunset
|
|
||||||
hyprutils
|
|
||||||
hyprwayland-scanner
|
|
||||||
xdg-desktop-portal-hyprland
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
mako
|
|
||||||
libnotify
|
|
||||||
hyprlauncher
|
hyprlauncher
|
||||||
|
hypridle
|
||||||
|
hyprlock
|
||||||
|
hyprpaper
|
||||||
|
hyprpolkitagent
|
||||||
|
hyprpwcenter
|
||||||
|
hyprsunset
|
||||||
|
hyprwire
|
||||||
|
waybar
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
swww
|
||||||
|
wl-clipboard
|
||||||
|
nwg-displays
|
||||||
|
nwg-look
|
||||||
|
waypaper
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
mako
|
||||||
|
notification-daemon
|
||||||
|
libnotify
|
||||||
|
sddm
|
||||||
"
|
"
|
||||||
|
|
||||||
SOUND_PKGS="
|
THEME="
|
||||||
|
adw-gtk-theme
|
||||||
|
catppuccin-gtk-theme-latte
|
||||||
|
papirus-icon-theme
|
||||||
|
rose-pine-cursor
|
||||||
|
rose-pine-hyprcursor
|
||||||
|
|
||||||
|
"
|
||||||
|
|
||||||
|
AUDIO="
|
||||||
pipewire
|
pipewire
|
||||||
wireplumber
|
|
||||||
pipewire-audio
|
|
||||||
pipewire-alsa
|
pipewire-alsa
|
||||||
pipewire-pulse
|
pipewire-pulse
|
||||||
|
wireplumber
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
cava
|
||||||
"
|
"
|
||||||
UTIL_PKGS="
|
|
||||||
|
NETWORK="
|
||||||
|
networkmanager
|
||||||
|
network-manager-applet
|
||||||
|
blueman
|
||||||
|
bluez
|
||||||
|
bluez-utils
|
||||||
|
bluez-cups
|
||||||
|
openssh
|
||||||
|
sshfs
|
||||||
|
aria2
|
||||||
|
wget
|
||||||
|
rclone
|
||||||
|
"
|
||||||
|
|
||||||
|
PRINTERS="
|
||||||
|
cups
|
||||||
|
cups-browsed
|
||||||
|
cups-pdf
|
||||||
|
system-config-printer
|
||||||
|
sane
|
||||||
|
sane-airscan
|
||||||
|
"
|
||||||
|
|
||||||
|
FILESYSTEM="
|
||||||
|
btrfs-progs
|
||||||
|
btrfs-assistant
|
||||||
|
snapper
|
||||||
|
ntfs-3g
|
||||||
|
dosfstools
|
||||||
|
zip
|
||||||
|
7zip
|
||||||
|
rsync
|
||||||
|
trash-cli
|
||||||
|
"
|
||||||
|
|
||||||
|
TERMINAL_TOOLS="
|
||||||
fish
|
fish
|
||||||
neovim
|
|
||||||
uwsm
|
|
||||||
python3
|
|
||||||
util-linux
|
|
||||||
libnewt
|
|
||||||
kitty
|
|
||||||
yazi
|
yazi
|
||||||
playerctl
|
playerctl
|
||||||
flatpak
|
atuin
|
||||||
wl-clipboard
|
zoxide
|
||||||
scx-scheds
|
eza
|
||||||
man-db
|
|
||||||
fastfetch
|
|
||||||
btop
|
|
||||||
file
|
|
||||||
nerd-fonts
|
|
||||||
ffmpeg
|
|
||||||
7zip
|
|
||||||
jq
|
|
||||||
poppler
|
|
||||||
fd
|
fd
|
||||||
ripgrep
|
ripgrep
|
||||||
fzf
|
fzf
|
||||||
zoxide
|
duf
|
||||||
imagemagick
|
gdu
|
||||||
bat
|
fastfetch
|
||||||
eza
|
tealdeer
|
||||||
npm
|
man-db
|
||||||
bc
|
bc
|
||||||
|
mediainfo
|
||||||
|
"
|
||||||
|
|
||||||
|
DEV="
|
||||||
|
cmake
|
||||||
|
go
|
||||||
|
rust
|
||||||
|
rust-analyzer
|
||||||
|
python-pip
|
||||||
|
prettier
|
||||||
|
npm
|
||||||
|
pandoc-cli
|
||||||
|
tectonic
|
||||||
chezmoi
|
chezmoi
|
||||||
|
neovim
|
||||||
|
lazygit
|
||||||
github-cli
|
github-cli
|
||||||
openssh
|
|
||||||
socat
|
|
||||||
otf-font-awesome
|
|
||||||
papirus-icon-theme
|
|
||||||
hicolor-icon-theme
|
|
||||||
noto-fonts-emoji
|
|
||||||
cliphist
|
|
||||||
"
|
"
|
||||||
|
|
||||||
GUI_PKGS="
|
GAMES="
|
||||||
zen-browser-bin
|
|
||||||
vesktop
|
|
||||||
mangohud
|
|
||||||
goverlay
|
|
||||||
steam
|
steam
|
||||||
gimp
|
heroic-games-launcher-bin
|
||||||
gamescope
|
lutris
|
||||||
|
wine
|
||||||
|
winetricks
|
||||||
|
protontricks
|
||||||
|
prismlauncher
|
||||||
gamemode
|
gamemode
|
||||||
bluez
|
gamescope
|
||||||
bluez-utils
|
mangohud
|
||||||
blueman
|
lact
|
||||||
waybar
|
goverlay
|
||||||
heroic-games-launcher
|
"
|
||||||
|
|
||||||
|
MULTIMEDIA="
|
||||||
|
mpv
|
||||||
|
satty
|
||||||
|
gimp
|
||||||
|
kdenlive
|
||||||
|
imagemagick
|
||||||
feh
|
feh
|
||||||
slurp
|
|
||||||
grim
|
|
||||||
"
|
"
|
||||||
|
|
||||||
PRINT_PKGS="
|
DOCUMENTS="
|
||||||
cups
|
zathura
|
||||||
cups-browsed
|
zathura-pdf-poppler
|
||||||
"
|
"
|
||||||
|
|
||||||
THEME_PKGS="
|
USERSPACE="
|
||||||
catppuccin-gtk-theme-latte
|
gurk
|
||||||
|
vesktop
|
||||||
|
openrgb
|
||||||
|
homebank
|
||||||
|
winboat
|
||||||
|
freetube
|
||||||
|
zen-browser-bin
|
||||||
"
|
"
|
||||||
|
|
||||||
PKGS=( $HYPR_PKGS $SOUND_PKGS $UTIL_PKGS $GUI_PKGS $PRINT_PKGS )
|
declare -A presets
|
||||||
|
presets[minimal]="$HYPRLAND_UI $AUDIO $TERMINAL_TOOLS"
|
||||||
|
presets[normal]="$HYPRLAND_UI $AUDIO $TERMINAL_TOOLS $THEME $NETWORK $FILESYSTEM $USERSPACE $DOCUMENTS $MULTIMEDIA $PRINTERS $DEV $GAMES"
|
||||||
|
|
||||||
echo "Downloading packages..."
|
wants_help=false
|
||||||
sudo pacman -Syu --needed "${PKGS[@]}"
|
list=false
|
||||||
|
list_presets=false
|
||||||
|
install=false
|
||||||
|
uninstall=false
|
||||||
|
preset=""
|
||||||
|
|
||||||
if ! groups "$USER" | grep -qw "gamemode"; then
|
help_message="Super cool system setup utility that downloads all the packages you could possibly need!\n
|
||||||
sudo usermod -aG gamemode "$USER"
|
How to use this bad boy:\n\n
|
||||||
|
\t--help - show this help message and leave\n
|
||||||
|
\t--list - list what is in given preset and leave. You can only use this option with --preset!\n
|
||||||
|
\t--preset - choose a preset you want to use\n
|
||||||
|
\t--install - installs given preset to your system\n
|
||||||
|
\t--uninstall - uninstall given preset from your system. Possibly very stupid, because presets contain important system packages, like your window manager!\n\n
|
||||||
|
Thanks for using my super cool script :D
|
||||||
|
"
|
||||||
|
if [ "$EUID" -eq 0 ]; then
|
||||||
|
echo -e "${RED}Please do not run this script as root.${RESET}"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! echo $PATH | grep -q "$HOME/.local/bin"; then
|
if [[ -z "$1" ]]; then
|
||||||
fish -c "fish_add_path \"$HOME/.local/bin\""
|
echo "You need to give me some arguments... Try --help if you don't know what you're doing"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! echo $SHELL | grep -qw "/usr/bin/fish"; then
|
while [ -n "$1" ]; do
|
||||||
chsh -s "$(command -v fish)"
|
case $1 in
|
||||||
|
--list-presets)
|
||||||
|
list_presets=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--list)
|
||||||
|
list=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--preset)
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
preset="$2"
|
||||||
|
shift 2
|
||||||
|
else
|
||||||
|
echo "Error: --preset requires one argument"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
wants_help=true
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--install)
|
||||||
|
install=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--uninstall)
|
||||||
|
uninstall=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$1 is not a valid option! What are you even doing?!"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# show help and exit
|
||||||
|
if [[ "$wants_help" = true ]]; then
|
||||||
|
echo -e "$help_message"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! pacman -Q yay &>/dev/null; then
|
if [[ "$list_presets" = true ]]; then
|
||||||
|
echo -e "Existing presets:\n\tmiminal - a minimal preset with not a lot of stuff\n\tnormal - preset with everything you could possibly need"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# check if preset was chosen
|
||||||
|
if [[ -v presets[$preset] ]]; then
|
||||||
|
|
||||||
|
# list and exit
|
||||||
|
if [[ "$list" = true ]]; then
|
||||||
|
echo "Preset $preset contains:"
|
||||||
|
echo "${presets[$preset]}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if yay is installed and install it if needed
|
||||||
install_yay
|
install_yay
|
||||||
|
|
||||||
|
# install given packages
|
||||||
|
if [[ "$install" = true ]]; then
|
||||||
|
echo "Downloading preset: $preset"
|
||||||
|
yay -Syu ${presets[$preset]} --needed
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# uninstall given preset
|
||||||
|
if [[ "$uninstall" = true ]]; then
|
||||||
|
reassurance=""
|
||||||
|
read -p "Are you sure you want to do this very stupid thing? Type I AM VERY DUM to continue..." reassurance
|
||||||
|
if [[ $reassurance = "I AM VERY DUM" ]]; then
|
||||||
|
echo "Uninstalling preset: $preset"
|
||||||
|
yay -Rns ${presets[$preset]}
|
||||||
|
else
|
||||||
|
echo "Canceled uninstall"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Yay is installed..."
|
echo "Given preset does not exists..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Flatpak install..."
|
|
||||||
|
|
||||||
flatpak update --noninteractive
|
|
||||||
flatpak install --noninteractive com.github.tchx84.Flatseal com.spotify.Client
|
|
||||||
|
|
||||||
echo "Services setup..."
|
|
||||||
|
|
||||||
systemctl --user enable hypridle hyprpolkitagent pipewire-pulse
|
|
||||||
sudo systemctl enable bluetooth cups
|
|
||||||
|
|
||||||
echo "Downloading theme with yay..."
|
|
||||||
yay -S $THEME_PKGS --needed
|
|
||||||
|
|
||||||
echo -e "${BOLD}${GREEN}All done!${RESET}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user