From 9cd13c7073d6dacaac31a9c315be5d6796cf23f6 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Sat, 23 Jan 2021 20:00:31 +0100 Subject: [PATCH] bin: add listen & improve shell aliases --- .config/shell/functions | 5 ++++- .local/bin/scripts/dif | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/shell/functions b/.config/shell/functions index 2841ad9..58120bb 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -118,8 +118,11 @@ alias v='edit' alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G' alias lar='last | tac' +# Listen to loopback of mic +alias listen='pactl load-module module-loopback; read; pactl unload-module module-loopback' + alias browse-safe='sudo systemctl disable --now systemd-resolved && sudo rm -f /etc/resolv.conf && echo "nameserver 185.228.168.10" | sudo tee /etc/resolv.conf && sudo chattr +i /etc/resolv.conf' -alias browse-unsafe='sudo chattr -i /etc/resolv.conf && sudo mv /etc/resolv.conf /etc/resolv.conf.bak && sudo systemctl enable --now systemd-resolved' +alias browse-unsafe='sudo chattr -i /etc/resolv.conf && sudo mv /etc/resolv.conf /etc/resolv.conf.bak && sudo systemctl enable --now systemd-resolved && sleep 100 && browse-safe' xo() { while test $# -gt 0; do diff --git a/.local/bin/scripts/dif b/.local/bin/scripts/dif index 7c6041f..ad77243 100755 --- a/.local/bin/scripts/dif +++ b/.local/bin/scripts/dif @@ -1,3 +1,3 @@ #!/bin/sh # diff with pagination -diff --color=always -U 2 "$@" | less --quit-if-one-screen +diff --color=always --report-identical-files -U 2 "$@" | less --quit-if-one-screen