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