Merge branch 'upstream-main' into upstream-hidpi

This commit is contained in:
wyj
2024-05-05 16:34:49 -04:00
92 changed files with 1213 additions and 125 deletions
+9 -1
View File
@@ -21,4 +21,12 @@ sed -i "s|HOME|${HOME}|g" $HOME/dotfiles/apps/ml4w-dotfiles-settings.desktop
cp $HOME/dotfiles/apps/ml4w-dotfiles-settings.desktop $HOME/.local/share/applications
echo ":: ML4W Dotfiles Settings App installed successfully"
echo
sed -i "s|HOME|${HOME}|g" $HOME/dotfiles/apps/ml4w-hyprland-settings.desktop
cp $HOME/dotfiles/apps/ml4w-hyprland-settings.desktop $HOME/.local/share/applications
echo ":: ML4W Hyprland Settings App installed successfully"
echo
if [ -f ~/.config/ml4w-hyprland-settings/hyprctl.sh ] ;then
echo ":: Starting restore from ML4W Hyprland Settings App"
~/.config/ml4w-hyprland-settings/hyprctl.sh
fi
echo
+7
View File
@@ -44,6 +44,9 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/.
if ! test -L ~/.config/hypr && [ -d ~/.config/hypr ] ;then
echo " - $HOME/.config/hypr/"
fi
if ! test -L ~/.config/ml4w-hyprland-settings && [ -d ~/.config/ml4w-hyprland-settings ] ;then
echo " - $HOME/.config/ml4w-hyprland-settings/"
fi
if ! test -L ~/.config/rofi && [ -d ~/.config/rofi ] ;then
echo " - $HOME/.config/rofi/"
fi
@@ -107,6 +110,10 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/.
cp -r ~/.config/hypr ~/dotfiles-versions/backup/config
echo ":: Backup of $HOME/.config/hypr created in ~/dotfiles-versions/backup/config/"
fi
if ! test -L ~/.config/ml4w-hyprland-settings && [ -d ~/.config/ml4w-hyprland-settings ] ;then
cp -r ~/.config/ml4w-hyprland-settings ~/dotfiles-versions/backup/config
echo ":: Backup of $HOME/.config/ml4w-hyprland-settings created in ~/dotfiles-versions/backup/config/"
fi
if ! test -L ~/.config/qtile && [ -d ~/.config/rofi ] ;then
cp -r ~/.config/rofi ~/dotfiles-versions/backup/config
echo ":: Backup of $HOME/.config/rofi created in ~/dotfiles-versions/backup/config/"
+7
View File
@@ -36,6 +36,13 @@ if [ -d ~/dotfiles/hypr/settings/ ] ;then
echo ":: ~/dotfiles/hypr/settings removed."
fi
if [ -f ~/dotfiles/.settings/eww-monitor.sh ] ;then
if grep -q "echo" $HOME/dotfiles/.settings/eww-monitor.sh ; then
rm ~/dotfiles/.settings/eww-monitor.sh
echo ":: ~/dotfiles/.settings/eww-monitor.sh removed."
fi
fi
# Create default folder structure
xdg-user-dirs-update
echo
+28
View File
@@ -0,0 +1,28 @@
echo -e "${GREEN}"
figlet "System check"
echo -e "${NONE}"
echo "The system check will test that essential packages and "
echo "execution commands are available now on your system."
if gum confirm "Do you want to run a short system check?" ;then
_folderExists "$HOME/dotfiles" "Please repeat the installation."
_commandExists "rofi" "rofi-wayland"
_commandExists "dunst" "dunst"
_commandExists "waybar" "waybar"
_commandExists "hyprpaper" "hyprpaper"
_commandExists "hyprlock" "hyprpaper"
_commandExists "hypridle" "hyprpaper"
_commandExists "wal" "python-pywal"
_commandExists "gum" "gum"
_commandExists "wlogout" "wlogout"
_commandExists "eww" "eww"
_commandExists "magick" "imagemagick"
elif [ $? -eq 130 ]; then
exit 130
else
echo ":: System check skipped"
fi
echo ""
+5 -5
View File
@@ -30,25 +30,25 @@ if [ ! -d ~/dotfiles ];then
disman=0
echo "You have already installed a display manager on your system."
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm")
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm and theme")
else
disman=1
echo "There is no display manager installed on your system."
echo "After the installation/update of the dotfiles, you can start Hyprland with command Hyprland and Qtile with commmand Qtile (or startx)."
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Install sddm")
dmsel=$(gum choose "Keep current setup" "Install sddm and theme")
fi
else
if [ -f /etc/systemd/system/display-manager.service ]; then
disman=0
echo "You have already installed a display manager. If your display manager is working fine, you can keep the current setup."
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm")
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm and theme")
else
disman=1
echo "There is no display manager installed on your system. You're starting Hyprland/Qtile with commands on tty."
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Install sddm")
dmsel=$(gum choose "Keep current setup" "Install sddm and theme")
fi
fi
@@ -56,7 +56,7 @@ if [ -z "${dmsel}" ] ;then
echo "Installation canceled."
exit
fi
if [ "$dmsel" == "Install sddm" ] ;then
if [ "$dmsel" == "Install sddm and theme" ] ;then
disman=0
# Try to force the installation of sddm
+4 -1
View File
@@ -37,5 +37,8 @@ fi
if [ -d ~/dotfiles-versions/$version/swappy ]; then
_installSymLink swappy ~/.config/swappy ~/dotfiles/swappy/ ~/.config
fi
if [ -d ~/dotfiles-versions/$version/swappy ]; then
_installSymLink eww ~/.config/eww ~/dotfiles/eww/ ~/.config
fi
echo ":: Symbolic links created."
echo
echo
+22
View File
@@ -272,4 +272,26 @@ _replaceLineInFile() {
echo "ERROR: Target file not found."
sleep 2
fi
}
# ------------------------------------------------------
# System check
# ------------------------------------------------------
_commandExists() {
package="$1";
if ! type $package > /dev/null 2>&1; then
echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2"
else
echo ":: OK: $package command found."
fi
}
_folderExists() {
folder="$1";
if [ ! -d $folder ]; then
echo ":: ERROR: $folder doesn't exists. $2"
else
echo ":: OK: $folder found."
fi
}
Regular → Executable
+2 -1
View File
@@ -6,7 +6,8 @@ if [ -d ~/dotfiles/nvim ]; then
echo -e "${GREEN}"
figlet "Neovim"
echo -e "${NONE}"
if gum confirm "Do you want to install the ML4W Neovim configuration and overwrite your existing configuration?"; then
echo ":: The script has detected a nvim folder."
if gum confirm "Do you want to install the ML4W Neovim configuration?"; then
echo ":: ML4W Neovim configuration will be installed"
neovim=1
else
+4 -3
View File
@@ -11,7 +11,6 @@ packagesPacman=(
"dunst"
"starship"
"mpv"
"freerdp"
"thunar"
"mousepad"
"noto-fonts"
@@ -26,6 +25,8 @@ packagesPacman=(
"python-psutil"
"python-rich"
"python-click"
"python-pywal"
"python-gobject"
"pavucontrol"
"tumbler"
"blueman"
@@ -46,11 +47,12 @@ packagesPacman=(
"fuse2"
"gtk4"
"libadwaita"
"python-pywal"
"xdg-desktop-portal"
"qalculate-gtk"
"imagemagick"
"guvcview"
"jq"
"rofi-wayland"
);
packagesYay=(
@@ -58,5 +60,4 @@ packagesYay=(
"bibata-cursor-theme"
"trizen"
"pacseek"
"rofi-lbonn-wayland"
);
+1
View File
@@ -16,4 +16,5 @@ packagesYay=(
"wlogout"
"nwg-look"
"emote"
"eww"
);
+8 -1
View File
@@ -28,6 +28,13 @@ if [[ $(_isInstalledYay "swaylock-effects-git") == 0 ]]; then
echo
fi
# Remove rofi-lbonn-wayland
if [[ $(_isInstalledYay "rofi-lbonn-wayland") == 0 ]]; then
yay --noconfirm -Rns rofi-lbonn-wayland
echo ":: rofi-lbonn-wayland removed"
echo
fi
# Remove hypridle-bin
if [[ $(_isInstalledYay "hypridle-git") == 0 ]]; then
yay --noconfirm -Rns hypridle-git
@@ -40,7 +47,7 @@ if [[ $(_isInstalledYay "hypridle-git") == 0 ]]; then
echo
fi
# Remove hypridle-bin
# Remove hyprlock-bin
if [[ $(_isInstalledYay "hyprlock-git") == 0 ]]; then
yay --noconfirm -Rns hyprlock-git
if [ -f /usr/lib/debug/usr/bin/hyprlock.debug ] ;then
+1 -1
View File
@@ -8,7 +8,7 @@ monitorrestored=0
_showRestoreOptions() {
echo "The following configurations can be transferred into the new installation."
echo "(SPACE = select/unselect a profile. RETURN = confirm. ESC/No selection = Skip Restore)"
echo "(SPACE = select/unselect a profile. RETURN = confirm. CTRL-C/No selection = Skip Restore)"
echo ""
restorelist=""
if [ -f ~/dotfiles/.bashrc ]; then
+6 -4
View File
@@ -1,8 +1,10 @@
if [ "$restored" == "1" ]; then
echo -e "${GREEN}"
figlet "Restore Settings"
echo -e "${NONE}"
python .install/restore.py
if [ -f ~/dotfiles/.settings/settings.json ] ;then
echo -e "${GREEN}"
figlet "Restore Settings"
echo -e "${NONE}"
python .install/restore.py
fi
else
if [ -f ~/dotfiles/.settings/settings.json ] ;then
rm ~/dotfiles/.settings/settings.json