13 Commits

Author SHA1 Message Date
  Alois Mahdal 8de32f90b3 Enable lua checkers in syntastic 4 years ago
  Alois Mahdal 83c05b561e Add vxx() for editing stdin to C-C/C-V clipboard 4 years ago
  Alois Mahdal 6a26eeaa42 Fix typo in docstring 4 years ago
  Alois Mahdal aa80261f15 Update all vim submodules 4 years ago
  Alois Mahdal be127af6ff Turn off "unsafe paste" warning 4 years ago
  Alois Mahdal cf3961fb20 Good bye, Keybase 4 years ago
  Alois Mahdal 7ffb4d0d3c Update after mkittool-debstuff refactoring 4 years ago
  Alois Mahdal f92f07f859 Add searx.me search engine aggregator 4 years ago
  Alois Mahdal 997d7f356f Add stdin repeaters 4 years ago
  Alois Mahdal 782fb95c6a Don't speak to non-alive processes 4 years ago
  Alois Mahdal 9c27b1fb15 Treat paths with spaces more properly 4 years ago
  Alois Mahdal b698f29841 Add pp(), like nn() but also pause 4 years ago
  Alois Mahdal a1868c4edc Add mkittool config for debstuff 4 years ago

+ 59
- 1
dotfiles/bash/main.bashrc View File

@@ -32,6 +32,51 @@ nn() {
32 32
     notify-send -a 'nn()' "hey, $msg"
33 33
 }
34 34
 
35
+pp() {
36
+    #
37
+    # Ring the bell and send notification $1 and pause
38
+    #
39
+    local msg=${1:-this is done}
40
+    local junk
41
+    bb
42
+    echo -e "hey, \033[1;31m$msg\033[1;0m!"
43
+    notify-send -a 'pp()' "hey, $msg"
44
+    read -r junk -p "Press Enter to continue"
45
+}
46
+
47
+lrep() {
48
+    #
49
+    # Print each line on STDIN $1 times
50
+    #
51
+    local rep=${1:-1}; shift
52
+    local line
53
+    local n
54
+    while read -r line; do
55
+        n=$rep
56
+        while test "$n" -gt 0;
57
+        do
58
+            echo "$line"
59
+            ((n--))
60
+        done
61
+    done
62
+}
63
+
64
+prep() {
65
+    #
66
+    # Print STDIN $1 times
67
+    #
68
+    local rep=${1:-1}; shift
69
+    local data
70
+    data=$(cat)
71
+    n=$rep
72
+    while test "$n" -gt 0;
73
+    do
74
+        echo "$data"
75
+        echo
76
+        ((n--))
77
+    done
78
+}
79
+
35 80
 dt() {
36 81
     #
37 82
     # Open $1 new terminals
@@ -392,7 +437,7 @@ xvxx() {
392 437
     # Edit text in primary clipboard and save it to C-C clipboard
393 438
     #
394 439
     # Ideal for editing snippets in browser-based editors: during editing,
395
-    # select the text, open terminal, call `xvx`, edit the text, move
440
+    # select the text, open terminal, call `xvxx`, edit the text, move
396 441
     # back to the browser and paste it over the old (still selected) text.
397 442
     # That's it, no need to make up and save temporary files.
398 443
     #
@@ -401,6 +446,19 @@ xvxx() {
401 446
     xop o | vipe | xop ii
402 447
 }
403 448
 
449
+vxx() {
450
+    #
451
+    # Edit text on stdin and save it to C-C clipboard
452
+    #
453
+    # Ideal for editing outut of command before pasting ot to browser
454
+    # or another GUI application.  Run the command with `vxx`, edit
455
+    # the text, move back to the application and paste it.
456
+    #
457
+    # If you quickly realize you need to re-edit the text, use xvvx().
458
+    #
459
+    vipe | xop ii
460
+}
461
+
404 462
 xcxx() {
405 463
     #
406 464
     # Filter text in primary clipboard using command $@ and save it to C-C clipboard

+ 4
- 1
dotfiles/bash/post.bashrc View File

@@ -147,8 +147,11 @@ __bashum__shrink_relpath() {
147 147
     local frst
148 148
     local last
149 149
     local elnum
150
+    local elem
150 151
     test "${#path}" -le 7 && echo -n "$path" && return 0
151
-    elems=(${path//// }); elnum=${#elems[@]}
152
+    while IFS= read -r elem; do
153
+        elems+=("$elem"); elnum=${#elems[@]}
154
+    done <<<"$(sed 's|/|\n|' <<<"$path")"
152 155
     frst=${elems[0]}
153 156
     last=${elems[$((elnum-1))]}
154 157
     case $elnum in

+ 6
- 6
dotfiles/config/bmo/be.ini View File

@@ -11,7 +11,7 @@
11 11
 
12 12
 [be.def.spot.role:afk]
13 13
     shape = bounce
14
-    enter = clementine-pause
14
+    enter = bmo_beh__if -P clementine /usr/bin/clementine --pause
15 15
     spike = bmo kb home && slock
16 16
 
17 17
 [be.def.axis.role]
@@ -26,19 +26,19 @@
26 26
 [be.def.spot.role:gone]
27 27
     shape = bounce
28 28
     enter = ssh-add -D 2>&1 && notify-send "all identities removed"
29
-    enter = weechat-fifo -s \*/disconnect -all gone
29
+    enter = bmo_beh__if -P weechat weechat-fifo -s \*/disconnect -all gone
30 30
     spike = bmo kb home && slock
31
-    leave = weechat-fifo -s \*/connect -all
31
+    leave = bmo_beh__if -P weechat weechat-fifo -s \*/connect -all
32 32
     leave = bmo nag -R
33 33
 
34 34
 [be.def.spot.role:zleeping]
35 35
     shape = bounce
36 36
     enter = bmo_beh__if -P mocp --then mocp --pause
37
-    enter = clementine-pause
37
+    enter = bmo_beh__if -P clementine /usr/bin/clementine --pause
38 38
     enter = ssh-add -D 2>&1 && notify-send "all identities removed"
39
-    enter = weechat-fifo -s \*/disconnect -all offline
39
+    enter = bmo_beh__if -P weechat weechat-fifo -s \*/disconnect -all offline
40 40
     spike = bmo kb home && slock systemctl suspend -i
41
-    leave = weechat-fifo -s \*/connect -all
41
+    leave = bmo_beh__if -P weechat weechat-fifo -s \*/connect -all
42 42
 
43 43
 [be.def.spot.role:presenting]
44 44
     important = true

+ 2
- 0
dotfiles/config/bmo/wish.ini View File

@@ -40,6 +40,7 @@
40 40
     wnoise  = https://mynoise.net/NoiseMachines/whiteNoiseGenerator.php
41 41
     rdt     = https://www.reddit.com/subreddits/
42 42
     so      = https://stackoverflow.com/
43
+    sx      = https://searx.me/
43 44
     tgi     = https://try.gitea.io/
44 45
     tjc     = https://together.jolla.com/
45 46
     tor     = https://theoldreader.com/
@@ -76,6 +77,7 @@
76 77
     sf      = http://slovnik.cz/bin/mld.fpl?dictdir=frcz.fr&lines=90&vcb=%s
77 78
     ud      = http://www.urbandictionary.com/define.php?term=%s
78 79
     the     = http://www.thesaurus.com/browse/%s
80
+    sx      = https://searx.me/?q=%s
79 81
     tfd     = http://www.thefreedictionary.com/%s
80 82
     tldr    = http://www.ostera.io/tldr.jsx/#/%s
81 83
     w       = http://en.wikipedia.org/wiki/%s

+ 18
- 0
dotfiles/config/mkittool/debstuff.ini View File

@@ -0,0 +1,18 @@
1
+[debstuff]
2
+    build_options = notest
3
+    email = Alois Mahdal <netvor@vornet.cz>
4
+    branch = last
5
+    uri_pattern = https://pagure.io/%s.git
6
+    storage_root = ~/pals/vornet-scratch/deb
7
+    scrap_storage = true
8
+
9
+[debstuff.def.group.jats]
10
+    branch = devel
11
+    uri_pattern = ~/vcs.jats/%s
12
+
13
+[debstuff.def.group.vpriv]
14
+    uri_pattern = ~/st/vcs.private/%s
15
+
16
+[debstuff.def.group.vscratch]
17
+    branch = devel
18
+    uri_pattern = ~/vcs.mystream/%s

+ 1
- 0
dotfiles/config/xfce4/terminal/terminalrc View File

@@ -29,4 +29,5 @@ MiscSlimTabs=FALSE
29 29
 ColorPalette=#000000;#cc0000;#4e9a06;#c4a000;#3465a4;#75507b;#06989a;#d3d7cf;#555753;#ef2929;#8ae234;#fce94f;#739fcf;#ad7fa8;#34e2e2;#eeeeec
30 30
 ScrollingOnOutput=FALSE
31 31
 ScrollingLines=100000
32
+MiscShowUnsafePasteDialog=FALSE
32 33
 

+ 0
- 1
dotfiles/i3/config View File

@@ -461,4 +461,3 @@ exec "urxvt -e weechat"
461 461
 exec "nm-applet"
462 462
 exec "blueman-applet"
463 463
 exec "shutter --min_at_startup"
464
-exec "/opt/keybase/Keybase"

+ 1
- 1
dotfiles/vim/bundle/colorschemes

@@ -1 +1 @@
1
-Subproject commit 2f532d0564534accf09cecfa9a1e3639865367ee
1
+Subproject commit 9e7ab1cfec5d3db85aa1c4e87329fd869ecf94e9

+ 1
- 1
dotfiles/vim/bundle/syntastic

@@ -1 +1 @@
1
-Subproject commit 7274363a7267bf168ec21a50375102d602fd1232
1
+Subproject commit 0336c35c0b10b46d85cdd9c3df721f978429e82c

+ 1
- 1
dotfiles/vim/bundle/targets

@@ -1 +1 @@
1
-Subproject commit d6466f6f281f920e178637882a2e6e4f40c3acc2
1
+Subproject commit a79447f261e4b8b4327557aa03726f3849334b84

+ 1
- 1
dotfiles/vim/bundle/vim-airline

@@ -1 +1 @@
1
-Subproject commit 98bc6abde3860600e599c7ad17fdfb80809c04af
1
+Subproject commit c213f2ac44292a6c5548872e63acb0648cc07a9a

+ 1
- 1
dotfiles/vim/bundle/vim-airline-themes

@@ -1 +1 @@
1
-Subproject commit 3bfe1d00d48f7c35b7c0dd7af86229c9e63e14a9
1
+Subproject commit b85165844240fe0b9121df487679a320e053abc7

+ 1
- 1
dotfiles/vim/bundle/vim-gitgutter

@@ -1 +1 @@
1
-Subproject commit afa4f2ddf0fecb37914ec37357636abb18013422
1
+Subproject commit c75c83df531881008f8cf903eab7cd68bc19ff7a

+ 1
- 1
dotfiles/vim/bundle/vim-markdown

@@ -1 +1 @@
1
-Subproject commit be5e60fa2d85fec3b585411844846678a775a5d3
1
+Subproject commit da5a7ac96f517e0fd6f886bc3fbe27156ca1f946

+ 1
- 1
dotfiles/vim/bundle/vimtodo

@@ -1 +1 @@
1
-Subproject commit 051cd01a3adbf6bb9a74f21074e9b6dbe242f294
1
+Subproject commit d977c98e5d6a7a5dfb75a7a4faed3e88865031bc

+ 4
- 0
dotfiles/vim/vimrc View File

@@ -26,6 +26,10 @@ let g:syntastic_mode_map = {
26 26
   \ "active_filetypes": ["bash"],
27 27
   \ "passive_filetypes": ["python"] }
28 28
 
29
+let g:syntastic_check_on_open = 1
30
+let g:syntastic_lua_checkers = ["luac", "luacheck"]
31
+let g:syntastic_lua_luacheck_args = "--no-unused-args"
32
+
29 33
 let g:gitgutter_sign_added = '✚'
30 34
 let g:gitgutter_sign_modified = '❱'
31 35
 let g:gitgutter_sign_removed = '❌'