From 63fd828e65b1773350cfb402d604d814c72e30cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 30 Oct 2017 09:33:26 +0100 Subject: Update mutt config --- shellrc | 1 + 1 file changed, 1 insertion(+) (limited to 'shellrc') diff --git a/shellrc b/shellrc index a01b3e5..4eec35e 100644 --- a/shellrc +++ b/shellrc @@ -19,6 +19,7 @@ alias cgdb='cgdb -q' alias octave='octave-cli -q' alias ssh='TERM="xterm-256color" ssh' alias feh='feh --magick-timeout 10 -.' +alias mutt='neomutt' export LESS=-R export LESS_TERMCAP_mb=$'\E[1;31m' -- cgit v1.2.3 From e6a51fb649348d4ec7c25e87508e97faeb103461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Nov 2017 21:36:16 +0100 Subject: VArious changes but mostly just ssh-clear function added --- shellrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shellrc') diff --git a/shellrc b/shellrc index 4eec35e..fcaa67f 100644 --- a/shellrc +++ b/shellrc @@ -108,3 +108,9 @@ dorepeat() { echo done } + +# Clear all ssh control masters +ssh-clear() { + rm -f ~/.cache/ssh + mkdir -p ~/.cache/ssh +} -- cgit v1.2.3 From 9180b46532a7081a64a35b3625d655b548eec6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 28 Nov 2017 15:59:48 +0100 Subject: Just fix ssh-clear --- shellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shellrc') diff --git a/shellrc b/shellrc index fcaa67f..0ede298 100644 --- a/shellrc +++ b/shellrc @@ -111,6 +111,6 @@ dorepeat() { # Clear all ssh control masters ssh-clear() { - rm -f ~/.cache/ssh + rm -rf ~/.cache/ssh mkdir -p ~/.cache/ssh } -- cgit v1.2.3 From 7a7c48ffb6e13461ca783c2d01c4643b1b07abc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Jan 2018 23:31:02 +0100 Subject: Add tobg shell shortcut function --- shellrc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shellrc') diff --git a/shellrc b/shellrc index 0ede298..14fb0b9 100644 --- a/shellrc +++ b/shellrc @@ -114,3 +114,8 @@ ssh-clear() { rm -rf ~/.cache/ssh mkdir -p ~/.cache/ssh } + +# Run process in background +tobg() { + "$@" >/dev/null 2>&1 & +} -- cgit v1.2.3 From e6e04d7c587b17c23a90f3aa37ab5bdeec8415bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 4 Apr 2018 09:50:34 +0200 Subject: Drop eaglerc and shellrc --- shellrc | 121 ---------------------------------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 shellrc (limited to 'shellrc') diff --git a/shellrc b/shellrc deleted file mode 100644 index 14fb0b9..0000000 --- a/shellrc +++ /dev/null @@ -1,121 +0,0 @@ -# vim: ft=sh: -# This is file with aliases and variables shared between bash and zsh - -# Continue only if this is interactive shell -[[ $- != *i* ]] && return - -################################################################################# -# Aliases - -alias ls='ls --color=auto' -eval $(dircolors -b) -alias ll='ls -lh' -alias df='df -h' -alias du='du -h' -alias grep='grep --color=auto' -alias git='LANG=en_GB git' -alias gdb='gdb -q' -alias cgdb='cgdb -q' -alias octave='octave-cli -q' -alias ssh='TERM="xterm-256color" ssh' -alias feh='feh --magick-timeout 10 -.' -alias mutt='neomutt' - -export LESS=-R -export LESS_TERMCAP_mb=$'\E[1;31m' -export LESS_TERMCAP_md=$'\E[1;36m' -export LESS_TERMCAP_me=$'\E[0m' -export LESS_TERMCAP_se=$'\E[0m' -export LESS_TERMCAP_so=$'\E[01;44;33m' -export LESS_TERMCAP_ue=$'\E[0m' -export LESS_TERMCAP_us=$'\E[1;32m' -[ -x /usr/bin/src-hilite-lesspipe.sh ] && export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" - -alias gst='git status' -alias v='vim' -alias i='i3-msg' - -# Systemd aliases if we are running systemd -if pidof systemd >/dev/null 2>/dev/null; then - alias sctl='sudo systemctl' - alias usctl='systemctl --user' - alias jrn='journalctl' - alias ujrn='jrn --user' -fi - -################################################################################# -# Utility functions - -# Generate random password (optionally takes length of password as first argument) -genpasswd() { - local l=$1 - [ -n "$l" ] || l=16 - tr -dc A-Za-z0-9_ < /dev/urandom | head -c "$l" | xargs -} - -# Clip stdin to clipboard -clip() { - # Note: printf as magic to remove trailing new lines - printf %s "$(cat)" | xclip -selection clipboard -} - -# Clip current HEAD hash to clipboard -# Optionally you can pass commit as argument -gitclip() { - [ -n "$1" ] && local CMT="$1" || local CMT=HEAD - git rev-parse "$CMT"| clip -} -# Clip current head message to clipboard -# Optionally you can pass commit as argument -gitmclip() { - [ -n "$1" ] && local CMT="$1" || local CMT=HEAD - git log --format=%B -n 1 "$CMT" | clip -} - -# Automatic branch merger (merge branch, push it to server and remove branch) -# Expects name of the branch as argument -gitbmerge() { - ( - set -e - local WT="$(git worktree list | sed -nE "/\[$1\]/{s/([^ ]+) .*/\1/p}")" - if [ -n "$WT" ]; then - rm -r "$WT" - git worktree prune - fi - git merge --ff-only "$1" && git push && git branch -d "$1" && git push origin :"$1" - ) -} - -# Create new branch from master -gitbnew() { - git branch "$1" master - local NW="$(git rev-parse --show-toplevel)-$1" - git worktree add "$NW" $1 - cd "$NW" - git submodule update --init --recursive -} - -# Make screenshot -xshot() { - import -window "$(xdotool selectwindow)" ~/xshot_$(date +%F_%H%M%S_%N).png -} - -# Run given command every second -dorepeat() { - while true; do - "$@" - sleep 1 - echo - done -} - -# Clear all ssh control masters -ssh-clear() { - rm -rf ~/.cache/ssh - mkdir -p ~/.cache/ssh -} - -# Run process in background -tobg() { - "$@" >/dev/null 2>&1 & -} -- cgit v1.2.3