Skip to content

Commit

Permalink
feat(ujust): Add setup-boot-windows-steam ujust script
Browse files Browse the repository at this point in the history
* Adds a ujust script for making a steam shortcut that boots into Windows on dual-boot setups
  • Loading branch information
wolfyreload committed Nov 3, 2024
1 parent 1797666 commit 34d1a87
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# vim: set ft=make :

# Adds a script in Steam to boot Windows which is useful for dual-boot setups
setup-boot-windows-steam:
#!/usr/bin/bash

echo "Making ~/boot-windows.sh script"
echo "#!/usr/bin/bash" | tee ~/boot-windows.sh
echo 'boot_number=$(echo $(efibootmgr) | grep -Po "(?<=Boot)\S{4}(?=( |\* )Windows)")' | tee -a ~/boot-windows.sh
echo 'sudo efibootmgr -n "${boot_number}" && reboot' | tee -a ~/boot-windows.sh
chmod +x ~/boot-windows.sh

echo "Making efibootmgr -n accessible without sudo"
echo "%wheel ALL=(root) NOPASSWD: /usr/sbin/efibootmgr" | sudo tee /etc/sudoers.d/efibootmgr-config

echo "Adding ~/boot-windows.sh as a Non-steam game"
/usr/bin/steamos-add-to-steam ~/boot-windows.sh

0 comments on commit 34d1a87

Please sign in to comment.