mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 05:40:38 -04:00
more script adds
This commit is contained in:
parent
a11d325a19
commit
e1df303d71
15 changed files with 621 additions and 0 deletions
45
Scripts/.extra/custom_flat.lst
Normal file
45
Scripts/.extra/custom_flat.lst
Normal file
|
@ -0,0 +1,45 @@
|
|||
# ------------------------------------------- // System
|
||||
com.github.tchx84.Flatseal # Flatseal
|
||||
# org.gnome.Boxes # Boxes
|
||||
# com.usebottles.bottles # Bottles
|
||||
# io.github.dimtpap.coppwr # Coppwr
|
||||
|
||||
# ------------------------------------------- // Browser
|
||||
com.brave.Browser # Brave
|
||||
# org.torproject.torbrowser-launcher # Tor
|
||||
|
||||
# ------------------------------------------- // Social
|
||||
# io.github.spacingbat3.webcord # Webcord
|
||||
# dev.vencord.Vesktop # Vesktop
|
||||
com.discordapp.Discord # Discord
|
||||
org.signal.Signal # Signal
|
||||
|
||||
# ------------------------------------------- // Productivity
|
||||
# md.obsidian.Obsidian # Obsidian
|
||||
# org.mozilla.Thunderbird # Thunderbird
|
||||
# io.github.alainm23.planify # Planify
|
||||
|
||||
# ------------------------------------------- // Image/Graphics
|
||||
org.inkscape.Inkscape # Inkscape
|
||||
org.kde.krita # Krita
|
||||
org.gimp.GIMP # Gimp
|
||||
org.blender.Blender # Blender
|
||||
io.gitlab.theevilskeleton.Upscaler # ImageUpscaler
|
||||
|
||||
# ------------------------------------------- // Photography
|
||||
# org.gnome.Shotwell # Shotwell
|
||||
# org.darktable.Darktable # Darktable
|
||||
# org.kde.digikam # Digikam
|
||||
org.gnome.eog # ImageViewer
|
||||
|
||||
# ------------------------------------------- // Audio/Video
|
||||
# com.spotify.Client # Spotify
|
||||
# org.kde.kdenlive # Kdenlive
|
||||
com.obsproject.Studio # Obs
|
||||
com.github.rafostar.Clapper # Clapper
|
||||
com.github.unrud.VideoDownloader # VideoDownloader
|
||||
|
||||
# ------------------------------------------- // Gaming
|
||||
# hu.kramo.Cartridges # Cartridges
|
||||
# com.github.Matoking.protontricks # ProtonTricks
|
||||
# net.davidotek.pupgui2 # ProtonUp
|
34
Scripts/.extra/install_fpk.sh
Executable file
34
Scripts/.extra/install_fpk.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
#|---/ /+-----------------------------------+---/ /|#
|
||||
#|--/ /-| Script to install flatpaks (user) |--/ /-|#
|
||||
#|-/ /--| Prasanth Rangan |-/ /--|#
|
||||
#|/ /---+-----------------------------------+/ /---|#
|
||||
|
||||
BaseDir=`dirname "$(realpath "$0")"`
|
||||
ScrDir=`dirname "$(dirname "$(realpath "$0")")"`
|
||||
|
||||
source $ScrDir/global_fn.sh
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Error: unable to source global_fn.sh, please execute from $(dirname "$(realpath "$0")")..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! pkg_installed flatpak
|
||||
then
|
||||
sudo pacman -S flatpak
|
||||
fi
|
||||
|
||||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flats=`awk -F '#' '{print $1}' $BaseDir/custom_flat.lst | sed 's/ //g' | xargs`
|
||||
|
||||
flatpak install --user -y flathub ${flats}
|
||||
flatpak remove --unused
|
||||
|
||||
GtkTheme=`gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g"`
|
||||
GtkIcon=`gsettings get org.gnome.desktop.interface icon-theme | sed "s/'//g"`
|
||||
|
||||
flatpak --user override --filesystem=~/.themes
|
||||
flatpak --user override --filesystem=~/.icons
|
||||
|
||||
flatpak --user override --env=GTK_THEME=${GtkTheme}
|
||||
flatpak --user override --env=ICON_THEME=${GtkIcon}
|
80
Scripts/.extra/install_hyp.sh
Normal file
80
Scripts/.extra/install_hyp.sh
Normal file
|
@ -0,0 +1,80 @@
|
|||
#!/bin/env bash
|
||||
source global_fn.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: unable to source global_fn.sh, please execute from $(dirname $(realpath $0))..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
hyprland_clone="$HOME/.cache/hyprdots/Hyprland-clone"
|
||||
|
||||
chk_aurh
|
||||
|
||||
if ! pkg_installed hyprland-git ; then
|
||||
$aurhlpr ${use_default} -S hyprland-git || true
|
||||
if ! pkg_installed hyprland-git ; then #? redunduncy
|
||||
echo -e "\n\033[0;31mWARNING!!! READ ME!\033[0m"
|
||||
cat << WARN
|
||||
|
||||
Hyprland installation failed!
|
||||
Please check your internet connection and consider reporting the issue to your package manager's support.
|
||||
For manual installation of Hyprland, you can proceed with this installation or follow the guide at https://wiki.hyprland.org/Getting-Started/Installation/ (Press any key to exit)
|
||||
|
||||
|
||||
Note: This process is a work around.
|
||||
Typically, it's recommended to use package managers for installations/updates as they handle the process more efficiently.
|
||||
|
||||
IMPORTANT: After installation with this method please be aware that you should install hyprland with your package manager if already available.
|
||||
example: "$aurhlpr -Sy hyprland-git", or run ./install.sh again
|
||||
|
||||
The script will now attempt to:
|
||||
1. Manually compile and install Hyprland.
|
||||
2. Check and install any missing dependencies.
|
||||
3. Clone Hyprland to $hyprland_clone
|
||||
4. Execute [ make all && sudo make install ]
|
||||
|
||||
Please ensure you have sufficient permissions, internet connection and disk space for this operation.
|
||||
|
||||
WARN
|
||||
echo ""
|
||||
read -n 1 -s -r -p "[ENTER/SPACE:yes ANY:no] Do you want to proceed with the installation? " key
|
||||
[[ -z "$key" ]] || exit 0
|
||||
|
||||
echo -e "\nChecking dependencies..."
|
||||
dependencies=(gdb ninja gcc cmake meson libxcb xcb-proto xcb-util xcb-util-keysyms libxfixes libx11 libxcomposite xorg-xinput libxrender pixman wayland-protocols cairo pango seatd libxkbcommon xcb-util-wm xorg-xwayland libinput libliftoff libdisplay-info cpio tomlplusplus)
|
||||
missing_dependencies=()
|
||||
for dependency in "${dependencies[@]}"; do
|
||||
if ! pkg_installed $dependency; then
|
||||
missing_dependencies+=($dependency)
|
||||
fi
|
||||
done
|
||||
if [ ${#missing_dependencies[@]} -gt 0 ]; then
|
||||
echo "Missing dependencies: ${missing_dependencies[@]}"
|
||||
echo "Installing missing dependencies..."
|
||||
$aurhlpr ${use_default} -S ${missing_dependencies[@]}
|
||||
fi
|
||||
|
||||
if cd "$hyprland_clone" 2>/dev/null; then
|
||||
git fetch
|
||||
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
|
||||
echo "Changes are available in the remote repository. Pulling changes..."
|
||||
git reset --hard
|
||||
git clean -fd
|
||||
git pull
|
||||
else
|
||||
if command -v Hyprland >/dev/null; then
|
||||
echo -e "\033[1;33mLatest version of Hyprland is already compiled and installed!\033[0m"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
else
|
||||
mkdir -p "$hyprland_clone"
|
||||
git clone --recursive https://github.com/hyprwm/Hyprland "$hyprland_clone"
|
||||
cd $hyprland_clone
|
||||
fi
|
||||
|
||||
echo "Compiling Directory: $(pwd)"
|
||||
make all && sudo make install
|
||||
fi
|
||||
else
|
||||
echo -e "\033[0;32m[OK]\033[0m Hyprland"
|
||||
fi
|
17
Scripts/.extra/install_mod.sh
Executable file
17
Scripts/.extra/install_mod.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
#|---/ /+-----------------------------------------------+---/ /|#
|
||||
#|--/ /-| Script to enable early loading for nvidia drm |--/ /-|#
|
||||
#|-/ /--| Prasanth Rangan |-/ /--|#
|
||||
#|/ /---+-----------------------------------------------+/ /---|#
|
||||
|
||||
|
||||
if [ `lspci -k | grep -A 2 -E "(VGA|3D)" | grep -i nvidia | wc -l` -gt 0 ] ; then
|
||||
if [ `grep 'MODULES=' /etc/mkinitcpio.conf | grep nvidia | wc -l` -eq 0 ] ; then
|
||||
sudo sed -i "/MODULES=/ s/)$/ nvidia nvidia_modeset nvidia_uvm nvidia_drm)/" /etc/mkinitcpio.conf
|
||||
sudo mkinitcpio -P
|
||||
if [ `grep 'options nvidia-drm modeset=1' /etc/modprobe.d/nvidia.conf | wc -l` -eq 0 ] ; then
|
||||
echo 'options nvidia-drm modeset=1' | sudo tee -a /etc/modprobe.d/nvidia.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
2
Scripts/.extra/mnt_drives.lst
Normal file
2
Scripts/.extra/mnt_drives.lst
Normal file
|
@ -0,0 +1,2 @@
|
|||
/dev/sdb1
|
||||
/dev/nvme0n1p1
|
71
Scripts/.extra/mnt_drives.sh
Executable file
71
Scripts/.extra/mnt_drives.sh
Executable file
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
#|---/ /+---------------------------+---/ /|#
|
||||
#|--/ /-| Script to mount my drives |--/ /-|#
|
||||
#|-/ /--| Prasanth Rangan |-/ /--|#
|
||||
#|/ /---+---------------------------+/ /---|#
|
||||
|
||||
# function to check device parameters
|
||||
|
||||
chk_blk()
|
||||
{
|
||||
local BlkParm=$1
|
||||
local MyDrive=$2
|
||||
local ChkFlag=$3
|
||||
|
||||
BlkVal=`lsblk --noheadings --raw -o $BlkParm $MyDrive`
|
||||
|
||||
if [ ! -z $BlkVal ] && [ $ChkFlag == 'y' ] ; then
|
||||
#echo "$MyDrive : $BlkParm is $BlkVal"
|
||||
return 0
|
||||
|
||||
elif [ -z $BlkVal ] && [ $ChkFlag == 'n' ] ; then
|
||||
#echo "$MyDrive : $BlkParm not available"
|
||||
return 0
|
||||
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
ext_lab()
|
||||
{
|
||||
local MyMount=$1
|
||||
local MyLabel=$2
|
||||
local MyDrive=""
|
||||
|
||||
MyDrive=`findmnt --mountpoint $MyMount --noheadings -o source`
|
||||
if [ `lsblk --noheadings --raw -o fstype $MyDrive` == "ext4" ] && chk_blk label $MyDrive n ; then
|
||||
sudo e2label $MyDrive $MyLabel
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# main loop to mount listed partition
|
||||
|
||||
while read dev_part
|
||||
do
|
||||
if chk_blk uuid $dev_part y && chk_blk label $dev_part y && chk_blk mountpoint $dev_part n ; then
|
||||
|
||||
dev_label=`lsblk --noheadings --raw -o label $dev_part`
|
||||
dev_uuid=`lsblk --noheadings --raw -o uuid $dev_part`
|
||||
dev_fstype=`lsblk --noheadings --raw -o fstype $dev_part`
|
||||
|
||||
if [ ! -d /mnt/$dev_label ] ; then
|
||||
sudo mkdir /mnt/$dev_label
|
||||
echo "/mnt/$dev_label dir created..."
|
||||
fi
|
||||
|
||||
if [ `grep $dev_uuid /etc/fstab | wc -l` -eq 0 ] ; then
|
||||
fstEntry=`echo -e "${fstEntry}\n# $dev_part \nUUID=$dev_uuid /mnt/$dev_label \t$dev_fstype \t\tnosuid,nodev,nofail,x-gvfs-show \t 0 0\n "`
|
||||
fi
|
||||
|
||||
sudo mount $dev_part /mnt/$dev_label
|
||||
fi
|
||||
done < mnt_drives.lst
|
||||
|
||||
echo -e "${fstEntry}\n" | sudo tee -a /etc/fstab
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
ext_lab '/home' '9S'
|
||||
ext_lab '/' 'YoRHa'
|
||||
|
84
Scripts/.extra/restore_app.sh
Executable file
84
Scripts/.extra/restore_app.sh
Executable file
|
@ -0,0 +1,84 @@
|
|||
#!/bin/bash
|
||||
#|---/ /+-----------------------------+---/ /|#
|
||||
#|--/ /-| Script to configure my apps |--/ /-|#
|
||||
#|-/ /--| Prasanth Rangan |-/ /--|#
|
||||
#|/ /---+-----------------------------+/ /---|#
|
||||
|
||||
ScrDir=`dirname "$(dirname "$(realpath "$0")")"`
|
||||
|
||||
source $ScrDir/global_fn.sh
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Error: unable to source global_fn.sh, please execute from $(dirname "$(realpath "$0")")..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CloneDir=`dirname "$(realpath $CloneDir)"`
|
||||
|
||||
|
||||
# icons
|
||||
if [ -f /usr/share/applications/rofi-theme-selector.desktop ] && [ -f /usr/share/applications/rofi.desktop ]
|
||||
then
|
||||
sudo rm /usr/share/applications/rofi-theme-selector.desktop
|
||||
sudo rm /usr/share/applications/rofi.desktop
|
||||
fi
|
||||
sudo sed -i "/^Icon=/c\Icon=adjust-colors" /usr/share/applications/nwg-look.desktop
|
||||
sudo sed -i "/^Icon=/c\Icon=spectacle" /usr/share/applications/swappy.desktop
|
||||
|
||||
|
||||
# steam
|
||||
#if pkg_installed steam
|
||||
# then
|
||||
# skinsDir="${XDG_DATA_HOME:-$HOME/.local/share}/Steam/Skins/"
|
||||
# if [ ! -d "$skinsDir" ]
|
||||
# then
|
||||
# mkdir -p "$skinsDir"
|
||||
# fi
|
||||
# tar -xzf ${CloneDir}/Source/arcs/Steam_Metro.tar.gz -C "$skinsDir"
|
||||
#fi
|
||||
|
||||
|
||||
# spotify
|
||||
if pkg_installed spotify && pkg_installed spicetify-cli
|
||||
then
|
||||
if [ ! -w /opt/spotify ] || [ ! -w /opt/spotify/Apps ]; then
|
||||
sudo chmod a+wr /opt/spotify
|
||||
sudo chmod a+wr /opt/spotify/Apps -R
|
||||
fi
|
||||
|
||||
spicetify &> /dev/null
|
||||
mkdir -p ~/.config/spotify
|
||||
touch ~/.config/spotify/prefs
|
||||
sptfyConf=$(spicetify -c)
|
||||
sed -i "/^prefs_path/ s+=.*$+= $HOME/.config/spotify/prefs+g" "${sptfyConf}"
|
||||
tar -xzf ${CloneDir}/Source/arcs/Spotify_Sleek.tar.gz -C ~/.config/spicetify/Themes/
|
||||
spicetify backup apply
|
||||
spicetify config current_theme Sleek
|
||||
spicetify config color_scheme Wallbash
|
||||
spicetify apply
|
||||
fi
|
||||
|
||||
|
||||
# firefox
|
||||
if pkg_installed firefox
|
||||
then
|
||||
FoxRel=$(find ~/.mozilla/firefox -maxdepth 1 -type d -name "*.default-release" | head -1)
|
||||
|
||||
if [ -z "${FoxRel}" ] ; then
|
||||
firefox &> /dev/null &
|
||||
sleep 1
|
||||
FoxRel=$(find ~/.mozilla/firefox -maxdepth 1 -type d -name "*.default-release" | head -1)
|
||||
else
|
||||
BkpDir="${HOME}/.config/cfg_backups/$(date +'%y%m%d_%Hh%Mm%Ss')_apps"
|
||||
mkdir -p "${BkpDir}"
|
||||
cp -r ~/.mozilla/firefox "${BkpDir}"
|
||||
fi
|
||||
|
||||
tar -xzf ${CloneDir}/Source/arcs/Firefox_UserConfig.tar.gz -C "${FoxRel}"
|
||||
tar -xzf ${CloneDir}/Source/arcs/Firefox_Extensions.tar.gz -C ~/.mozilla/
|
||||
|
||||
find ~/.mozilla/extensions -maxdepth 1 -type f -name "*.xpi" | while read fext
|
||||
do
|
||||
firefox -profile "${FoxRel}" "${fext}" &> /dev/null &
|
||||
done
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue