feat: add desktop entry for boot into windows easily (#235)
* feat: add desktop entry for boot into windows easily * feat: add just recipe for this desktop file --------- Co-authored-by: Juha Uotila <10782843+inffy@users.noreply.github.com>
This commit is contained in:
parent
6a2da4d662
commit
c038bb2e72
4 changed files with 31 additions and 1 deletions
2
.github/changelogs.py
vendored
2
.github/changelogs.py
vendored
|
|
@ -77,7 +77,7 @@ sudo bootc switch --enforce-container-sigpolicy ghcr.io/ublue-os/$IMAGE_NAME:{cu
|
|||
```
|
||||
|
||||
### Documentation
|
||||
Be sure to read the [documentation](https://docs.projectbluefin.io/) for more information
|
||||
Be sure to read the [documentation](https://docs.getaurora.dev/) for more information
|
||||
on how to use your cloud native system.
|
||||
"""
|
||||
HANDWRITTEN_PLACEHOLDER = """\
|
||||
|
|
|
|||
|
|
@ -305,3 +305,11 @@ toggle-tailscale:
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Configure Boot to Windows desktop entry
|
||||
[group('System')]
|
||||
configure-boot-to-windows:
|
||||
mkdir -p $HOME/.local/share/applications
|
||||
cp -r /usr/share/applications/boot-to-windows.desktop $HOME/.local/share/applications
|
||||
sed -i 's/Hidden=true/Hidden=false/' $HOME/.local/share/applications/boot-to-windows.desktop
|
||||
13
system_files/kinoite/usr/bin/boot-to-windows
Executable file
13
system_files/kinoite/usr/bin/boot-to-windows
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# Look up the boot number for Windows in the EFI records
|
||||
boot_number=$(echo $(efibootmgr) | grep -Po "(?<=Boot)\S{4}(?=( |\* )Windows)")
|
||||
|
||||
# Check that Windows EFI entry was found
|
||||
if [ -z "$boot_number" ]; then
|
||||
kdialog --error "Cannot find Windows boot in EFI, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set next boot to be Windows and reboot the machine
|
||||
sudo efibootmgr -n "${boot_number}" && reboot
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Hidden=true
|
||||
Name=Boot to Windows
|
||||
Comment=Boot to Windows installation
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Icon=folder-windows-symbolic
|
||||
Exec=sh -c "pkexec /usr/bin/boot-to-windows"
|
||||
Categories=Utility;
|
||||
Loading…
Reference in a new issue