diff --git a/.config/rodolphe/.aliases b/.config/rodolphe/.aliases index f3fbe1c..b7f8859 100644 --- a/.config/rodolphe/.aliases +++ b/.config/rodolphe/.aliases @@ -1,43 +1,56 @@ -# -# Aliases for ls -# - [ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ] && alias ls='ls --color=auto' alias ll='ls -lihF' alias la='ls -A' alias l='ll -A' hash eza 2>/dev/null && alias ls='eza' - -# -# Aliases for common commands -# - -alias df='df -h' +alias sudo='sudo ' alias grep='grep -n --color=auto' +alias j='jobs' +alias df='df -h' +alias du='du -ch' alias ip='ip --color' alias ipb='ip --color --brief' -alias j='jobs' alias mount_ro='mount -o ro,noexec,noatime,nodev,nosuid,noiversion' -alias sudo='sudo ' - - -# -# Aliases for installed programs -# - -hash clang-format 2>/dev/null && alias clang-format='clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false}"' +alias ryzom_season_change='date --date $(wget -q -O - "https://api.ryzom.com/time.php?format=xml" | sed "s/>\n/\(89-/" | sed "s//\(23-/g" | sed "s/<\/day_of_season>/\)\*72/" | sed "s/<\/time_of_day>/\)\*3/" | bc | tr "\n" "+" | sed "s/\+$/\n\"min\"\n/" | bc | tr -d "\n")' +hash tree 2>/dev/null && alias t='tree' hash duf 2>/dev/null && alias du='duf' -hash helix 2>/dev/null && alias hx='helix' hash htop 2>/dev/null && alias top='htop' +hash clang-format 2>/dev/null && alias clang-format='clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4, AllowShortFunctionsOnASingleLine: None, KeepEmptyLinesAtTheStartOfBlocks: false}"' +hash xscreensaver-command 2>/dev/null && alias lock='xscreensaver-command --lock' +hash sqlmap 2>/dev/null && alias sqlmap='sqlmap --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"' +hash sqlmap 2>/dev/null && alias sqlmap-tor='sqlmap --tor --tor-type=SOCKS5' +hash jmtpfs 2>/dev/null && alias mount_android='jmtpfs "/media/android"' hash kitty 2>/dev/null && alias kitty_ssh='kitty +kitten ssh' hash nvim 2>/dev/null && alias vim='nvim' -hash tree 2>/dev/null && alias t='tree' -hash yt-dlp 2>/dev/null && alias audio-dl='yt-dlp --extract-audio --audio-quality 0 --audio-format "vorbis"' +hash helix 2>/dev/null && alias hx='helix' -if hash sqlmap 2>/dev/null; then - alias sqlmap='sqlmap --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"' - alias sqlmap-tor='sqlmap --tor --tor-type=SOCKS5' +if hash dig 2>/dev/null; then + istheinternetonfire() { + txt=$(dig +short txt istheinternetonfire.com) + if hash cowsay 2>/dev/null; then + echo "$txt" | cowsay + else + echo "$txt" + fi + } +fi + +if hash yay 2>/dev/null; then + reinstall_pattern() { + PATTERN="$1" + yay -S $(pacman -Qm | /bin/grep "$PATTERN" | cut -d ' ' -f1) + } +fi + +if hash gphoto2 2>/dev/null; then + if hash ffmpeg 2>/dev/null; then + if modinfo v4l2loopback >/dev/null 2>&1; then + webcam_dslr() { + gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 + } + fi + fi fi # https://github.com/OpenXRay/xray-16 @@ -47,9 +60,9 @@ if hash xr_3da 2>/dev/null; then alias stalker_call_of_pripyat='xr_3da' fi -if hash yay 2>/dev/null; then - reinstall_pattern() { - PATTERN="$1" - yay -S $(pacman -Qm | /bin/grep "$PATTERN" | cut -d ' ' -f1) - } +if hash yt-dlp 2>/dev/null; then + alias audio-dl='yt-dlp --extract-audio --audio-quality 0 --audio-format "vorbis"' + alias youtube-dl='yt-dlp' +elif hash youtube-dl 2>/dev/null; then + alias audio-dl='youtube-dl -x --audio-quality 0 --audio-format "vorbis"' fi diff --git a/README.md b/README.md index c4c0324..0aa2d2f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ pacman -S cargo-audit cargo-outdated cargo-release rustup # Python pacman -S python ruff uv # CLI software -pacman -S dog exiv2 gnupg imagemagick mkcert ncdu nmap pass playerctl python-shodan python-weasyprint qrencode rsync shellcheck sqlmap ssh-audit xsv yt-dlp +pacman -S dog exiv2 gnupg imagemagick mkcert ncdu nmap pass playerctl python-shodan python-weasyprint qrencode rsync shellcheck sqlmap ssh-audit yt-dlp # Hyprland pacman -S hyprland xdg-desktop-portal-hyprland wofi qt5-wayland qt6-wayland pacman -S pipewire wireplumber pipewire-audio pipewire-alsa pipewire-pulse pipewire-jack pipewire-x11-bell