Merge branch 'upstream-main' into fcitx5
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -77,7 +80,7 @@ if [ -d ~/dotfiles ] || ! test -L ~/.bashrc || [ -d ~/.config/hypr ] || [ -d ~/.
|
||||
if ! test -L ~/.config/swappy && [ -d ~/.config/swappy ] ;then
|
||||
echo " - $HOME/.config/swappy/"
|
||||
fi
|
||||
|
||||
echo
|
||||
# Start Backup
|
||||
|
||||
if gum confirm "Do you want to create a backup?" ;then
|
||||
@@ -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/"
|
||||
|
||||
@@ -11,8 +11,9 @@ fi
|
||||
if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then
|
||||
echo "Backup is already available here ~/dotfiles-versions/backups/$datets/.bashrc-old"
|
||||
fi
|
||||
echo
|
||||
if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
||||
bash_confirm="Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?"
|
||||
bash_confirm="Do you want to replace your existing .bashrc file with the ML4W dotfiles .bashrc file?"
|
||||
if gum confirm "$bash_confirm" ;then
|
||||
rm ~/.bashrc
|
||||
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
|
||||
@@ -22,7 +23,7 @@ if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
|
||||
echo "Installation of the .bashrc file skipped."
|
||||
fi
|
||||
else
|
||||
bash_confirm="Do you want to install the dotfiles .bashrc file now?"
|
||||
bash_confirm="Do you want to install the ML4W dotfiles .bashrc file now?"
|
||||
if gum confirm "$bash_confirm" ;then
|
||||
if [ -L ~/.bashrc ] || [ -f ~/.bashrc ]; then
|
||||
rm ~/.bashrc
|
||||
|
||||
@@ -36,6 +36,17 @@ 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
|
||||
|
||||
# Replace pfetch and neofetch with fastfetch
|
||||
sed -i "s/pfetch/fastfetch/g" ~/dotfiles/.bashrc
|
||||
sed -i "s/neofetch/fastfetch/g" ~/dotfiles/.bashrc
|
||||
|
||||
# Create default folder structure
|
||||
xdg-user-dirs-update
|
||||
echo
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Confirm Start
|
||||
# ------------------------------------------------------
|
||||
|
||||
echo "You can cancel the installation at any time with CTRL + C"
|
||||
SCRIPT=$(realpath "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
|
||||
@@ -18,7 +17,8 @@ if [ ! -d ~/dotfiles ];then
|
||||
if gum confirm "DO YOU WANT TO START THE INSTALLATION OF THE ML4W DOTFILES NOW?" ;then
|
||||
echo "Installation started."
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
echo ":: Installation canceled."
|
||||
exit;
|
||||
@@ -27,7 +27,8 @@ else
|
||||
if gum confirm "DO YOU WANT TO START THE UPDATE OF YOUR ML4W DOTFILES NOW?" ;then
|
||||
echo ":: Update started."
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
echo ":: Update canceled."
|
||||
exit 130
|
||||
else
|
||||
echo ":: Update canceled."
|
||||
exit;
|
||||
|
||||
@@ -13,22 +13,23 @@ fi
|
||||
if [ ! -d ~/dotfiles ]; then
|
||||
echo "The script will now remove existing directories and files from ~/.config/"
|
||||
echo "and copy your prepared configuration from ~/dotfiles-versions/$version to ~/dotfiles"
|
||||
echo ""
|
||||
echo
|
||||
echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory."
|
||||
echo ""
|
||||
echo
|
||||
fi
|
||||
if [[ ! $(tty) == *"pts"* ]] && [ -d ~/dotfiles ]; then
|
||||
echo "You're running the script in tty. You can delete the existing ~/dotfiles folder now for a clean installation."
|
||||
echo "If not, the script will overwrite existing files but will not remove additional files or folders of your custom configuration."
|
||||
echo ""
|
||||
echo
|
||||
else
|
||||
if [ -d ~/dotfiles ]; then
|
||||
echo "The script will overwrite existing files but will not remove additional files or folders from your custom configuration."
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
if [ ! -d ~/dotfiles ]; then
|
||||
echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS in .config IF NEEDED!"
|
||||
echo ""
|
||||
echo
|
||||
fi
|
||||
|
||||
if gum confirm "Do you want to install the prepared dotfiles now?" ;then
|
||||
@@ -50,8 +51,10 @@ if gum confirm "Do you want to install the prepared dotfiles now?" ;then
|
||||
echo "Skipped: DEV MODE!"
|
||||
fi
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
echo ":: Installation canceled"
|
||||
exit 130
|
||||
else
|
||||
echo ":: Installation canceled"
|
||||
exit
|
||||
fi
|
||||
echo ""
|
||||
echo
|
||||
|
||||
28
.install/diagnosis.sh
Normal file
28
.install/diagnosis.sh
Normal 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."
|
||||
echo
|
||||
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 ""
|
||||
@@ -2,6 +2,7 @@
|
||||
# Disable display manager
|
||||
# ------------------------------------------------------
|
||||
disman=0
|
||||
profile="Hyprland"
|
||||
echo -e "${GREEN}"
|
||||
figlet "Display Manager"
|
||||
echo -e "${NONE}"
|
||||
@@ -30,72 +31,94 @@ 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")
|
||||
echo
|
||||
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")
|
||||
echo
|
||||
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")
|
||||
echo
|
||||
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")
|
||||
echo
|
||||
dmsel=$(gum choose "Keep current setup" "Install sddm and theme")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${dmsel}" ] ;then
|
||||
echo "Installation canceled."
|
||||
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
|
||||
echo "Install sddm"
|
||||
yay -S --noconfirm sddm sddm-sugar-candy-git --ask 4
|
||||
echo ":: Install sddm"
|
||||
yay -S --noconfirm sddm --ask 4
|
||||
|
||||
# Enable sddm
|
||||
if [ -f /etc/systemd/system/display-manager.service ]; then
|
||||
sudo rm /etc/systemd/system/display-manager.service
|
||||
fi
|
||||
sudo systemctl enable sddm.service
|
||||
|
||||
# Create sddm.conf.d folder
|
||||
if [ ! -d /etc/sddm.conf.d/ ]; then
|
||||
sudo mkdir /etc/sddm.conf.d
|
||||
echo "Folder /etc/sddm.conf.d created."
|
||||
echo ":: Folder /etc/sddm.conf.d created."
|
||||
fi
|
||||
|
||||
# Copy sddm.conf
|
||||
sudo cp sddm/sddm.conf /etc/sddm.conf.d/
|
||||
echo "File /etc/sddm.conf.d/sddm.conf updated."
|
||||
echo ":: File /etc/sddm.conf.d/sddm.conf updated."
|
||||
|
||||
# Download and install sugar candy theme if not exists
|
||||
if [ ! -d /usr/share/sddm/themes/sugar-candy ]; then
|
||||
if [ -f ~/Downloads/sddm-sugar-candy-master.zip ] ;then
|
||||
rm ~/Downloads/sddm-sugar-candy-master.zip
|
||||
fi
|
||||
wget -P ~/Downloads/ https://framagit.org/MarianArlt/sddm-sugar-candy/-/archive/master/sddm-sugar-candy-master.zip
|
||||
if [ -f ~/Downloads/sddm-sugar-candy-master.zip ] ;then
|
||||
unzip -o -q ~/Downloads/sddm-sugar-candy-master.zip -d ~/Downloads/
|
||||
if [ ! -d /usr/share/sddm/themes/sugar-candy ] ;then
|
||||
sudo mkdir -p /usr/share/sddm/themes/sugar-candy
|
||||
fi
|
||||
sudo cp -r ~/Downloads/sddm-sugar-candy-master/* /usr/share/sddm/themes/sugar-candy
|
||||
echo ":: SDDM Sugar Candy Theme installed"
|
||||
else
|
||||
echo "ERROR: Sugar Candy Download not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install background wallpaper for sddm
|
||||
if [ -f /usr/share/sddm/themes/sugar-candy/theme.conf ]; then
|
||||
|
||||
# Cache file for holding the current wallpaper
|
||||
sudo cp wallpapers/default.jpg /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.jpg
|
||||
echo "Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
||||
|
||||
echo ":: Default wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
|
||||
sudo cp sddm/theme.conf /usr/share/sddm/themes/sugar-candy/
|
||||
sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.jpg"'/' /usr/share/sddm/themes/sugar-candy/theme.conf
|
||||
echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/"
|
||||
|
||||
echo ":: File theme.conf updated in /usr/share/sddm/themes/sugar-candy/"
|
||||
fi
|
||||
|
||||
elif [ "$dmsel" == "Deactivate current display manager" ] ;then
|
||||
|
||||
sudo rm /etc/systemd/system/display-manager.service
|
||||
echo "Current display manager deactivated."
|
||||
echo ":: Current display manager deactivated."
|
||||
disman=1
|
||||
|
||||
elif [ "$dmsel" == "Keep current setup" ] ;then
|
||||
echo "Keep current setup."
|
||||
echo ":: sddm setup skipped."
|
||||
else
|
||||
echo "Keep current setup."
|
||||
echo ":: sddm setup skipped."
|
||||
fi
|
||||
|
||||
@@ -6,9 +6,13 @@ echo -e "${GREEN}"
|
||||
figlet "Hook"
|
||||
echo -e "${NONE}"
|
||||
echo ":: The script has detected a hook.sh script."
|
||||
echo
|
||||
if gum confirm "Do you want to run the script now?"; then
|
||||
source ~/dotfiles-versions/hook.sh
|
||||
echo ":: hook.sh executed!"
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
echo ":: Execution of hook.sh skipped."
|
||||
fi
|
||||
|
||||
@@ -37,5 +37,11 @@ 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
|
||||
if [ -d ~/dotfiles-versions/$version/fastfetch ]; then
|
||||
_installSymLink fastfetch ~/.config/fastfetch ~/dotfiles/fastfetch/ ~/.config
|
||||
fi
|
||||
echo ":: Symbolic links created."
|
||||
echo
|
||||
echo
|
||||
|
||||
@@ -6,4 +6,5 @@ gtk
|
||||
README.md
|
||||
CHANGELOG
|
||||
LICENSE
|
||||
install.sh
|
||||
install.sh
|
||||
setup.sh
|
||||
@@ -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
|
||||
}
|
||||
@@ -7,10 +7,11 @@ echo -e "${NONE}"
|
||||
if [ -d ~/dotfiles ] ;then
|
||||
echo "Do you want to check for new packages only (faster installation)"
|
||||
echo "or do you want to reinstall all packages again? (more robust and can help to fix issues)"
|
||||
echo
|
||||
if gum confirm "How do you want to proceed?" --affirmative "New packages only" --negative "Force reinstallation" ;then
|
||||
force_install=0
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo "Installation canceled."
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
force_install=1
|
||||
@@ -18,10 +19,11 @@ if [ -d ~/dotfiles ] ;then
|
||||
else
|
||||
echo "Do you want to reinstall all already installed packages and install the required new packages? (recommended and more robust)"
|
||||
echo "or do you want to install the new required packages only? (could be faster installation)"
|
||||
echo
|
||||
if gum confirm "How do you want to proceed?" --affirmative "Reinstall all packages" --negative "Install new packages only" ;then
|
||||
force_install=1
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo "Installation canceled."
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
force_install=0
|
||||
|
||||
@@ -6,48 +6,85 @@ echo -e "${GREEN}"
|
||||
figlet "Keyboard"
|
||||
echo -e "${NONE}"
|
||||
|
||||
# Default layout and variants
|
||||
keyboard_layout="us"
|
||||
|
||||
_setupKeyboardLayout() {
|
||||
echo ""
|
||||
echo "Start typing = Search, RETURN = Confirm, CTRL-C = Cancel"
|
||||
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||
echo ""
|
||||
echo ":: Keyboard layout changed to $keyboard_layout"
|
||||
echo ""
|
||||
_confirmKeyboard
|
||||
}
|
||||
|
||||
_confirmKeyboard() {
|
||||
echo "Current selected keyboard setup:"
|
||||
echo "Keyboard layout: $keyboard_layout"
|
||||
if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then
|
||||
return 0
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
else
|
||||
_setupKeyboardLayout
|
||||
fi
|
||||
}
|
||||
|
||||
setkeyboard=0
|
||||
if [ "$restored" == "1" ]; then
|
||||
echo ":: You have already restored your settings into the new installation."
|
||||
else
|
||||
echo "You can repeat the keyboard setup again to choose between a desktop and laptop optimized configuration."
|
||||
echo
|
||||
if gum confirm "Do you want to setup your keyboard again?" ;then
|
||||
setkeyboard=0
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
echo ":: Keyboard setup skipped."
|
||||
setkeyboard=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$setkeyboard" == "0" ] ;then
|
||||
|
||||
# Default layout and variants
|
||||
keyboard_layout="us"
|
||||
keyboard_variant=""
|
||||
|
||||
_setupKeyboardLayout() {
|
||||
keyboard_layout=$(localectl list-x11-keymap-layouts | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||
echo ":: Keyboard layout changed to $keyboard_layout"
|
||||
_setupKeyboardVariant
|
||||
}
|
||||
|
||||
_setupKeyboardVariant() {
|
||||
if gum confirm "Do you want to set a variant of the keyboard?" ; then
|
||||
keyboard_variant=$(localectl list-x11-keymap-variants | gum filter --height 15 --placeholder "Find your keyboard layout...")
|
||||
echo ":: Keyboard variant changed to $keyboard_variant"
|
||||
fi
|
||||
_confirmKeyboard
|
||||
}
|
||||
|
||||
_confirmKeyboard() {
|
||||
echo
|
||||
echo "Current selected keyboard setup:"
|
||||
echo "Keyboard layout: $keyboard_layout"
|
||||
echo "Keyboard variant: $keyboard_variant"
|
||||
echo
|
||||
if gum confirm "Do you want proceed with this keyboard setup?" --affirmative "Proceed" --negative "Change" ;then
|
||||
return 0
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
else
|
||||
_setupKeyboardLayout
|
||||
fi
|
||||
}
|
||||
|
||||
_confirmKeyboard
|
||||
|
||||
cp .install/templates/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
|
||||
if gum confirm "Are you using a laptop and would you like to enable the laptop presets?"; then
|
||||
cp .install/templates/keyboard-laptop.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
echo "source = ~/dotfiles/hypr/conf/layouts/laptop.conf" > ~/dotfiles-versions/$version/hypr/conf/layout.conf
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
cp .install/templates/keyboard-default.conf ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
fi
|
||||
cp .install/templates/autostart.sh ~/dotfiles-versions/$version/qtile/autostart.sh
|
||||
|
||||
SEARCH="KEYBOARD_LAYOUT"
|
||||
REPLACE="$keyboard_layout"
|
||||
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
|
||||
SEARCH="KEYBOARD_VARIANT"
|
||||
REPLACE="$keyboard_variant"
|
||||
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
|
||||
|
||||
SEARCH="KEYBOARD_LAYOUT"
|
||||
REPLACE="$keyboard_layout"
|
||||
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/autostart.sh
|
||||
|
||||
echo ""
|
||||
echo ":: Keyboard setup updated successfully."
|
||||
echo
|
||||
echo ":: Keyboard setup complete."
|
||||
echo
|
||||
echo "PLEASE NOTE: You can update your keyboard layout later in ~/dotfiles/hypr/conf/keyboard.conf"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
7
.install/neovim.sh
Normal file → Executable file
7
.install/neovim.sh
Normal file → Executable file
@@ -6,9 +6,14 @@ 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."
|
||||
echo
|
||||
if gum confirm "Do you want to install the ML4W Neovim configuration?"; then
|
||||
echo ":: ML4W Neovim configuration will be installed"
|
||||
neovim=1
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
rm -rf ~/dotfiles-versions/$version/nvim/
|
||||
echo ":: Installation of ML4W Neovim configuration skipped."
|
||||
|
||||
@@ -11,8 +11,8 @@ packagesPacman=(
|
||||
"dunst"
|
||||
"starship"
|
||||
"mpv"
|
||||
"freerdp"
|
||||
"thunar"
|
||||
"thunar"
|
||||
"nautilus"
|
||||
"mousepad"
|
||||
"noto-fonts"
|
||||
"otf-font-awesome"
|
||||
@@ -26,9 +26,10 @@ packagesPacman=(
|
||||
"python-psutil"
|
||||
"python-rich"
|
||||
"python-click"
|
||||
"python-pywal"
|
||||
"python-gobject"
|
||||
"pavucontrol"
|
||||
"tumbler"
|
||||
"blueman"
|
||||
"papirus-icon-theme"
|
||||
"breeze-icons"
|
||||
"polkit-gnome"
|
||||
@@ -38,6 +39,7 @@ packagesPacman=(
|
||||
"nm-connection-editor"
|
||||
"gvfs"
|
||||
"xdg-user-dirs"
|
||||
"xdg-desktop-portal-gtk"
|
||||
"networkmanager"
|
||||
"network-manager-applet"
|
||||
"xarchiver"
|
||||
@@ -46,17 +48,18 @@ packagesPacman=(
|
||||
"fuse2"
|
||||
"gtk4"
|
||||
"libadwaita"
|
||||
"python-pywal"
|
||||
"xdg-desktop-portal"
|
||||
"qalculate-gtk"
|
||||
"imagemagick"
|
||||
"guvcview"
|
||||
"jq"
|
||||
"rofi-wayland"
|
||||
"fastfetch"
|
||||
"blueman"
|
||||
);
|
||||
|
||||
packagesYay=(
|
||||
"pfetch"
|
||||
"bibata-cursor-theme"
|
||||
"trizen"
|
||||
"pacseek"
|
||||
"rofi-lbonn-wayland"
|
||||
);
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
packagesPacman=(
|
||||
"hyprland"
|
||||
"hyprpaper"
|
||||
"hyprlock"
|
||||
"hypridle"
|
||||
"xdg-desktop-portal-hyprland"
|
||||
"waybar"
|
||||
"grim"
|
||||
"slurp"
|
||||
"swappy"
|
||||
"cliphist"
|
||||
"hyprlock"
|
||||
"hypridle"
|
||||
);
|
||||
|
||||
packagesYay=(
|
||||
"swww"
|
||||
"wlogout"
|
||||
"nwg-look"
|
||||
"emote"
|
||||
"eww"
|
||||
"hyprshade"
|
||||
);
|
||||
|
||||
55
.install/paralleldownloads.sh
Executable file
55
.install/paralleldownloads.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# ------------------------------------------------------
|
||||
# Activate parallel downloads
|
||||
# ------------------------------------------------------
|
||||
|
||||
# Search for the line containing "ParallelDownloads = 5"
|
||||
line=$(grep "ParallelDownloads = 5" /etc/pacman.conf)
|
||||
|
||||
# Check if the line starts with a '#' character
|
||||
if [[ $line == \#* ]]; then
|
||||
echo -e "${GREEN}"
|
||||
figlet "Downloads"
|
||||
echo -e "${NONE}"
|
||||
echo ":: You can activate parallel downloads in pacman.conf to speedup the download of packages?"
|
||||
if gum confirm "Do you want to activate parallel downloads?"; then
|
||||
|
||||
# Remove the '#' character from the beginning of the line
|
||||
echo ":: Modifying pacman.conf to enable parallel downloads."
|
||||
new_line=$(echo $line | sed 's/^#//')
|
||||
|
||||
# Replace the original line with the new line in the configuration file
|
||||
sudo sed -i "s/$line/$new_line/g" /etc/pacman.conf
|
||||
|
||||
# Display a message indicating that the line was modified
|
||||
echo ":: Modified line: $new_line"
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit
|
||||
else
|
||||
echo ":: Activation of parallel downloads skipped."
|
||||
fi
|
||||
else
|
||||
# Check if the line is already uncommented
|
||||
if [[ $line == ParallelDownloads\ =\ 5 ]]; then
|
||||
# Display a message indicating that the line does not need to be modified
|
||||
echo ":: pacman.conf already optimized for parallel downloads."
|
||||
else
|
||||
# Display a message indicating that the line is missing or commented out
|
||||
echo ":: Parallel downloads could not be activated. Required configuration in /etc/pacman.conf could not found."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Activate Color in pacman.conf
|
||||
if grep -Fxq "#Color" /etc/pacman.conf
|
||||
then
|
||||
sudo sed -i 's/^#Color/Color/' /etc/pacman.conf
|
||||
echo ":: Color activated in pacman.conf"
|
||||
else
|
||||
echo ":: Color is already activated in pacman.conf"
|
||||
fi
|
||||
if grep -Fxq "# Color" /etc/pacman.conf
|
||||
then
|
||||
sudo sed -i 's/^# Color/Color/' /etc/pacman.conf
|
||||
echo ":: Color activated in pacman.conf"
|
||||
fi
|
||||
echo
|
||||
@@ -4,13 +4,13 @@
|
||||
echo -e "${GREEN}"
|
||||
figlet "Profile"
|
||||
echo -e "${NONE}"
|
||||
|
||||
echo "SPACE = select/unselect a profile. RETURN = confirm. No selection = CANCEL"
|
||||
echo "Please select your installation profile."
|
||||
echo
|
||||
profile=$(gum choose --no-limit --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " "Hyprland" "Qtile")
|
||||
|
||||
if [ -z "${profile}" ] ;then
|
||||
echo "No profile selected. Installation canceled."
|
||||
echo ":: No profile selected. Installation canceled."
|
||||
exit
|
||||
else
|
||||
echo "Profile/s selected:" $profile
|
||||
echo ":: Profile/s selected:" $profile
|
||||
fi
|
||||
|
||||
@@ -6,9 +6,9 @@ echo -e "${GREEN}"
|
||||
figlet "Reboot"
|
||||
echo -e "${NONE}"
|
||||
echo "A reboot of your system is recommended."
|
||||
echo
|
||||
if gum confirm "Do you want to reboot your system now?" ;then
|
||||
echo ":: Rebooting now ..."
|
||||
sleep 3
|
||||
gum spin --spinner dot --title "Rebooting now..." -- sleep 3
|
||||
systemctl reboot
|
||||
elif [ $? -eq 130 ]; then
|
||||
exit 130
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,8 +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 ""
|
||||
echo
|
||||
restorelist=""
|
||||
if [ -f ~/dotfiles/.bashrc ]; then
|
||||
restorelist+="~/dotfiles/.bashrc "
|
||||
@@ -43,6 +42,10 @@ _showRestoreOptions() {
|
||||
restorelist+="~/dotfiles/hypr/conf/environment.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/environment.conf,"
|
||||
fi
|
||||
if [ -f ~/dotfiles/hypr/conf/layout.conf ] && [ -d ~/dotfiles/hypr/conf/layouts/ ]; then
|
||||
restorelist+="~/dotfiles/hypr/conf/layout.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/layout.conf,"
|
||||
fi
|
||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ] && [ -d ~/dotfiles/hypr/conf/windowrules/ ]; then
|
||||
restorelist+="~/dotfiles/hypr/conf/windowrule.conf "
|
||||
selectedlist+="~/dotfiles/hypr/conf/windowrule.conf,"
|
||||
@@ -88,7 +91,7 @@ _showRestoreOptions() {
|
||||
echo "No files selected to restore."
|
||||
confirmrestore=$(gum choose "Change restore" "Skip restore")
|
||||
if [ -z "${confirmrestore}" ] ;then
|
||||
echo "Installation canceled."
|
||||
echo ":: Installation canceled."
|
||||
exit
|
||||
fi
|
||||
if [ "$confirmrestore" == "Change restore" ]; then
|
||||
@@ -151,6 +154,12 @@ _startRestore() {
|
||||
echo ":: Hyprland environment.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/layout.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/layout.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/layout.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo ":: Hyprland layout.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/windowrule.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/windowrule.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# -----------------------------------------------------
|
||||
input {
|
||||
kb_layout = KEYBOARD_LAYOUT
|
||||
kb_variant =
|
||||
kb_variant = KEYBOARD_VARIANT
|
||||
kb_model =
|
||||
kb_options =
|
||||
numlock_by_default = true
|
||||
@@ -18,7 +18,13 @@ input {
|
||||
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
# for desktop
|
||||
natural_scroll = false
|
||||
|
||||
# for laptop
|
||||
# natural_scroll = yes
|
||||
# middle_button_emulation = true
|
||||
# clickfinger_behavior = 1
|
||||
}
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
30
.install/templates/keyboard-laptop.conf
Normal file
30
.install/templates/keyboard-laptop.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
# -----------------------------------------------------
|
||||
# Keyboard Layout
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
# -----------------------------------------------------
|
||||
input {
|
||||
kb_layout = KEYBOARD_LAYOUT
|
||||
kb_variant = KEYBOARD_VARIANT
|
||||
kb_model =
|
||||
kb_options =
|
||||
numlock_by_default = true
|
||||
mouse_refocus=false
|
||||
|
||||
# For United States
|
||||
# kb_layout = us
|
||||
# kb_variant = intl
|
||||
# kb_model = pc105
|
||||
# kb_options =
|
||||
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
# for desktop
|
||||
# natural_scroll = false
|
||||
|
||||
# for laptop
|
||||
natural_scroll = yes
|
||||
middle_button_emulation = true
|
||||
clickfinger_behavior = 1
|
||||
}
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
@@ -6,12 +6,14 @@ echo -e "${GREEN}"
|
||||
figlet "System Update"
|
||||
echo -e "${NONE}"
|
||||
echo "It's important that your system is up-to-date before you proceed."
|
||||
echo
|
||||
if gum confirm "Do you want to update your system with yay now?" ;then
|
||||
echo ":: Update started"
|
||||
yay
|
||||
elif [ $? -eq 130 ]; then
|
||||
echo ":: Installation canceled."
|
||||
exit 130
|
||||
else
|
||||
else
|
||||
echo ":: System update skipped"
|
||||
fi
|
||||
echo
|
||||
|
||||
@@ -4,6 +4,7 @@ echo -e "${GREEN}"
|
||||
figlet "KVM VM"
|
||||
echo -e "${NONE}"
|
||||
echo "The script has detected that you run the installation in a KVM virtual machine."
|
||||
echo
|
||||
if grep -Fxq "kvm.conf" ~/dotfiles-versions/$version/hypr/conf/environment.conf
|
||||
then
|
||||
echo ":: KVM Environment already set."
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# ------------------------------------------------------
|
||||
# Check if yay is installed
|
||||
# ------------------------------------------------------
|
||||
echo -e "${GREEN}"
|
||||
figlet "yay"
|
||||
echo -e "${NONE}"
|
||||
if sudo pacman -Qs yay > /dev/null ; then
|
||||
echo ":: yay is already installed!"
|
||||
else
|
||||
echo -e "${GREEN}"
|
||||
figlet "yay"
|
||||
echo -e "${NONE}"
|
||||
echo ":: yay is not installed. Starting the installation!"
|
||||
_installPackagesPacman "base-devel"
|
||||
SCRIPT=$(realpath "$0")
|
||||
@@ -18,4 +18,4 @@ else
|
||||
cd $temp_path
|
||||
echo ":: yay has been installed successfully."
|
||||
fi
|
||||
echo ""
|
||||
echo
|
||||
Reference in New Issue
Block a user