Make dual boot aliases host-specific
parent
fadf35956c
commit
d45c8e7581
|
@ -68,19 +68,6 @@ alias pl="swipl"
|
||||||
alias py="python"
|
alias py="python"
|
||||||
alias r="R"
|
alias r="R"
|
||||||
|
|
||||||
reboot_windows ()
|
|
||||||
{
|
|
||||||
# Check if grub is installed by checking if the command exists, if it does
|
|
||||||
# not, then assume that the system is using systemd-boot
|
|
||||||
if grub-install --version &>/dev/null; then
|
|
||||||
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
|
|
||||||
sudo grub-reboot "$windows_title"
|
|
||||||
echo "Grub set to reboot to Windows"
|
|
||||||
else
|
|
||||||
sudo bootctl set-oneshot windows.conf
|
|
||||||
echo "Systemd set to reboot to Windows"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
alias reboot-windows='reboot_windows'
|
alias reboot-windows='reboot_windows'
|
||||||
alias azerty="setxkbmap be"
|
alias azerty="setxkbmap be"
|
||||||
alias qwerty="setxkbmap us"
|
alias qwerty="setxkbmap us"
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
|
source "$HOME/.bash_aliases/dualboot"
|
||||||
|
|
||||||
alias lm='ddcutil setvcp 10'
|
alias lm='ddcutil setvcp 10'
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
reboot_windows ()
|
||||||
|
{
|
||||||
|
# Check if grub is installed by checking if the command exists, if it does
|
||||||
|
# not, then assume that the system is using systemd-boot
|
||||||
|
if grub-install --version &>/dev/null; then
|
||||||
|
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
|
||||||
|
sudo grub-reboot "$windows_title"
|
||||||
|
echo "Grub set to reboot to Windows"
|
||||||
|
else
|
||||||
|
sudo bootctl set-oneshot windows.conf
|
||||||
|
echo "Systemd set to reboot to Windows"
|
||||||
|
fi
|
||||||
|
}
|
|
@ -1 +1,3 @@
|
||||||
|
source "$HOME/.bash_aliases/dualboot"
|
||||||
|
|
||||||
alias lm='xbacklight -set'
|
alias lm='xbacklight -set'
|
||||||
|
|
Loading…
Reference in New Issue