Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added hyprlang installation #24

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 11 Jan 2024
- dropped wlsunset
- added hyprlang build and install

## 02 Jan 2024
- Readme updated for cliphist instruction for ubuntu 23.10 users
Expand Down
48 changes: 48 additions & 0 deletions install-scripts/hyprlang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# hyprlang - hyprland and xdg-desktop-portal- dependencies #

## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
# Determine the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Change the working directory to the parent directory of the script
PARENT_DIR="$SCRIPT_DIR/.."
cd "$PARENT_DIR" || exit 1

source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"

# Set the name of the log file to include the current date and time
LOG="Install-Logs/install-$(date +%d-%H%M%S)_hyprlang.log"
MLOG="install-$(date +%d-%H%M%S)_hyprlang2.log"

##
printf "${NOTE} Installing hyprlang...\n"

# Check if hyprlang folder exists and remove it
if [ -d "hyprlang" ]; then
printf "${NOTE} Removing existing hyprlang folder...\n"
rm -rf "hyprlang"
fi

# Clone and build hyprlang
printf "${NOTE} Installing hyprlang...\n"
if git clone https://github.com/hyprwm/hyprlang.git; then
cd hyprlang || exit 1
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
if sudo cmake --install ./build 2>&1 | tee -a "$MLOG" ; then
printf "${OK} hyprlang installed successfully.\n" 2>&1 | tee -a "$MLOG"
else
echo -e "${ERROR} Installation failed for hyprlang." 2>&1 | tee -a "$MLOG"
fi
#moving the addional logs to Install-Logs directory
mv $MLOG ../Install-Logs/ || true
cd ..
else
echo -e "${ERROR} Download failed for hyprlang." 2>&1 | tee -a "$LOG"
fi


clear

3 changes: 1 addition & 2 deletions install-scripts/xdph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ if git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland;
mv $MLOG ../Install-Logs/ || true
cd ..
else
echo -e "${ERROR} Download failed for xdg-desktop-portal-hyprland." 2>&1 | tee -a "$MLOG"
mv $MLOG Install-Logs/ || true
echo -e "${ERROR} Download failed for xdg-desktop-portal-hyprland." 2>&1 | tee -a "$LOG"
fi

printf "\n\n"
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ execute_script "swww.sh"
execute_script "rofi-wayland.sh"
execute_script "pywal.sh"
execute_script "force-install.sh"
execute_script "hyprlang.sh"

#execute_script "cliphist.sh"

Expand Down