Merge branch 'master' of github.com:hektor/dots
commit
0b7b0900af
|
@ -65,7 +65,15 @@ alias xev='xev | grep -A2 ButtonPress' # Ignore mouse movements
|
|||
|
||||
reboot_to_windows ()
|
||||
{
|
||||
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
|
||||
sudo grub-reboot "$windows_title" && sudo reboot
|
||||
# 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-to-windows='reboot_to_windows'
|
||||
|
|
26
.bashrc
26
.bashrc
|
@ -1,6 +1,8 @@
|
|||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
# Aliases {{{
|
||||
# Load aliases dynamically
|
||||
[ -f "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases"
|
||||
|
@ -46,6 +48,14 @@ export MANWIDTH=120
|
|||
export EDITOR=nvim
|
||||
# }}}
|
||||
|
||||
# Vim
|
||||
export EDITOR=vim
|
||||
|
||||
# Nvm
|
||||
export PATH=~/.nvm/versions/node/v14.16.0/bin:$PATH
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" --no-use
|
||||
|
||||
# X11 {{{
|
||||
export XDG_SESSION_TYPE=X11
|
||||
export XDG_CONFIG_HOME=$HOME/.config
|
||||
|
@ -68,13 +78,16 @@ if [ -f "/usr/bin/fzf" ]; then
|
|||
--color=fg:-1,bg:-1"
|
||||
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||
export FZF_CTRL_T_OPTS="--preview='bat {} | head -500'"
|
||||
source /usr/share/fzf/completion.bash
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
|
||||
_fzf_setup_completion path vim
|
||||
_fzf_setup_completion path zathura
|
||||
_fzf_setup_completion path xournalpp
|
||||
_fzf_setup_completion path nvim
|
||||
if [[ $ID == "raspbian" ]]; then
|
||||
source /usr/share/doc/fzf/examples/completion.bash
|
||||
source /usr/share/doc/fzf/examples/key-bindings.bash
|
||||
elif [[ $ID == "arch" ]]; then
|
||||
source /usr/share/fzf/completion.bash
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
fi
|
||||
|
||||
_fzf_setup_completion path vimn zathura xournalpp
|
||||
else
|
||||
echo "fzf not installed"
|
||||
fi
|
||||
|
@ -93,4 +106,3 @@ source /usr/share/nvm/install-nvm-exec
|
|||
# Jupyter {{{
|
||||
export JUPYTERLAB_DIR=$HOME/.local/share/jupyter/lab
|
||||
# }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue