From 81acd05a7fd1af5ad39f5a8f90c262e193d2af7f Mon Sep 17 00:00:00 2001 From: BluishHumility Date: Wed, 16 Oct 2024 21:22:52 -0400 Subject: [PATCH] feat(user_commands.bash): create custom desktop file for nvidia sessions with heredoc --- setup_sway_isomode.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup_sway_isomode.bash b/setup_sway_isomode.bash index d054edf..dfdb99a 100644 --- a/setup_sway_isomode.bash +++ b/setup_sway_isomode.bash @@ -6,10 +6,18 @@ echo "Cloning the EOS Community Sway repo..." git clone https://github.com/EndeavourOS-Community-Editions/sway.git # Check if nvidia-inst is installed +# If it is, do the Nvidia stuff if pacman -Qq nvidia-inst 2>/dev/null | grep -q .; then - # If it is, do the Nvidia stuff + # Add the --unsupported-gpu flag to the sway call in greetd.conf sed -i 's|sway -c|sway --unsupported-gpu -c|' sway/etc/greetd/greetd.conf - + # Create a custom desktop file that uses sway --unsupported-gpu + cat < /usr/share/wayland-sessions/sway-nvidia.desktop +[Desktop Entry] +Name=Sway-Nvidia +Comment=Sway with Nvidia +Exec=sway --unsupported-gpu +Type=Application +EOF fi # Install the custom package list