Commit f46794a
xxwhirlpool
·
2025-12-10 17:11:52 -0500 EST
parent 37bb527
add askdd to (hopefully) protect from disk destruction 2.0 & more
3 files changed,
+18,
-3
+5,
-1
| ... | ... | @@ -133,7 +133,8 @@ alias fastfetch="hyfetch" | |
| 133 | 133 | alias bat="batcat" | |
| 134 | 134 | alias cat="bat --paging=never" | |
| 135 | 135 | alias rced="micro ~/.bashrc && source ~/.bashrc" | |
| 136 | - | alias dd="ask dd" | |
| 136 | + | alias dd="askdd" | |
| 137 | + | alias copy="xclip -sel clipboard" | |
| 137 | 138 | ||
| 138 | 139 | # lazy ass way for me to get my idol mp3s from youtube | |
| 139 | 140 | # usage: ytmp3 url |
| ... | ... | @@ -153,6 +154,9 @@ alias sun="daylight --short --timezone='America/New_York' | lolcat" | |
| 153 | 154 | # git | |
| 154 | 155 | alias gitall="git remote | xargs -L1 git push --all" | |
| 155 | 156 | alias gyolo="git add . && git commit -m 'yolo'" | |
| 157 | + | alias gitd="git diff --staged" | |
| 158 | + | alias gdiff="gitd" | |
| 159 | + | alias gits="git status" | |
| 156 | 160 | alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-astro/src/utils && node git-changelog.js" | |
| 157 | 161 | ||
| 158 | 162 | # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn |
+1,
-2
| ... | ... | @@ -1,7 +1,6 @@ | |
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | 2 | # | |
| 3 | - | # mostly to stop myself from accidentally | |
| 4 | - | # wiping my own hard drive again with `dd` | |
| 3 | + | # basic confirmation dialog | |
| 5 | 4 | ||
| 6 | 5 | if [ $# -eq 0 ]; then | |
| 7 | 6 | echo "Usage: ask [COMMAND]" |
+12,
-0
| ... | ... | @@ -0,0 +1,12 @@ | |
| 1 | + | #!/usr/bin/env bash | |
| 2 | + | ||
| 3 | + | warning() { | |
| 4 | + | if [[ "$*" =~ $(df . | awk {'print $1'} | tail -n1) ]]; then | |
| 5 | + | if ! gum confirm "WARNING: you are executing this command on your current drive! be careful!" --default="false" --timeout="15s"; then | |
| 6 | + | echo "nope" | |
| 7 | + | exit 1 | |
| 8 | + | fi | |
| 9 | + | fi | |
| 10 | + | } | |
| 11 | + | ||
| 12 | + | warning $@ |