fix installation block
This commit is contained in:
+14
-10
@@ -88,7 +88,7 @@ say_yellow "Starting Chadwm setup..."
|
|||||||
|
|
||||||
CURRENT_DE="$(detect_de)"
|
CURRENT_DE="$(detect_de)"
|
||||||
CURRENT_DM="$(detect_display_manager)"
|
CURRENT_DM="$(detect_display_manager)"
|
||||||
CURRENT_USER=$(whoami)
|
REAL_USER=${SUDO_USER:-$(whoami)}
|
||||||
|
|
||||||
if [[ -z "$CURRENT_DE" ]]; then
|
if [[ -z "$CURRENT_DE" ]]; then
|
||||||
say_cyan -e "No Desktop Environment detected. Installing Chadwm (light setup with SDDM)..."
|
say_cyan -e "No Desktop Environment detected. Installing Chadwm (light setup with SDDM)..."
|
||||||
@@ -96,24 +96,28 @@ if [[ -z "$CURRENT_DE" ]]; then
|
|||||||
install_packages sddm picom feh acpi rofi dash imlib2 xsetroot
|
install_packages sddm picom feh acpi rofi dash imlib2 xsetroot
|
||||||
enable_graphical_target
|
enable_graphical_target
|
||||||
|
|
||||||
git clone https://github.com/siduck/chadwm --depth 1 ~/.config/chadwm
|
git clone https://github.com/siduck/chadwm --depth 1 "/home/$REAL_USER/.config/chadwm"
|
||||||
cd ~/.config/chadwm/
|
|
||||||
mv eww ~/.config
|
cd "/home/$REAL_USER/.config/chadwm/chadwm"
|
||||||
cd chadwm
|
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
# create .desktop file
|
# 2. Ensure the target directory actually exists
|
||||||
TARGET_FILE="/usr/share/xsessions/chadwm.desktop"
|
TARGET_DIR="/usr/share/xsessions"
|
||||||
|
TARGET_FILE="$TARGET_DIR/chadwm.desktop"
|
||||||
|
|
||||||
cat <<EOF | sudo tee $TARGET_FILE > /dev/null
|
if [ ! -d "$TARGET_DIR" ]; then
|
||||||
|
sudo mkdir -p "$TARGET_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. Create the .desktop file
|
||||||
|
cat <<EOF | sudo tee $TARGET_FILE > /dev/null
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=chadwm
|
Name=chadwm
|
||||||
Comment=dwm made beautiful
|
Comment=dwm made beautiful
|
||||||
Exec=/home/$CURRENT_USER/.config/chadwm/scripts/run.sh
|
Exec=/home/$REAL_USER/.config/chadwm/scripts/run.sh
|
||||||
Type=Application
|
Type=Application
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Set appropriate permissions
|
|
||||||
sudo chmod 644 $TARGET_FILE
|
sudo chmod 644 $TARGET_FILE
|
||||||
|
|
||||||
say_green -e "Chadwm with SDDM installed successfully. You can reboot now to start Chadwm."
|
say_green -e "Chadwm with SDDM installed successfully. You can reboot now to start Chadwm."
|
||||||
|
|||||||
Reference in New Issue
Block a user