]> git.rmz.io Git - dotfiles.git/commitdiff
Merge branch 'lazyvim'
authorSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:36:48 +0000 (17:36 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 17 Dec 2023 17:36:48 +0000 (17:36 +0000)
100 files changed:
Makefile
aliases
awesome/bindings.lua
awesome/signals.lua
awesome/themes/nord/background.svg
bin/aur-sync-devel [new file with mode: 0755]
bin/find_duplicate
bin/maic
bin/maif
bin/monzo.py
bin/org-agenda [new file with mode: 0755]
bin/shorten [new file with mode: 0755]
bin/xkbload [new file with mode: 0755]
git/config
kitty/kitty.conf
mbsync/config
mpv/config
mutt/accounts/mailfence
mutt/bindings
mutt/colors/nord
mutt/mailcap
ncmpcpp/config
nvim/.gitignore [new file with mode: 0644]
nvim/.neoconf.json [new file with mode: 0644]
nvim/LICENSE [new file with mode: 0644]
nvim/README.md [new file with mode: 0644]
nvim/init.lua [new file with mode: 0644]
nvim/lua/config/autocmds.lua [new file with mode: 0644]
nvim/lua/config/keymaps.lua [new file with mode: 0644]
nvim/lua/config/lazy.lua [new file with mode: 0644]
nvim/lua/config/options.lua [new file with mode: 0644]
nvim/lua/plugins/coding.lua [new file with mode: 0644]
nvim/lua/plugins/colorscheme.lua [new file with mode: 0644]
nvim/lua/plugins/core.lua [new file with mode: 0644]
nvim/lua/plugins/dap.lua [new file with mode: 0644]
nvim/lua/plugins/editor.lua [new file with mode: 0644]
nvim/lua/plugins/example.lua [new file with mode: 0644]
nvim/lua/plugins/lsp.lua [new file with mode: 0644]
nvim/lua/plugins/nvim-treesitter.lua [new file with mode: 0644]
nvim/lua/plugins/productivity.lua [new file with mode: 0644]
nvim/lua/plugins/ui.lua [new file with mode: 0644]
nvim/lua/snippets/all.lua [new file with mode: 0644]
nvim/stylua.toml [new file with mode: 0644]
qutebrowser/.gitignore
qutebrowser/config.py
qutebrowser/quickmarks
qutebrowser/themes/nord-qutebrowser.py
ssh/config
systemd/system/suspend@.service [new file with mode: 0644]
systemd/user/pause-mpd.service [new file with mode: 0644]
systemd/user/suspend.target [new file with mode: 0644]
task/taskrc [moved from taskrc with 100% similarity]
vim/after/plugin/togglelist.vim
vim/ftplugin/c.vim
vim/ftplugin/cpp.vim
vim/ftplugin/help.vim
vim/ftplugin/man.vim
vim/ftplugin/python.vim
vim/ultisnips/cpp.snippets
vim/vimrc
weechat/alias.conf
weechat/autosort.conf
weechat/buffer_autoset.conf
weechat/buflist.conf
weechat/charset.conf
weechat/colorize_nicks.conf
weechat/exec.conf
weechat/fifo.conf
weechat/fset.conf
weechat/guile.conf
weechat/logger.conf
weechat/lua.conf
weechat/perl.conf
weechat/perl/highmon.pl
weechat/plugins.conf
weechat/python.conf
weechat/python/autosort.py
weechat/python/buffer_autoset.py
weechat/python/colorize_nicks.py
weechat/python/go.py
weechat/python/grep.py
weechat/python/wee-slack
weechat/relay.conf
weechat/ruby.conf
weechat/ruby/colorizer.rb
weechat/ruby/samechannel.rb
weechat/script.conf
weechat/sec.conf
weechat/tcl.conf
weechat/trigger.conf
weechat/typing.conf
weechat/weechat.conf
weechat/xfer.conf
xprofile.d/10-screensaver.sh
xprofile.d/10-xkb.sh
xprofile.d/99-applications.sh
zsh/lib/10-fzf.zsh [moved from zsh/lib/fzf.zsh with 100% similarity]
zsh/lib/kitty.zsh [deleted file]
zsh/lib/motd.zsh
zshenv

index c5a8d99c5721277ff61731b03a033556e84b0662..a2457785c6fc917b86fb3fc1c3491b36c1a30d4d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ DOTFILES := goobookrc profile Xresources
 CONFIGFILES := mpv offlineimap ranger retroarch xbindkeys xkb
 
 .PHONY: core_files
-core_files: dircolors git ranger ssh systemd tmux vim zsh
+core_files: dircolors git nvim ranger ssh systemd tmux zsh
 
 .PHONY: desktop
 desktop: core_files awesome kitty picom qutebrowser rofi xkb
@@ -127,7 +127,7 @@ systemd: $(XDG_CONFIG_HOME) $(systemd_system_units)
 .PHONY: systemd
 
 task: $(XDG_CONFIG_HOME)
-       ln -sfT $(APATH)/taskrc $(XDG_CONFIG_HOME)/taskrc
+       ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@
 .PHONY: task
 
 tmux: $(XDG_CONFIG_HOME)
@@ -150,6 +150,10 @@ vim: $(XDG_CONFIG_HOME)
        ln -sfT $(APATH)/vim $(XDG_CONFIG_HOME)/vim
        mkdir -p $(XDG_DATA_HOME)/vim
 .PHONY: vim
+       
+nvim: $(XDG_CONFIG_HOME) vim
+       ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@
+.PHONY: nvim
 
 yay: $(XDG_CONFIG_HOME)
        ln -sfT $(APATH)/yay $(XDG_CONFIG_HOME)/yay
diff --git a/aliases b/aliases
index 721a3da9d3864abcf78fbab25a4aff32e8257571..e7b0a12f861c309dd1736187e6b62df5bd99743b 100644 (file)
--- a/aliases
+++ b/aliases
@@ -32,7 +32,7 @@ if [[ -n "${VIM_TERMINAL}" ]]; then
         done
     }
 fi
-alias vi='vim'
+alias vi=nvim
 alias svi='sudo -e'
 #alias vp='vim PKGBUILD' # I have a script for that in ~/bin
 alias vs='vim SPLITBUILD'
index ae2ebafd055ef7036ec50b2063b03f5578e184db..be64d76b6f3947343be925bccf7724b5862f66cd 100644 (file)
@@ -49,6 +49,25 @@ globalkeys = gears.table.join(globalkeys,
               {description = "focus the next screen", group = "screen"}),
     awful.key({ modkey,           }, "=",     function () awful.screen.focus_relative( 1) end, -- that's the key left of 1 (kinesis)
               {description = "focus the next screen", group = "screen"}),
+    awful.key({ modkey, "Control" }, "=",
+              function ()
+                -- swap tags in screens
+                local c = client.focus
+                local this_screen = awful.screen.focused();
+                -- TODO: only works with two screens
+                local next_screen = this_screen:get_next_in_direction("right") or this_screen:get_next_in_direction("left")
+                local this_screen_tag = this_screen.selected_tag;
+                local next_screen_tag = next_screen.selected_tag;
+
+                this_screen_tag:swap(next_screen_tag)
+
+                this_screen_tag:view_only()
+                next_screen_tag:view_only()
+
+                awful.screen.focus(this_screen)
+                c:jump_to(true)
+              end,
+              {description = "swap screens", group = "screen"}),
     awful.key({ modkey, "Control" }, "Right", function () awful.screen.focus_relative(-1) end,
               {description = "focus the next screen", group = "screen"}),
     awful.key({ modkey, "Control" }, "Left",  function () awful.screen.focus_relative(-1) end,
@@ -149,7 +168,11 @@ globalkeys = gears.table.join(globalkeys,
     -- requires a little sleep before simulating shift+Insert, otherwise I
     -- believe the focus is still on awful and not the current window
     awful.key({ modkey }, "\\", function () awful.spawn('xdotool sleep 0.2 key --clearmodifiers shift+Insert') end,
-              {description = "paste primary selection", group = "awesome"})
+              {description = "paste primary selection", group = "awesome"}),
+    -- utf8 picker
+    -- TODO: the mapping is similar to kitty's <C-S-u>, but worth changing maybe?
+    awful.key({ modkey, "Shift"}, "u", function () awful.spawn('rofimoji') end,
+              { description = "select utf8 character", group = "awesome"})
 )
 
 -- Client keys {{{1
index 204ca2bc1dd9f6222444c9a0a7f166181048390f..62a56a6bf66a70226dc16c0772a1dc535d47e08e 100644 (file)
@@ -19,13 +19,17 @@ end)
 -- open steam games on tag 9 and switch to it
 awesome.register_xproperty("STEAM_GAME", "number")
 client.connect_signal("manage", function (c)
-    if c:get_xproperty("STEAM_GAME") then
+    local steam_game = c:get_xproperty("STEAM_GAME")
+    if  steam_game then
         local tag = tags[1][9]
         c:move_to_screen(1)
         c:move_to_tag(tag)
-        tag:view_only()
-        c.fullscreen = true
-        awful.placement.centered(mouse, {parent = c})
+        if steam_game ~= 769 then
+          -- 769 seems to be the value for the steam client itself
+          tag:view_only()
+          c.fullscreen = true
+          awful.placement.centered(mouse, {parent = c})
+        end
     end
 end)
 
index c476dabb39f4fb1ad4ccdd862d684058f4bba374..fc3167c1e266ba3c9be71ad2ee4ac3064d56b4f0 100644 (file)
@@ -9,10 +9,9 @@
    viewBox="0 0 1920 1080"
    sodipodi:docname="background.svg"
    xml:space="preserve"
-   inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
+   inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:svg="http://www.w3.org/2000/svg"><defs
      id="defs3785" /><sodipodi:namedview
      inkscape:deskcolor="#505050"
      showgrid="false"
      inkscape:zoom="0.47542512"
-     inkscape:cx="742.49336"
-     inkscape:cy="583.68813"
-     inkscape:window-width="1920"
-     inkscape:window-height="1060"
+     inkscape:cx="983.33046"
+     inkscape:cy="655.20307"
+     inkscape:window-width="1910"
+     inkscape:window-height="1050"
      inkscape:window-x="0"
      inkscape:window-y="20"
-     inkscape:window-maximized="0"
+     inkscape:window-maximized="1"
      inkscape:current-layer="g3787" /><g
      inkscape:groupmode="layer"
      inkscape:label="Image"
-     id="g3787"><image
-       width="1920"
-       height="1080"
-       preserveAspectRatio="none"
-       xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAABmJLR0QALgA0AEDSDCbGAAAACXBI
-WXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH4wQKBh8NcV+LuQAAABl0RVh0Q29tbWVudABDcmVhdGVk
-IHdpdGggR0lNUFeBDhcAACAASURBVHja7N3Lb1vpecDh95CHoqiLRUmkrDt1I2lRd1n2yOOZxBk0
-i6IFgrTrrrvuf9C/pdtm2y6LbrrsKkCCaYpOkgZNgaBAgAIdJI2nXTRNmo49tiVSIl8/z86WdHjO
-+2nz4YfvqDi9evFfAQAAAAAAAMDEqxgBAAAAAAAAQA4CMAAAAAAAAEASAjAAAAAAAABAEgIwAAAA
-AAAAQBICMAAAAAAAAEASAjAAAAAAAABAEgIwAAAAAAAAQBICMAAAAAAAAEASAjAAAAAAAABAEgIw
-AAAAAAAAQBICMAAAAAAAAEASAjAAAAAAAABAEgIwAAAAAAAAQBICMAAAAAA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AAIgRgAAAAAAAAgAgBGAAAAAAA
-ACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAA
-AAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAA
-AAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIAB
-AAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgB
-GAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACI
-EIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAA
-gAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAA
-AACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgANAa
-fcsAAADtSURBVAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgB
-GAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACI
-EIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAA
-gAgBGAAAAAAAACBCAAYAAAAAAACIEIABAAAAAAAAIgRgAAAAAAAAgAgBGAAAAAAAACBCAAYAAAAA
-AACIEIABAAAAAAAAIn4HA7EsyiF3uCoAAAAASUVORK5CYII=
-"
-       id="image4851"
-       x="0"
-       y="0"
-       style="display:none" /><path
-       style="display:none;fill:#8fbcbb;fill-opacity:1"
+     id="g3787"
+     style="display:inline"><path
+       style="display:inline;fill:#8fbcbb;fill-opacity:1"
        d="m 781.44238,717.28955 c 0.361,-0.94075 9.13393,-17.02825 19.4954,-35.75 45.54592,-82.29521 71.14464,-130.08517 93.35709,-174.28725 8.91282,-17.73623 16.58096,-32.24873 17.04031,-32.25 0.45934,-10e-4 5.59136,3.1781 11.40447,7.06525 11.13313,7.44457 27.71998,16.27924 29.46915,15.69618 0.56835,-0.18945 -2.95862,-3.69295 -7.83772,-7.78556 C 931.34385,479.05086 917,464.94808 917,463.0671 c 0,-0.90144 3.30537,-9.0478 7.34528,-18.10304 7.9553,-17.8314 14.17281,-32.64449 26.42796,-62.96406 4.82251,-11.93103 8.41056,-19.5 9.24393,-19.5 0.81721,0 4.50464,7.40027 9.21823,18.5 32.3175,76.10237 52.0409,116.50968 109.4897,224.31134 9.617,18.04624 17.2113,33.08559 16.8761,33.42077 -0.3352,0.33518 -5.0572,-1.52383 -10.4935,-4.13114 -9.5456,-4.5782 -27.164,-10.87799 -28.0222,-10.01985 -0.5625,0.56253 -0.9196,0.30866 10.4145,7.40262 18.0252,11.28186 40.0892,28.79513 43.8306,34.79056 5.2515,8.41521 27.8926,51.33579 27.3608,51.86759 -0.316,0.31606 -7.2384,-3.15177 -15.383,-7.7063 C 1079.189,686.26375 1043.5749,670.80491 1012,662.62051 l -12.5,-3.24007 0.5,-4.94022 c 0.275,-2.71712 0.4754,-11.46522 0.4452,-19.44022 -0.044,-11.7031 -0.48727,-16.13956 -2.2971,-23 -3.27788,-12.42528 -9.41137,-24.19613 -16.24942,-31.18443 C 974.55373,573.30924 968.6219,570.54382 960,570.60641 c -8.47308,0.0615 -14.86612,3.28087 -22.00332,11.08026 -13.20525,14.43043 -19.86477,39.83371 -17.08525,65.17317 0.68658,6.25922 0.87488,11.69808 0.41845,12.08636 -0.45643,0.38828 -6.00488,1.96874 -12.32988,3.51214 -30.35165,7.40629 -66.99781,23.22316 -112.11419,48.38967 -8.0378,4.4836 -14.94844,8.15199 -15.35699,8.15199 -0.40854,0 -0.44743,-0.7697 -0.0864,-1.71045 z"
        id="path4856"
        inkscape:label="arch" /><g
        id="g3794"
        transform="matrix(2.5254331,0,0,2.5254331,314.19741,362.48502)"
-       inkscape:label="witekio"><path
+       inkscape:label="witekio"
+       style="display:none"><path
          fill="#00B7EE"
          d="m 214.471,140.636 c -4.906,0 -9.502,-3.079 -11.24,-8.014 L 162.17,16.034 c -2.211,-6.268 1.034,-13.157 7.246,-15.389 6.207,-2.228 13.026,1.045 15.236,7.312 l 41.06,116.587 c 2.207,6.272 -1.038,13.161 -7.245,15.389 -1.318,0.474 -2.671,0.703 -3.996,0.703"
          id="path90"
-         style="fill:#8fbcbb;fill-opacity:1" /><path
+         style="display:inline;fill:#8fbcbb;fill-opacity:1" /><path
          fill="#00365E"
          d="m 342.029,0.646 c -6.207,-2.23 -13.032,1.045 -15.243,7.312 L 296.971,92.625 267.151,7.958 c -1.56,-4.421 -5.428,-7.302 -9.738,-7.862 -0.078,-0.014 -0.156,-0.028 -0.233,-0.038 -0.468,-0.05 -0.935,-0.064 -1.41,-0.057 -0.474,-0.007 -0.943,0.007 -1.41,0.057 -0.078,0.01 -0.155,0.024 -0.233,0.038 -4.311,0.561 -8.18,3.441 -9.739,7.862 l -24.849,70.29 12.659,35.951 23.555,-66.694 29.979,85.117 c 0.079,0.233 0.204,0.443 0.294,0.666 0.107,0.247 0.207,0.496 0.325,0.733 0.235,0.467 0.505,0.906 0.789,1.332 0.11,0.155 0.196,0.322 0.311,0.474 0.423,0.567 0.886,1.092 1.392,1.565 0.124,0.118 0.27,0.216 0.4,0.327 0.409,0.354 0.838,0.683 1.287,0.978 0.204,0.131 0.415,0.247 0.623,0.368 0.467,0.267 0.951,0.493 1.453,0.695 0.125,0.049 0.235,0.126 0.367,0.173 0.062,0.024 0.128,0.031 0.193,0.053 0.442,0.149 0.893,0.258 1.342,0.353 0.188,0.04 0.363,0.101 0.547,0.128 0.623,0.107 1.263,0.163 1.903,0.166 h 0.014 0.014 c 0.637,-0.003 1.276,-0.059 1.903,-0.166 0.18,-0.027 0.359,-0.088 0.543,-0.128 0.453,-0.095 0.906,-0.204 1.346,-0.353 0.063,-0.022 0.128,-0.029 0.193,-0.053 0.128,-0.047 0.239,-0.125 0.367,-0.173 0.498,-0.202 0.982,-0.429 1.453,-0.695 0.211,-0.121 0.415,-0.237 0.622,-0.368 0.45,-0.294 0.879,-0.623 1.287,-0.978 0.132,-0.111 0.277,-0.209 0.401,-0.327 0.505,-0.474 0.969,-0.998 1.391,-1.565 0.111,-0.148 0.201,-0.315 0.309,-0.47 0.287,-0.426 0.557,-0.869 0.788,-1.335 0.121,-0.237 0.219,-0.486 0.329,-0.73 0.09,-0.227 0.211,-0.436 0.298,-0.669 L 349.268,16.036 c 2.213,-6.269 -1.032,-13.159 -7.239,-15.39"
          id="path92"
-         style="fill:#5e81ac;fill-opacity:1;stroke:none" /></g></g><g
-     inkscape:groupmode="layer"
-     id="layer1"
-     inkscape:label="Image 1" /></svg>
+         style="display:inline;fill:#5e81ac;fill-opacity:1;stroke:none" /></g></g></svg>
diff --git a/bin/aur-sync-devel b/bin/aur-sync-devel
new file mode 100755 (executable)
index 0000000..f699fed
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/bash
+# Example taken from /usr/share/doc/aurutils/examples/sync-devel
+
+set -e
+argv0=sync-devel
+XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
+
+# For the purposes of this example, we assume AURDEST contains both AUR and
+# non-AUR git repositories (e.g. from github or archweb), with corresponding
+# packages in the local repository.
+AURDEST=${AURDEST:-$XDG_CACHE_HOME/aurutils/sync}
+AURVCS=".*-(cvs|svn|git|hg|bzr|darcs)$"
+
+# Pattern the defines VCS packages. The AUR has no formal definition of a VCS
+# package - here we include the most common version control systems.
+filter_vcs() {
+    awk -v "mask=$AURVCS" '$1 ~ mask {print $1}' "$@"
+}
+
+# Scratch space for intermediary results.
+mkdir -pm 0700 "${TMPDIR:-/tmp}/aurutils-$UID"
+tmp=$(mktemp -d --tmpdir "aurutils-$UID/$argv0.XXXXXXXX")
+trap 'rm -rf "$tmp"' EXIT
+
+# Retrieve a list of the local repository contents. The repository
+# can be specified with the usual aur-repo arguments.
+aur repo --list "$@" | tee "$tmp"/db | filter_vcs - >"$tmp"/vcs
+
+# Only AUR repositories can be cloned anew, as the source of non-AUR packages
+# is unknown beforehand. Their existence is checked with `git-ls-remote` (`-e`)
+# Running makepkg locally on a PKGBUILD with pkgver() results in local changes,
+# so these are removed with `--discard`. New upstream commits are then merged
+# with `git-merge` or `git-rebase` (`--sync=auto`). The final PKGBUILD is shown
+# in `aur-view` later on.
+cd "$AURDEST"
+aur fetch -e --discard --sync=auto --results="$tmp"/fetch_results - <"$tmp"/vcs
+
+# Make sure empty repositories are not considered for inspection.
+targets=()
+while IFS=: read -r mode rev_old rev path; do
+    path=${path#file://} name=${path##*/}
+
+    case $mode in
+       clone|merge|fetch|rebase|reset)
+           [[ $rev != "0" ]] && targets+=("$name") ;;
+    esac
+done <"$tmp"/fetch_results
+
+# Inspect new AUR (downstream) commits with aur-view(1). This is done
+# before running aur-srcver, which runs makepkg and sources the
+# PKGBUILD.
+aur view "${targets[@]}"
+
+# Update `epoch:pkgver-pkgrel` for each target with `aur-srcver`.
+# This runs `makepkg`, cloning upstream to the latest revision. The
+# output is then compared with the contents of the local repository.
+cat "$tmp"/db | aur vercmp -p <(aur srcver "${targets[@]}") | \
+    awk '{print $1}' >"$tmp"/ood
+
+# Build the packages. Arguments are shared between aur-repo and
+# aur-build to specify the local repository.
+if [[ -s $tmp/ood ]]; then
+    aur build "$@" -a "$tmp"/ood --syncdeps --rmdeps --noconfirm
+else
+    printf >&2 '%s: all packages up-to-date\n' "$argv0"
+fi
index b7ce1ba33ec86eb9f9dab80ea07e5da9c1348460..4844611cf35d77a60e23bbf1f201bdb0ccf4c5a6 100755 (executable)
@@ -1,5 +1,3 @@
 #!/bin/bash
 
-dirs=(/home/ramsi/Movies /mnt/Skaro/Movies)
-
-find "${dirs[@]}" -type f -printf '%H %P\n' | sed -r 's/\{[^}]+\}.*//' | sort -k1 | uniq -Df1
+find "$@" -type f -printf '%H %P\n' | sed -r 's/\{[^}]+\}.*//' | sort -k1 | uniq -Df1
index bdbb82f9097067a1fd7828f55fc610521415335a..1385b547d843071df4348f73f6c7adecab6409ca 100755 (executable)
--- a/bin/maic
+++ b/bin/maic
@@ -1,3 +1,5 @@
 #!/usr/bin/env bash
 
+set -o pipefail
+
 maim -q --select --hidecursor "$@" | xclip -selection clipboard -t image/png
index e4e1d2a6eff61d92b11042bd3e0c05a156fdfccb..63de4c9f70580dbdda5358787ca2c5551e31533d 100755 (executable)
--- a/bin/maif
+++ b/bin/maif
@@ -25,14 +25,10 @@ while [[ $# -gt 0 ]]; do
 
     case $opt in
         -h|--help)     usage; exit 0 ;;
-        -* )
-            echo -e "\n  Option does not exist : $opt\n"
-            usage; exit 1 ;;
-
         *) args+=("$opt"); shift ;;
     esac
 done
 
 geometry="$(slop)"
 file="$(date "+%FT%T_${geometry%%+*}_maif.png")"
-maim --geometry="${geometry}" $file
+maim "${args[@]}" --geometry="${geometry}" $file
index 722cc5f715956f58a583c4ec077ad058b8997abc..6980487aeef81e218ceb584da7f64cafc98f8326 100755 (executable)
@@ -7,9 +7,11 @@ import sys
 outformat = "qif"
 # outformat = "csv"
 
+
 class UnknownAccountError(Exception):
     pass
 
+
 def get_account(data):
     account_id = data["transactions"][0]["account_id"]
     if account_id == "":
@@ -19,6 +21,7 @@ def get_account(data):
 
     raise UnknownAccountError(account_id)
 
+
 if __name__ == "__main__":
     with open(sys.argv[1], 'r') if len(sys.argv) > 1 else sys.stdin as fp:
         data = json.load(fp)
@@ -46,6 +49,11 @@ if __name__ == "__main__":
             else:
                 payee = t["merchant"]["name"]
             memo = t["description"]
+            try:
+                memo = "Tab: {}".format(t["tab"]["name"])
+            except KeyError:
+                pass
+
             memo += "\n{local_amount} {local_currency}".format(**t)
             notes = t["notes"]
             if outformat == "csv":
diff --git a/bin/org-agenda b/bin/org-agenda
new file mode 100755 (executable)
index 0000000..a39a449
--- /dev/null
@@ -0,0 +1,91 @@
+#!/bin/python
+
+from glob import glob
+from os import path, get_terminal_size
+import orgparse
+from datetime import date
+
+# TODO: read org location from config
+org_glob = '~/org/**.org'
+org_todos = ['TODO', 'WAITING', 'NEXT']
+org_dones = ['DONE', 'CANCELLED']
+
+
+def org_is_archived(root):
+    return "ARCHIVE" in root.tags
+
+
+def org_is_overdue(node, end=None):
+    if not node.scheduled:
+        return False
+
+    if node.todo in org_dones:
+        return False
+
+    if node.closed:
+        return False
+
+    if end is None:
+        end = orgparse.date.OrgDate(date.today())
+
+    r = orgparse.date.OrgDate(0, end)
+    return node.scheduled.has_overlap(r)
+
+
+def org_is_scheduled(node: orgparse.node, start=None, end=None):
+    if not node.scheduled:
+        return False
+
+    if node.todo in org_dones:
+        return False
+
+    if start is None and end is None:
+        return True
+
+    if start is None:
+        start = orgparse.date.OrgDate(0)
+
+    if end is None:
+        end = start
+
+    r = orgparse.date.OrgDate(start, end)
+    return node.scheduled.has_overlap(r)
+
+
+def format_tags(tags):
+    if not tags:
+        return ""
+    return "".join([":{}:".format(t) for t in tags])
+
+
+def print_node(node):
+    [f, _] = path.splitext(path.basename(n.env.filename))
+    [cols, rows] = get_terminal_size()
+    wf = 12
+    wh = min(50, cols - wf)
+    wt = cols - wf - wh
+    print("{:<{wf}}{:<{wh}}{:>{wt}}".format(f+":", "{} {}".format(n.todo, n.heading)[:wh], format_tags(n.tags),
+            wf=wf, wh=wh, wt=wt))
+
+
+nodes_today = []
+nodes_overdue = []
+nodes_done_today = []
+#TODO nodes_deadline
+for org_file in glob(path.expanduser(org_glob)):
+    with open(org_file) as f:
+        env = orgparse.node.OrgEnv(todos=org_todos, dones=org_dones, filename=org_file)
+        root = orgparse.load(f, env=env)
+        # print(root.env.all_todo_keys)
+        for node in root[1:]:
+            if org_is_archived(node):
+                continue
+            if org_is_overdue(node, date.today()):
+                nodes_overdue.append(node)
+            elif org_is_scheduled(node, date.today()):
+                nodes_today.append(node)
+
+for n in nodes_overdue:
+    print_node(n)
+for n in nodes_today:
+    print_node(n)
diff --git a/bin/shorten b/bin/shorten
new file mode 100755 (executable)
index 0000000..33f41f2
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+# https://brettterpstra.com/2016/04/27/shell-tricks-shorten-every-line-of-output/
+
+#TODO allow different width to be set
+c=$(tput cols)
+w=$((c - 1))
+cat | sed -E "s/(.{$w}).*$/\1…/"
diff --git a/bin/xkbload b/bin/xkbload
new file mode 100755 (executable)
index 0000000..607385b
--- /dev/null
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+# This script is meant to be called by inputplug when a new input device event happened.
+
+xkb_config=$XDG_CONFIG_HOME/xkb
+xkb_file=$xkb_config/default.xkb
+[[ -f $xkb_config/$(hostname).xkb ]] && xkb_file=$(hostname)
+
+XIDeviceEnabled()
+{
+    kinadv2="Kinesis Advantage2 Keyboard"
+    if [[ "$device_name" == "$kinadv2" ]]; then
+        # HACK: if I don't sleep, capslock is enabled on reconnect
+        sleep 0.1
+        echo "xkbcomp default.xkb"
+        xkbcomp -w0 -I$xkb_config $xkb_file $DISPLAY -i $device_id
+    fi
+}
+
+call_event_handler()
+{
+    case $(type -t $event_type) in
+        function) $event_type ;;
+        *) echo "No handler for event '$event_type'" ;;
+    esac
+}
+
+if [[ $# -eq 4 ]]; then
+    # See inputplug(1)
+    event_type=$1
+    device_id=$2
+    device_type=$3
+    device_name=$4
+    call_event_handler
+else
+    # if not called with four args, loop over all devices
+    event_type=XIDeviceEnabled
+    for device_id in $(xinput list --id-only); do
+        device_name="$(xinput list --name-only $device_id)"
+        device_type="UnknownTODO"  # don't know how to get this easily
+        call_event_handler
+    done
+fi
index a759c2e95004ba4e0c18886c1f912ced60fb8388..8f78436ffe94d24443dc3ba9116c24065f96208e 100644 (file)
@@ -56,3 +56,5 @@
 
 [includeIf "gitdir:~/src/fpp/**"]
        path = ~/.config/git/fpp.config
+[credential]
+       helper = cache
index 2a4ea8e8fc49eca21bea37d1e2ad1dd403485dad..73883419e38926d50404650ef8f8684ad1a42232 100644 (file)
@@ -243,9 +243,13 @@ allow_hyperlinks yes
 
 #: Process hyperlink (OSC 8) escape sequences. If disabled OSC 8
 #: escape sequences are ignored. Otherwise they become clickable
-#: links, that you can click by holding down ctrl+shift and clicking
-#: with the mouse. The special value of ``ask`` means that kitty will
-#: ask before opening the link.
+#: links, that you can click with the mouse or by using the hints
+#: kitten <https://sw.kovidgoyal.net/kitty/kittens/hints/>. The
+#: special value of ask means that kitty will ask before opening the
+#: link when clicked.
+
+shell_integration no-sudo
+
 
 term xterm-kitty
 
index 11aa5d75d2a33e47d0a4892f74781c0e0fabc170..6f705abe8d77fb95c078e1e90d230270b8412168 100644 (file)
@@ -42,10 +42,9 @@ Channel mailfence/bin
 Far  :mailfence-remote:"Trash"
 Near :mailfence-local:"trash"
 
-Channel mailfence/youtube
-Far  :mailfence-remote:
-Near :mailfence-local:
-Patterns youtube*
+Channel mailfence/important
+Far  :mailfence-remote:important
+Near :mailfence-local:important
 
 Channel mailfence/archive
 Far  :mailfence-remote:
@@ -56,9 +55,9 @@ Group mailfence
 Channel mailfence/inbox
 Channel mailfence/drafts
 Channel mailfence/sent
+Channel mailfence/important
 Channel mailfence/spam
 Channel mailfence/bin
-Channel mailfence/youtube
 Channel mailfence/archive
 
 IMAPAccount     fpp
index 0392e66accc02cb51ed45bfe2942f8a51c5227eb..2f3b64409293e01b8d5ca474b3e3812de2556d61 100644 (file)
@@ -1,5 +1,6 @@
 # default
 ytdl
-ytdl-format=bestvideo*[height<=720][vcodec!=?vp9]+bestaudio/best[height<=720]
+ytdl-format=bestvideo*[height<=720]+bestaudio/best[height<=720]
 cache=auto
+sub-auto=fuzzy
 no-sub
index 3bc608bb1ff3876cc9fc573b99bb4963c2184169..620ea28ab36551d8363262e4cd301ceee7903be1 100644 (file)
@@ -18,6 +18,7 @@ macro index,pager a "<pipe-message>khard add-email<return>" "add the sender addr
 
 mailboxes +mailfence/inbox
 mailboxes +mailfence/sent
+mailboxes +mailfence/important
 mailboxes +mailfence/youtube
 mailboxes +mailfence/archive
 mailboxes +mailfence/drafts
@@ -25,6 +26,7 @@ mailboxes +mailfence/spam
 mailboxes +mailfence/trash
 
 macro index,pager gi "<change-folder>+mailfence/inbox<return>"   "go to inbox"
+macro index,pager gI "<change-folder>+mailfence/important<return>"   "go to important"
 macro index,pager gy "<change-folder>+mailfence/youtube<return>" "go to youtube"
 macro index,pager ga "<change-folder>+mailfence/archive<return>" "go to archive"
 macro index,pager gs "<change-folder>+mailfence/spam<return>"    "go to spam"
index 469977b1e694b57d827db66071bf0c25ac07b557..649b0f2dd69c8467d0d3ea512ee31fdda204453d 100644 (file)
@@ -36,6 +36,13 @@ macro pager F "\
 <enter-command> set resolve=\$my_resolve<enter>" \
 "Flag message without resolving"
 
+#FIXME: doesn't work because <forward-message> is interactive
+# macro index,pager <esc>f "\
+# <enter-command> set my_mime_forward=\$mime_forward mime_forward=yes<enter>\
+# <forward-message>\
+# <enter-command> set mime_forward=\$my_mime_forward<enter>" \
+# "Forward message as attachement"
+
 # Remap bounce-message function to “B”
 bind index,pager B bounce-message
 bind index,pager R group-reply
index ece1443b0752be66d64de76dce859756ce4070d1..83346d8fb08b5124ca6e7de9cff21eca27abfa6e 100644 (file)
@@ -6,7 +6,7 @@ color   normal     color15        default
 color   status     brightblue  default
 color   indicator  color15        color235
 color   tree       color8         default
-color   error      brightcolor15  color196
+color   error      bold color15  color196
 color   markers    color142       default
 
 uncolor index *
@@ -15,11 +15,11 @@ color   index      color8       default ~P
 # threads containing new messages
 color   index      color4      default "~(~N)"
 # new messages + sidebar
-color   index      brightcolor3   default ~N
+color   index      bold color3   default ~N
 # tagged
-color   index      brightcolor12  default ~T
+color   index      bold color12  default ~T
 # deleted
-color   index      brightcolor1       default ~D
+color   index      bold color1       default ~D
 
 uncolor header *
 # set up the headers
@@ -31,14 +31,14 @@ color   header     blue           default "^date:"
 color   header     brightyellow   default "^subject: "
 
 # message bodies
-color   attachment brightcolor211 default
-color   search     brightcolor16  color221
+color   attachment bold color211 default
+color   search     bold color16  color221
 color   signature  color243       default
 color   tilde      color240       default
 
 uncolor body *
 color   body       color137       default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+"
-color   bold       brightcolor15  default
+color   bold       bold color15  default
 # gpg
 color   body       brightgreen    default "^gpg: Good signature.*"
 color   body       brightred      default "^gpg: BAD signature.*"
index e7ddad0d1d6052d9d2255574331fa002ecd244c4..e64064d755a6a2ac567d92b444bc697be20c75d8 100644 (file)
@@ -1,4 +1,4 @@
-text/html;       $XDG_CONFIG_HOME/mutt/mutt_bgrun qutebrowser %s; test=test -n "$DISPLAY"; nametemplate=%s.html
+text/html;       $XDG_CONFIG_HOME/mutt/mutt_bgrun qutebrowser --temp-basedir %s; test=test -n "$DISPLAY"; nametemplate=%s.html
 text/html;       w3m -I %{charset} -dump %s -T text/html -cols "$COLUMNS" -o display_link_number=1; copiousoutput; nametemplate=%s.html
 text/calendar;   $XDG_CONFIG_HOME/mutt/ical2txt; copiousoutput
 # generate html from dmarc report, testing against *rmz.io* because all other tests were too difficult
index 5407875068d33d7519174ff210d251143cb9388b..ddd4c456f3cb74f2abb86038d53e3ef7bb0412ba 100644 (file)
@@ -20,8 +20,7 @@ autocenter_mode = "yes"
 user_interface  = "alternative"
 media_library_primary_tag = "album_artist"
 
-visualizer_fifo_path = "/tmp/mpd.fifo"
+visualizer_data_source = "/tmp/mpd.fifo"
 visualizer_output_name = "fifo"
-visualizer_sync_interval = "30"
 visualizer_in_stereo = "yes"
 visualizer_type = "spectrum" (spectrum/wave)
diff --git a/nvim/.gitignore b/nvim/.gitignore
new file mode 100644 (file)
index 0000000..cc5457a
--- /dev/null
@@ -0,0 +1,8 @@
+tt.*
+.tests
+doc/tags
+debug
+.repro
+foo.*
+*.log
+data
diff --git a/nvim/.neoconf.json b/nvim/.neoconf.json
new file mode 100644 (file)
index 0000000..7c48087
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "neodev": {
+    "library": {
+      "enabled": true,
+      "plugins": true
+    }
+  },
+  "neoconf": {
+    "plugins": {
+      "lua_ls": {
+        "enabled": true
+      }
+    }
+  }
+}
diff --git a/nvim/LICENSE b/nvim/LICENSE
new file mode 100644 (file)
index 0000000..261eeb9
--- /dev/null
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/nvim/README.md b/nvim/README.md
new file mode 100644 (file)
index 0000000..185280b
--- /dev/null
@@ -0,0 +1,4 @@
+# 💤 LazyVim
+
+A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
+Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
diff --git a/nvim/init.lua b/nvim/init.lua
new file mode 100644 (file)
index 0000000..ffbd395
--- /dev/null
@@ -0,0 +1,9 @@
+-- load original vimrc file
+vim.cmd([[ source $XDG_CONFIG_HOME/vim/vimrc ]])
+
+-- TODO: review if I want this for some buffers
+vim.g.autoformat = false
+
+-- bootstrap lazy.nvim, LazyVim and your plugins
+package.loaded["lazyvim.config.options"] = true
+require("config.lazy")
diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua
new file mode 100644 (file)
index 0000000..2e26068
--- /dev/null
@@ -0,0 +1,33 @@
+-- Autocmds are automatically loaded on the VeryLazy event
+
+local function augroup(name)
+  return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true })
+end
+
+-- Highlight on yank
+vim.api.nvim_create_autocmd("TextYankPost", {
+  group = augroup("highlight_yank"),
+  callback = function()
+    vim.highlight.on_yank()
+  end,
+})
+
+-- close some filetypes with <q>
+vim.api.nvim_create_autocmd("FileType", {
+  group = augroup("close_with_q"),
+  pattern = {
+    "PlenaryTestPopup",
+    "help",
+    "lspinfo",
+    "man",
+    "notify",
+    "qf",
+    "spectre_panel",
+    "startuptime",
+    "tsplayground",
+  },
+  callback = function(event)
+    vim.bo[event.buf].buflisted = false
+    vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
+  end,
+})
diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua
new file mode 100644 (file)
index 0000000..e8b8287
--- /dev/null
@@ -0,0 +1,93 @@
+-- Keymaps are automatically loaded on the VeryLazy event
+
+local Util = require("lazyvim.util")
+
+local function map(mode, lhs, rhs, opts)
+  local keys = require("lazy.core.handler").handlers.keys
+  ---@cast keys LazyKeysHandler
+  -- do not create the keymap if a lazy keys handler exists
+  if not keys.active[keys.parse({ lhs, mode = mode }).id] then
+    opts = opts or {}
+    opts.silent = opts.silent ~= false
+    vim.keymap.set(mode, lhs, rhs, opts)
+  end
+end
+
+-- Resize window using <ctrl> arrow keys
+-- TODO: this is cool, but should also support a number
+map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
+map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
+map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
+map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
+
+-- Move Lines
+map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move down" })
+map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move up" })
+map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move down" })
+map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move up" })
+map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
+map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
+
+-- buffers
+if Util.has("bufferline.nvim") then
+  map("n", "<S-h>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
+  map("n", "<S-l>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
+  map("n", "[b", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
+  map("n", "]b", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
+else
+  map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
+  map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
+  map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
+  map("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
+end
+map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
+map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
+
+-- Clear search with <esc>
+map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
+
+-- Clear search, diff update and redraw
+-- taken from runtime/lua/_editor.lua
+map(
+  "n",
+  "<leader>ur",
+  "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>",
+  { desc = "Redraw / clear hlsearch / diff update" }
+)
+
+map({ "n", "x" }, "gw", "*N", { desc = "Search word under cursor" })
+
+-- Add undo break-points
+map("i", ",", ",<c-g>u")
+map("i", ".", ".<c-g>u")
+map("i", ";", ";<c-g>u")
+
+-- lazy
+map("n", "<leader>l", "<cmd>:Lazy<cr>", { desc = "Lazy" })
+
+-- new file
+map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
+
+if not Util.has("trouble.nvim") then
+  map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
+  map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
+end
+
+-- stylua: ignore start
+
+-- toggle options
+map("n", "<leader>uf", Util.format.toggle, { desc = "Toggle format on Save" })
+map("n", "<leader>ud", Util.toggle.diagnostics, { desc = "Toggle Diagnostics" })
+local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
+map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
+
+-- highlights under cursor
+if vim.fn.has("nvim-0.9.0") == 1 then
+  map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
+end
+
+-- floating terminal
+-- TODO: I prefer a split buffer for terminal, need to review how to make this more vim-like
+map("n", "<leader>ft", function() Util.float_term(nil, { cwd = Util.get_root() }) end, { desc = "Terminal (root dir)" })
+map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
+map("t", "<esc><esc>", "<c-\\><c-n>", {desc = "Enter Normal Mode"})
diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua
new file mode 100644 (file)
index 0000000..bad9b58
--- /dev/null
@@ -0,0 +1,52 @@
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not vim.loop.fs_stat(lazypath) then
+  -- bootstrap lazy.nvim
+  -- stylua: ignore
+  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
+end
+vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
+
+require("lazy").setup({
+  spec = {
+    -- add LazyVim and import its plugins
+    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
+    -- import any extras modules here
+    -- { import = "lazyvim.plugins.extras.lang.typescript" },
+    -- { import = "lazyvim.plugins.extras.lang.json" },
+    -- { import = "lazyvim.plugins.extras.ui.mini-animate" },
+    -- import/override with your plugins
+    { import = "plugins" },
+  },
+  defaults = {
+    -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
+    -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
+    lazy = false,
+    -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
+    -- have outdated releases, which may break your Neovim install.
+    version = false, -- always use the latest git commit
+    -- version = "*", -- try installing the latest stable version for plugins that support semver
+  },
+  install = { colorscheme = { "tokyonight", "habamax" } },
+  checker = {
+    -- automatically check for plugin updates
+    enabled = true,
+    notify = false,
+  },
+  performance = {
+    rtp = {
+      -- HACK: do not reset rtp to allow interop with vim-plug
+      reset = false,
+      -- disable some rtp plugins
+      disabled_plugins = {
+        "gzip",
+        -- "matchit",
+        -- "matchparen",
+        "netrwPlugin",
+        "tarPlugin",
+        "tohtml",
+        "tutor",
+        "zipPlugin",
+      },
+    },
+  },
+})
diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua
new file mode 100644 (file)
index 0000000..5fce922
--- /dev/null
@@ -0,0 +1,24 @@
+-- Options are automatically loaded before lazy.nvim startup
+
+local opt = vim.opt
+
+vim.g.man_hardwrap = 1
+vim.env.MANWIDTH = 80
+
+vim.diagnostic.config({ virtual_text = false })
+
+-- TODO: also try noinsert
+opt.completeopt = "menu,menuone,noselect"
+
+-- Some settings taken from LazyVim's default options
+opt.pumblend = 10 -- Popup blend
+opt.pumheight = 10 -- Maximum number of entries in a popup
+opt.showmode = false -- Dont show mode since we have a statusline
+opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
+opt.updatetime = 200 -- Save swap file and trigger CursorHold
+if vim.fn.has("nvim-0.9.0") == 1 then
+  opt.splitkeep = "screen"
+  opt.shortmess:append({ C = true })
+end
+-- do not let markdown plugin change indent
+vim.g.markdown_recommended_style = 0
diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua
new file mode 100644 (file)
index 0000000..324dc4e
--- /dev/null
@@ -0,0 +1,142 @@
+---@type LazyPluginSpec
+return {
+  -- snippets
+  {
+    "L3MON4D3/LuaSnip",
+    -- disable luasnip bindings for <tab> and <s-tab>
+    dependencies = {
+      {
+        "honza/vim-snippets",
+        config = function()
+          require("luasnip.loaders.from_snipmate").lazy_load()
+          require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/lua/snippets" })
+        end,
+      },
+    },
+    keys = function()
+      return {}
+    end,
+    opts = {
+      store_selection_keys = "<Tab>",
+    },
+  },
+
+  -- auto completion
+  {
+    "hrsh7th/nvim-cmp",
+    ---@param opts cmp.ConfigSchema
+    opts = function(_, opts)
+      local has_words_before = function()
+        unpack = unpack or table.unpack
+        local line, col = unpack(vim.api.nvim_win_get_cursor(0))
+        return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
+      end
+
+      local cmp = require("cmp")
+      local luasnip = require("luasnip")
+
+      local upstream_format = opts.formatting.format
+      opts.formatting.format = function(entry, vim_item)
+        vim_item = upstream_format(entry, vim_item)
+        local menu = {
+          nvim_lsp = "[lsp]",
+          luasnip = "[snip]",
+          buffer = "[buf]",
+          path = "[path]",
+        }
+        vim_item.menu = menu[entry.source.name]
+        return vim_item
+      end
+
+      opts.completion = vim.tbl_extend("force", opts.completion, {
+        completeopt = "menu,menuone,noselect",
+      })
+      -- TODO: review if I want to keep any of LazyVim's mappings
+      opts.mapping = cmp.mapping.preset.insert({
+        -- lazyvims
+        ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
+        ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
+        ["<C-b>"] = cmp.mapping.scroll_docs(-4),
+        ["<C-f>"] = cmp.mapping.scroll_docs(4),
+        ["<C-e>"] = cmp.mapping.abort(),
+        ["<C-Space>"] = cmp.mapping.complete(),
+        -- mine
+        ["<Tab>"] = cmp.mapping(function(fallback)
+          if cmp.visible() then
+            cmp.select_next_item()
+          elseif luasnip.expand_or_jumpable() then
+            luasnip.expand_or_jump()
+          elseif has_words_before() then
+            cmp.complete()
+          else
+            fallback()
+          end
+        end, { "i", "s" }),
+        ["<S-Tab>"] = cmp.mapping(function(fallback)
+          if cmp.visible() then
+            cmp.select_prev_item()
+          elseif luasnip.jumpable(-1) then
+            luasnip.jump(-1)
+          else
+            fallback()
+          end
+        end, { "i", "s" }),
+      })
+    end,
+  },
+
+  -- auto pairs
+  {
+    "echasnovski/mini.pairs",
+  },
+
+  -- surround
+  {
+    "echasnovski/mini.surround",
+    keys = function()
+      -- HACK: use function to disable merging with LazyVim's keys definition
+      return {
+        { "ys", desc = "Add surrounding", "n" },
+        { "S", desc = "Add surrounding", "x" },
+        { "ds", desc = "Delete surrounding" },
+        { "cs", desc = "Change surrounding" },
+        { "yss", "ys_", remap = true },
+      }
+    end,
+    opts = {
+      mappings = {
+        -- TODO: this is tpope/surround like, but should consider using vim-sandwich mappings
+        -- see: :h MiniSurround-vim-surround-config
+        add = "ys",
+        delete = "ds",
+        find = "",
+        find_left = "",
+        highlight = "",
+        replace = "cs",
+        update_n_lines = "",
+      },
+    },
+    config = function(_, opts)
+      require("mini.surround").setup(opts)
+      -- remap visual
+      vim.keymap.del("x", "ys", { silent = true })
+      vim.keymap.set("x", "S", [[:<C-u>lua MiniSurround.add('visual')<CR>]], { silent = true })
+    end,
+  },
+  -- comments
+  {
+    "numToStr/Comment.nvim",
+    opts = {
+      toggler = {
+        line = "gcc",
+        block = "gbb",
+      },
+      mappings = {
+        basic = true,
+        extra = true,
+      },
+    },
+  },
+  { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false },
+  { "echasnovski/mini.comment", enabled = false },
+}
diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua
new file mode 100644 (file)
index 0000000..8e1ae25
--- /dev/null
@@ -0,0 +1,83 @@
+---@type LazyPluginSpec
+return {
+  {
+    "LazyVim",
+    opts = { colorscheme = "onenord" },
+    dependencies = { "onenord.nvim" },
+  },
+  {
+    -- this meta plugin can be used to install all colorschemes to test with telescope
+    name = "colorschemes",
+    dir = "",
+    lazy = true,
+    dependencies = {
+      {
+        -- requires too much configuration to make look good
+        "rmehri01/onenord.nvim",
+        opts = function(_, opts)
+          local colors = require("onenord.colors").load()
+          opts = vim.tbl_extend("force", opts, {
+            custom_highlights = {
+              ["@parameter"] = { fg = colors.fg },
+              ["@namespace"] = { fg = colors.fg },
+              ["@type"] = { fg = colors.fg },
+              ["@variable.builtin"] = { fg = colors.fg },
+            },
+          })
+          return opts
+        end,
+      },
+      { "folke/tokyonight.nvim" },
+      {
+        "catppuccin/nvim",
+        name = "catppuccin",
+        opts = {
+          color_overrides = {
+            -- https://github.com/catppuccin/nvim/discussions/323#discussioncomment-5760383
+            mocha = {
+              rosewater = "#BF616A",
+              flamingo = "#BF616A",
+              pink = "#B48EAD",
+              mauve = "#B48EAD",
+              red = "#BF616A",
+              maroon = "#BF616A",
+              peach = "#D08770",
+              yellow = "#EBCB8B",
+              green = "#A3BE8C",
+              teal = "#88c0d0",
+              sky = "#88c0d0",
+              sapphire = "#88c0d0",
+              blue = "#81a1c1",
+              lavender = "#81a1c1",
+              text = "#ECEFF4",
+              subtext1 = "#E5E9F0",
+              subtext0 = "#D8DEE9",
+              overlay2 = "#8d9196",
+              overlay1 = "#81858b",
+              overlay0 = "#4C566A",
+              surface2 = "#434C5E",
+              surface1 = "#3B4252",
+              surface0 = "#292e39",
+              base = "#242933",
+              mantle = "#20242d",
+              crust = "#1c2028",
+            },
+          },
+        },
+      },
+      {
+        "shaunsingh/nord.nvim",
+        dev = true,
+        init = function()
+          vim.g.nord_contrats = true
+          vim.g.nord_borders = true
+          vim.g.nord_bold = false
+          vim.g.nord_uniform_diff_background = false
+          vim.g.nord_disable_background = false
+        end,
+      },
+      -- conflicts with above
+      -- { "gbprod/nord.nvim"},
+    },
+  },
+}
diff --git a/nvim/lua/plugins/core.lua b/nvim/lua/plugins/core.lua
new file mode 100644 (file)
index 0000000..fecdfd8
--- /dev/null
@@ -0,0 +1,13 @@
+---@type LazyPluginSpec
+return {
+  {
+    "LazyVim/LazyVim",
+    opts = {
+      defaults = {
+        autocmds = false,
+        options = false,
+        keymaps = false,
+      },
+    },
+  },
+}
diff --git a/nvim/lua/plugins/dap.lua b/nvim/lua/plugins/dap.lua
new file mode 100644 (file)
index 0000000..302edc4
--- /dev/null
@@ -0,0 +1,140 @@
+return {
+  "mfussenegger/nvim-dap",
+
+  dependencies = {
+    -- fancy UI for the debugger
+    {
+      "rcarriga/nvim-dap-ui",
+      -- stylua: ignore
+      keys = {
+        { "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
+        { "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
+      },
+      opts = {},
+      config = function(_, opts)
+        local dap = require("dap")
+        local dapui = require("dapui")
+        dapui.setup(opts)
+        dap.listeners.after.event_initialized["dapui_config"] = function()
+          dapui.open({})
+        end
+        dap.listeners.before.event_terminated["dapui_config"] = function()
+          dapui.close({})
+        end
+        dap.listeners.before.event_exited["dapui_config"] = function()
+          dapui.close({})
+        end
+      end,
+    },
+
+    -- virtual text for the debugger
+    {
+      "theHamsta/nvim-dap-virtual-text",
+      opts = {},
+    },
+
+    -- which key integration
+    {
+      "folke/which-key.nvim",
+      opts = {
+        defaults = {
+          ["<leader>d"] = { name = "+debug" },
+          ["<leader>da"] = { name = "+adapters" },
+        },
+      },
+    },
+
+    -- mason.nvim integration
+    {
+      "jay-babu/mason-nvim-dap.nvim",
+      dependencies = "mason.nvim",
+      cmd = { "DapInstall", "DapUninstall" },
+      opts = {
+        -- Makes a best effort to setup the various debuggers with
+        -- reasonable debug configurations
+        automatic_setup = true,
+
+        -- You can provide additional configuration to the handlers,
+        -- see mason-nvim-dap README for more information
+        handlers = {},
+
+        -- You'll need to check that you have the required things installed
+        -- online, please don't ask me how to install them :)
+        ensure_installed = {
+          "cpptools",
+        },
+      },
+      config = function(_, opts)
+        require("mason-nvim-dap").setup(opts)
+        local dap = require("dap")
+        dap.configurations.cpp = {
+          {
+            name = "Launch file",
+            type = "cppdbg",
+            request = "launch",
+            program = function()
+              return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
+            end,
+            cwd = "${workspaceFolder}",
+            stopAtEntry = true,
+          },
+        }
+      end,
+    },
+
+    {
+      "jbyuki/one-small-step-for-vimkind",
+      -- stylua: ignore
+      keys = {
+        { "<leader>daL", function() require("osv").launch({ port = 8086 }) end, desc = "Adapter Lua Server" },
+        { "<leader>dal", function() require("osv").run_this() end, desc = "Adapter Lua" },
+      },
+      config = function()
+        local dap = require("dap")
+        dap.adapters.nlua = function(callback, config)
+          callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 8086 })
+        end
+        dap.configurations.lua = {
+          {
+            type = "nlua",
+            request = "attach",
+            name = "Attach to running Neovim instance",
+          },
+        }
+      end,
+    },
+  },
+
+  -- stylua: ignore
+  keys = {
+    { "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
+    { "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
+    { "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
+    { "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
+    { "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
+    { "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
+    { "<leader>dj", function() require("dap").down() end, desc = "Down" },
+    { "<leader>dk", function() require("dap").up() end, desc = "Up" },
+    { "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
+    { "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
+    { "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
+    { "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
+    { "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
+    { "<leader>ds", function() require("dap").session() end, desc = "Session" },
+    { "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
+    { "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
+  },
+
+  config = function()
+    local Config = require("lazyvim.config")
+    vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
+
+    for name, sign in pairs(Config.icons.dap) do
+      sign = type(sign) == "table" and sign or { sign }
+      vim.fn.sign_define(
+        "Dap" .. name,
+        { text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
+      )
+    end
+  end,
+}
diff --git a/nvim/lua/plugins/editor.lua b/nvim/lua/plugins/editor.lua
new file mode 100644 (file)
index 0000000..1ec7312
--- /dev/null
@@ -0,0 +1,118 @@
+local Util = require("lazyvim.util")
+
+---@type LazyPluginSpec
+return {
+  {
+    "nvim-telescope/telescope.nvim",
+    keys = {
+      { "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
+      -- from lazyvim
+      { "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
+      { "<leader>/", Util.telescope("live_grep"), desc = "Grep (root dir)" },
+      { "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
+      { "<leader><space>", Util.telescope("files"), desc = "Find Files (root dir)" },
+      { "<leader><space>", false },
+      -- find
+      { "<leader>fb", "<cmd>Telescope buffers sort_lastused=true<CR>", desc = "Buffers" },
+      -- { "<leader>ff", Util.telescope("files"), desc = "Find Files (root dir)" },
+      { "<leader>ff", false }, -- fswitch
+      { "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
+      { "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
+      { "<leader>fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" },
+      -- git
+      -- { "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
+      { "<leader>gc", false },
+      -- { "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
+      { "<leader>gs", false },
+      -- search
+      { "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
+      { "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
+      { "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
+      { "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
+      { "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document diagnostics" },
+      { "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace diagnostics" },
+      { "<leader>sg", Util.telescope("live_grep"), desc = "Grep (root dir)" },
+      { "<leader>sG", Util.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
+      { "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
+      { "<leader>sH", "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
+      { "<leader>sk", "<cmd>Telescope keymaps<cr>", desc = "Key Maps" },
+      { "<leader>sM", "<cmd>Telescope man_pages<cr>", desc = "Man Pages" },
+      { "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
+      { "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
+      { "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
+      { "<leader>sw", Util.telescope("grep_string"), desc = "Word (root dir)" },
+      { "<leader>sW", Util.telescope("grep_string", { cwd = false }), desc = "Word (cwd)" },
+      { "<leader>uC", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
+      -- {
+      --   "<leader>ss",
+      --   Util.telescope("lsp_document_symbols", {
+      --     symbols = {
+      --       "Class",
+      --       "Function",
+      --       "Method",
+      --       "Constructor",
+      --       "Interface",
+      --       "Module",
+      --       "Struct",
+      --       "Trait",
+      --       "Field",
+      --       "Property",
+      --     },
+      --   }),
+      --   desc = "Goto Symbol",
+      -- },
+      { "<leader>ss", false }, -- use for snippets below
+      {
+        "<leader>sS",
+        Util.telescope("lsp_dynamic_workspace_symbols", {
+          symbols = {
+            "Class",
+            "Function",
+            "Method",
+            "Constructor",
+            "Interface",
+            "Module",
+            "Struct",
+            "Trait",
+            "Field",
+            "Property",
+          },
+        }),
+        desc = "Goto Symbol (Workspace)",
+      },
+    },
+  },
+  {
+    "benfowler/telescope-luasnip.nvim",
+    dependencies = {
+      "telescope.nvim",
+    },
+    config = function()
+      require("telescope").load_extension("luasnip")
+    end,
+    keys = { { "<leader>ss", "<cmd>Telescope luasnip<cr>", desc = "Snippets" } },
+  },
+  {
+    "neo-tree.nvim",
+    lazy = false,
+    opts = {
+      filesystem = {
+        -- TODO: review these
+        bind_to_cwd = false,
+        follow_current_file = {
+          enabled = false,
+        },
+      },
+    },
+    keys = function()
+      local NeoTree = function(args)
+        return function()
+          require("neo-tree.command").execute(args)
+        end
+      end
+      return {
+        { "<leader>fe", NeoTree({ toggle = true, dir = vim.loop.cwd() }) },
+      }
+    end,
+  },
+}
diff --git a/nvim/lua/plugins/example.lua b/nvim/lua/plugins/example.lua
new file mode 100644 (file)
index 0000000..39f342f
--- /dev/null
@@ -0,0 +1,267 @@
+-- since this is just an example spec, don't actually load anything here and return an empty spec
+-- stylua: ignore
+if true then return {} end
+
+-- every spec file under config.plugins will be loaded automatically by lazy.nvim
+--
+-- In your plugin files, you can:
+-- * add extra plugins
+-- * disable/enabled LazyVim plugins
+-- * override the configuration of LazyVim plugins
+return {
+  -- add gruvbox
+  { "ellisonleao/gruvbox.nvim" },
+
+  -- Configure LazyVim to load gruvbox
+  {
+    "LazyVim/LazyVim",
+    opts = {
+      colorscheme = "gruvbox",
+    },
+  },
+
+  -- change trouble config
+  {
+    "folke/trouble.nvim",
+    -- opts will be merged with the parent spec
+    opts = { use_diagnostic_signs = true },
+  },
+
+  -- disable trouble
+  { "folke/trouble.nvim", enabled = false },
+
+  -- add symbols-outline
+  {
+    "simrat39/symbols-outline.nvim",
+    cmd = "SymbolsOutline",
+    keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
+    config = true,
+  },
+
+  -- override nvim-cmp and add cmp-emoji
+  {
+    "hrsh7th/nvim-cmp",
+    dependencies = { "hrsh7th/cmp-emoji" },
+    ---@param opts cmp.ConfigSchema
+    opts = function(_, opts)
+      local cmp = require("cmp")
+      opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
+    end,
+  },
+
+  -- change some telescope options and a keymap to browse plugin files
+  {
+    "nvim-telescope/telescope.nvim",
+    keys = {
+      -- add a keymap to browse plugin files
+      -- stylua: ignore
+      {
+        "<leader>fp",
+        function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
+        desc = "Find Plugin File",
+      },
+    },
+    -- change some options
+    opts = {
+      defaults = {
+        layout_strategy = "horizontal",
+        layout_config = { prompt_position = "top" },
+        sorting_strategy = "ascending",
+        winblend = 0,
+      },
+    },
+  },
+
+  -- add telescope-fzf-native
+  {
+    "telescope.nvim",
+    dependencies = {
+      "nvim-telescope/telescope-fzf-native.nvim",
+      build = "make",
+      config = function()
+        require("telescope").load_extension("fzf")
+      end,
+    },
+  },
+
+  -- add pyright to lspconfig
+  {
+    "neovim/nvim-lspconfig",
+    ---@class PluginLspOpts
+    opts = {
+      ---@type lspconfig.options
+      servers = {
+        -- pyright will be automatically installed with mason and loaded with lspconfig
+        pyright = {},
+      },
+    },
+  },
+
+  -- add tsserver and setup with typescript.nvim instead of lspconfig
+  {
+    "neovim/nvim-lspconfig",
+    dependencies = {
+      "jose-elias-alvarez/typescript.nvim",
+      init = function()
+        require("lazyvim.util").on_attach(function(_, buffer)
+          -- stylua: ignore
+          vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
+          vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
+        end)
+      end,
+    },
+    ---@class PluginLspOpts
+    opts = {
+      ---@type lspconfig.options
+      servers = {
+        -- tsserver will be automatically installed with mason and loaded with lspconfig
+        tsserver = {},
+      },
+      -- you can do any additional lsp server setup here
+      -- return true if you don't want this server to be setup with lspconfig
+      ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
+      setup = {
+        -- example to setup with typescript.nvim
+        tsserver = function(_, opts)
+          require("typescript").setup({ server = opts })
+          return true
+        end,
+        -- Specify * to use this function as a fallback for any server
+        -- ["*"] = function(server, opts) end,
+      },
+    },
+  },
+
+  -- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
+  -- treesitter, mason and typescript.nvim. So instead of the above, you can use:
+  { import = "lazyvim.plugins.extras.lang.typescript" },
+
+  -- add more treesitter parsers
+  {
+    "nvim-treesitter/nvim-treesitter",
+    opts = {
+      ensure_installed = {
+        "bash",
+        "help",
+        "html",
+        "javascript",
+        "json",
+        "lua",
+        "markdown",
+        "markdown_inline",
+        "python",
+        "query",
+        "regex",
+        "tsx",
+        "typescript",
+        "vim",
+        "yaml",
+      },
+    },
+  },
+
+  -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
+  -- would overwrite `ensure_installed` with the new value.
+  -- If you'd rather extend the default config, use the code below instead:
+  {
+    "nvim-treesitter/nvim-treesitter",
+    opts = function(_, opts)
+      -- add tsx and treesitter
+      vim.list_extend(opts.ensure_installed, {
+          "tsx",
+          "typescript",
+      })
+    end,
+  },
+
+  -- the opts function can also be used to change the default opts:
+  {
+    "nvim-lualine/lualine.nvim",
+    event = "VeryLazy",
+    opts = function(_, opts)
+      table.insert(opts.sections.lualine_x, "😄")
+    end,
+  },
+
+  -- or you can return new options to override all the defaults
+  {
+    "nvim-lualine/lualine.nvim",
+    event = "VeryLazy",
+    opts = function()
+      return {
+        --[[add your custom lualine config here]]
+      }
+    end,
+  },
+
+  -- use mini.starter instead of alpha
+  { import = "lazyvim.plugins.extras.ui.mini-starter" },
+
+  -- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
+  { import = "lazyvim.plugins.extras.lang.json" },
+
+  -- add any tools you want to have installed below
+  {
+    "williamboman/mason.nvim",
+    opts = {
+      ensure_installed = {
+        "stylua",
+        "shellcheck",
+        "shfmt",
+        "flake8",
+      },
+    },
+  },
+
+  -- Use <tab> for completion and snippets (supertab)
+  -- first: disable default <tab> and <s-tab> behavior in LuaSnip
+  {
+    "L3MON4D3/LuaSnip",
+    keys = function()
+      return {}
+    end,
+  },
+  -- then: setup supertab in cmp
+  {
+    "hrsh7th/nvim-cmp",
+    dependencies = {
+      "hrsh7th/cmp-emoji",
+    },
+    ---@param opts cmp.ConfigSchema
+    opts = function(_, opts)
+      local has_words_before = function()
+        unpack = unpack or table.unpack
+        local line, col = unpack(vim.api.nvim_win_get_cursor(0))
+        return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
+      end
+
+      local luasnip = require("luasnip")
+      local cmp = require("cmp")
+
+      opts.mapping = vim.tbl_extend("force", opts.mapping, {
+        ["<Tab>"] = cmp.mapping(function(fallback)
+          if cmp.visible() then
+            cmp.select_next_item()
+            -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
+            -- they way you will only jump inside the snippet region
+          elseif luasnip.expand_or_jumpable() then
+            luasnip.expand_or_jump()
+          elseif has_words_before() then
+            cmp.complete()
+          else
+            fallback()
+          end
+        end, { "i", "s" }),
+        ["<S-Tab>"] = cmp.mapping(function(fallback)
+          if cmp.visible() then
+            cmp.select_prev_item()
+          elseif luasnip.jumpable(-1) then
+            luasnip.jump(-1)
+          else
+            fallback()
+          end
+        end, { "i", "s" }),
+      })
+    end,
+  },
+}
diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua
new file mode 100644 (file)
index 0000000..3354f7d
--- /dev/null
@@ -0,0 +1,98 @@
+return {
+  -- lspconfig
+  {
+    "neovim/nvim-lspconfig",
+    ---@class PluginLspOpts
+    --
+    init = function ()
+      local keys = require("lazyvim.plugins.lsp.keymaps").get()
+
+      -- TODO: setup a new mapping for this
+      -- { "gr", "<cmd>Telescope lsp_references<cr>", desc = "References" },
+      keys[#keys+1] = { "gr", false }
+    end,
+    opts = {
+      -- Automatically format on save
+      -- autoformat = false,
+      -- LSP Server Settings
+      ---@type lspconfig.options
+      servers = {
+        lua_ls = {
+          settings = {
+            Lua = {
+              diagnostics = {
+                disable = { "missing-fields", },
+              },
+            },
+          },
+        },
+        -- Add clangd extensions
+        -- https://github.com/p00f/clangd_extensions.nvim
+        ruff_lsp = {
+          root_dir = function(fname)
+            return require("lspconfig.util").root_pattern("pyproject.toml", "setup.cfg", "ruff.toml")(fname)
+          end,
+        },
+        pylsp = {
+          settings = {
+            pylsp = {
+              plugins = {
+                autopep8 = { enabled = false },
+                flake8 = { enabled = false },
+                mccabe = { enabled = false },
+                pycodestyle = { enabled = false },
+                pydocstyle = { enabled = false },
+                pyflakes = { enabled = false },  -- covered by flake8
+              }
+            }
+          }
+        }
+      },
+      -- you can do any additional lsp server setup here
+      -- return true if you don't want this server to be setup with lspconfig
+      ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
+      setup = {
+        -- example to setup with typescript.nvim
+        -- tsserver = function(_, opts)
+        --   require("typescript").setup({ server = opts })
+        --   return true
+        -- end,
+        -- Specify * to use this function as a fallback for any server
+        -- ["*"] = function(server, opts) end,
+      },
+    },
+  },
+
+  -- cmdline tools and lsp servers
+  {
+
+    "williamboman/mason.nvim",
+    cmd = "Mason",
+    keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
+    opts = {
+      ensure_installed = {
+        "stylua",
+        "shfmt",
+        -- "flake8",
+      },
+    },
+    ---@param opts MasonSettings | {ensure_installed: string[]}
+    config = function(_, opts)
+      require("mason").setup(opts)
+      local mr = require("mason-registry")
+      local function ensure_installed()
+        for _, tool in ipairs(opts.ensure_installed) do
+          local p = mr.get_package(tool)
+          if not p:is_installed() then
+            p:install()
+          end
+        end
+      end
+      if mr.refresh then
+        mr.refresh(ensure_installed)
+      else
+        ensure_installed()
+      end
+    end,
+  },
+}
diff --git a/nvim/lua/plugins/nvim-treesitter.lua b/nvim/lua/plugins/nvim-treesitter.lua
new file mode 100644 (file)
index 0000000..8b87f09
--- /dev/null
@@ -0,0 +1,23 @@
+return {
+  -- add more treesitter parsers
+  {
+    "nvim-treesitter/nvim-treesitter",
+    opts = {
+      -- overwrites the settings from LazyVim
+      ensure_installed = {
+        "bash",
+        "c",
+        "html",
+        "json",
+        "lua",
+        "markdown",
+        "markdown_inline",
+        "python",
+        "regex",
+        "vim",
+        "vimdoc",
+        "yaml",
+      },
+    },
+  },
+}
diff --git a/nvim/lua/plugins/productivity.lua b/nvim/lua/plugins/productivity.lua
new file mode 100644 (file)
index 0000000..a612c82
--- /dev/null
@@ -0,0 +1,120 @@
+-- TODO: finish this
+-- Create a function that deindents all lines according to the indentation of the first
+local function d(s)
+  local std = require("std")
+  local _, e = string.find(s, '^%s*')
+  local ss = std.string.split(s, '')
+  local dedent = function(str) return str:sub(e + 1) end
+  return std.functional.map(dedent, std.elems, ss)
+end
+
+---@type LazyPluginSpec
+return {
+  {
+    "nvim-orgmode/orgmode",
+    opts = {
+      org_agenda_files = { "~/org/**/*.org" },
+      org_default_notes_file = "~/org/refile.org",
+      mappings = {
+        prefix = "go",
+        global = {
+          org_agenda = "goa",
+          org_capture = "goc",
+        },
+      },
+      win_split_mode = function(name)
+        local bufnr = vim.api.nvim_create_buf(false, true)
+        vim.api.nvim_buf_set_name(bufnr, name)
+
+        if name == "orgagenda" then
+          vim.cmd("botright 80vsplit")
+          local win = vim.api.nvim_get_current_win()
+          vim.api.nvim_win_set_buf(win, bufnr)
+          return
+        end
+
+        local fill = 0.8
+        local width = math.floor((vim.o.columns * fill))
+        local height = math.floor((vim.o.lines * fill))
+        local row = math.floor((((vim.o.lines - height) / 2) - 1))
+        local col = math.floor(((vim.o.columns - width) / 2))
+        vim.api.nvim_open_win(bufnr, true, {
+          relative = "editor",
+          width = width,
+          height = height,
+          row = row,
+          col = col,
+          style = "minimal",
+          border = "rounded",
+        })
+      end,
+      org_agenda_span = "week",
+      org_agenda_start_on_weekday = false,
+      org_agenda_start_day = "-2d",
+      org_archive_location = "archive/%s_archive::",
+      org_log_done = 'time',
+      org_log_into_drawer = "LOGBOOK",
+      org_indent_mode = "noindent",
+      org_tags_column = -80, -- flushright
+      org_todo_keywords = { "TODO(t)", "NEXT(n)", "WAITING(w)", "|", "DONE", "CANCELLED" },
+      org_todo_keyword_faces = {
+        TODO = ":foreground #bf616a",
+        NEXT = ":foreground blue",
+        WAITING = ":foreground yellow",
+        CANCELLED = ":foreground grey",
+      },
+      org_capture_templates = {
+        t = {
+          description = "Task",
+          template = "* TODO %?\n:PROPERTIES:\n:CREATED:  %U\n:END:",
+        },
+        l = "Log Task",
+        lh = {
+          description = "Log Task",
+          template = [[
+* DONE %?
+SCHEDULED: %t
+]],
+        },
+        lw = {
+          description = "Log Task (work)",
+          template = [[
+* DONE %?
+SCHEDULED: %t
+]],
+          target = "~/org/work.org",
+          headline = "Tasks"
+        },
+        j = {
+          description = "Journal",
+          template = "\n*** %u\n**** %U - %?",
+          target = "~/org/journal.org",
+        },
+        m = {
+          description = "Meeting",
+          template = "* Meeting %U\n%?",
+          target = "~/org/work.org",
+          headline = "Meetings",
+        },
+      },
+    },
+    dependencies = {
+      {
+        "nvim-treesitter",
+        opts = function(_, opts)
+          if type(opts.highlight) == "table" then
+            opts.hightlight = vim.tbl_extend("error", opts.highlight, {
+              additional_vim_regex_highlighting = { "org" },
+            })
+          end
+          if type(opts.ensure_installed) == "table" then
+            vim.list_extend(opts.ensure_installed, { "org" })
+          end
+        end,
+      },
+    },
+    init = function()
+      require("orgmode").setup_ts_grammar()
+    end,
+  },
+}
diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua
new file mode 100644 (file)
index 0000000..9745a30
--- /dev/null
@@ -0,0 +1,147 @@
+---@type LazyPluginSpec
+return {
+  {
+    "nvim-notify",
+  },
+  {
+    "bufferline.nvim",
+    ---@type BufferlineConfig
+    opts = {
+      options = {
+        always_show_bufferline = false,
+      },
+    },
+  },
+  {
+    "noice.nvim",
+    enabled = false,
+    ---@type NoiceConfig
+    opts = {
+      presets = {
+        command_palette = false, -- don't position the cmdline and popupmenu together
+        lsp_doc_border = true,
+        long_message_to_split = true,
+      },
+      cmdline = {
+        view = "cmdline",
+      },
+      routes = {
+        { -- send file written messages to mini
+          filter = {
+            event = "msg_show",
+            kind = "",
+            find = "%[w%]",
+          },
+          opts = { skip = true },
+        },
+      },
+    },
+    config = function(_, opts)
+      -- ensure [w] is written to msg_show so we can match it
+      vim.opt.shortmess:append("w")
+      vim.opt.shortmess:remove("W")
+
+      require("noice").setup(opts)
+    end,
+  },
+  {
+    "lualine.nvim",
+    --TODO: Things that were in vim but are missing
+    -- - git line add/mod/del ar next to branch name rather on right
+    -- - one status line per splits
+    --   - maybe a single one is OK too?
+    --   - I think I want a line stating wihch file is in the split though
+    --   - unix/dos eof markers
+    --     - really I only want to know if it's not unix
+    --   - filetype in text form. It's quite important to glance this quickly
+  },
+  {
+    "indent-blankline.nvim",
+  },
+  {
+    "mini.indentscope",
+    opts = {
+      draw = {
+        animation = require("mini.indentscope").gen_animation.linear({ duration = 10 }),
+      },
+    },
+  },
+  {
+    "nvimdev/dashboard-nvim",
+  -- TODO: create cool dashboard header
+  -- generate logo from text here:
+  -- https://patorjk.com/software/taag/#p=testall&v=0&f=Computer&t=NEOVIM
+  -- Can also use use `chafa` and aplha.term to generate text from cli, see
+  -- https://github.com/goolord/alpha-nvim/discussions/16#discussioncomment-4915947
+  -- https://github.com/goolord/alpha-nvim/discussions/16#discussioncomment-5065731
+  -- To add orgmode agenda button in alpha
+  -- dashboard.button("a", "󰕪 " .. " View Agenda", ":lua require('orgmode').action('agenda.agenda')<CR>"),
+    opts = function()
+      local logo = [[
+           ██╗      █████╗ ███████╗██╗   ██╗██╗   ██╗██╗███╗   ███╗          Z
+           ██║     ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║   ██║██║████╗ ████║      Z    
+           ██║     ███████║  ███╔╝  ╚████╔╝ ██║   ██║██║██╔████╔██║   z       
+           ██║     ██╔══██║ ███╔╝    ╚██╔╝  ╚██╗ ██╔╝██║██║╚██╔╝██║ z         
+           ███████╗██║  ██║███████╗   ██║    ╚████╔╝ ██║██║ ╚═╝ ██║           
+           ╚══════╝╚═╝  ╚═╝╚══════╝   ╚═╝     ╚═══╝  ╚═╝╚═╝     ╚═╝           
+  ]]
+
+      logo = string.rep("\n", 8) .. logo .. "\n\n"
+
+      local opts = {
+        theme = "doom",
+        hide = {
+          -- this is taken care of by lualine
+          -- enabling this messes up the actual laststatus setting after loading a file
+          statusline = false,
+        },
+        config = {
+          header = vim.split(logo, "\n"),
+          -- stylua: ignore
+          center = {
+            { action = [[lua require('orgmode').action('agenda.agenda')]],         desc = " View Agenda",     icon = "󰕪 ", key = "a" },
+            { action = "Telescope find_files",                                     desc = " Find file",       icon = " ", key = "f" },
+            { action = "ene | startinsert",                                        desc = " New file",        icon = " ", key = "n" },
+            { action = "Telescope oldfiles",                                       desc = " Recent files",    icon = " ", key = "r" },
+            { action = [[lua require("lazyvim.util").telescope.config_files()()]], desc = " Config",          icon = " ", key = "c" },
+            { action = 'lua require("persistence").load()',                        desc = " Restore Session", icon = " ", key = "s" },
+            { action = "LazyExtras",                                               desc = " Lazy Extras",     icon = " ", key = "x" },
+            { action = "Lazy",                                                     desc = " Lazy",            icon = "󰒲 ", key = "l" },
+          },
+          footer = function()
+            local stats = require("lazy").stats()
+            local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
+            return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
+          end,
+        },
+      }
+
+      for _, button in ipairs(opts.config.center) do
+        button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
+        button.key_format = "  %s"
+      end
+
+      -- close Lazy and re-open when the dashboard is ready
+      if vim.o.filetype == "lazy" then
+        vim.cmd.close()
+        vim.api.nvim_create_autocmd("User", {
+          pattern = "DashboardLoaded",
+          callback = function()
+            require("lazy").show()
+          end,
+        })
+      end
+
+      return opts
+    end
+  },
+  {
+    "nvim-navic",
+  },
+  {
+    "nvim-web-devicons",
+  },
+  {
+    "nui.nvim",
+  },
+}
diff --git a/nvim/lua/snippets/all.lua b/nvim/lua/snippets/all.lua
new file mode 100644 (file)
index 0000000..40c6cdb
--- /dev/null
@@ -0,0 +1,17 @@
+-- TODO: finish this
+local comment_calculate = require("Comment.ft").calculate
+local comment_utils = require("Comment.utils")
+
+return {
+  s(
+    "FPP",
+    fmt(
+      [[Copyright © Focal Point Positioning Limited {year}. All Rights Reserved.
+This code is the copyright of Focal Point Positioning Limited and
+cannot be used, copied or distributed without the express written
+permission of Focal Point Positioning Limited.
+]],
+      { year = i("year", os.date("%Y")) }
+    )
+  ),
+}
diff --git a/nvim/stylua.toml b/nvim/stylua.toml
new file mode 100644 (file)
index 0000000..0f90030
--- /dev/null
@@ -0,0 +1,3 @@
+indent_type = "Spaces"
+indent_width = 2
+column_width = 120
index 77b9ee086a51f810a5bd5e6b328511c6c87b271c..e622edaef300fb8127ff61f4fcbfaea88ac449fc 100644 (file)
@@ -1,2 +1,3 @@
 /qsettings/
 autoconfig.yml
+/bookmarks/
index 5a091a58a1eb3202119ce6bcdd9cbf51c0cb807c..0994d6b3a1ac2fb8c6c09624d7a8a65af4d7519a 100644 (file)
@@ -1,14 +1,11 @@
-## Autogenerated config.py
-##
-## NOTE: config.py is intended for advanced users who are comfortable
-## with manually migrating the config file on qutebrowser upgrades. If
-## you prefer, you can also configure qutebrowser using the
-## :set/:bind/:config-* commands without having to write a config.py
-## file.
-##
-## Documentation:
-##   qute://help/configuring.html
-##   qute://help/settings.html
+# noqa: D100
+
+from qutebrowser.config.configfiles import ConfigAPI
+from qutebrowser.config.config import ConfigContainer
+
+c: ConfigContainer = c      # noqa: F821 pylint: disable=E0602,C0103
+config: ConfigAPI = config  # noqa: F821 pylint: disable=E0602,C0103
+
 
 def in_terminal(cmd: list):
     """Wraps cmd to be run in the default TERMINAL, as set by environment.
@@ -20,31 +17,8 @@ def in_terminal(cmd: list):
     t = getenv('TERMINAL', 'xterm')
     return [t, '-e'] + cmd
 
-try:
-    from qutebrowser.api import interceptor, message
-    from PyQt5.QtCore import QUrl
-
-    def intercept(info: interceptor.Request):
-        url = info.request_url
-        if url.host() == "twitter.com":
-            url.setHost("nitter.eu")
-            message.info("Redirecting to " + url.toString())
-            info.redirect(url)
-        if url.host() == "xkcd.com":
-            url.setHost("m.xkcd.com")
-            message.info("Redirecting to " + url.toString())
-            info.redirect(url)
-        if url.host() == "www.bristolpost.co.uk":
-            url.setUrl("https://outline.com/" + url.toString())
-            message.info("Redirecting to " + url.toString())
-            info.redirect(url)
-
-    interceptor.register(intercept)
-except ImportError:
-    pass
-
-## This is here so configs done via the GUI are still loaded.
-## Remove it to not load settings done via the GUI.
+
+## Change the argument to True to still load settings configured via autoconfig.yml
 config.load_autoconfig(True)
 
 ## Aliases for commands. The keys of the given dictionary are the
@@ -108,7 +82,16 @@ c.auto_save.session = True
 ## key. Note that when a key is bound (via `bindings.default` or
 ## `bindings.commands`), the mapping is ignored.
 ## Type: Dict
-c.bindings.key_mappings = {'<Ctrl-6>': '<Ctrl-^>', '<Ctrl-M>': '<Return>', '<Ctrl-J>': '<Return>', '<Ctrl-I>': '<Tab>', '<Shift-Return>': '<Return>', '<Enter>': '<Return>', '<Shift-Enter>': '<Return>', '<Ctrl-Enter>': '<Ctrl-Return>'}
+c.bindings.key_mappings = {
+    '<Ctrl-6>': '<Ctrl-^>',
+    '<Ctrl-M>': '<Return>',
+    '<Ctrl-J>': '<Return>',
+    '<Ctrl-I>': '<Tab>',
+    '<Shift-Return>': '<Return>',
+    '<Enter>': '<Return>',
+    '<Shift-Enter>': '<Return>',
+    '<Ctrl-Enter>': '<Ctrl-Return>'
+}
 
 ## When to show a changelog after qutebrowser was upgraded.
 ## Type: String
@@ -144,6 +127,8 @@ c.changelog_after_upgrade = 'patch'
 ## `colors.webpage.darkmode.threshold.text` to 150 and
 ## `colors.webpage.darkmode.threshold.background` to 205.  - "With
 ## selective inversion of everything": Combines the two variants   above.
+## - "With increased text contrast": Set
+## `colors.webpage.darkmode.increase_text_contrast` (QtWebEngine 6.3+)
 ## Type: Bool
 # c.colors.webpage.darkmode.enabled = False
 
@@ -159,6 +144,10 @@ c.changelog_after_upgrade = 'patch'
 ## Type: Float
 # c.colors.webpage.darkmode.grayscale.images = 0.0
 
+## Increase text contrast by drawing an outline of the uninverted color.
+## Type: Bool
+# c.colors.webpage.darkmode.increase_text_contrast = False
+
 ## Which images to apply dark mode to. With QtWebEngine 5.15.0, this
 ## setting can cause frequent renderer process crashes due to a
 ## https://codereview.qt-project.org/c/qt/qtwebengine-
@@ -220,6 +209,7 @@ c.changelog_after_upgrade = 'patch'
 ## this list show up in the completion window under the Filesystem
 ## category when the command line contains `:open` but no argument.
 ## Type: List of String
+# TODO:
 # c.completion.favorite_paths = []
 
 ## Height (in pixels or as percentage of the window) of the completion.
@@ -478,7 +468,7 @@ c.content.headers.accept_language = 'en-UK;q=1.0, en;q=0.9, de;q=0.7, fr;q=0.7,
 ## the full referer. No restart is needed with QtWebKit.
 ## Type: String
 ## Valid values:
-##   - always: Always send the Referer.
+##   - always: Always send the Referer. With QtWebEngine 6.2+, this value is unavailable and will act like `same-domain`.
 ##   - never: Never send the Referer. This is not recommended, as some sites may break.
 ##   - same-domain: Only send the Referer for the same domain. This will still protect your privacy, but shouldn't break any sites. With QtWebEngine, the referer will still be sent for other domains, but with stripped path information.
 # c.content.headers.referer = 'same-domain'
@@ -636,19 +626,17 @@ config.set('content.notifications.enabled', True, '*://*.gitlab.com/*')
 config.set('content.notifications.enabled', True, '*://*.google.com/*')
 
 ## What notification presenter to use for web notifications. Note that
-## not all implementations support all features of notifications: - With
-## PyQt 5.14, any setting other than `qt` does not support  the `click`
-## and   `close` events, as well as the `tag` option to replace existing
-## notifications. - The `qt` and `systray` options only support showing
-## one notification at the time   and ignore the `tag` option to replace
-## existing notifications. - The `herbe` option only supports showing one
+## not all implementations support all features of notifications: - The
+## `qt` and `systray` options only support showing one notification at
+## the time   and ignore the `tag` option to replace existing
+## notifications. - The `herbe` option only supports showing one
 ## notification at the time and doesn't   show icons. - The `messages`
 ## option doesn't show icons and doesn't support the `click` and
 ## `close` events.
 ## Type: String
 ## Valid values:
 ##   - auto: Tries `libnotify`, `systray` and `messages`, uses the first one available without showing error messages.
-##   - qt: Use Qt's native notification presenter, based on a system tray icon. Switching from or to this value requires a restart of qutebrowser. Recommended over `systray` on PyQt 5.14.
+##   - qt: Use Qt's native notification presenter, based on a system tray icon. Switching from or to this value requires a restart of qutebrowser.
 ##   - libnotify: Shows messages via DBus in a libnotify-compatible way. If DBus isn't available, falls back to `systray` or `messages`, but shows an error message.
 ##   - systray: Use a notification presenter based on a systray icon. Falls back to `libnotify` or `messages` if not systray is available. This is a reimplementation of the `qt` setting value, but with the possibility to switch to it at runtime.
 ##   - messages: Show notifications as qutebrowser messages. Most notification features aren't available.
@@ -689,7 +677,7 @@ c.content.pdfjs = True
 ## this setting is set to False, the system-wide animation setting is
 ## considered.
 ## Type: Bool
-# c.content.prefers_reduced_motion = False
+c.content.prefers_reduced_motion = True
 
 ## Draw the background color and images also when the page is printed.
 ## Type: Bool
@@ -733,10 +721,7 @@ with config.pattern('*://calendar.google.com/*') as p:
 ## Type: Bool
 # c.content.site_specific_quirks.enabled = True
 
-## Disable a list of named quirks. The js-string-replaceall quirk is
-## needed for Nextcloud Calendar < 2.2.0 with QtWebEngine < 5.15.3.
-## However, the workaround is not fully compliant to the ECMAScript spec
-## and might cause issues on other websites, so it's disabled by default.
+## Disable a list of named quirks.
 ## Type: FlagList
 ## Valid values:
 ##   - ua-whatsapp
@@ -746,12 +731,10 @@ with config.pattern('*://calendar.google.com/*') as p:
 ##   - js-whatsapp-web
 ##   - js-discord
 ##   - js-string-replaceall
-##   - js-globalthis
-##   - js-object-fromentries
 ##   - js-array-at
 ##   - misc-krunker
 ##   - misc-mathml-darkmode
-# c.content.site_specific_quirks.skip = ['js-string-replaceall']
+# c.content.site_specific_quirks.skip = []
 
 ## How to proceed on TLS certificate errors.
 ## Type: String
@@ -776,7 +759,8 @@ with config.pattern('*://calendar.google.com/*') as p:
 
 ## Enable WebGL.
 ## Type: Bool
-# c.content.webgl = True
+c.content.webgl = False
+config.set('content.webgl', True, '*://meet.google.com/*')
 
 ## Which interfaces to expose via WebRTC.
 ## Type: String
@@ -965,6 +949,10 @@ c.fonts.default_family = ["Fira Code"]
 ## Type: Font
 # c.fonts.tabs.unselected = 'default_size default_family'
 
+## Font used for tooltips. If set to null, the Qt default is used.
+## Type: Font
+# c.fonts.tooltip = None
+
 ## Font family for cursive fonts.
 ## Type: FontFamily
 # c.fonts.web.family.cursive = ''
@@ -1083,31 +1071,32 @@ c.hints.scatter = False
 ## CSS selectors used to determine which elements on a page should have
 ## hints.
 ## Type: Dict
-c.hints.selectors = {'all': ['a', 'area', 'textarea', 'select',
-                             'input:not([type="hidden"])', 'button', 'frame',
-                             'iframe', 'img', 'link', 'summary',
-                             '[contenteditable]:not([contenteditable="false"])',
-                             '[onclick]', '[onmousedown]', '[role="link"]',
-                             '[role="option"]', '[role="button"]',
-                             '[role="tab"]', '[role="checkbox"]',
-                             '[role="menuitem"]', '[role="menuitemcheckbox"]',
-                             '[role="menuitemradio"]', '[role="treeitem"]',
-                             '[ng-click]', '[ngClick]', '[data-ng-click]',
-                             '[x-ng-click]', '[tabindex]:not([tabindex="-1"])'],
-                     'links': ['a[href]', 'area[href]', 'link[href]', '[role="link"][href]'],
-                     'images': ['img'],
-                     'media': ['audio', 'img', 'video'],
-                     'url': ['[src]', '[href]'],
-                     'inputs': ['input[type="text"]', 'input[type="date"]',
-                                'input[type="datetime-local"]',
-                                'input[type="email"]', 'input[type="month"]',
-                                'input[type="number"]', 'input[type="password"]',
-                                'input[type="search"]', 'input[type="tel"]',
-                                'input[type="time"]', 'input[type="url"]',
-                                'input[type="week"]', 'input:not([type])',
-                                '[contenteditable]:not([contenteditable="false"])',
-                                'textarea']
-                     }
+# TODO: reduce hints on some websites like reddit
+c.hints.selectors = {
+    'all': [
+        'a', 'area', 'textarea', 'select', 'input:not([type="hidden"])',
+        'button', 'frame', 'iframe', 'img', 'link', 'summary',
+        '[contenteditable]:not([contenteditable="false"])', '[onclick]',
+        '[onmousedown]', '[role="link"]', '[role="option"]', '[role="button"]',
+        '[role="tab"]', '[role="checkbox"]', '[role="menuitem"]',
+        '[role="menuitemcheckbox"]', '[role="menuitemradio"]',
+        '[role="treeitem"]', '[aria-haspopup]', '[ng-click]', '[ngClick]',
+        '[data-ng-click]', '[x-ng-click]', '[tabindex]:not([tabindex="-1"])'
+    ],
+    'links': ['a[href]', 'area[href]', 'link[href]', '[role="link"][href]'],
+    'images': ['img'],
+    'media': ['audio', 'img', 'video'],
+    'url': ['[src]', '[href]'],
+    'inputs': [
+        'input[type="text"]', 'input[type="date"]',
+        'input[type="datetime-local"]', 'input[type="email"]',
+        'input[type="month"]', 'input[type="number"]',
+        'input[type="password"]', 'input[type="search"]', 'input[type="tel"]',
+        'input[type="time"]', 'input[type="url"]', 'input[type="week"]',
+        'input:not([type])',
+        '[contenteditable]:not([contenteditable="false"])', 'textarea'
+    ]
+}
 
 ## Make characters in hint strings uppercase.
 ## Type: Bool
@@ -1286,6 +1275,17 @@ c.new_instance_open_target_window = 'last-visible'
 ## Type: List of String
 c.qt.args = ['proxy-pac-url=file://' + str(config.configdir / 'proxy.pac')]
 
+## Enables Web Platform features that are in development. This passes the
+## `--enable-experimental-web-platform-features` flag to Chromium. By
+## default, this is enabled with Qt 5 to maximize compatibility despite
+## an aging Chromium base.
+## Type: String
+## Valid values:
+##   - always: Enable experimental web platform features.
+##   - auto: Enable experimental web platform features when using Qt 5.
+##   - never: Disable experimental web platform features.
+# c.qt.chromium.experimental_web_platform_features = 'auto'
+
 ## When to use Chromium's low-end device mode. This improves the RAM
 ## usage of renderer processes, at the expense of performance.
 ## Type: String
@@ -1293,13 +1293,14 @@ c.qt.args = ['proxy-pac-url=file://' + str(config.configdir / 'proxy.pac')]
 ##   - always: Always use low-end device mode.
 ##   - auto: Decide automatically (uses low-end mode with < 1 GB available RAM).
 ##   - never: Never use low-end device mode.
+# TODO: maybe never?
 # c.qt.chromium.low_end_device_mode = 'auto'
 
 ## Which Chromium process model to use. Alternative process models use
 ## less resources, but decrease security and robustness. See the
 ## following pages for more details:    -
 ## https://www.chromium.org/developers/design-documents/process-models
-## - https://doc.qt.io/qt-5/qtwebengine-features.html#process-models
+## - https://doc.qt.io/qt-6/qtwebengine-features.html#process-models
 ## Type: String
 ## Valid values:
 ##   - process-per-site-instance: Pages from separate sites are put into separate processes and separate visits to the same site are also isolated.
@@ -1357,13 +1358,25 @@ c.qt.args = ['proxy-pac-url=file://' + str(config.configdir / 'proxy.pac')]
 # c.qt.force_software_rendering = 'none'
 
 ## Turn on Qt HighDPI scaling. This is equivalent to setting
-## QT_AUTO_SCREEN_SCALE_FACTOR=1 or QT_ENABLE_HIGHDPI_SCALING=1 (Qt >=
-## 5.14) in the environment. It's off by default as it can cause issues
-## with some bitmap fonts. As an alternative to this, it's possible to
-## set font sizes and the `zoom.default` setting.
+## QT_ENABLE_HIGHDPI_SCALING=1 (Qt >= 5.14) in the environment. It's off
+## by default as it can cause issues with some bitmap fonts. As an
+## alternative to this, it's possible to set font sizes and the
+## `zoom.default` setting.
 ## Type: Bool
 # c.qt.highdpi = False
 
+## Disable accelerated 2d canvas to avoid graphical glitches. On some
+## setups graphical issues can occur on sites like Google sheets and
+## PDF.js. These don't occur when accelerated 2d canvas is turned off, so
+## we do that by default. So far these glitches only occur on some Intel
+## graphics devices.
+## Type: String
+## Valid values:
+##   - always: Disable accelerated 2d canvas
+##   - auto: Disable on Qt6 < 6.6.0, enable otherwise
+##   - never: Enable accelerated 2d canvas
+# c.qt.workarounds.disable_accelerated_2d_canvas = 'auto'
+
 ## Work around locale parsing issues in QtWebEngine 5.15.3. With some
 ## locales, QtWebEngine 5.15.3 is unusable without this workaround. In
 ## affected scenarios, QtWebEngine will log "Network service crashed,
@@ -1804,6 +1817,7 @@ c.url.searchengines = {'DEFAULT':        'https://duckduckgo.com/?t=chakra&q={}'
                        'fpp/confluence': 'https://fppnt.atlassian.net/wiki/search?text={}',
                        'evk':            'https://gitlab.com/search?&scope=issues&group_id=13301433&search={}',
                        'dev':            'https://devdocs.io/#q={}',
+                       'phind':          'https://www.phind.com/search?q={}',
                       }
 
 ## Page(s) to open at the start.
@@ -1853,9 +1867,9 @@ c.url.searchengines = {'DEFAULT':        'https://duckduckgo.com/?t=chakra&q={}'
 # config.bind("'", 'mode-enter jump_mark')
 # config.bind('+', 'zoom-in')
 # config.bind('-', 'zoom-out')
-# config.bind('.', 'repeat-command')
-# config.bind('/', 'set-cmd-text /')
-# config.bind(':', 'set-cmd-text :')
+# config.bind('.', 'cmd-repeat-last')
+# config.bind('/', 'cmd-set-text /')
+# config.bind(':', 'cmd-set-text :')
 # config.bind(';I', 'hint images tab')
 # config.bind(';O', 'hint links fill :open -t -r {hint-url}')
 # config.bind(';R', 'hint --rapid links window')
@@ -1911,9 +1925,9 @@ config.bind('<Escape>', 'clear-keychain ;; search ;; fullscreen --leave ;; fake-
 # config.bind('<back>', 'back')
 # config.bind('<forward>', 'forward')
 # config.bind('=', 'zoom')
-# config.bind('?', 'set-cmd-text ?')
+# config.bind('?', 'cmd-set-text ?')
 # config.bind('@', 'macro-run')
-# config.bind('B', 'set-cmd-text -s :quickmark-load -t')
+# config.bind('B', 'cmd-set-text -s :quickmark-load -t')
 # config.bind('D', 'tab-close -o')
 # config.bind('F', 'hint all tab')
 # config.bind('G', 'scroll-to-perc')
@@ -1923,7 +1937,7 @@ config.bind('J', 'tab-prev')
 # config.bind('L', 'forward')
 # config.bind('M', 'bookmark-add')
 # config.bind('N', 'search-prev')
-# config.bind('O', 'set-cmd-text -s :open -t')
+# config.bind('O', 'cmd-set-text -s :open -t')
 # config.bind('PP', 'open -t -- {primary}')
 # config.bind('Pp', 'open -t -- {clipboard}')
 # config.bind('R', 'reload -f')
@@ -1931,7 +1945,7 @@ config.bind('J', 'tab-prev')
 # config.bind('Sh', 'history')
 # config.bind('Sq', 'bookmark-list')
 # config.bind('Ss', 'set')
-# config.bind('T', 'set-cmd-text -sr :tab-focus')
+# config.bind('T', 'cmd-set-text -sr :tab-focus')
 # config.bind('U', 'undo -w')
 # config.bind('V', 'mode-enter caret ;; selection-toggle --line')
 # config.bind('ZQ', 'quit')
@@ -1940,7 +1954,7 @@ config.bind('J', 'tab-prev')
 # config.bind(']]', 'navigate next')
 # config.bind('`', 'mode-enter set_mark')
 # config.bind('ad', 'download-cancel')
-# config.bind('b', 'set-cmd-text -s :quickmark-load')
+# config.bind('b', 'cmd-set-text -s :quickmark-load')
 # config.bind('cd', 'download-clear')
 config.unbind('co')
 config.bind('co', 'download-open')
@@ -1948,25 +1962,25 @@ config.bind('co', 'download-open')
 # config.bind('f', 'hint')
 # config.bind('g$', 'tab-focus -1')
 # config.bind('g0', 'tab-focus 1')
-# config.bind('gB', 'set-cmd-text -s :bookmark-load -t')
+# config.bind('gB', 'cmd-set-text -s :bookmark-load -t')
 # config.bind('gC', 'tab-clone')
 # config.bind('gD', 'tab-give')
 # config.bind('gJ', 'tab-move +')
 # config.bind('gK', 'tab-move -')
-# config.bind('gO', 'set-cmd-text :open -t -r {url:pretty}')
+# config.bind('gO', 'cmd-set-text :open -t -r {url:pretty}')
 # config.bind('gU', 'navigate up -t')
 # config.bind('g^', 'tab-focus 1')
 # config.bind('ga', 'open -t')
-# config.bind('gb', 'set-cmd-text -s :bookmark-load')
+# config.bind('gb', 'cmd-set-text -s :bookmark-load')
 # config.bind('gd', 'download')
 # config.bind('gf', 'view-source')
 # config.bind('gg', 'scroll-to-perc 0')
 # config.bind('gi', 'hint inputs --first')
 config.bind('gl', 'tab-move -')
 # config.bind('gm', 'tab-move')
-# config.bind('go', 'set-cmd-text :open {url:pretty}')
+# config.bind('go', 'cmd-set-text :open {url:pretty}')
 config.bind('gr', 'tab-move +')
-# config.bind('gt', 'set-cmd-text -s :tab-select')
+# config.bind('gt', 'cmd-set-text -s :tab-select')
 # config.bind('gu', 'navigate up')
 # config.bind('h', 'scroll left')
 # config.bind('i', 'mode-enter insert')
@@ -1974,16 +1988,18 @@ config.bind('gr', 'tab-move +')
 # config.bind('k', 'scroll up')
 # config.bind('l', 'scroll right')
 config.bind('m', 'spawn mpv {url}')
+# TODO: add hints.selector for ytdl compatible links
+config.bind('M', 'hint links spawn mpv {hint-url}')
 # config.bind('n', 'search-next')
-# config.bind('o', 'set-cmd-text -s :open')
+# config.bind('o', 'cmd-set-text -s :open')
 # config.bind('pP', 'open -- {primary}')
 # config.bind('pp', 'open -- {clipboard}')
 # config.bind('q', 'macro-record')
 # config.bind('r', 'reload')
 # config.bind('sf', 'save')
-# config.bind('sk', 'set-cmd-text -s :bind')
-# config.bind('sl', 'set-cmd-text -s :set -t')
-# config.bind('ss', 'set-cmd-text -s :set')
+# config.bind('sk', 'cmd-set-text -s :bind')
+# config.bind('sl', 'cmd-set-text -s :set -t')
+# config.bind('ss', 'cmd-set-text -s :set')
 config.bind('sq', 'quickmark-save')
 config.bind('tCh', 'spawn --userscript config-cycle-tld -p    content.cookies.accept no-3rdparty never all;; reload')
 config.bind('tch', 'spawn --userscript config-cycle-tld -p -t content.cookies.accept no-3rdparty never all;; reload')
@@ -2011,24 +2027,24 @@ config.bind('tgh', 'spawn --userscript config-cycle-tld -p -t content.geolocatio
 # config.bind('tsu', 'config-cycle -p -t -u {url} content.javascript.enabled ;; reload')
 # config.bind('u', 'undo')
 # config.bind('v', 'mode-enter caret')
-# config.bind('wB', 'set-cmd-text -s :bookmark-load -w')
+# config.bind('wB', 'cmd-set-text -s :bookmark-load -w')
 # config.bind('wIf', 'devtools-focus')
 # config.bind('wIh', 'devtools left')
 # config.bind('wIj', 'devtools bottom')
 # config.bind('wIk', 'devtools top')
 # config.bind('wIl', 'devtools right')
 # config.bind('wIw', 'devtools window')
-# config.bind('wO', 'set-cmd-text :open -w {url:pretty}')
+# config.bind('wO', 'cmd-set-text :open -w {url:pretty}')
 # config.bind('wP', 'open -w -- {primary}')
-# config.bind('wb', 'set-cmd-text -s :quickmark-load -w')
+# config.bind('wb', 'cmd-set-text -s :quickmark-load -w')
 # config.bind('wf', 'hint all window')
 # config.bind('wh', 'back -w')
 # config.bind('wi', 'devtools')
 # config.bind('wl', 'forward -w')
-# config.bind('wo', 'set-cmd-text -s :open -w')
+# config.bind('wo', 'cmd-set-text -s :open -w')
 # config.bind('wp', 'open -w -- {clipboard}')
-# config.bind('xO', 'set-cmd-text :open -b -r {url:pretty}')
-# config.bind('xo', 'set-cmd-text -s :open -b')
+# config.bind('xO', 'cmd-set-text :open -b -r {url:pretty}')
+# config.bind('xo', 'cmd-set-text -s :open -b')
 # config.bind('yD', 'yank domain -s')
 # config.bind('yM', 'yank inline [{title}]({url}) -s')
 # config.bind('yP', 'yank pretty-url -s')
index 3eb045e89e2e8fd813f366b3ea831e61cb0d070e..8b9467bf2f74f4e65aec5baa50cb14b0dfebe9ca 100644 (file)
@@ -1,20 +1,25 @@
+attic/pritchard https://coconstruct.com/app/shared/ProjectOverview.aspx?projectOID=1504533
 bash/substitution https://tldp.org/LDP/abs/html/parameter-substitution.html
 cups https://localhost:631/
+deepthought/flexget http://deepthought.lan:8081/
+deepthought/sabnzbd http://deepthought.lan:8080/
 dev/bincompat https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B Policies/Binary Compatibility Issues With C++ - KDE Community Wiki
 dev/bithacks http://graphics.stanford.edu/~seander/bithacks.html#OperationCounting Bit Twiddling Hacks
 dev/clang-tidy https://clang.llvm.org/extra/clang-tidy/
 dev/docs https://devdocs.io/
-finance/amex/dashboard https://global.americanexpress.com/dashboard
+finance/amex https://www.americanexpress.com/en-gb/account/login
 finance/monzo/api https://developers.monzo.com/
 finance/nsandi https://www.nsandi.com/Login
 finance/zopa https://www.zopa.com/login
+finances/taxtool https://cooltaxtool.com/
 fpp/confluence https://fppnt.atlassian.net/wiki/home
 fpp/eng/base https://gitlab.com/fppnt/engineering/base
 fpp/evk https://gitlab.com/fppnt/evk
-fpp/evk/boards/sprint https://gitlab.com/groups/fppnt/evk/-/boards/3254472?iteration_id=Current
+fpp/evk/board https://gitlab.com/groups/fppnt/evk/-/boards/5435597
 fpp/evk/design/architecture https://drive.google.com/drive/folders/1j6SyDxNHr3-nXaz6heYdaVjDuHQq-fMJ
 fpp/evk/evk https://gitlab.com/fppnt/evk/evk
 fpp/evk/issues https://gitlab.com/groups/fppnt/evk/-/issues
+fpp/evk/mr https://gitlab.com/fppnt/evk/evk/-/merge_requests/
 fpp/gitlab https://gitlab.com/fppnt
 fpp/google/drive https://drive.google.com/drive/shared-drives
 fpp/mail https://mail.google.com/
@@ -25,6 +30,7 @@ gitlab/ci/env https://docs.gitlab.com/ee/ci/variables/index.html
 gitlab/issues https://gitlab.com/gitlab-org/gitlab/-/issues
 hask http://dev.stephendiehl.com/hask/
 health/physio https://vitality.ascenti.co.uk/login?access_code=sodaypax
+home/automation/hass http://deepthought.lan:8123/lovelace/home
 humble/books https://www.humblebundle.com/books
 humble/games https://www.humblebundle.com/games
 humble/store https://www.humblebundle.com/store
@@ -36,3 +42,4 @@ telegram https://web.telegram.org/z/
 x4/econ-depgraph https://i.imgur.com/kMzfyf6.jpeg
 x4/roguey https://roguey.co.uk/x4/
 x4/ships https://www.qsna.eu/x4/ships/
+zsh/expansion https://thevaluable.dev/zsh-expansion-guide-example/
index e41b08a6cff6f2491dacf5e1c1a7c5c539d22f64..62a86d97fb789838dde6666b784a4f14bddb42f0 100644 (file)
@@ -1,3 +1,10 @@
+# noqa: D100
+from qutebrowser.config.configfiles import ConfigAPI
+from qutebrowser.config.config import ConfigContainer
+
+c: ConfigContainer = c      # noqa: F821 pylint: disable=E0602,C0103
+config: ConfigAPI = config  # noqa: F821 pylint: disable=E0602,C0103
+
 # https://github.com/Linuus/nord-qutebrowser
 
 nord = {
@@ -426,6 +433,14 @@ c.colors.tabs.selected.odd.bg = nord['nord0']
 ## Type: QtColor
 c.colors.tabs.selected.odd.fg = nord['nord5']
 
+## Background color of tooltips. If set to null, the Qt default is used.
+## Type: QssColor
+c.colors.tooltip.bg = None
+
+## Foreground color of tooltips. If set to null, the Qt default is used.
+## Type: QssColor
+c.colors.tooltip.fg = None
+
 ## Background color for webpages if unset (or empty to use the theme's
 ## color).
 ## Type: QtColor
index ae4ab2ef3131dfdbeb525aae5dadf82efdc26979..14c6c6b17e937e21924e8bbec2e1a65fc1258171 100644 (file)
@@ -15,6 +15,9 @@ Host wrt-*.lan
 User root
 HostKeyAlgorithms=+ssh-rsa
 
+Host aur.archlinux.org
+User aur
+
 Host fpp-nuc
 HostName localhost
 Port 22223
diff --git a/systemd/system/suspend@.service b/systemd/system/suspend@.service
new file mode 100644 (file)
index 0000000..addaeb9
--- /dev/null
@@ -0,0 +1,12 @@
+# Proxy the system suspend.target to a users suspend.target. Enable with:
+#    systemctl enable suspend@$(whoami)
+[Unit]
+Description=Call user's suspend target when system suspends
+After=suspend.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl --user --machine=%i@ start --wait suspend.target
+
+[Install]
+WantedBy=suspend.target
diff --git a/systemd/user/pause-mpd.service b/systemd/user/pause-mpd.service
new file mode 100644 (file)
index 0000000..d550f06
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Pause MPD
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mpc -q pause
+
+[Install]
+WantedBy=suspend.target
diff --git a/systemd/user/suspend.target b/systemd/user/suspend.target
new file mode 100644 (file)
index 0000000..6aba376
--- /dev/null
@@ -0,0 +1,3 @@
+[Unit]
+Description=User suspend target
+StopWhenUnneeded=yes
similarity index 100%
rename from taskrc
rename to task/taskrc
index dbb06f1ec74dfa8ee2e11ad4739f7b152a07b86a..278362c8392ef0e0e150e6076118480930808203 100644 (file)
@@ -2,47 +2,32 @@
 if exists("g:loaded_toggle_list")
   finish
 endif
-
 let g:loaded_toggle_list = 1
 
-function! s:GetBufferList()
-  redir =>buflist
-  silent! ls
-  redir END
-  return buflist
-endfunction
-
+" Inspired by
+" https://github.com/drmingdrmer/vim-toggle-quickfix/blob/master/autoload/togglequickfix.vim
 function! s:ToggleLocationList()
-  for bufnum in map(filter(split(s:GetBufferList(), '\n'), 'v:val =~# "Location List"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
-      lclose
-      return
-  endfor
-
   let last = winnr('$')
-
+  let cur = winnr()
   try
-    Errors
-  catch
-    try
-      lopen
-    catch /E776/
-    endtry
-  endtry
-  if last == winnr('$')
+    lwindow 10
+  catch /E776/
     echohl WarningMsg | echon 'No Location List' | echohl None
+  endtry
+  if winnr('$') == last
+    lclose
+  elseif winnr() != cur
+    wincmd p
   endif
 endfunction
 
 function! s:ToggleQuickfixList()
-  for bufnum in map(filter(split(s:GetBufferList(), '\n'), 'v:val =~ "Quickfix List"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
-    if bufwinnr(bufnum) != -1
-      cclose
-      return
-    endif
-  endfor
-  let winnr = winnr()
-  copen 10
-  if winnr() != winnr
+  let last = winnr('$')
+  let cur = winnr()
+  cwindow 10
+  if winnr('$') == last
+    cclose
+  elseif winnr() != cur
     wincmd p
   endif
 endfunction
index dc06376966351aaa376657abe9fffd60eeb945c6..a2e9e7156902ff108404aaa6cbddf94ec0dce5a5 100644 (file)
@@ -9,28 +9,38 @@ augroup fswitch
     au BufEnter *.c        let b:fswitchlocs = 'reg:|source|include/**|'
 augroup END
 
-" Disable ale as we use ycm
-let b:ale_enabled = 0
-
-nnoremap <buffer> gd :YcmCompleter GoTo<CR>
-nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
-nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
-
-nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR>
-
-" format with =
-call operator#user#define_ex_command('ycmcompleter-format', 'YcmCompleter Format')
-map <buffer> = <Plug>(operator-ycmcompleter-format)
-vnoremap <buffer> = :YcmCompleter Format<CR>
-" restore = mapping to g=
-nnoremap <buffer>g= =
-vnoremap <buffer>g= =
-
-" hover popup
-let g:ycm_auto_hover = ''
-let b:ycm_hover = { 'command': 'GetDoc', 'syntax': &filetype }
-nmap <buffer> gh <plug>(YCMHover)
-nmap <buffer> gH :YcmCompleter GetDoc<CR>
+if exists("g:loaded_youcompleteme")
+    " Disable ale as we use ycm
+    let b:ale_enabled = 0
+
+    nnoremap <buffer> gd :YcmCompleter GoTo<CR>
+    nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
+    nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
+
+    " replaced with <leader>ca (code action) in neovim
+    nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR>
+    " replaced with <leader>cr (code rename) in neovim
+    nnoremap <buffer> <leader>fr :YcmCompleter RefactorRename<space>
+
+    " format with =
+    call operator#user#define_ex_command('ycmcompleter-format', 'YcmCompleter Format')
+    map <buffer> = <Plug>(operator-ycmcompleter-format)
+    vnoremap <buffer> = :YcmCompleter Format<CR>
+    " restore = mapping to g=
+    nnoremap <buffer>g= =
+    vnoremap <buffer>g= =
+
+    " hover popup
+    let g:ycm_auto_hover = ''
+    let b:ycm_hover = { 'command': 'GetDoc', 'syntax': &filetype }
+    nmap <buffer> gh <plug>(YCMHover)
+    nmap <buffer> gH :YcmCompleter GetDoc<CR>
+else
+    " I'm way to used to using = to format than to switch to gq
+    nnoremap <buffer> =  gq
+    nnoremap <buffer> == gqq
+    vnoremap <buffer> =  gq
+endif
 
 let b:tcomment_options = {'whitespace': 'no'}
 
index 12c6443f475fbbd7ea6ef09cf9258e3bbc0343ed..ea6837f7200683f9ed688fbd1ddd67419c1000bb 100644 (file)
@@ -45,30 +45,6 @@ let g:switch_const_definitions =
 
 nnoremap <buffer> <leader>c :call switch#Switch({'definitions': g:switch_const_definitions})<cr>
 
-" Disable ale as we use ycm
-let b:ale_enabled = 0
-
-nnoremap <buffer> gd :YcmCompleter GoTo<CR>
-nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
-nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
-
-nnoremap <buffer> <leader>fi :YcmCompleter FixIt<CR>
-nnoremap <buffer> <leader>fr :YcmCompleter RefactorRename<space>
-
-" format with =
-call operator#user#define_ex_command('ycmcompleter-format', 'YcmCompleter Format')
-map <buffer> = <Plug>(operator-ycmcompleter-format)
-vnoremap <buffer> = :YcmCompleter Format<CR>
-" restore = mapping to g=
-nnoremap <buffer>g= =
-vnoremap <buffer>g= =
-
-" hover popup
-let g:ycm_auto_hover = ''
-let b:ycm_hover = { 'command': 'GetDoc', 'syntax': &filetype }
-nmap <buffer> gh <plug>(YCMHover)
-nmap <buffer> gH :YcmCompleter GetDoc<CR>
-
 setlocal errorformat=
 " TODO I don't remember these errorformat or what they match, maybe CMake? {{{
 setlocal errorformat+=\ %##%n\ %m\ %f:%l:%c
index c79df7a4b2c67f37c3426baf75bc008f490105e6..3d477e2123ff2d9ffccda55bedad278975bcfa3a 100644 (file)
@@ -2,6 +2,8 @@ setlocal textwidth=78
 setlocal listchars-=extends:❯,precedes:❮
 setlocal sidescroll=0
 setlocal sidescrolloff=0
+setlocal signcolumn=no
+setlocal winfixwidth
 wincmd L
-vertical resize 78
+vertical resize 80
 normal ze
index bd6528a9df1098434e5af07402393068568d089d..00fb96d9894d37e224c14506cc6f11f98e32706f 100644 (file)
@@ -1,8 +1,10 @@
 setlocal nolist
-setlocal textwidth=80
+setlocal textwidth=88
 setlocal listchars-=extends:❯,precedes:❮
 setlocal sidescroll=0
 setlocal sidescrolloff=0
+setlocal winfixwidth
+setlocal nowrap
 wincmd L
-vertical resize 80
+vertical resize 88
 normal ze
index c64e31f17f481d1c61dae8f268a797e48a2060db..83d8895bb6d418a12d2c87e4036377209c766d41 100644 (file)
@@ -1,5 +1,7 @@
 setlocal foldlevelstart=1  " at least show content of classes
 
-nnoremap <buffer> gd :YcmCompleter GoTo<CR>
-nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
-nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
+if exists("g:loaded_youcompleteme")
+    nnoremap <buffer> gd :YcmCompleter GoTo<CR>
+    nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
+    nnoremap <buffer> gD :YcmCompleter GoToReferences<CR>
+endif
index 1d44b8c92f5e8ad44546d221fb9a64a5fbdf7449..a677d5f5f5c98c7be4c0118321fc1af81ddc9e04 100644 (file)
@@ -35,6 +35,10 @@ $1 &operator=($1 const &) = default;
 $1 &operator=($1 &&) noexcept = default;
 endsnippet
 
+snippet spaceship "defaulted spaceship operator <=>"
+friend auto operator<=>(${1:type} const&, $1 const&) = default;
+endsnippet
+
 snippet ns "namespace .. (namespace)"
 namespace${1/.+/ /m}${1} {
 ${VISUAL}${0}
index c4872527f4691c5e846c6ef6959f9d3704910044..bd479a7e36b08063dcef2a22933e5ea16d1d0b2c 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
+" force python3
+if has('python3') | endif
+
+" space is leader
+let g:mapleader = " "
+
+" disable netrw
+"FIXME: it currently breaks vim-fugitive 2023-04-11
+" instead of opening Git status, a netrw buffer opens instead
+let g:loaded_netrwPlugin = 1
+
 " runtimepath {{{1
 set runtimepath ^=$XDG_CONFIG_HOME/vim
 set runtimepath +=$XDG_CONFIG_HOME/vim/after
 
-" force python3
-if has('python3') | endif
-
 " plugins {{{1
-" remove all autocommands
-autocmd!
-
 call plug#begin('$XDG_DATA_HOME/vim')
 " This does not update vim-plug, use PlugUpgrade instead
 Plug 'junegunn/vim-plug'
 
-Plug 'airblade/vim-gitgutter' " {{{
-" prefer other signs such as ycm diags
-let g:gitgutter_sign_priority = 1
-" don't clobber other signs
-let g:gitgutter_sign_allow_clobber = 0
-"}}}
+if !has("nvim")
+  Plug 'bling/vim-airline' " {{{2
+    let g:airline#extensions#whitespace#enabled = 1
+    let g:airline#extensions#tabline#enabled = 1
+    let g:airline#extensions#searchcount#enabled = 0
+    let g:airline_powerline_fonts = 1
+
+    let g:asyncrun_status = "stopped"
+    " let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
+  "}}}
+  Plug 'raimondi/delimitmate' " {{{2
+    let delimitMate_expand_cr = 2
+    let g:delimitMate_expand_space = 1
+  "}}}
+  Plug 'tpope/vim-surround' "{{{2
+  "}}}
+  " Plug 'valloric/youcompleteme' {{{2
+  Plug 'valloric/youcompleteme',
+        \{ 'do': './install.py --clangd-completer --clang-completer' }
+    let g:ycm_clangd_binary_path = 'clangd'   " use clangd in path
+    let g:ycm_clangd_args = ['--clang-tidy']
+    let g:ycm_extra_conf_vim_data = ['getcwd()']
+    let g:ycm_add_preview_to_completeopt = 1
+    let g:ycm_complete_in_comments = 1
+    let g:ycm_complete_in_strings  = 1
+    let g:ycm_autoclose_preview_window_after_insertion = 0
+
+    let g:ycm_language_server =
+          \ [
+          \   {
+          \     'name': 'haskell',
+          \     'cmdline': [ 'haskell-language-server-wrapper', '--lsp' ],
+          \     'filetypes': [ 'haskell', 'lhaskell'  ]
+          \   },
+          \ ]
+  " }}}
+  Plug 'svermeulen/vim-yoink' " {{{2
+  ""}}}
+  Plug 'arcticicestudio/nord-vim' " {{{2
+    let g:nord_bold = 1
+    let g:nord_italic = 1
+    let g:nord_italic_comments = 1
+    let g:nord_underline = 1
+    let g:nord_uniform_status_lines = 0
+    let g:nord_uniform_diff_background = 0
+    let g:nord_cursor_line_number_background = 0
+    let g:nord_bold_vertical_split_line = 0
+  "}}}
+  Plug 'sirver/ultisnips' " replaced by lua-snip {{{2
+  Plug 'honza/vim-snippets'
+    let g:UltiSnipsEditSplit = 'vertical'
+    let g:UltiSnipsSnippetDirectories = [ expand("$XDG_CONFIG_HOME/vim/ultisnips") ]
+    if has('fname_case')
+      let g:UltiSnipsSnippetDirectories = ["UltiSnips", "ultisnips"]
+    endif
+    let g:UltiSnipsExpandTrigger       = "<tab>"
+    let g:UltiSnipsJumpForwardTrigger  = "<tab>"
+    let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
+    
+    " UltiSnips completion function that tries to expand a snippet. If there's no
+    " snippet for expanding, it checks for completion window and if it's shown,
+    " selects first element. If there's no completion window it tries to jump to
+    " next placeholder. If there's no placeholder it just returns TAB key
+    " https://github.com/Valloric/YouCompleteMe/issues/36#issuecomment-15451411
+    function! g:UltiSnips_Complete()
+        call UltiSnips#ExpandSnippet()
+        if g:ulti_expand_res == 0
+            if pumvisible()
+                return "\<C-n>"
+            else
+                call UltiSnips#JumpForwards()
+                if g:ulti_jump_forwards_res == 0
+                  return "\<TAB>"
+                endif
+            endif
+        endif
+        return ""
+    endfunction
+    au InsertEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
+    let g:UltiSnipsListSnippets="<c-e>"
+  "}}}
+  Plug 'vim-utils/vim-man'  " replaced by builtin {{{2
+    let g:man_width = 80
+  "}}}
+  Plug 'airblade/vim-gitgutter' " replaced by gitsigns {{{
+  " prefer other signs such as ycm diags
+  let g:gitgutter_sign_priority = 1
+  " don't clobber other signs
+  let g:gitgutter_sign_allow_clobber = 0
+  "}}}
+  Plug 'justinmk/vim-sneak' " replaced by leap {{{2
+  let g:sneak#streak = 1
+  let g:sneak#target_labels = "aoeuisnthdpylrcgfqjkxzmwvz" " dvorak
+  let g:sneak#use_ic_scs = 1  " follow 'ignorecase' and 'smartcase'
+
+  " sneaky f and t
+  nmap f <Plug>Sneak_f
+  nmap F <Plug>Sneak_F
+  xmap f <Plug>Sneak_f
+  xmap F <Plug>Sneak_F
+  omap f <Plug>Sneak_f
+  omap F <Plug>Sneak_F
+  nmap t <Plug>Sneak_t
+  nmap T <Plug>Sneak_T
+  xmap t <Plug>Sneak_t
+  xmap T <Plug>Sneak_T
+  omap t <Plug>Sneak_t
+  omap T <Plug>Sneak_T
+  "}}}
+  Plug 'shougo/unite.vim' " replaced by telescope {{{2
+    function! UniteSetup()
+      call unite#filters#matcher_default#use(['matcher_fuzzy'])
+      call unite#custom#profile('default', 'context', {
+            \ 'winheight': 20,
+            \ 'direction': 'botright'
+            \ })
+
+      nnoremap [unite] <Nop>
+      nmap <leader>u [unite]
+      nnoremap [unite]u :UniteResume<CR>
+      nnoremap <silent> [u :UnitePrevious<CR>
+      nnoremap <silent> ]u :UniteNext<CR>
+
+      " unite-grep {{{3
+      " seems not respected
+      let g:unite_source_grep_max_candidates = 2000
+      if executable('ag')
+        " Use ag in unite grep source.
+        let g:unite_source_grep_command = 'ag'
+        let g:unite_source_grep_default_opts = '--smart-case --vimgrep --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
+        let g:unite_source_grep_recursive_opt = ''
+      end
+      nnoremap <silent> [unite]a :<C-u>Unite grep:.::\12\17<CR>
+      nnoremap <silent> [unite]A :<C-u>Unite grep:.:-w:\12\17<CR>
+      command! -nargs=+ Ag Unite grep:.::<args>
+
+      " unite-file_rec {{{3
+      if executable('ag')
+        " Use ag in unite rec source
+        let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '-g', '']
+      end
+      nnoremap <silent> [unite]f :<C-u>Unite -start-insert file_rec/async<CR>
+
+      " unite-buffer {{{3
+      call unite#custom#default_action('buffer', 'open')
+      nnoremap <silent> [unite]b :<C-u>Unite buffer:-<CR>
+
+      " unite-jumplist {{{3
+      nnoremap <silent> [unite]j :<C-u>Unite output:jumps:<CR>
+
+      " unite-menu {{{3
+      let g:unite_source_menu_menus = {}
+      let g:unite_source_menu_menus.fugitive = { 'description' : 'fugitive menu'}
+      let g:unite_source_menu_menus.fugitive.command_candidates = {
+            \ 'Gstatus <Leader>gs' : 'Gstatus',
+            \ 'Gcommit -v <Leader>gc' : 'Gcommit -v',
+            \ 'Glog' : 'Glog',
+            \}
+
+      nnoremap <silent> <leader>gg :<C-u>Unite menu:fugitive<CR>
+
+      let g:unite_source_history_yank_enable = 1
+      nnoremap <silent> [unite]p :<C-u>Unite history/yank<CR>
+    endfunction
+    augroup unit_setup
+      autocmd VimEnter * ++once call UniteSetup()
+    augroup END
+  "}}}2
+  Plug 'shougo/vimproc.vim', {'do': 'make'} " {{{2
+  "}}}2
+  Plug 'tomtom/tcomment_vim' " replaced by comment.nvim {{{2
+    let g:tcomment_textobject_inlinecomment = 'gic'
+    let g:tcomment#filetype#guess = 0
+    "let g:tcomment#options = {'whitespace' : 'no'}
+  "}}}2
+  " colorschemes
+  Plug 'morhetz/gruvbox' " {{{2
+    let g:gruvbox_contrast_dark  = 'hard'
+    let g:gruvbox_contrast_light = 'soft'
+  " }}}2
+  " staging
+  Plug 'puremourning/vimspector' " replaced by lsp {{{2
+    let g:vimspector_enable_mappings = 'HUMAN'
+  " }}}
+  Plug 'vim-scripts/syntaxrange' " replaced by treesitter {{{2
+  " }}}
+endif
+
 Plug 'alepez/vim-gtest'
 Plug 'alx741/vinfo'
 Plug 'andrewradev/sideways.vim' " {{{2
@@ -26,79 +213,42 @@ nnoremap <silent> ,h :SidewaysLeft<CR>:delmarks z<CR>
 nnoremap <silent> ,l :SidewaysRight<CR>:delmarks z<CR>
 "}}}
 Plug 'andrewradev/switch.vim'
-if !has('nvim')
-  Plug 'bling/vim-airline' "{{{2
-  let g:airline#extensions#whitespace#enabled = 1
-  let g:airline#extensions#tabline#enabled = 1
-  let g:airline#extensions#searchcount#enabled = 0
-  let g:airline_powerline_fonts = 1
-
-  let g:asyncrun_status = "stopped"
-  " let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
-  "}}}
-endif
-
 Plug 'chrisbra/checkattach'
 Plug 'derekwyatt/vim-fswitch'
 Plug 'elzr/vim-json'
 Plug 'firef0x/pkgbuild.vim'
 Plug 'junegunn/vim-easy-align'
-Plug 'justinmk/vim-sneak'
-Plug 'klen/python-mode'
 Plug 'kshenoy/vim-signature'
-Plug 'majutsushi/tagbar'
+" Plug 'majutsushi/tagbar' " TODO: delete? {{{2
+"   map <F5> :TagbarToggle<cr>
+"   let g:tagbar_sort = 0
+"   let g:tagbar_compact = 1
+"   let g:tagbar_autoshowtag = 1
+"   let g:tagbar_width = 25
+"   let g:tagbar_iconchars = ['+', '-']
+"}}}
 Plug 'octol/vim-cpp-enhanced-highlight'
-Plug 'raimondi/delimitmate'
 Plug 'sgeb/vim-diff-fold'
 Plug 'skywind3000/asyncrun.vim' " {{{2
 command! -bang -nargs=* -complete=file Make AsyncRun -save=2 -program=make @ <args>
 let g:asyncrun_open = 10
 "}}}
-Plug 'shougo/unite.vim'
-Plug 'shougo/vimproc.vim', {'do': 'make'}
 Plug 'sjl/gundo.vim'
-Plug 'thinca/vim-qfreplace'
-Plug 'tomtom/tcomment_vim'
+" Plug 'thinca/vim-qfreplace' " TODO: delete?
 Plug 'tpope/vim-abolish'
 Plug 'tpope/vim-characterize'
-Plug 'tpope/vim-endwise'
+" Plug 'tpope/vim-endwise' " TODO: delete?
 Plug 'tpope/vim-eunuch'
 Plug 'tpope/vim-fugitive'
 Plug 'tpope/vim-repeat'
 Plug 'tpope/vim-scriptease'
 Plug 'tpope/vim-speeddating'
-Plug 'tpope/vim-surround'  "investigate vim-sandwich
 Plug 'tpope/vim-unimpaired'
 Plug 'tweekmonster/spellrotate.vim'
-Plug 'valloric/youcompleteme', { 'do': './install.py --clangd-completer --clang-completer' }
-Plug 'vim-scripts/mediawiki.vim'
-Plug 'vim-scripts/replacewithregister'
-Plug 'vim-scripts/yankring.vim'
+" Plug 'vim-scripts/mediawiki.vim' " TODO: delete?
+Plug 'vim-scripts/replacewithregister' " FIXME: is overridden by lsp
 Plug 'wincent/loupe'
 
-" colorschemes
-Plug 'morhetz/gruvbox' " {{{2
-let g:gruvbox_contrast_dark  = 'hard'
-let g:gruvbox_contrast_light = 'soft'
-
-if !has('nvim')
-  Plug 'arcticicestudio/nord-vim' " {{{2
-  let g:nord_bold = 1
-  let g:nord_italic = 1
-  let g:nord_italic_comments = 1
-  let g:nord_underline = 1
-  let g:nord_uniform_status_lines = 0
-  let g:nord_uniform_diff_background = 0
-  let g:nord_cursor_line_number_background = 0
-  let g:nord_bold_vertical_split_line = 0
-endif
-
-"}}}
-
-" snippets
-Plug 'sirver/ultisnips'
-Plug 'honza/vim-snippets'
-
 " text objects
 Plug 'kana/vim-textobj-user'
 Plug 'julian/vim-textobj-variable-segment'
@@ -109,14 +259,20 @@ Plug 'kana/vim-operator-user'
 " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
 Plug 'imsnif/kdl.vim'
 
-Plug 'puremourning/vimspector'
 Plug 'ilyachur/cmake4vim'
 Plug 'ilyachur/gtest-vim'
 
-Plug 'git@github.com:/ram-z/vim-orgmode', { 'branch': 'dev' } " {{{2
-Plug 'vim-scripts/syntaxrange'
+Plug 'junegunn/vim-peekaboo' "{{{2
+  " issue with having it at the bottom is that it doesn't leave much 
+  let g:peekaboo_window = 'bo 16new'
+  let g:peekaboo_compact = 1
+  let g:peekaboo_delay = 500
+"}}}
 
-let g:org_agenda_files = ['~/org/*.org']
+" Plug 'vim-scripts/ansiesc.vim' " TODO: delete? {{{2
+"   nmap corwp <Plug>RestoreWinPosn
+"   nmap coswp <Plug>SaveWinPosn
+" "}}}
 
 Plug 'neovimhaskell/haskell-vim'  " {{{2
 let g:haskell_enable_quantification = 1   " to enable highlighting of `forall`
@@ -137,17 +293,28 @@ Plug 'mtth/scratch.vim'  " {{{2
   let g:scratch_autohide = 0
 "}}}
 
-let g:man_hardwrap = 80
-if !has('nvim')
-  Plug 'vim-utils/vim-man'  " {{{2
-  let g:man_width = 80
+Plug 'vim-pandoc/vim-pandoc'  " {{{2
+Plug 'vim-pandoc/vim-pandoc-syntax'
+let g:pandoc#syntax#conceal#use = 1
+let g:pandoc#syntax#conceal#blacklist = [
+    \ 'titleblock',
+    \ 'codeblock_start',
+    \ 'codeblock_delim',
+    \ 'atx',
+    \ ]
+let g:pandoc#syntax#codeblocks#embeds#langs = [
+    \ 'plantuml',
+    \ ]
+let g:pandoc#keyboard#blacklist_submodule_mappings = [
+    \ 'para',
+    \ ]
 "}}}
-endif
 
-Plug 'jenterkin/vim-autosource'  " {{{2
-  let g:autosource_hashdir = $XDG_CACHE_HOME . '/vim/vim-autosource'
-  let g:autosource_conf_names = ['.vimrc', '.vimrc.lua']
-"}}}
+" Plug 'jenterkin/vim-autosource'  " TODO: delete? {{{2
+"   let g:autosource_hashdir = $XDG_CACHE_HOME . '/vim/vim-autosource'
+"   let g:autosource_conf_names = ['.vimrc', '.vimrc.lua']
+" "}}}
+
 call plug#end()
 
 filetype plugin indent on
@@ -183,8 +350,6 @@ set linebreak                   " wrap long lines at a character in 'breakat'
 set showbreak=↪                 " show these chars for wrapped lines
 set breakindent                 " preserve indentation in wrapped text
 
-set lazyredraw                  " don't redraw while executing macros
-
 set list                        " show chars defined in 'listchars'
 set listchars=tab:❭\            " list of strings used for list mode
 set listchars+=extends:❯,precedes:❮
@@ -238,7 +403,6 @@ endif
 set showcmd         " Show (partial) command in status line.
 set ruler           " show the cursor position all the time
 set confirm         " Ask what to do when closing unsaved documents
-set shortmess=      " reset option
 set shortmess+=a    " all abbreviations
 set shortmess+=o    " overwrite file-written message
 set shortmess+=O    " file-read message overrides previous
@@ -247,6 +411,8 @@ set shortmess+=T    " truncate other messages in the middle
 set shortmess+=W    " don't give 'written' or '[w]' when writing a file
 set shortmess+=A    " ignore swapfile warning
 set shortmess+=I    " no splash screen
+set shortmess+=F    " don't give the file info when editing a file
+set shortmess+=c    " don't give |ins-completion-menu| messages
 
 " editing text {{{2
 set backspace=indent,eol,start  " allow backspacing over everything in insert mode
@@ -264,6 +430,7 @@ set formatoptions+=t    " Auto-wrap text using textwidth
 set formatoptions-=o    " Do not insert comment leader after hitting o or O in normal mode
 
 set nrformats-=octal    " don't inc/dec octal numbers with ^[AX]
+set nrformats+=unsigned " treat all numbers as unsigned
 
 set complete=.       " scan the current buffer ( 'wrapscan' is ignored)
 set complete+=w      " scan buffers from other windows
@@ -315,6 +482,7 @@ set backupskip+=.netrc          " skip netrc
 set backupskip+=/dev/shm/pass*  " skip passwordstore files
 
 set undofile                    " persistent undo history
+set undolevels=10000            " moar undos
 if !has('nvim')
   set undodir=$XDG_CACHE_HOME/vim/undo//
 endif
@@ -352,6 +520,7 @@ set wildignore+=*.orig                           " Merge resolution files
 " running make and jumping to errors {{{2
 set makeprg=make\ -w     " print changing directories
 
+set grepformat=%f:%l:%c:%m
 set grepprg=ag\ --vimgrep\ $*
 
 " language specific {{{2
@@ -376,9 +545,9 @@ set sessionoptions+=unix,slash  " damn windows and it's silly ways
 
 " autocmds {{{1
 " Resize splits when the window is resized {{{2
-augroup resize
+augroup resize_splits
     au!
-    autocmd VimResized * :wincmd =
+    autocmd VimResized * :tabdo wincmd =
 augroup END
 
 " Only show cursorline in the current window and in normal mode {{{2
@@ -395,7 +564,7 @@ augroup ft_stdin
 augroup END
 
 " Jump to last known cursor position {{{2
-augroup cursor_pos
+augroup last_loc
     au!
     " blacklist certain filetype
     let blacklist = ['gitcommit']
@@ -425,9 +594,6 @@ command! ToggleAutoChecktime let b:autochecktime=!get(b:, 'autochecktime', 0) |
 
 " bindings {{{1
 
-" allow both <space> and \ to be <leader>
-map <space> <leader>
-
 " make
 function! MakeWithOpt()
   " TODO only do this if makeprg matches make
@@ -480,6 +646,9 @@ nnoremap <silent> <leader>ww :Untrail<CR>
 " Source
 vnoremap <leader>S y:execute @@<cr>:echo 'Sourced selection.'<cr>
 nnoremap <leader>S ^vg_y:execute @@<cr>:echo 'Sourced line.'<cr>
+" Technically this is similar to execute this file, which is usually mapped to
+" <leader>r and it would make sense to have that for lua files in nvim folder
+nnoremap <leader>SS :source %<cr>:echo 'Sourced file.'<cr>
 
 " jump to last cursor position
 noremap ' `
@@ -498,11 +667,6 @@ nnoremap U
 " nnoremap <leader>r :silent !ranger %:h<cr>:redraw!<cr>
 " nnoremap <leader>R :silent !ranger<cr>:redraw!<cr>
 
-" Use sane regexes.
-nnoremap / /\v
-vnoremap / /\v
-cnoremap s/ s/\v
-
 " display the number of matches for the last search
 nmap <Leader># :%s:<C-R>/::gn<CR>
 
@@ -605,7 +769,7 @@ vnoremap <leader><Space> zf
 cabbrev w!! SudoWrite
 
 " uppercase previous word
-inoremap <C-C> <Esc>gUiwgi
+inoremap <C-C> <C-G>u<Esc>gUiwgi
 
 " http://git.io/v3ZeU
 nmap <silent> <leader>qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
@@ -623,9 +787,6 @@ nnoremap <silent> <C-W>cl :CloseRightWindow<CR>
 nnoremap <silent> <C-W>cj :CloseBelowWindow<CR>
 nnoremap <silent> <C-W>ck :CloseAboveWindow<CR>
 
-" delimitmate {{{2
-let delimitMate_expand_cr = 2
-let g:delimitMate_expand_space = 1
 
 " fswitch {{{2
 nnoremap <silent> <Leader>ff :FSHere<CR>
@@ -648,8 +809,11 @@ function! GitToggle()
   if buflisted(l:status_buffer)
     execute 'bdelete '.l:status_buffer
   else
-    Git
-    16wincmd_
+    execute 'Git'
+    if !empty(FugitiveGitDir())
+      " only resize status if Git was sucessful
+      16wincmd_
+    endif
   endif
 endfunction
 command! GitToggle :call GitToggle()
@@ -687,15 +851,8 @@ nmap <silent> cog <Plug>IndentGuidesToggle
 nmap <silent> [og <Plug>IndentGuidesEnable
 nmap <silent> ]og <Plug>IndentGuidesDisable
 
-" python-mode {{{2
-
-let g:pymode_rope_completion = 0
-let g:pymode_rope = 0
-let g:pymode_run = 0
-let g:pymode_folding = 1
-let g:pymode_lint_ignore = "E221,E266,E501"
-let g:pymode_lint_cwindow = 0           " don't open cwindow when linting
-let g:pymode_syntax_space_errors = 0    " don't bother me when I'm typing
+" netrw {{{2
+let g:netrw_sort_sequence = '[\/]$,\.\%(h\|hpp\)$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
 
 " signature {{{2
 " disable '[ mappings
@@ -734,134 +891,6 @@ if ! &diff
   let g:syntastic_check_on_open=1
 endif
 
-" tagbar {{{2
-map <F5> :TagbarToggle<cr>
-let g:tagbar_sort = 0
-let g:tagbar_compact = 1
-let g:tagbar_autoshowtag = 1
-let g:tagbar_width = 25
-let g:tagbar_iconchars = ['+', '-']
-
-" tcomments {{{2
-let g:tcomment_textobject_inlinecomment = 'gic'
-let g:tcomment#filetype#guess = 0
-"let g:tcomment#options = {'whitespace' : 'no'}
-
-" ultisnips {{{2
-let g:UltiSnipsEditSplit = 'vertical'
-let g:UltiSnipsSnippetDirectories = [ expand("$XDG_CONFIG_HOME/vim/ultisnips") ]
-if has('fname_case')
-  let g:UltiSnipsSnippetDirectories = ["UltiSnips", "ultisnips"]
-endif
-let g:UltiSnipsExpandTrigger       = "<tab>"
-let g:UltiSnipsJumpForwardTrigger  = "<tab>"
-let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
-
-" UltiSnips completion function that tries to expand a snippet. If there's no
-" snippet for expanding, it checks for completion window and if it's shown,
-" selects first element. If there's no completion window it tries to jump to
-" next placeholder. If there's no placeholder it just returns TAB key
-" https://github.com/Valloric/YouCompleteMe/issues/36#issuecomment-15451411
-function! g:UltiSnips_Complete()
-    call UltiSnips#ExpandSnippet()
-    if g:ulti_expand_res == 0
-        if pumvisible()
-            return "\<C-n>"
-        else
-            call UltiSnips#JumpForwards()
-            if g:ulti_jump_forwards_res == 0
-               return "\<TAB>"
-            endif
-        endif
-    endif
-    return ""
-endfunction
-au InsertEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>"
-let g:UltiSnipsListSnippets="<c-e>"
-
-" unite {{{2
-call unite#filters#matcher_default#use(['matcher_fuzzy'])
-call unite#custom#profile('default', 'context', {
-            \ 'winheight': 20,
-            \ 'direction': 'botright'
-            \ })
-
-nnoremap [unite] <Nop>
-nmap <leader>u [unite]
-nnoremap [unite]u :UniteResume<CR>
-nnoremap <silent> [u :UnitePrevious<CR>
-nnoremap <silent> ]u :UniteNext<CR>
-
-" unite-grep {{{3
-" seems not respected
-let g:unite_source_grep_max_candidates = 2000
-if executable('ag')
-    " Use ag in unite grep source.
-    let g:unite_source_grep_command = 'ag'
-    let g:unite_source_grep_default_opts = '--smart-case --vimgrep --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
-    let g:unite_source_grep_recursive_opt = ''
-end
-nnoremap <silent> [unite]a :<C-u>Unite grep:.::\12\17<CR>
-nnoremap <silent> [unite]A :<C-u>Unite grep:.:-w:\12\17<CR>
-command! -nargs=+ Ag Unite grep:.::<args>
-
-" unite-file_rec {{{3
-if executable('ag')
-    " Use ag in unite rec source
-    let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '-g', '']
-end
-nnoremap <silent> [unite]f :<C-u>Unite -start-insert file_rec/async<CR>
-call unite#custom#source('file_rec/async', 'sorters', 'sorter_selecta')
-
-" unite-buffer {{{3
-call unite#custom#default_action('buffer', 'open')
-nnoremap <silent> [unite]b :<C-u>Unite buffer:-<CR>
-
-" unite-jumplist {{{3
-nnoremap <silent> [unite]j :<C-u>Unite output:jumps:<CR>
-
-" unite-menu {{{3
-let g:unite_source_menu_menus = {}
-let g:unite_source_menu_menus.fugitive = { 'description' : 'fugitive menu'}
-let g:unite_source_menu_menus.fugitive.command_candidates = {
-            \ 'Gstatus <Leader>gs' : 'Gstatus',
-            \ 'Gcommit -v <Leader>gc' : 'Gcommit -v',
-            \ 'Glog' : 'Glog',
-            \}
-
-nnoremap <silent> <leader>gg :<C-u>Unite menu:fugitive<CR>
-
-let g:unite_source_history_yank_enable = 1
-nnoremap <silent> [unite]p :<C-u>Unite history/yank<CR>
-
-" yankring {{{2
-nnoremap <silent> <leader>p :YRShow<cr>
-let g:yankring_history_dir = expand('$XDG_CACHE_HOME/vim')
-let g:yankring_replace_n_pkey = ''
-let g:yankring_replace_n_nkey = ''
-
-" map Y to y$ for the yank ring
-function! YRRunAfterMaps()
-    nnoremap Y   :<C-U>YRYankCount 'y$'<CR>
-endfunction
-
-" youcompleteme {{{2
-let g:ycm_clangd_binary_path = 'clangd'   " use clangd in path
-let g:ycm_clangd_args = ['--clang-tidy']
-let g:ycm_extra_conf_vim_data = ['getcwd()']
-let g:ycm_add_preview_to_completeopt = 1
-let g:ycm_complete_in_comments = 1
-let g:ycm_complete_in_strings  = 1
-let g:ycm_autoclose_preview_window_after_insertion = 0
-
-let g:ycm_language_server =
-    \ [
-    \   {
-    \     'name': 'haskell',
-    \     'cmdline': [ 'haskell-language-server-wrapper', '--lsp' ],
-    \     'filetypes': [ 'haskell', 'lhaskell'  ]
-    \   },
-    \ ]
 
 " vim-easy-align {{{2
 " start interactive EasyAlign in visual mode
@@ -881,25 +910,6 @@ nnoremap <silent> <Leader>tu :GTestRunUnderCursor<CR>
 " vim-json {{{2
 let g:vim_json_syntax_conceal = 0
 
-" vim-sneak {{{2
-let g:sneak#streak = 1
-let g:sneak#target_labels = "aoeuisnthdpylrcgfqjkxzmwvz" " dvorak
-let g:sneak#use_ic_scs = 1  " follow 'ignorecase' and 'smartcase'
-
-" sneaky f and t
-nmap f <Plug>Sneak_f
-nmap F <Plug>Sneak_F
-xmap f <Plug>Sneak_f
-xmap F <Plug>Sneak_F
-omap f <Plug>Sneak_f
-omap F <Plug>Sneak_F
-nmap t <Plug>Sneak_t
-nmap T <Plug>Sneak_T
-xmap t <Plug>Sneak_t
-xmap T <Plug>Sneak_T
-omap t <Plug>Sneak_t
-omap T <Plug>Sneak_T
-
 " functions {{{1
 
 " Convenient command to see the difference between the current buffer and the
@@ -918,21 +928,21 @@ nnoremap <silent> gs :<C-U>set operatorfunc=SortLinesOpFunc<CR>g@
 vnoremap <silent> gs :sort<cr>
 
 " edit configs  {{{2
+" TODO: populate location list with both .vim and .lua files
+" TODO: create file if it doesn't exist in nvim or vim rtps
 function! EditConfig(what, ext = '.vim')
-    let l:dir = split(&runtimepath,',')[0]
-    if a:what == 'vimrc'
-        let l:file = expand($MYVIMRC)
-    elseif ! isdirectory(globpath(l:dir, a:what))
-        echoe a:what." is not valid!"
+    if a:what == 'vimrc' || a:what == 'init.lua'
+        let l:file = a:what
     elseif empty(&filetype)
         echoe 'filetype is empty!'
+        return
     else
-        let l:file = l:dir.'/'.a:what.'/'.&filetype.a:ext
+        let l:file = a:what.'/'.&filetype.a:ext
     endif
 
-    execute ':vsplit '.file
-    execute ':lcd %:p:h'
+    execute ':Vvsplit! '.file
 endf
+nmap <leader>en :call EditConfig('init.lua')<CR>
 nmap <leader>ev :call EditConfig('vimrc')<CR>
 nmap <leader>ef :call EditConfig('ftplugin')<CR>
 nmap <leader>es :call EditConfig('syntax')<CR>
@@ -966,8 +976,6 @@ function! SwitchSpell()
 endfunction
 
 nnoremap <silent> coS :call SwitchSpell()<CR>
-" fix spelling with first choice
-nnoremap <Leader>f 1z=
 
 " gitdir or home {{{2
 " from derek wyatt:
index 4a88a6e4bf33e4ca702ceb479b7dcc740f7aac75..42d686b03bfbcc19919feb6b80033b40e1f57f53 100644 (file)
@@ -6,50 +6,53 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
+config_version = 2
+
 [cmd]
-AAWAY = "allserv /away"
-AME = "allchan /me"
-AMSG = "allchan /msg *"
-ANICK = "allserv /nick"
+aaway = "allserv /away"
+ame = "allchan /me"
+amsg = "allchan /msg *"
+anick = "allserv /nick"
 b = "buffer"
 bare = "window bare"
-BYE = "quit"
-C = "buffer clear"
-CHAT = "dcc chat"
-CL = "buffer clear"
-CLOSE = "buffer close"
-EXIT = "quit"
+bye = "quit"
+c = "buffer clear"
+chat = "dcc chat"
+cl = "buffer clear"
+close = "buffer close"
+exit = "quit"
 flip = "/say (╯°□°)╯︵ ┻━┻"
-IG = "ignore"
+ig = "ignore"
 issue = "/slack slash /gitlab $1 issue show $2"
-J = "join"
-K = "kick"
-KB = "kickban"
-LEAVE = "part"
-M = "msg"
-MUB = "unban *"
-N = "names"
+j = "join"
+k = "kick"
+kb = "kickban"
+leave = "part"
+m = "msg"
+meet = "/say https://meet.google.com/skx-qdpa-znp"
+mub = "unban *"
+n = "names"
 parrotwave = "/say :parrotwave1: :parrotwave2: :parrotwave3: :parrotwave4: :parrotwave5: :parrotwave6: :parrotwave7:"
-Q = "query"
+q = "query"
 rap = "/slack slash /gitlab rap $*"
 rap-issue = "/slack slash /gitlab rap issue show $*"
 rap-search = "/slack slash /gitlab rap issue search $*"
-REDRAW = "window refresh"
-SAY = "msg *"
+redraw = "window refresh"
+say = "msg *"
 shrug = "/say ¯\_(ツ)_/¯"
-SIGNOFF = "quit"
-T = "topic"
-UB = "unban"
-UMODE = "mode $nick"
-V = "command core version"
-W = "who"
-WC = "window merge"
-WI = "whois"
-WII = "whois $1 $1"
-WW = "whowas"
+signoff = "quit"
+t = "topic"
+ub = "unban"
+umode = "mode $nick"
+v = "command core version"
+w = "who"
+wc = "window merge"
+wi = "whois"
+wii = "whois $1 $1"
+ww = "whowas"
 
 [completion]
 issue = "rap|base"
index 0e49df0f05c3c848109fb874f2b136e7f9c0ac13..885e357104e8d9d2d4f8ed8441ce93998897930b 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [sorting]
index b6ae37e159de1982816e37c122c2be45ff83113a..6d1bd0cead93cd6cef9d545ca105c43d0afd9c03 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 40033d94106e85b5a0c95b4fb8971f06d96d05df..42c2698b77b0af1d11f45fe8d8139e070b833656 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index f9c9d4650734b9e0c87dd321aa3102d37c6169d1..0cf83faf22eddfd3e28f42bfb20ee35db58d1caf 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [default]
index c36c5a88fd3d2ca702c7ea32aea675db5c214276..cb8c914cc5d20053657bacb31c25f02bf2efdc23 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 5d4414929cd80d0fe9620fd6aac24363e2023f13..9e387c1ad196226232d81d183214579ab0a0d2cd 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [command]
index ee18e2f6a30291a0c7faee93ffbad9fc0bb72cac..c88a1ef868c8cb68e990f10c4549306f4a56a775 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [file]
index 1b52d85a65602ea981cca226b5fa35954a5da167..d3871a0d36f18da7a0988caeea29e49eb8e401ab 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
@@ -32,6 +32,8 @@ option1 = ""
 option2 = "${marked} ${name}  ${type}  ${value2}${newline}  ${empty_name}  ${_default_value}${color:darkgray} -- ${min}..${max}${newline}  ${empty_name}  ${description}"
 
 [color]
+color_name = 246
+color_name_selected = default
 default_value = default
 default_value_selected = white
 description = default
index 57e43f27cf8e0aa34d330c07258c1056f7c590eb..4a0d42f3ab45bcd4aefc544a5df3bb38752f3bdd 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 741d79eb27bf2489d77b5e7059605f74126009a7..b5729fd1780f39188ac70e50810c0859b78b1d99 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
@@ -23,6 +23,7 @@ color_lines = on
 flush_delay = 120
 fsync = off
 info_lines = off
+log_conditions = ""
 mask = "$plugin.$name.weechatlog"
 name_lower_case = on
 nick_prefix = ""
index ac0dd0edbd3d8e37a61d340bb2b8f3fb8f6c82b8..e399662cd54daaec2039788816e00b366712c318 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index d19ceecae415f332fc25239b0371177920791b99..e9d81e856231155a1f63265aa26d429d30c9a158 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 066fa4370997aa43c653df0aa097bd037f11a999..f843cade98fb108aa2eb4e6dc200d36a85433c27 100644 (file)
@@ -1,6 +1,5 @@
 #
 # highmon.pl - Highlight Monitoring for weechat 0.3.0
-# Version 2.6
 #
 # Add 'Highlight Monitor' buffer/bar to log all highlights in one spot
 #
@@ -73,6 +72,8 @@
 # Bugs and feature requests at: https://github.com/KenjiE20/highmon
 
 # History:
+# 2020-06-21, Sebastien Helleu <flashcode@flashtux.org>:
+#      v2.7: make call to bar_new compatible with WeeChat >= 2.9
 # 2019-05-13, HubbeKing <hubbe128@gmail.com>
 #      v2.6:   -add: send "logger_backlog" signal on buffer open if logging is enabled
 # 2014-08-16, KenjiE20 <longbow@longbowslair.co.uk>:
@@ -266,7 +267,14 @@ sub highmon_bar_open
        # Make the bar item
        weechat::bar_item_new("highmon", "highmon_bar_build", "");
 
-       $highmon_bar = weechat::bar_new ("highmon", "off", 100, "root", "", "bottom", "vertical", "vertical", 0, 0, "default", "cyan", "default", "on", "highmon");
+        if (weechat::info_get("version_number", "") >= 0x02090000)
+        {
+            $highmon_bar = weechat::bar_new ("highmon", "off", 100, "root", "", "bottom", "vertical", "vertical", 0, 0, "default", "cyan", "default", "default", "on", "highmon");
+        }
+        else
+        {
+            $highmon_bar = weechat::bar_new ("highmon", "off", 100, "root", "", "bottom", "vertical", "vertical", 0, 0, "default", "cyan", "default", "on", "highmon");
+        }
 
        return weechat::WEECHAT_RC_OK;
 }
@@ -717,7 +725,7 @@ sub highmon_new_message
        if ($cb_high == "1" || (weechat::config_get_plugin("merge_private") eq "on" && $cb_tags =~ /notify_private/))
        {
                # Pre bug #29618 (0.3.3) away detect
-               if (weechat::info_get("version_number", "") <= 197120)
+               if (weechat::info_get("version_number", "") <= 0x00030200)
                {
                        $away = '';
                        # Get infolist for this server
@@ -1131,7 +1139,7 @@ sub format_buffer_name
 }
 
 # Check result of register, and attempt to behave in a sane manner
-if (!weechat::register("highmon", "KenjiE20", "2.6", "GPL3", "Highlight Monitor", "", ""))
+if (!weechat::register("highmon", "KenjiE20", "2.7", "GPL3", "Highlight Monitor", "", ""))
 {
        # Double load
        weechat::print ("", "\tHighmon is already loaded");
index dd3eb42b41a8e9a1cb1f68a1e829c21d1b40146b..8d99d30aa05ae5d12b10380de059662af1d9f588 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [var]
@@ -64,7 +64,9 @@ python.go.color_number = "yellow,magenta"
 python.go.color_number_selected = "yellow,red"
 python.go.fuzzy_search = "off"
 python.go.message = "Go to: "
+python.go.min_chars = "0"
 python.go.short_name = "off"
+python.go.short_name_server = "off"
 python.go.sort = "number,beginning"
 python.go.use_core_instead_weechat = "off"
 python.grep.clear_buffer = "off"
@@ -186,7 +188,9 @@ python.go.color_number = "color for buffer number (not selected) (default: "yell
 python.go.color_number_selected = "color for selected buffer number (default: "yellow,red")"
 python.go.fuzzy_search = "search buffer matches using approximation (default: "off")"
 python.go.message = "message to display before list of buffers (default: "Go to: ")"
+python.go.min_chars = "Minimum chars to search and display list of matching buffers (default: "0")"
 python.go.short_name = "display and search in short names instead of buffer name (default: "off")"
+python.go.short_name_server = "prefix short names with server names for search and display (default: "off")"
 python.go.sort = "comma-separated list of keys to sort buffers (the order is important, sorts are performed in the given order): name = sort by name (or short name),  (default: "number,beginning")"
 python.go.use_core_instead_weechat = "use name "core" instead of "weechat" for core buffer (default: "off")"
 python.screen_away.away_suffix = "What to append to your nick when you're away."
@@ -235,7 +239,7 @@ python.slack.shared_name_prefix = "The prefix of buffer names for shared channel
 python.slack.short_buffer_names = "Use `foo.#channel` rather than `foo.slack.com.#channel` as the internal name for Slack buffers."
 python.slack.show_buflist_presence = "Display a `+` character in the buffer list for present users."
 python.slack.show_reaction_nicks = "Display the name of the reacting user(s) alongside each reactji."
-python.slack.slack_api_token = "List of Slack API tokens, one per Slack instance you want to connect to. See the README for details on how to get these."
+python.slack.slack_api_token = "List of Slack API tokens, one per Slack instance you want to connect to; see the README for details on how to get these (note: content is evaluated, see /help eval)."
 python.slack.slack_timeout = "How long (ms) to wait when communicating with Slack."
 python.slack.switch_buffer_on_join = "When /joining a channel, automatically switch to it as well."
 python.slack.thread_broadcast_prefix = "Prefix to distinguish thread messages that were also sent to the channel, when thread_messages_in_channel is enabled."
index 24d67cdc30d062ec5b9dddc5dc1413c502628031..56786933bf01294a557fdc73b238a45f597a8720 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 8f7c263e149ae1b24868b0c840f480b887710f8a..4312cda767c919e66bf66506d85f9caff95e2f09 100644 (file)
 
 #
 # Changelog:
+# 3.9:
+#   * Remove `buffers.pl` from recommended settings.
+# 3,8:
+#   * Fix relative sorting on script name in default rules.
+#   * Document a useful property of stable sort algorithms.
+# 3.7:
+#   * Make default rules work with bitlbee, matrix and slack.
 # 3.6:
 #   * Add more documentation on provided info hooks.
 # 3.5:
@@ -80,7 +87,7 @@ import weechat
 
 SCRIPT_NAME     = 'autosort'
 SCRIPT_AUTHOR   = 'Maarten de Vries <maarten@de-vri.es>'
-SCRIPT_VERSION  = '3.6'
+SCRIPT_VERSION  = '3.9'
 SCRIPT_LICENSE  = 'GPL3'
 SCRIPT_DESC     = 'Flexible automatic (or manual) buffer sorting based on eval expressions.'
 
@@ -173,22 +180,21 @@ class Config:
 
        default_rules = json.dumps([
                '${core_first}',
-               '${irc_last}',
-               '${buffer.plugin.name}',
+               '${info:autosort_order,${info:autosort_escape,${script_or_plugin}},core,*,irc,bitlbee,matrix,slack}',
+               '${script_or_plugin}',
                '${irc_raw_first}',
-               '${if:${plugin}==irc?${server}}',
-               '${if:${plugin}==irc?${info:autosort_order,${type},server,*,channel,private}}',
-               '${if:${plugin}==irc?${hashless_name}}',
+               '${server}',
+               '${info:autosort_order,${type},server,*,channel,private}',
+               '${hashless_name}',
                '${buffer.full_name}',
        ])
 
        default_helpers = json.dumps({
-               'core_first':     '${if:${buffer.full_name}!=core.weechat}',
-               'irc_first':      '${if:${buffer.plugin.name}!=irc}',
-               'irc_last':       '${if:${buffer.plugin.name}==irc}',
-               'irc_raw_first':  '${if:${buffer.full_name}!=irc.irc_raw}',
-               'irc_raw_last':   '${if:${buffer.full_name}==irc.irc_raw}',
-               'hashless_name':  '${info:autosort_replace,#,,${info:autosort_escape,${buffer.name}}}',
+               'core_first':       '${if:${buffer.full_name}!=core.weechat}',
+               'irc_raw_first':    '${if:${buffer.full_name}!=irc.irc_raw}',
+               'irc_raw_last':     '${if:${buffer.full_name}==irc.irc_raw}',
+               'hashless_name':    '${info:autosort_replace,#,,${info:autosort_escape,${buffer.name}}}',
+               'script_or_plugin': '${if:${script_name}?${script_name}:${plugin}}',
        })
 
        default_signal_delay = 5
@@ -961,6 +967,9 @@ order can be customized by defining your own sort rules, but the default should
 be sane enough for most people. It can also group IRC channel/private buffers
 under their server buffer if you like.
 
+Autosort uses a stable sorting algorithm, meaning that you can manually move buffers
+to change their relative order, if they sort equal with your rule set.
+
 {*white}# Sort rules{reset}
 Autosort evaluates a list of eval expressions (see {*default}/help eval{reset}) and sorts the
 buffers based on evaluated result. Earlier rules will be considered first. Only
@@ -993,12 +1002,9 @@ If you remove all signals you can still sort your buffers manually with the
 {*white}# Recommended settings
 For the best visual effect, consider setting the following options:
   {*white}/set {cyan}irc.look.server_buffer{reset} {brown}independent{reset}
-  {*white}/set {cyan}buffers.look.indenting{reset} {brown}on{reset}
 
-The first setting allows server buffers to be sorted independently, which is
+This setting allows server buffers to be sorted independently, which is
 needed to create a hierarchical tree view of the server and channel buffers.
-The second one indents channel and private buffers in the buffer list of the
-`{*default}buffers.pl{reset}` script.
 
 If you are using the {*default}buflist{reset} plugin you can (ab)use Unicode to draw a tree
 structure with the following setting (modify to suit your need):
index 38dbc4b71023f8c301c507469ce8d96f7ac52b87..9725cd769b2cc4e3a059cc43f312fdd776952eaa 100644 (file)
@@ -22,6 +22,8 @@
 #
 # History:
 #
+# 2021-06-02, Sébastien Helleu <flashcode@flashtux.org>:
+#     version 1.2: fix /help buffer_autoset
 # 2018-04-14, Kim B. Heino:
 #     version 1.1: on startup apply settings to already opened buffers
 # 2017-06-21, Sébastien Helleu <flashcode@flashtux.org>:
@@ -31,9 +33,9 @@
 # 2015-07-12, Sébastien Helleu <flashcode@flashtux.org>:
 #     version 0.8: add option buffer_autoset.look.timer to add a small timer
 #                  before setting buffer properties
-# 2015-04-05, Nils Görs <freenode@#weechat>:
+# 2015-04-05, Nils Görs <libera@#weechat>:
 #     version 0.7: increase priority of hook_signal('buffer_opened')
-# 2012-12-09, Nils Görs <freenode@#weechat>:
+# 2012-12-09, Nils Görs <libera@#weechat>:
 #     version 0.6: add support of core buffer
 # 2012-03-09, Sébastien Helleu <flashcode@flashtux.org>:
 #     version 0.5: fix reload of config file
@@ -50,7 +52,7 @@
 
 SCRIPT_NAME = "buffer_autoset"
 SCRIPT_AUTHOR = "Sébastien Helleu <flashcode@flashtux.org>"
-SCRIPT_VERSION = "1.1"
+SCRIPT_VERSION = "1.2"
 SCRIPT_LICENSE = "GPL3"
 SCRIPT_DESC = "Auto-set buffer properties when a buffer is opened"
 
@@ -291,26 +293,25 @@ if __name__ == "__main__" and import_ok:
                 "[add buffer property value] | [del option]",
                 "     add: add a buffer/property/value in configuration file\n"
                 "     del: delete an option from configuration file\n"
-                "  buffer: name of a buffer (can start or end with \"*\" as "
-                "wildcard)\n"
+                "  buffer: name of a buffer (wildcard \"*\" is allowed)\n"
                 "property: buffer property\n"
                 "   value: value for property\n"
                 "  option: name of option from configuration file\n\n"
                 "Examples:\n"
                 "  disable timestamp on channel #weechat:\n"
-                "    /" + SCRIPT_COMMAND + " add irc.freenode.#weechat "
+                "    /" + SCRIPT_COMMAND + " add irc.libera.#weechat "
                 "time_for_each_line 0\n"
                 "  add word \"weechat\" in highlight list on channel "
                 "#savannah:\n"
-                "    /" + SCRIPT_COMMAND + " add irc.freenode.#savannah "
+                "    /" + SCRIPT_COMMAND + " add irc.libera.#savannah "
                 "highlight_words_add weechat\n"
-                "  disable highlights from nick \"mike\" on freenode server, "
+                "  disable highlights from nick \"mike\" on libera server, "
                 "channel #weechat (requires WeeChat >= 0.3.4):\n"
-                "    /" + SCRIPT_COMMAND + " add irc.freenode.#weechat "
+                "    /" + SCRIPT_COMMAND + " add irc.libera.#weechat "
                 "hotlist_max_level_nicks_add mike:2\n"
-                "  disable hotlist changes for nick \"bot\" on freenode "
+                "  disable hotlist changes for nick \"bot\" on libera "
                 "server (all channels) (requires WeeChat >= 0.3.4):\n"
-                "    /" + SCRIPT_COMMAND + " add irc.freenode.* "
+                "    /" + SCRIPT_COMMAND + " add irc.libera.* "
                 "hotlist_max_level_nicks_add bot:-1",
                 "add %(buffers_plugins_names)|"
                 "%(buffer_autoset_current_buffer) "
index 2c85c7c80d7cfe82ab2d3516ecc27ce3f4f82657..10ffb71121991b732f57e929fcd790363a0735a9 100644 (file)
@@ -21,6 +21,9 @@
 #
 #
 # History:
+# 2022-11-07: mva
+#   version 30: add ":" and "," to VALID_NICK regexp,
+#               to don't reset colorization in input_line
 # 2022-07-11: ncfavier
 #   version 29: check nick for exclusion *after* stripping
 #               decrease minimum min_nick_length to 1
@@ -93,13 +96,13 @@ w = weechat
 
 SCRIPT_NAME    = "colorize_nicks"
 SCRIPT_AUTHOR  = "xt <xt@bash.no>"
-SCRIPT_VERSION = "29"
+SCRIPT_VERSION = "30"
 SCRIPT_LICENSE = "GPL"
 SCRIPT_DESC    = "Use the weechat nick colors in the chat area"
 
 # Based on the recommendations in RFC 7613. A valid nick is composed
 # of anything but " ,*?.!@".
-VALID_NICK = r'([@~&!%+-])?([^\s,\*?\.!@]+)'
+VALID_NICK = r'([@~&!%+-])?([^\s,\*?\.!@:,]+)'
 valid_nick_re = re.compile(VALID_NICK)
 ignore_channels = []
 ignore_nicks = []
index 2ab47ed4523a104c06311709773d0c19c80d60fc..25041a8079665e5a59961624cb17ebf78ce7b4c3 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2009-2014 Sébastien Helleu <flashcode@flashtux.org>
+# Copyright (C) 2009-2023 Sébastien Helleu <flashcode@flashtux.org>
 # Copyright (C) 2010 m4v <lambdae2@gmail.com>
 # Copyright (C) 2011 stfn <stfnmd@googlemail.com>
 #
 #
 # History:
 #
+# 2023-06-21, Sébastien Helleu <flashcode@flashtux.org>:
+#     version 2.9: add option "min_chars"
+# 2023-01-08, Sébastien Helleu <flashcode@flashtux.org>:
+#     version 2.8: send buffer pointer with signal "input_text_changed"
+# 2021-05-25, Tomáš Janoušek <tomi@nomi.cz>:
+#     version 2.7: add new option to prefix short names with server names
 # 2019-07-11, Simmo Saan <simmo.saan@gmail.com>
 #     version 2.6: fix detection of "/input search_text_here"
 # 2017-04-01, Sébastien Helleu <flashcode@flashtux.org>:
@@ -94,7 +100,7 @@ from __future__ import print_function
 
 SCRIPT_NAME = 'go'
 SCRIPT_AUTHOR = 'Sébastien Helleu <flashcode@flashtux.org>'
-SCRIPT_VERSION = '2.6'
+SCRIPT_VERSION = '2.9'
 SCRIPT_LICENSE = 'GPL3'
 SCRIPT_DESC = 'Quick jump to buffers'
 
@@ -106,13 +112,19 @@ try:
     import weechat
 except ImportError:
     print('This script must be run under WeeChat.')
-    print('Get WeeChat now at: http://www.weechat.org/')
+    print('Get WeeChat now at: https://weechat.org/')
     IMPORT_OK = False
 
 import re
 
 # script options
 SETTINGS = {
+    'auto_jump': (
+        'off',
+        'automatically jump to buffer when it is uniquely selected'),
+    'buffer_number': (
+        'on',
+        'display buffer number'),
     'color_number': (
         'yellow,magenta',
         'color for buffer number (not selected)'),
@@ -131,12 +143,21 @@ SETTINGS = {
     'color_name_highlight_selected': (
         'red,brown',
         'color for highlight in a selected buffer name'),
+    'fuzzy_search': (
+        'off',
+        'search buffer matches using approximation'),
     'message': (
         'Go to: ',
         'message to display before list of buffers'),
+    'min_chars': (
+        '0',
+        'Minimum chars to search and display list of matching buffers'),
     'short_name': (
         'off',
         'display and search in short names instead of buffer name'),
+    'short_name_server': (
+        'off',
+        'prefix short names with server names for search and display'),
     'sort': (
         'number,beginning',
         'comma-separated list of keys to sort buffers '
@@ -149,15 +170,6 @@ SETTINGS = {
     'use_core_instead_weechat': (
         'off',
         'use name "core" instead of "weechat" for core buffer'),
-    'auto_jump': (
-        'off',
-        'automatically jump to buffer when it is uniquely selected'),
-    'fuzzy_search': (
-        'off',
-        'search buffer matches using approximation'),
-    'buffer_number': (
-        'on',
-        'display buffer number'),
 }
 
 # hooks management
@@ -317,9 +329,14 @@ def go_matching_buffers(strinput):
     strinput = strinput.lower()
     infolist = weechat.infolist_get('buffer', '', '')
     while weechat.infolist_next(infolist):
+        pointer = weechat.infolist_pointer(infolist, 'pointer')
         short_name = weechat.infolist_string(infolist, 'short_name')
+        server = weechat.buffer_get_string(pointer, 'localvar_server')
         if go_option_enabled('short_name'):
-            name = weechat.infolist_string(infolist, 'short_name')
+            if go_option_enabled('short_name_server') and server:
+                name = server + '.' + short_name
+            else:
+                name = short_name
         else:
             name = weechat.infolist_string(infolist, 'name')
         if name == 'weechat' \
@@ -332,7 +349,6 @@ def go_matching_buffers(strinput):
             full_name = '%s.%s' % (
                 weechat.infolist_string(infolist, 'plugin_name'),
                 weechat.infolist_string(infolist, 'name'))
-        pointer = weechat.infolist_pointer(infolist, 'pointer')
         matching = name.lower().find(strinput) >= 0
         if not matching and strinput[-1] == ' ':
             matching = name.lower().endswith(strinput.strip())
@@ -401,6 +417,11 @@ def go_matching_buffers(strinput):
 
 def go_buffers_to_string(listbuf, pos, strinput):
     """Return string built with list of buffers found (matching user input)."""
+    try:
+        if len(strinput) < int(weechat.config_get_plugin('min_chars')):
+            return ''
+    except:
+        pass
     string = ''
     strinput = strinput.lower()
     for i in range(len(listbuf)):
@@ -491,7 +512,7 @@ def go_command_run_input(data, buf, command):
         if buffers_pos >= len(buffers):
             buffers_pos = 0
         weechat.hook_signal_send('input_text_changed',
-                                 weechat.WEECHAT_HOOK_SIGNAL_STRING, '')
+                                 weechat.WEECHAT_HOOK_SIGNAL_POINTER, buf)
         return weechat.WEECHAT_RC_OK_EAT
     elif command == '/input complete_previous':
         # choose previous buffer in list
@@ -499,7 +520,7 @@ def go_command_run_input(data, buf, command):
         if buffers_pos < 0:
             buffers_pos = len(buffers) - 1
         weechat.hook_signal_send('input_text_changed',
-                                 weechat.WEECHAT_HOOK_SIGNAL_STRING, '')
+                                 weechat.WEECHAT_HOOK_SIGNAL_POINTER, buf)
         return weechat.WEECHAT_RC_OK_EAT
     elif command == '/input return':
         # switch to selected buffer (if any)
index 64dbc528f55b6afba0b9c34c8c5002e5c4324f07..b6751225a5320df67770b3012f2e2816ab4bba0b 100644 (file)
 #
 #   History:
 #
+#   2022-11-11, anonymous2ch
+#   version 0.8.6: ignore utf-8 decoding errors
+#
+#   2021-05-02, Sébastien Helleu <flashcode@flashtux.org>
+#   version 0.8.5: add compatibility with WeeChat >= 3.2 (XDG directories)
+#
+#   2020-10-11, Thom Wiggers <thom@thomwiggers.nl>
+#   version 0.8.4: Python3 compatibility fix
+#
+#   2020-05-06, Dominique Martinet <asmadeus@codewreck.org> and hexa-
+#   version 0.8.3: more python3 compatibility fixes...
+#
 #   2019-06-30, dabbill <dabbill@gmail.com>
 #               and Sébastien Helleu <flashcode@flashtux.org>
 #   version 0.8.2: make script compatible with Python 3
@@ -230,7 +242,7 @@ except ImportError:
 
 SCRIPT_NAME    = "grep"
 SCRIPT_AUTHOR  = "Elián Hanisch <lambdae2@gmail.com>"
-SCRIPT_VERSION = "0.8.2"
+SCRIPT_VERSION = "0.8.6"
 SCRIPT_LICENSE = "GPL3"
 SCRIPT_DESC    = "Search in buffers and logs"
 SCRIPT_COMMAND = "grep"
@@ -446,9 +458,13 @@ def get_config_log_filter():
         return []
 
 def get_home():
-    home = weechat.config_string(weechat.config_get('logger.file.path'))
-    home = home.replace('%h', weechat.info_get('weechat_dir', ''))
-    home = path.abspath(path.expanduser(home))
+    options = {
+        'directory': 'data',
+    }
+    home = weechat.string_eval_path_home(
+        weechat.config_string(weechat.config_get('logger.file.path')),
+        {}, {}, options,
+    )
     return home
 
 def strip_home(s, dir=''):
@@ -596,7 +612,10 @@ def get_file_by_name(buffer_name):
             if '$server' in mask:
                 mask = mask.replace('$server', server)
         # change the unreplaced vars by '*'
-        from string import letters
+        try:
+            from string import letters
+        except ImportError:
+            from string import ascii_letters as letters
         if '%' in mask:
             # vars for time formatting
             mask = mask.replace('%', '$')
@@ -722,7 +741,7 @@ def grep_file(file, head, tail, after_context, before_context, count, regexp, hi
         check = lambda s: check_string(s, regexp, hilight, exact)
 
     try:
-        file_object = open(file, 'r')
+        file_object = open(file, 'r', errors='ignore')
     except IOError:
         # file doesn't exist
         return lines
@@ -885,8 +904,7 @@ def grep_buffer(buffer, head, tail, after_context, before_context, count, regexp
         check = lambda s: check_string(s, regexp, hilight, exact)
 
     if before_context:
-        before_context_range = range(1, before_context + 1)
-        before_context_range.reverse()
+        before_context_range = reversed(range(1, before_context + 1))
 
     while infolist_next(infolist):
         line = get_line(infolist)
@@ -984,7 +1002,7 @@ def show_matching_lines():
             buffer_update()
         else:
             global hook_file_grep, grep_stdout, grep_stderr, pattern_tmpl
-            grep_stdout = grep_stderr = ''
+            grep_stdout = grep_stderr = b''
             hook_file_grep = weechat.hook_process(
                 'func:grep_process',
                 get_config_int('timeout_secs') * 1000,
@@ -1009,14 +1027,17 @@ def grep_process(*args):
     except Exception as e:
         result = e
 
-    return pickle.dumps(result)
-
-grep_stdout = grep_stderr = ''
+    return pickle.dumps(result, 0)
 
 def grep_process_cb(data, command, return_code, out, err):
     global grep_stdout, grep_stderr, matched_lines, hook_file_grep
 
+    if isinstance(out, str):
+        out = out.encode()
     grep_stdout += out
+
+    if isinstance(err, str):
+        err = err.encode()
     grep_stderr += err
 
     def set_buffer_error(message):
@@ -1548,7 +1569,7 @@ def cmd_logs(data, buffer, args):
     buffer = buffer_create()
     if get_config_boolean('clear_buffer'):
         weechat.buffer_clear(buffer)
-    file_list = zip(file_list, file_sizes)
+    file_list = list(zip(file_list, file_sizes))
     msg = 'Found %s logs.' %len(file_list)
 
     print_line(msg, buffer, display=True)
@@ -1738,8 +1759,11 @@ Examples:
             debug = pybuffer.debugBuffer(globals(), '%s_debug' % SCRIPT_NAME)
         except:
             def debug(s, *args):
-                if not isinstance(s, basestring):
-                    s = str(s)
+                try:
+                    if not isinstance(s, basestring):
+                        s = str(s)
+                except NameError:
+                    pass
                 if args:
                     s = s %args
                 prnt('', '%s\t%s' %(script_nick, s))
index 39ff696e6ad2c3c6381b2556786394adb06bf935..c303a77c5420f2f97306802953d57a9587ba5fd6 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 39ff696e6ad2c3c6381b2556786394adb06bf935
+Subproject commit c303a77c5420f2f97306802953d57a9587ba5fd6
index 237b2d555b62db7dcaab4098721d637f7538a082..7f72fabd0fdf9832f6349e274d3fa77bed047ae7 100644 (file)
@@ -6,9 +6,11 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
+config_version = 2
+
 [look]
 auto_open_buffer = on
 raw_messages = 256
@@ -37,8 +39,8 @@ nonce_size = 16
 password = ""
 password_hash_algo = "*"
 password_hash_iterations = 100000
-ssl_cert_key = "%h/ssl/relay.pem"
-ssl_priorities = "NORMAL:-VERS-SSL3.0"
+tls_cert_key = "%h/ssl/relay.pem"
+tls_priorities = "NORMAL:-VERS-SSL3.0"
 totp_secret = ""
 totp_window = 0
 websocket_allowed_origins = ""
index 555f48f38b34b1316a302d5c820080e1ece98e65..c7d00c9a213d51da25606935d4351037b7c3d368 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 21c15bbe5154dc70dad660cf8559a07fdb60e3b5..14d1729eef6b429276a74e9081e7d8ac2a20a02e 100644 (file)
 # Changelog:
 #
 # 0.1: Initial release.
-#
+# 0.2: Add compatibility with new weechat_print modifier data (WeeChat >= 2.9).
+# 0.3: Fix the compatibility checker
 
 SCRIPT_NAME    = 'colorizer'
 SCRIPT_AUTHOR  = 'Michael B. Hix'
 SCRIPT_DESC    = 'Colorize text in buffers based on rules.'
-SCRIPT_VERSION = '0.1'
+SCRIPT_VERSION = '0.3'
 SCRIPT_LICENSE = 'BSD'
 
 # A default coloring rule.
@@ -157,8 +158,16 @@ end
 # Handle message printing.
 #
 def colorize_cb( data, modifier, modifier_data, message )
-       _,buffer,_ = modifier_data.split( ';' )
-       return message unless @buffer_regex =~ buffer
+       if modifier_data.start_with?('0x')
+               # WeeChat >= 2.9
+               buffer, tags = modifier_data.split( ';' )
+               buffer_name = Weechat.buffer_get_string(buffer, 'name')
+       else
+               # WeeChat <= 2.8
+               plugin, buffer_name, tags = modifier_data.split( ';' )
+       end
+
+       return message unless @buffer_regex =~ buffer_name
 
        reset = Weechat.color( 'reset' )
        @rules.each do |reg, color_str|
index 84aa4ad5fdc51cd252ff71dd0aad813a66238bb7..89f8478a69bc55922789c6c19ac21cacb2e5cd3b 100644 (file)
@@ -1,3 +1,4 @@
+# coding: utf-8
 #
 # (c) 2013 Hendrik 'henk' Jaeger <weechat@henk.geekmail.org>
 # (c) 2015 arza <arza@arza.us>
 # 2015-09-24 0.1 arza:
 #  - option -m/--minimum for minimum count of mutual channels
 #  - fixed completion
+# 2021-11-06 0.2 Sébastien Helleu:
+#  - make script compatible with WeeChat >= 3.4
+#    (new parameters in function hdata_search)
 
 def weechat_init
   Weechat.register(
     "samechannel",
     "henk",
-    "0.1",
+    "0.2",
     "GPL3",
     "Lists multiple occurences of the same nick(s) in a set of channels.",
     "",
@@ -156,10 +160,17 @@ def find_channels( names, serverptr )
 end
 
 def find_servers( names )
+  weechat_version = Weechat.info_get('version_number', '').to_i
   serverptrlist = Weechat.hdata_get_list($hdata_ircserver, 'irc_servers')
   if names
     matching_servers = names.map do |name|
-      foundserverptr = Weechat.hdata_search($hdata_ircserver, serverptrlist, '${irc_server.name} =~ ' + name, 1)
+      if weechat_version >= 0x03040000
+        foundserverptr = Weechat.hdata_search($hdata_ircserver, serverptrlist,
+                                              '${irc_server.name} =~ ${name}',
+                                              {}, {'name' => name}, {}, 1)
+      else
+        foundserverptr = Weechat.hdata_search($hdata_ircserver, serverptrlist, '${irc_server.name} =~ ' + name, 1)
+      end
     end
   else
     return hhh_get_ptrarray($hdata_ircserver, serverptrlist)
index 3f8633bce5a5ab141413adee941bf853f84b8836..69fe2d5118c89c3359386bc4a02ee9966aaedda2 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 852b9899c483d71e05e78e4612864f0f96af075f..6b8d72fb1808115b0a954b6dfb5b7e15f6aefff5 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [crypt]
index 30bcee26d9ff024984c2334059ac5e7b71120135..3aff5a07c844c8924ee42e58cf621c24743a1441 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 30bdbc35622fa1eb3389f2d6c188e9b6dd816f78..7085f94fb5e251d73f2bd39627912d14a3c1ef55 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
@@ -22,8 +22,6 @@ flag_return_code = lightmagenta
 identifier = cyan
 regex = white
 replace = cyan
-trigger = green
-trigger_disabled = red
 
 [trigger]
 beep.arguments = ""
index dd8b7b0a0d7d61aea053e17c88c3c6003930204f..1b69a5a1bc14b109b6621f0de4126ad30d0cfc25 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 70a79c888f8d98fab8164b80a284bc39f29df4df..b59d29e631a49cf8400c156baa4d00ee5726143e 100644 (file)
@@ -6,9 +6,11 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
+config_version = 2
+
 [debug]
 
 [startup]
@@ -36,6 +38,7 @@ buffer_search_regex = off
 buffer_search_where = message
 buffer_time_format = "${color:253}%H:${color:245}%M"
 buffer_time_same = ""
+chat_space_right = off
 color_basic_force_bold = off
 color_inactive_buffer = off
 color_inactive_message = on
@@ -75,6 +78,7 @@ hotlist_suffix = ""
 hotlist_unique_numbers = on
 hotlist_update_on_buffer_switch = on
 input_cursor_scroll = 20
+input_multiline_lead_linebreak = on
 input_share = none
 input_share_overwrite = off
 input_undo_max = 32
@@ -96,7 +100,6 @@ nick_color_hash_salt = ""
 nick_color_stop_chars = "_|["
 nick_prefix = ""
 nick_suffix = ""
-paste_auto_add_newline = on
 paste_bracketed = off
 paste_bracketed_timer_delay = 10
 paste_max_lines = 1
@@ -178,6 +181,8 @@ chat_prefix_suffix = 31
 chat_read_marker = 31
 chat_read_marker_bg = default
 chat_server = brown
+chat_status_disabled = red
+chat_status_enabled = green
 chat_tags = red
 chat_text_found = yellow
 chat_text_found_bg = lightmagenta
@@ -205,7 +210,8 @@ status_filter = green
 status_more = 229
 status_mouse = green
 status_name = 121
-status_name_ssl = 121
+status_name_insecure = lightmagenta
+status_name_tls = white
 status_nicklist_count = default
 status_number = yellow
 status_time = default
@@ -434,49 +440,53 @@ python = message
 irc_smart = on;*;irc_smart_filter;*
 
 [key]
-ctrl-? = "/input delete_previous_char"
-ctrl-A = "/input move_beginning_of_line"
-ctrl-B = "/input move_previous_char"
-ctrl-Cb = "/input insert \x02"
-ctrl-Cc = "/input insert \x03"
-ctrl-Ci = "/input insert \x1D"
-ctrl-Co = "/input insert \x0F"
-ctrl-Cr = "/input insert \x12"
-ctrl-Cu = "/input insert \x15"
-ctrl-D = "/input delete_next_char"
-ctrl-E = "/input move_end_of_line"
-ctrl-F = "/input move_next_char"
-ctrl-H = "/window -1"
-ctrl-I = "/input complete_next"
-ctrl-J = "/input return"
-ctrl-K = "/input delete_end_of_line"
-ctrl-L = "/window +1"
-ctrl-M = "/input return"
-ctrl-N = "/buffer +1"
-ctrl-P = "/buffer -1"
-ctrl-R = "/input search_text"
-ctrl-Sctrl-U = "/input set_unread"
-ctrl-T = "/input transpose_chars"
-ctrl-U = "/input delete_beginning_of_line"
-ctrl-W = "/input delete_previous_word"
-ctrl-X = "/input switch_active_buffer"
-ctrl-Y = "/input clipboard_paste"
-meta-meta-OP = "/bar scroll buflist * b"
-meta-meta-OQ = "/bar scroll buflist * e"
-meta-meta2-11~ = "/bar scroll buflist * b"
-meta-meta2-12~ = "/bar scroll buflist * e"
-meta-meta2-1~ = "/window scroll_top"
-meta-meta2-23~ = "/bar scroll nicklist * b"
-meta-meta2-24~ = "/bar scroll nicklist * e"
-meta-meta2-4~ = "/window scroll_bottom"
-meta-meta2-5~ = "/window scroll_up"
-meta-meta2-6~ = "/window scroll_down"
-meta-meta2-7~ = "/window scroll_top"
-meta-meta2-8~ = "/window scroll_bottom"
-meta-meta2-A = "/buffer -1"
-meta-meta2-B = "/buffer +1"
-meta-meta2-C = "/buffer +10"
-meta-meta2-D = "/buffer -10"
+backspace = "/input delete_previous_char"
+ctrl-^ = "/buffer +"
+ctrl-_ = "/input undo"
+ctrl-a = "/input move_beginning_of_line"
+ctrl-b = "/input move_previous_char"
+ctrl-c,b = "/input insert \x02"
+ctrl-c,c = "/input insert \x03"
+ctrl-c,i = "/input insert \x1D"
+ctrl-c,o = "/input insert \x0F"
+ctrl-c,r = "/input insert \x12"
+ctrl-c,u = "/input insert \x15"
+ctrl-d = "/input delete_next_char"
+ctrl-down = "/input history_global_next"
+ctrl-e = "/input move_end_of_line"
+ctrl-f = "/input move_next_char"
+ctrl-f1 = "/bar scroll buflist * -100%"
+ctrl-f2 = "/bar scroll buflist * +100%"
+ctrl-h = "/window -1"
+ctrl-k = "/input delete_end_of_line"
+ctrl-l = "/window +1"
+ctrl-left = "/input move_previous_word"
+ctrl-n = "/buffer +1"
+ctrl-p = "/buffer -1"
+ctrl-r = "/input search_text"
+ctrl-right = "/input move_next_word"
+ctrl-s,ctrl-u = "/allbuf /buffer set unread"
+ctrl-t = "/input transpose_chars"
+ctrl-u = "/input delete_beginning_of_line"
+ctrl-up = "/input history_global_previous"
+ctrl-w = "/input delete_previous_word"
+ctrl-x = "/buffer switch"
+ctrl-y = "/input clipboard_paste"
+delete = "/input delete_next_char"
+down = "/input history_next"
+end = "/input move_end_of_line"
+f1 = "/bar scroll buflist * -100%"
+f10 = "/bar scroll title * +30%"
+f11 = "/bar scroll nicklist * -100%"
+f12 = "/bar scroll nicklist * +100%"
+f2 = "/bar scroll buflist * +100%"
+f5 = "/buffer -1"
+f6 = "/buffer +1"
+f7 = "/window -1"
+f8 = "/window +1"
+f9 = "/bar scroll title * -30%"
+home = "/input move_beginning_of_line"
+left = "/input move_previous_char"
 meta-! = "/buffer *1"
 meta-# = "/buffer *3"
 meta-$ = "/buffer *4"
@@ -485,7 +495,7 @@ meta-& = "/buffer *7"
 meta-( = "/buffer *9"
 meta-) = "/buffer *10"
 meta-* = "/buffer *8"
-meta-/ = "/input jump_last_buffer_displayed"
+meta-/ = "/buffer jump last_displayed"
 meta-0 = "/buffer *10"
 meta-1 = "/buffer *1"
 meta-2 = "/buffer *2"
@@ -496,237 +506,188 @@ meta-6 = "/buffer *6"
 meta-7 = "/buffer *7"
 meta-8 = "/buffer *8"
 meta-9 = "/buffer *9"
-meta-< = "/input jump_previously_visited_buffer"
+meta-< = "/buffer jump prev_visited"
 meta-= = "/filter toggle"
-meta-> = "/input jump_next_visited_buffer"
+meta-> = "/buffer jump next_visited"
 meta-@ = "/buffer *2"
 meta-B = "/buflist toggle"
-meta-OA = "/input history_global_previous"
-meta-OB = "/input history_global_next"
-meta-OC = "/input move_next_word"
-meta-OD = "/input move_previous_word"
-meta-OF = "/input move_end_of_line"
-meta-OH = "/input move_beginning_of_line"
-meta-OP = "/bar scroll buflist * -100%"
-meta-OQ = "/bar scroll buflist * +100%"
-meta-Oa = "/input history_global_previous"
-meta-Ob = "/input history_global_next"
-meta-Oc = "/input move_next_word"
-meta-Od = "/input move_previous_word"
-meta2-11^ = "/bar scroll buflist * -100%"
-meta2-11~ = "/bar scroll buflist * -100%"
-meta2-12^ = "/bar scroll buflist * +100%"
-meta2-12~ = "/bar scroll buflist * +100%"
-meta2-15~ = "/buffer -1"
-meta2-17~ = "/buffer +1"
-meta2-18~ = "/window -1"
-meta2-19~ = "/window +1"
-meta2-1;3A = "/buffer -1"
-meta2-1;3B = "/buffer +1"
-meta2-1;3C = "/buffer +1"
-meta2-1;3D = "/buffer -1"
-meta2-1;3P = "/bar scroll buflist * b"
-meta2-1;3Q = "/bar scroll buflist * e"
-meta2-1;5A = "/input history_global_previous"
-meta2-1;5B = "/input history_global_next"
-meta2-1;5C = "/input move_next_word"
-meta2-1;5D = "/input move_previous_word"
-meta2-1;5P = "/bar scroll buflist * -100%"
-meta2-1;5Q = "/bar scroll buflist * +100%"
-meta2-1~ = "/input move_beginning_of_line"
-meta2-200~ = "/input paste_start"
-meta2-201~ = "/input paste_stop"
-meta2-20~ = "/bar scroll title * -30%"
-meta2-21~ = "/bar scroll title * +30%"
-meta2-23~ = "/bar scroll nicklist * -100%"
-meta2-24~ = "/bar scroll nicklist * +100%"
-meta2-3~ = "/input delete_next_char"
-meta2-4~ = "/input move_end_of_line"
-meta2-5;3~ = "/window scroll_up"
-meta2-5~ = "/window page_up"
-meta2-6;3~ = "/window scroll_down"
-meta2-6~ = "/window page_down"
-meta2-7~ = "/input move_beginning_of_line"
-meta2-8~ = "/input move_end_of_line"
-meta2-A = "/input history_previous"
-meta2-B = "/input history_next"
-meta2-C = "/input move_next_char"
-meta2-D = "/input move_previous_char"
-meta2-F = "/input move_end_of_line"
-meta2-G = "/window page_down"
-meta2-H = "/input move_beginning_of_line"
-meta2-I = "/window page_up"
-meta2-Z = "/input complete_previous"
-meta2-[E = "/buffer -1"
 meta-^ = "/buffer *6"
 meta-_ = "/input redo"
-meta-a = "/input jump_smart"
+meta-a = "/buffer jump smart"
 meta-b = "/input move_previous_word"
 meta-d = "/input delete_next_word"
+meta-down = "/buffer +1"
+meta-end = "/window scroll_bottom"
 meta-f = "/input move_next_word"
-meta-h = "/input hotlist_clear"
-meta-jmeta-l = "/input jump_last_buffer"
-meta-jmeta-r = "/server raw"
-meta-jmeta-s = "/server jump"
-meta-j01 = "/buffer 1"
-meta-j02 = "/buffer 2"
-meta-j03 = "/buffer 3"
-meta-j04 = "/buffer 4"
-meta-j05 = "/buffer 5"
-meta-j06 = "/buffer 6"
-meta-j07 = "/buffer 7"
-meta-j08 = "/buffer 8"
-meta-j09 = "/buffer 9"
-meta-j10 = "/buffer 10"
-meta-j11 = "/buffer 11"
-meta-j12 = "/buffer 12"
-meta-j13 = "/buffer 13"
-meta-j14 = "/buffer 14"
-meta-j15 = "/buffer 15"
-meta-j16 = "/buffer 16"
-meta-j17 = "/buffer 17"
-meta-j18 = "/buffer 18"
-meta-j19 = "/buffer 19"
-meta-j20 = "/buffer 20"
-meta-j21 = "/buffer 21"
-meta-j22 = "/buffer 22"
-meta-j23 = "/buffer 23"
-meta-j24 = "/buffer 24"
-meta-j25 = "/buffer 25"
-meta-j26 = "/buffer 26"
-meta-j27 = "/buffer 27"
-meta-j28 = "/buffer 28"
-meta-j29 = "/buffer 29"
-meta-j30 = "/buffer 30"
-meta-j31 = "/buffer 31"
-meta-j32 = "/buffer 32"
-meta-j33 = "/buffer 33"
-meta-j34 = "/buffer 34"
-meta-j35 = "/buffer 35"
-meta-j36 = "/buffer 36"
-meta-j37 = "/buffer 37"
-meta-j38 = "/buffer 38"
-meta-j39 = "/buffer 39"
-meta-j40 = "/buffer 40"
-meta-j41 = "/buffer 41"
-meta-j42 = "/buffer 42"
-meta-j43 = "/buffer 43"
-meta-j44 = "/buffer 44"
-meta-j45 = "/buffer 45"
-meta-j46 = "/buffer 46"
-meta-j47 = "/buffer 47"
-meta-j48 = "/buffer 48"
-meta-j49 = "/buffer 49"
-meta-j50 = "/buffer 50"
-meta-j51 = "/buffer 51"
-meta-j52 = "/buffer 52"
-meta-j53 = "/buffer 53"
-meta-j54 = "/buffer 54"
-meta-j55 = "/buffer 55"
-meta-j56 = "/buffer 56"
-meta-j57 = "/buffer 57"
-meta-j58 = "/buffer 58"
-meta-j59 = "/buffer 59"
-meta-j60 = "/buffer 60"
-meta-j61 = "/buffer 61"
-meta-j62 = "/buffer 62"
-meta-j63 = "/buffer 63"
-meta-j64 = "/buffer 64"
-meta-j65 = "/buffer 65"
-meta-j66 = "/buffer 66"
-meta-j67 = "/buffer 67"
-meta-j68 = "/buffer 68"
-meta-j69 = "/buffer 69"
-meta-j70 = "/buffer 70"
-meta-j71 = "/buffer 71"
-meta-j72 = "/buffer 72"
-meta-j73 = "/buffer 73"
-meta-j74 = "/buffer 74"
-meta-j75 = "/buffer 75"
-meta-j76 = "/buffer 76"
-meta-j77 = "/buffer 77"
-meta-j78 = "/buffer 78"
-meta-j79 = "/buffer 79"
-meta-j80 = "/buffer 80"
-meta-j81 = "/buffer 81"
-meta-j82 = "/buffer 82"
-meta-j83 = "/buffer 83"
-meta-j84 = "/buffer 84"
-meta-j85 = "/buffer 85"
-meta-j86 = "/buffer 86"
-meta-j87 = "/buffer 87"
-meta-j88 = "/buffer 88"
-meta-j89 = "/buffer 89"
-meta-j90 = "/buffer 90"
-meta-j91 = "/buffer 91"
-meta-j92 = "/buffer 92"
-meta-j93 = "/buffer 93"
-meta-j94 = "/buffer 94"
-meta-j95 = "/buffer 95"
-meta-j96 = "/buffer 96"
-meta-j97 = "/buffer 97"
-meta-j98 = "/buffer 98"
-meta-j99 = "/buffer 99"
+meta-f1 = "/bar scroll buflist * b"
+meta-f11 = "/bar scroll nicklist * b"
+meta-f12 = "/bar scroll nicklist * e"
+meta-f2 = "/bar scroll buflist * e"
+meta-h = "/hotlist clear"
+meta-home = "/window scroll_top"
+meta-j,0,1 = "/buffer 1"
+meta-j,0,2 = "/buffer 2"
+meta-j,0,3 = "/buffer 3"
+meta-j,0,4 = "/buffer 4"
+meta-j,0,5 = "/buffer 5"
+meta-j,0,6 = "/buffer 6"
+meta-j,0,7 = "/buffer 7"
+meta-j,0,8 = "/buffer 8"
+meta-j,0,9 = "/buffer 9"
+meta-j,1,0 = "/buffer 10"
+meta-j,1,1 = "/buffer 11"
+meta-j,1,2 = "/buffer 12"
+meta-j,1,3 = "/buffer 13"
+meta-j,1,4 = "/buffer 14"
+meta-j,1,5 = "/buffer 15"
+meta-j,1,6 = "/buffer 16"
+meta-j,1,7 = "/buffer 17"
+meta-j,1,8 = "/buffer 18"
+meta-j,1,9 = "/buffer 19"
+meta-j,2,0 = "/buffer 20"
+meta-j,2,1 = "/buffer 21"
+meta-j,2,2 = "/buffer 22"
+meta-j,2,3 = "/buffer 23"
+meta-j,2,4 = "/buffer 24"
+meta-j,2,5 = "/buffer 25"
+meta-j,2,6 = "/buffer 26"
+meta-j,2,7 = "/buffer 27"
+meta-j,2,8 = "/buffer 28"
+meta-j,2,9 = "/buffer 29"
+meta-j,3,0 = "/buffer 30"
+meta-j,3,1 = "/buffer 31"
+meta-j,3,2 = "/buffer 32"
+meta-j,3,3 = "/buffer 33"
+meta-j,3,4 = "/buffer 34"
+meta-j,3,5 = "/buffer 35"
+meta-j,3,6 = "/buffer 36"
+meta-j,3,7 = "/buffer 37"
+meta-j,3,8 = "/buffer 38"
+meta-j,3,9 = "/buffer 39"
+meta-j,4,0 = "/buffer 40"
+meta-j,4,1 = "/buffer 41"
+meta-j,4,2 = "/buffer 42"
+meta-j,4,3 = "/buffer 43"
+meta-j,4,4 = "/buffer 44"
+meta-j,4,5 = "/buffer 45"
+meta-j,4,6 = "/buffer 46"
+meta-j,4,7 = "/buffer 47"
+meta-j,4,8 = "/buffer 48"
+meta-j,4,9 = "/buffer 49"
+meta-j,5,0 = "/buffer 50"
+meta-j,5,1 = "/buffer 51"
+meta-j,5,2 = "/buffer 52"
+meta-j,5,3 = "/buffer 53"
+meta-j,5,4 = "/buffer 54"
+meta-j,5,5 = "/buffer 55"
+meta-j,5,6 = "/buffer 56"
+meta-j,5,7 = "/buffer 57"
+meta-j,5,8 = "/buffer 58"
+meta-j,5,9 = "/buffer 59"
+meta-j,6,0 = "/buffer 60"
+meta-j,6,1 = "/buffer 61"
+meta-j,6,2 = "/buffer 62"
+meta-j,6,3 = "/buffer 63"
+meta-j,6,4 = "/buffer 64"
+meta-j,6,5 = "/buffer 65"
+meta-j,6,6 = "/buffer 66"
+meta-j,6,7 = "/buffer 67"
+meta-j,6,8 = "/buffer 68"
+meta-j,6,9 = "/buffer 69"
+meta-j,7,0 = "/buffer 70"
+meta-j,7,1 = "/buffer 71"
+meta-j,7,2 = "/buffer 72"
+meta-j,7,3 = "/buffer 73"
+meta-j,7,4 = "/buffer 74"
+meta-j,7,5 = "/buffer 75"
+meta-j,7,6 = "/buffer 76"
+meta-j,7,7 = "/buffer 77"
+meta-j,7,8 = "/buffer 78"
+meta-j,7,9 = "/buffer 79"
+meta-j,8,0 = "/buffer 80"
+meta-j,8,1 = "/buffer 81"
+meta-j,8,2 = "/buffer 82"
+meta-j,8,3 = "/buffer 83"
+meta-j,8,4 = "/buffer 84"
+meta-j,8,5 = "/buffer 85"
+meta-j,8,6 = "/buffer 86"
+meta-j,8,7 = "/buffer 87"
+meta-j,8,8 = "/buffer 88"
+meta-j,8,9 = "/buffer 89"
+meta-j,9,0 = "/buffer 90"
+meta-j,9,1 = "/buffer 91"
+meta-j,9,2 = "/buffer 92"
+meta-j,9,3 = "/buffer 93"
+meta-j,9,4 = "/buffer 94"
+meta-j,9,5 = "/buffer 95"
+meta-j,9,6 = "/buffer 96"
+meta-j,9,7 = "/buffer 97"
+meta-j,9,8 = "/buffer 98"
+meta-j,9,9 = "/buffer 99"
+meta-j,meta-l = "/buffer +"
+meta-j,meta-r = "/server raw"
+meta-j,meta-s = "/server jump"
 meta-k = "/input grab_key_command"
+meta-left = "/buffer -1"
 meta-m = "/mute mouse toggle"
 meta-n = "/window scroll_next_highlight"
 meta-p = "/window scroll_previous_highlight"
+meta-pgdn = "/window scroll_down"
+meta-pgup = "/window scroll_up"
 meta-r = "/input delete_line"
+meta-right = "/buffer +1"
 meta-s = "/mute aspell toggle"
 meta-u = "/window scroll_unread"
+meta-up = "/buffer -1"
 meta-w = "/close"
-meta-wmeta-meta2-A = "/window up"
-meta-wmeta-meta2-B = "/window down"
-meta-wmeta-meta2-C = "/window right"
-meta-wmeta-meta2-D = "/window left"
-meta-wmeta2-1;3A = "/window up"
-meta-wmeta2-1;3B = "/window down"
-meta-wmeta2-1;3C = "/window right"
-meta-wmeta2-1;3D = "/window left"
-meta-wmeta-b = "/window balance"
-meta-wmeta-s = "/window swap"
-meta-x = "/input zoom_merged_buffer"
+meta-w,meta-b = "/window balance"
+meta-w,meta-down = "/window down"
+meta-w,meta-left = "/window left"
+meta-w,meta-right = "/window right"
+meta-w,meta-s = "/window swap"
+meta-w,meta-up = "/window up"
+meta-x = "/buffer zoom"
 meta-z = "/window zoom"
-ctrl-^ = "/input jump_last_buffer"
-ctrl-_ = "/input undo"
+pgdn = "/window page_down"
+pgup = "/window page_up"
+return = "/input return"
+right = "/input move_next_char"
+shift-tab = "/input complete_previous"
+tab = "/input complete_next"
+up = "/input history_previous"
 
 [key_search]
-ctrl-J = "/input search_stop"
-ctrl-M = "/input search_stop"
-ctrl-R = "/input search_switch_case"
-meta2-A = "/input search_previous"
-meta2-B = "/input search_next"
+ctrl-r = "/input search_switch_case"
+down = "/input search_next"
+return = "/input search_stop"
+up = "/input search_previous"
 
 [key_cursor]
-ctrl-J = "/cursor stop"
-ctrl-M = "/cursor stop"
-meta-meta2-A = "/cursor move area_up"
-meta-meta2-B = "/cursor move area_down"
-meta-meta2-C = "/cursor move area_right"
-meta-meta2-D = "/cursor move area_left"
-meta2-1;3A = "/cursor move area_up"
-meta2-1;3B = "/cursor move area_down"
-meta2-1;3C = "/cursor move area_right"
-meta2-1;3D = "/cursor move area_left"
-meta2-A = "/cursor move up"
-meta2-B = "/cursor move down"
-meta2-C = "/cursor move right"
-meta2-D = "/cursor move left"
 @chat(python.*):D = "hsignal:slack_cursor_delete"
 @chat(python.*):L = "hsignal:slack_cursor_linkarchive"
 @chat(python.*):M = "hsignal:slack_cursor_message"
 @chat(python.*):R = "hsignal:slack_cursor_reply"
 @chat(python.*):T = "hsignal:slack_cursor_thread"
+@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop"
+@chat:m = "hsignal:chat_quote_message;/cursor stop"
+@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop"
 @item(buffer_nicklist):K = "/window ${_window_number};/kickban ${nick}"
 @item(buffer_nicklist):b = "/window ${_window_number};/ban ${nick}"
 @item(buffer_nicklist):k = "/window ${_window_number};/kick ${nick}"
 @item(buffer_nicklist):q = "/window ${_window_number};/query ${nick};/cursor stop"
 @item(buffer_nicklist):w = "/window ${_window_number};/whois ${nick}"
-@chat:Q = "hsignal:chat_quote_time_prefix_message;/cursor stop"
-@chat:m = "hsignal:chat_quote_message;/cursor stop"
-@chat:q = "hsignal:chat_quote_prefix_message;/cursor stop"
+down = "/cursor move down"
+left = "/cursor move left"
+meta-down = "/cursor move area_down"
+meta-left = "/cursor move area_left"
+meta-right = "/cursor move area_right"
+meta-up = "/cursor move area_up"
+return = "/cursor stop"
+right = "/cursor move right"
+up = "/cursor move up"
 
 [key_mouse]
+@*:button3 = "/cursor go ${_x},${_y}"
 @bar(buffers):ctrl-wheeldown = "hsignal:buffers_mouse"
 @bar(buffers):ctrl-wheelup = "hsignal:buffers_mouse"
 @bar(buflist):ctrl-wheeldown = "hsignal:buflist_mouse"
@@ -736,6 +697,8 @@ meta2-D = "/cursor move left"
 @bar(nicklist):button1-gesture-down-long = "/bar scroll nicklist ${_window_number} e"
 @bar(nicklist):button1-gesture-up = "/bar scroll nicklist ${_window_number} -100%"
 @bar(nicklist):button1-gesture-up-long = "/bar scroll nicklist ${_window_number} b"
+@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%"
+@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%"
 @chat(fset.fset):button1 = "/window ${_window_number};/fset -go ${_chat_line_y}"
 @chat(fset.fset):button2* = "hsignal:fset_mouse"
 @chat(fset.fset):wheeldown = "/fset -down 5"
@@ -749,6 +712,11 @@ meta2-D = "/cursor move left"
 @chat(script.scripts):button2 = "/window ${_window_number};/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}"
 @chat(script.scripts):wheeldown = "/script down 5"
 @chat(script.scripts):wheelup = "/script up 5"
+@chat:button1 = "/window ${_window_number}"
+@chat:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%"
+@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%"
+@chat:wheeldown = "/window scroll_down -window ${_window_number}"
+@chat:wheelup = "/window scroll_up -window ${_window_number}"
 @item(buffer_nicklist):button1 = "/window ${_window_number};/query ${nick}"
 @item(buffer_nicklist):button1-gesture-left = "/window ${_window_number};/kick ${nick}"
 @item(buffer_nicklist):button1-gesture-left-long = "/window ${_window_number};/kickban ${nick}"
@@ -762,11 +730,3 @@ meta2-D = "/cursor move left"
 @item(buflist2):button2* = "hsignal:buflist_mouse"
 @item(buflist3):button1* = "hsignal:buflist_mouse"
 @item(buflist3):button2* = "hsignal:buflist_mouse"
-@bar:wheeldown = "/bar scroll ${_bar_name} ${_window_number} +20%"
-@bar:wheelup = "/bar scroll ${_bar_name} ${_window_number} -20%"
-@chat:button1 = "/window ${_window_number}"
-@chat:ctrl-wheeldown = "/window scroll_horiz -window ${_window_number} +10%"
-@chat:ctrl-wheelup = "/window scroll_horiz -window ${_window_number} -10%"
-@chat:wheeldown = "/window scroll_down -window ${_window_number}"
-@chat:wheelup = "/window scroll_up -window ${_window_number}"
-@*:button3 = "/cursor go ${_x},${_y}"
index e644bb6e67a002fc3ed8f01d5d4a402b0b7870f3..205843aaef1f7733aad8e14f022c1fbf0a2ae66b 100644 (file)
@@ -6,7 +6,7 @@
 #
 # Use commands like /set or /fset to change settings in WeeChat.
 #
-# For more info, see: https://weechat.org/doc/quickstart/
+# For more info, see: https://weechat.org/doc/weechat/quickstart/
 #
 
 [look]
index 4e9a048b047af7684d593d8d70a7e13fdaae810a..3fcfa95e8c8c299bdc20cfe2a61dfacb70f0283b 100755 (executable)
@@ -20,9 +20,14 @@ elif [[ $(hostname) == "skull-canyon" ]]; then
     xidlehook \
         --socket=$XIDLEHOOK_SOCKET \
         --not-when-fullscreen \
-        --timer 300  'xset dpms force off' '' \
-        --timer 300  'i3lock -c 000000'    '' \
+        --timer 300  'xset dpms force off'   '' \
+        --timer 300  'loginctl lock-session' '' \
         &
 fi
 
+# FIXME: as soon as dpms force off comes on the session is locked regardles
+# TODO: maybe there is no need for xidlehook
+# Although, I'm not sure how suspend will work
+# xset s 300 60  # notify after 300, lock 60 after
+# xset dpms 300 360 1800
 xss-lock -- i3lock --nofork --color=000000 &
index 1606d1d2c4d7edc2000dd3c0d1e8e5bee0fccdf4..7e00da1aabb811148fc6974ab2031487aff73f43 100755 (executable)
@@ -1,5 +1,3 @@
 #!/usr/bin/env bash
 
-xkb_file=default
-[[ -f $XDG_CONFIG_HOME/xkb/$(hostname).xkb ]] && xkb_file=$(hostname)
-xkbcomp -I$XDG_CONFIG_HOME/xkb $XDG_CONFIG_HOME/xkb/$xkb_file.xkb $DISPLAY
+inputplug -0c xkbload
index 229a9e63b5d3627f07f4255280c52b2c9556b860..bd965d72a5d56609da94630fc9408e0f5c78fe22 100755 (executable)
@@ -10,3 +10,6 @@ fi
 picom &
 unclutter --timeout 1 &
 xcape -e "Control_L=Escape;Control_R=Escape"
+
+#TODO:
+# add support for kdeconnect-indicator if it is installed
similarity index 100%
rename from zsh/lib/fzf.zsh
rename to zsh/lib/10-fzf.zsh
diff --git a/zsh/lib/kitty.zsh b/zsh/lib/kitty.zsh
deleted file mode 100644 (file)
index e606c01..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-if test -n "$KITTY_INSTALLATION_DIR"; then
-    export KITTY_SHELL_INTEGRATION="enabled"
-    autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
-    kitty-integration
-    unfunction kitty-integration
-fi
index c1155066b314552685c06d8429101dda9dda0407..be5b477f295683e79e0f2eef7d44e54ad38581a6 100644 (file)
@@ -11,8 +11,7 @@ msg()
 }
 
 if [[ -d ~/org ]]; then
-    # 44 seems to be the number of color escape characters used by grep
-    todo | cut -c-$((COLUMNS + 44))
+    org-agenda
 fi
 
 if (( $+commands[checkupdates] )); then
diff --git a/zshenv b/zshenv
index 93993b0750868d845d1a02ac7f30eea34466342e..c184a185bcf5d0ade1d025f9b36c07bda42ff4cb 100644 (file)
--- a/zshenv
+++ b/zshenv
@@ -28,9 +28,9 @@ fi
 
 # vim stuff
 [[ -d "$XDG_CACHE_HOME/vim/backup" ]] || mkdir -p "$XDG_CACHE_HOME"/vim/{backup,undo,view}
-export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'
-export EDITOR=vim
-export VISUAL=vim
+export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/"..(has("nvim")?"nvim/init.lua":"vim/vimrc") | source $MYVIMRC'
+export EDITOR=nvim
+export VISUAL=nvim
 
 # default browser
 export BROWSER=qutebrowser
@@ -44,9 +44,6 @@ export LESSHISTFILE="$XDG_CACHE_HOME/lesshst"
 # urxvtd
 export RXVT_SOCKET="$XDG_RUNTIME_DIR/urxvtd-$HOST"
 
-# task
-export TASKRC="$XDG_CONFIG_HOME/taskrc"
-
 # mpv & mplayer
 export MPV_HOME="$XDG_CONFIG_HOME/mpv"
 export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer"