From 9d0e379976e7fd2358ae43f0fc6d27450c3f3baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 15 Aug 2017 22:01:54 +0200 Subject: Update vim plugins --- vim/bundle/tagbar | 2 +- vim/bundle/tlib_vim | 2 +- vim/bundle/vim-snippets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index d880bcc..fef0732 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit d880bcc333938ee1ed4a99fd89480eff9b6502a6 +Subproject commit fef07323944f61c20722c006e194b9f84442fa98 diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim index 6f9d75b..c96db61 160000 --- a/vim/bundle/tlib_vim +++ b/vim/bundle/tlib_vim @@ -1 +1 @@ -Subproject commit 6f9d75b54478bcaab722d33cbec69d8a1fe49f32 +Subproject commit c96db6151fde9d06a8fed71b7df05c6dbb3f14fe diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 9181f29..f1c5baa 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 9181f29981c0fe8d633f7dea6ce69338fe6b7a47 +Subproject commit f1c5baaae4acf4885b24c9f6d0b5f51e6f2acb47 -- cgit v1.2.3 From 68931fdf3e94c9e0096c151f57d9ee99acb5f8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 16 Aug 2017 16:49:30 +0200 Subject: Some more shell utility function --- shellrc | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/shellrc b/shellrc index 1faa936..7a2ae5f 100644 --- a/shellrc +++ b/shellrc @@ -57,12 +57,35 @@ genpasswd() { # Clip stdin to clipboard clip() { - xclip -selection clipboard + # 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() { - git rev-parse HEAD | clip + [ -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 "$1" && git push && git branch -d "$1" && git push origin :"$1" + ) } # Make screenshot -- cgit v1.2.3 From 6a5d958aa13521951f3b1f5ded760229caae7d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Aug 2017 12:41:38 +0200 Subject: Replace syntastic with ale --- .gitmodules | 6 +++--- vim/bundle/ale | 1 + vim/bundle/syntastic | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) create mode 160000 vim/bundle/ale delete mode 160000 vim/bundle/syntastic diff --git a/.gitmodules b/.gitmodules index c6c3c77..86c4728 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "vim/bundle/lightline.vim"] path = vim/bundle/lightline.vim url = https://github.com/itchyny/lightline.vim.git -[submodule "vim/bundle/syntastic"] - path = vim/bundle/syntastic - url = https://github.com/scrooloose/syntastic.git [submodule "vim/bundle/tlib_vim"] path = vim/bundle/tlib_vim url = https://github.com/tomtom/tlib_vim.git @@ -49,3 +46,6 @@ [submodule "vim/bundle/vim-repeat"] path = vim/bundle/vim-repeat url = https://github.com/tpope/vim-repeat.git +[submodule "vim/bundle/ale"] + path = vim/bundle/ale + url = https://github.com/w0rp/ale.git diff --git a/vim/bundle/ale b/vim/bundle/ale new file mode 160000 index 0000000..e5d0a17 --- /dev/null +++ b/vim/bundle/ale @@ -0,0 +1 @@ +Subproject commit e5d0a17694897dc8e234f534cfa33fc3483d8e12 diff --git a/vim/bundle/syntastic b/vim/bundle/syntastic deleted file mode 160000 index 5e1b26c..0000000 --- a/vim/bundle/syntastic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5e1b26c1724448c9d870b08dc93ce71528489333 -- cgit v1.2.3 From b2cae196d9bfef3a556db0147014c60ec09ebe5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 20 Aug 2017 12:42:17 +0200 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/tagbar | 2 +- vim/bundle/vim-snippets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 369fdad..9a76fd2 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 369fdade93adf23ef3da3b5f8e9fcd14a2b3f093 +Subproject commit 9a76fd2e9aeda82db0e74f7204d691d05fed2812 diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index fef0732..d4c370c 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit fef07323944f61c20722c006e194b9f84442fa98 +Subproject commit d4c370cf0e697ea24e5d01c7ca7d6b063480c176 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index f1c5baa..36351fa 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit f1c5baaae4acf4885b24c9f6d0b5f51e6f2acb47 +Subproject commit 36351fac5cca70de5bfc1f29132206a2935adfb6 -- cgit v1.2.3 From 390e78655fd11144aa9b3f019b4b6a9ad2690474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 27 Aug 2017 13:33:11 +0200 Subject: Revert "On bandwidth accept unknown state" This reverts commit da70bfe2b9d4c6f95276c0a0a68f1a0d8b42e5fb. --- config/i3blocks/scripts/bandwidth | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/config/i3blocks/scripts/bandwidth b/config/i3blocks/scripts/bandwidth index 93023c7..ba15a27 100755 --- a/config/i3blocks/scripts/bandwidth +++ b/config/i3blocks/scripts/bandwidth @@ -19,15 +19,12 @@ INTERFACE=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') # Issue #36 compliant. -if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ]; then - ST="`cat /sys/class/net/${INTERFACE}/operstate`" - # Note: usb telephone network is reported as unknown state - if [ "$ST" = "up" -o "$ST" = "unknown" ]; then - echo down # full text - echo down # short text - echo \#FF0000 # color - exit 0 - fi +if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ] +then + echo down # full text + echo down # short text + echo \#FF0000 # color + exit 0 fi # path to store the old results in -- cgit v1.2.3 From d691be754ed01e322742c45a074d7b364f1c99cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 31 Aug 2017 12:46:40 +0200 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/tagbar | 2 +- vim/bundle/vim-snippets | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 9a76fd2..65765ef 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 9a76fd2e9aeda82db0e74f7204d691d05fed2812 +Subproject commit 65765ef32b0288b35a022373f8e04c66b7764b2b diff --git a/vim/bundle/ale b/vim/bundle/ale index e5d0a17..1d86a72 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit e5d0a17694897dc8e234f534cfa33fc3483d8e12 +Subproject commit 1d86a724f2f54212d1230fcb2195220f5b3727f9 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index 08f9e22..96d6d10 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit 08f9e22c9ae4b9ecce32e7a617ef82cd419a8ace +Subproject commit 96d6d108bf6cd7bfdaa9872add4bb47d6ddbf7fd diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index d4c370c..59ea6d6 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit d4c370cf0e697ea24e5d01c7ca7d6b063480c176 +Subproject commit 59ea6d656a0b5190f6f8f3fff44197d752782cc6 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 36351fa..9de9bb3 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 36351fac5cca70de5bfc1f29132206a2935adfb6 +Subproject commit 9de9bb39a2ae5264ce6c757cff4be89e65ee84fb -- cgit v1.2.3 From c52a7085595c02be59daba7b10050838d92c509c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 5 Sep 2017 14:45:24 +0200 Subject: Add lynxrc --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index b6a26db..bd6ef50 100755 --- a/install +++ b/install @@ -72,6 +72,7 @@ fi if ask "Install mutt configuration"; then inst urlview ~/.urlview + inst lynxrc ~/.lynxrc inst mutt/mailcap ~/.mutt/ inst mutt/gpg.rc ~/.mutt/ inst mutt/color ~/.mutt/ -- cgit v1.2.3 From cc572cbda6e92322ac6129d9dc92050c5fb857f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 12 Sep 2017 08:36:25 +0200 Subject: Try to fix unknown operand on ash --- utils/inst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/inst b/utils/inst index fe4b5d7..5279365 100644 --- a/utils/inst +++ b/utils/inst @@ -8,7 +8,7 @@ ask() { else echo -e -n "\e[1;34m$1? (Y/n) \e[0m" read - [[ $REPLY =~ ^[Yy]?$ ]] + echo "$REPLY" | grep -qE '^[Yy]?$' fi } -- cgit v1.2.3