From a13f3ce4e5aa335424e05474110436bc2a3eeed2 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 30 Jan 2022 12:33:09 +0100 Subject: [PATCH] config: various shortcut updates --- .config/shell/functions | 2 ++ .config/topgrade.toml | 2 +- .local/bin/scripts/b | 2 +- .local/bin/scripts/genssh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/shell/functions b/.config/shell/functions index de604b6..79ab95d 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -180,9 +180,11 @@ alias dt='python -c "import time;print(time.asctime(time.localtime()))"' # Process alias println='printf "\n"' +alias myip="curl ifconfig.me && println && curl icanhazip.com" alias dedup='awk '"'"'!a[$0]++'"'" alias lar='last | tac' alias lst='( last; last -f /var/log/wtmp.1 ) | grep -v "pts/" | tac | less +G' +alias hedgedoc="cd '$d4/dev/_forks/hedgedoc' && tmux new-session -d 'yarn run dev' && tmux split-window -h 'nodemon --watch app.js --watch lib --watch locales app.js' && tmux ls && firefox localhost:3000" u() { which pacman-mirrors >/dev/null && diff --git a/.config/topgrade.toml b/.config/topgrade.toml index 5d2d241..9103a0b 100644 --- a/.config/topgrade.toml +++ b/.config/topgrade.toml @@ -2,7 +2,7 @@ #assume_yes = true # Disable specific steps - same options as the command line flag -disable = ["node", "pnpm", "nix", "emacs", "pacdiff"] +disable = ["node", "pnpm", "nix", "emacs", "config-update"] # Ignore failures for these steps #ignore_failures = ["powershell"] diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index 244c58f..37371e6 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -158,7 +158,7 @@ if test "$bat" -o "$batplain" && ! $inspect; then done;; esac else $batcommand "$pager" $batstyle,header$(test $# -gt 1 && echo ",numbers") "${bat[@]}" - fileinfo "${bat[@]}" + test $# -lt $(expr $(tput lines) / 3) && fileinfo "${bat[@]}" fi fi diff --git a/.local/bin/scripts/genssh b/.local/bin/scripts/genssh index 8bd307a..70e98e8 100755 --- a/.local/bin/scripts/genssh +++ b/.local/bin/scripts/genssh @@ -13,4 +13,4 @@ cat "$keys/$name.pub" if test "$OSTYPE" = "cygwin" then cat "$keys/$name.pub">/dev/clipboard else xclip -sel clip 2>/dev/null <"$keys/$name.pub" -fi && echo "SSH Public key copied to clipboard" || return 0 +fi && echo "SSH Public key copied to clipboard" || true