diff --git a/v2/arch-chadwm.sh b/v2/arch-chadwm.sh index c3c516b..6d61111 100755 --- a/v2/arch-chadwm.sh +++ b/v2/arch-chadwm.sh @@ -88,6 +88,7 @@ say_yellow "Starting Chadwm setup..." CURRENT_DE="$(detect_de)" CURRENT_DM="$(detect_display_manager)" +CURRENT_USER=$(whoami) if [[ -z "$CURRENT_DE" ]]; then say_cyan -e "No Desktop Environment detected. Installing Chadwm (light setup with SDDM)..." @@ -101,6 +102,20 @@ if [[ -z "$CURRENT_DE" ]]; then cd chadwm sudo make install + # create .desktop file + TARGET_FILE="/usr/share/xsessions/chadwm.desktop" + +cat < /dev/null +[Desktop Entry] +Name=chadwm +Comment=dwm made beautiful +Exec=/home/$CURRENT_USER/.config/chadwm/scripts/run.sh +Type=Application +EOF + + # Set appropriate permissions + sudo chmod 644 $TARGET_FILE + say_green -e "Chadwm with SDDM installed successfully. You can reboot now to start Chadwm." else say_cyan -e "Detected existing Desktop Environment: $CURRENT_DE"