Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'

git-subtree-dir: dots
git-subtree-mainline: 2ad98cde17
git-subtree-split: f64b634dd8
This commit is contained in:
2025-10-04 18:28:04 +02:00
232 changed files with 11175 additions and 0 deletions

56
dots/.bash_aliases/all Normal file
View File

@@ -0,0 +1,56 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias ..="cd .."
alias ls="ls --color=auto"
alias l="ls -1p"
alias ll="ls -lhp"
alias lt="ls -lhtp"
alias la="ls -lhap"
alias lta="ls -lhatp"
alias ldir="ls -dp" # list directories
alias grep="grep --color=auto"
alias rm="rm -I --preserve-root"
alias mv="mv -iv"
alias cp="cp -iv"
alias ln="ln -i"
alias mkdir="mkdir -pv"
alias chown="chown --preserve-root"
alias chmod="chmod --preserve-root"
alias chgrp="chgrp --preserve-root"
alias ip="ip --color"
alias ipa="ip -brief address"
alias ipl="ip -brief link"
alias ipr="ip route"
alias clip="xclip -sel clip"
alias df="df -kTh"
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
# Programs
alias o="xdg-open"
alias v="nvim"
alias g='git'
alias t=' task'
alias tsh='tasksh'
alias z='zathura --fork'
alias f='fzf'
alias fm='pcmanfm &>/dev/null &'
alias mm='micromamba'
# Languages
alias r5="plt-r5rs --no-prim"
alias hs="ghci"
alias pl="swipl"
alias py="python"
alias r="R"
alias azerty="setxkbmap be"
alias qwerty="setxkbmap us"
alias cole="setxkbmap us -variant colemak"

View File

@@ -0,0 +1,16 @@
# shellcheck shell=bash
# vim: set ft=bash :
reboot-to-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
}

View File

@@ -0,0 +1,7 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"
alias lm='ddcutil setvcp 10'
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'

View File

@@ -0,0 +1,6 @@
# shellcheck shell=bash
# vim: set ft=bash :
source "$HOME/.bash_aliases/dualboot"
alias lm='xbacklight -set'

4
dots/.bash_aliases/jira Normal file
View File

@@ -0,0 +1,4 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias jira-me='jira issue list -a$(jira me)'

View File

@@ -0,0 +1,35 @@
# shellcheck shell=bash
# vim: set ft=bash :
alias js="node"
alias ts="ts-node"
yarn() {
if [[ -f "package-lock.json" ]]; then
echo "WARNING: package-lock.json exists"
read -p "Are you sure you want to run yarn? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command yarn "$@"
else
echo "Aborted"
fi
else
command yarn "$@"
fi
}
npm() {
if [[ -f "yarn.lock" ]]; then
echo "WARNING: yarn.lock exists"
read -p "Are you sure you want to run npm? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
command npm "$@"
else
echo "Aborted"
fi
else
command npm "$@"
fi
}