Compare commits

...

51 commits

Author SHA1 Message Date
3827ba15b3
wezterm: Style tabbar with flavours 2023-03-07 11:44:27 +01:00
f1b218da95
bootstrap: Update stable packages 2023-03-07 11:10:03 +01:00
b800d8f1eb
desktop: Add flavours program to set colors
Switching from my custom, brittle, styling implementation `styler` to
the wonder `flavours` program which does exactly the same only with more
clarity, faster and - I would presume - more stable.
2023-03-07 11:09:47 +01:00
2c0d41f4af
nvim: Load zathura colors from xdg state directory 2023-03-07 10:51:22 +01:00
6f3ac3d31f
nvim: Move Navigator to dev version
Since Navigator.nvim only implements wezterm compatibility in its main
branch as of now, we explicitly switch away from its stable version for
now.
2023-03-07 10:50:32 +01:00
74fdc4bc8f
nvim: Update plugins 2023-03-07 10:49:04 +01:00
382bcdba72
nvim: Hook treesitter commentstrings into comment maps 2023-03-07 10:46:25 +01:00
72514b2a5e
nvim: Update rainbow brackets to maintained fork 2023-03-07 10:45:43 +01:00
954ccf5e89
nvim: Improve dynamic colorscheme sourcing 2023-03-07 10:41:47 +01:00
09af447747
multimedia: Scrub beets configuration 2023-03-06 11:35:13 +01:00
ec20d637c0
qutebrowser: Source colorscheme file from xdg state dir 2023-03-03 18:48:55 +01:00
22341e7988
wezterm: Dynamically load colors from scheme file 2023-03-03 18:41:06 +01:00
25d37d17b3
nvim: Dynamically source colorscheme from file
Neovim will source the `colorscheme.lua` file in its state directory on
startup, as well as whenever the file contents are changed.
This allows any colorscheme definition to be put into the file and vim
will apply it as soon as the file contents change.
2023-03-03 18:35:27 +01:00
c13db186cc
river: Generalize dual-screen wallpaper setup
Instead of checking for the specific DP-3 and DP-5 setup that my two
screens default to, we just check that two DP- monitors are connected
and set up the wallpapers on them.
This also circumvents the issue that screens receive different numbering
when disconnected and reconnected at any point.
2023-03-03 18:29:54 +01:00
0447f652cb
waybar: Change colorscheme.css location to xdg state 2023-03-03 18:29:13 +01:00
356d3ef3e6
writing: Add zk configuration to writing module 2023-03-03 12:56:18 +01:00
88ab8c10a6
sh: Simple pseudo-fix for missing xdg symlink
HACK - it does not reconnect the symlink correctly if its target indeed
returns to the system.
2023-03-03 12:55:08 +01:00
c92afad510
qutebrowser: Removed offline server redirect 2023-03-03 12:54:29 +01:00
1c7d0a9835
nvim: Default to stable versions for plugins
Using the lazy option 'version' we default to updating only to the
latest stable (semver) version of plugins. This should make it a little
more stable in the long run to keep up with plugin updates.

Not all plugins support this versioning scheme and for those that do not
it just keeps tracking the main branch.

Currently from the plugins that support it, only `nvim-lspconfig` needs
to be manually kept on the main branch since it is missing the correct
lua language server otherwise. This should be a problem of the past with
the release of the next version of the plugin.
2023-03-03 12:51:21 +01:00
051c0914ad
nvim: Add wrapping plugin 2023-03-03 12:38:09 +01:00
2c4d5c483d
nvim: Update plugin lockfile 2023-03-01 17:41:30 +01:00
7128edc57c
nvim: Add quarto filetype setup 2023-03-01 17:39:03 +01:00
c75b7636e0
nvim: Determine python venv on lsp start 2023-03-01 15:57:28 +01:00
a44cf1d509
nvim: Add notify, select and input UI theme plugins 2023-03-01 15:56:30 +01:00
72e7832dce
nvim: Remove navigator.lua 2023-03-01 14:40:36 +01:00
e94eade3b3
nvim: Add descriptions for various prefix groups 2023-03-01 14:37:59 +01:00
56003fcccb
nvim: Map <leader>v for vim-related options 2023-03-01 14:36:54 +01:00
e3f123c080
nvim: Add punctuation-based undo breakpoints 2023-03-01 14:35:04 +01:00
ea7fcd92f5
nvim: Switch to manual lsp mappings 2023-03-01 14:28:42 +01:00
e1abc2972b
nvim: Add gitcommit ft settings 2023-03-01 14:27:03 +01:00
8d40fd843e
nvim: Rename helpers module to util module 2023-03-01 14:26:26 +01:00
3d4199d743
bootstrap: Add systemd suspend-then-hibernate configuration 2023-02-28 11:23:40 +01:00
1b69f57146
nvim: Remove line number from terminal buffers 2023-02-28 11:21:39 +01:00
70ccf5fa55
nvim: Display gitsigns as highlights on linenums 2023-02-27 09:22:33 +01:00
693f8ba3f4
nvim: Move autocommands into separate module 2023-02-27 09:22:02 +01:00
74bbaf4daf
nvim: Remove cmdline if not used, split buffers belowright 2023-02-27 09:20:18 +01:00
e6d7578198
nvim: Switch from cmp-pandoc to cmp-pandoc-references
cmp-pandoc.nvim did not work sufficiently for my use case so far
(sometimes it did, most of the times it did not at all, every now and
again it sputtered some references to the list).

cmp-pandoc-references seems like a plugin kept relatively 'simple'
requiring no setup, a single `bibliography: ` line in the pandoc
meta-data header and it works flawlessly from there. I might delve
deeper at some point, especially with the papis.nvim integration, but
for now this is perfectly adequate.
2023-02-27 08:48:09 +01:00
0127a5db07
nvim: Switch from neorg to zk-nvim
Neorg is fine but not for me right now (especially with its own syntax
spec). zk seems to fit my workflow much better, this is the beginning of
trying it out.
2023-02-25 17:16:51 +01:00
fd8b0b290c
taskwarrior: Display scheduled tasks on grey bg
Switched scheduled to display on grey background to improve readability
on dark color schemes slightly.
2023-02-25 17:13:59 +01:00
cd9d373dca
taskwarrior: Add today alias
Added `tod` alias which looks for tasks due today or overdue.
2023-02-25 17:13:19 +01:00
f2cb2f5be9
imapfilter: Switch to use pass command
The other office tools use the pass command so we switch this one to use
it to unify invocation.
2023-02-25 17:12:27 +01:00
5d2542db51
sync-mail: Warn user as part of prehook
If no hook should be run before syncing (or a user-defined hook) then
the warning should fall under that and not be run as part of it.

Additionally takes care of multiple decryption requirements in a row.
2023-02-25 17:11:00 +01:00
89ed4615a7
ncmpcpp: Remap song ffwd and rewind
Mapped fast forward to f and song rewind to F to mimick seaerch-ahead
and search-behind ability of vim.
2023-02-25 17:07:19 +01:00
1ad0c382a9
river: Remove duplicate suspend call 2023-02-25 17:06:55 +01:00
28825adc5d
kanshi: Fix for black screen
Sometimes kanshi will keep docked mode (only external screens) enabled
while keeping them turned off and, sometimes even internal screen black.
This attempts to fix it.
2023-02-25 17:05:42 +01:00
1e84deff03
papis: Fix reference for imports, Add personal lib 2023-02-25 16:58:31 +01:00
73ae033139
vifm: Switch to tidy-viewer for csv preview 2023-02-25 16:55:42 +01:00
ad90cdce30
qutebrowser: Fix index error on redirects
Fixed silly mistake sometimes trying to reach an out of range redirect
url.
2023-02-25 16:54:24 +01:00
9a874b1a1b
nvim: Remap leader groups
This commit is a change to some of the foundational mappings I use
through my leader key: opening telescope searches and toggling several
additional display riders.

First of all, all telescope functionality has been subsumed under the
<leader>f prefix:
    f (<leader>ff, that is) for finding files
    F for grepping
    h for finding hidden files
    o for finding old files
    b for finding buffers

    l for searching git log
    s for searching git status
    c for finding git commits (for current file)

Aside from these (which are pretty massive changes for me), we have a
new leader prefix group for the (now freed) <leader>s:
    o toggle symbols outline
    m toggle minimap
    s open the (mini.nvim) startup screen
2023-02-24 21:38:31 +01:00
e87814ebcb
nvim: Remove leftover plugin settings
We are not making use of vsnip anymore (replaced by luasnip in zero-lsp
package) but still had a couple of vsnip mappings that lead to erratic
<tab> key behavior.
2023-02-24 15:11:50 +01:00
9a8a14f85f
nvim: mini indentline fix updated config option
Mini changed the configuration for its indentline module to use a table
instead of a function for its animation generation configuration.
This commit updates the config accordingly.
2023-02-24 10:02:00 +01:00
45 changed files with 764 additions and 471 deletions

View file

@ -7,7 +7,7 @@ alsa-utils Advanced Linux Sound Architecture - Utilities R
anki Helps you remember facts (like words/phrases in a foreign language) efficiently A anki Helps you remember facts (like words/phrases in a foreign language) efficiently A
ansible Official assortment of Ansible collections R ansible Official assortment of Ansible collections R
ansible-lint Checks playbooks for practices and behaviour that could potentially be improved. R ansible-lint Checks playbooks for practices and behaviour that could potentially be improved. R
arch-wiki-lite The wiki without html. 1/9 as big, easily searched and viewable on console. R arch-wiki-lite Arch Wiki without HTML. 1/9 as big, easily searched & viewable on console R
arduino Arduino prototyping platform SDK R arduino Arduino prototyping platform SDK R
arduino-avr-core Arduino AVR core with upstream avr-gcc and avrdude R arduino-avr-core Arduino AVR core with upstream avr-gcc and avrdude R
arduino-cli Arduino command line interface R arduino-cli Arduino command line interface R
@ -68,6 +68,7 @@ fasd Command-line productivity booster, offers quick access to files and directo
fd Simple, fast and user-friendly alternative to find R fd Simple, fast and user-friendly alternative to find R
ffmpegthumbnailer Lightweight video thumbnailer that can be used by file managers R ffmpegthumbnailer Lightweight video thumbnailer that can be used by file managers R
firefox Standalone web browser from mozilla.org R firefox Standalone web browser from mozilla.org R
flavours A simple and easy cli to build and use base16 schemes A
fonts-cjk Linux 下的免费商用字体包 A fonts-cjk Linux 下的免费商用字体包 A
freerdp Free implementation of the Remote Desktop Protocol (RDP) R freerdp Free implementation of the Remote Desktop Protocol (RDP) R
fwupd Simple daemon to allow session software to update firmware R fwupd Simple daemon to allow session software to update firmware R
@ -120,6 +121,7 @@ kubo IPFS implementation in Go R
lazygit Simple terminal UI for git commands R lazygit Simple terminal UI for git commands R
lib32-gamemode A daemon/lib combo that allows games to request a set of optimisations be temporarily applied to the host OS R lib32-gamemode A daemon/lib combo that allows games to request a set of optimisations be temporarily applied to the host OS R
libdvdcss Portable abstraction library for DVD decryption R libdvdcss Portable abstraction library for DVD decryption R
libfido2 Library functionality for FIDO 2.0, including communication with a device over USB R
libqalculate Multi-purpose desktop calculator R libqalculate Multi-purpose desktop calculator R
libreoffice-fresh LibreOffice branch which contains new features and program enhancements R libreoffice-fresh LibreOffice branch which contains new features and program enhancements R
libva-intel-driver VA-API implementation for Intel G45 and HD Graphics family R libva-intel-driver VA-API implementation for Intel G45 and HD Graphics family R
@ -295,7 +297,7 @@ transmission-qt Fast, easy, and free BitTorrent client (Qt GUI) R
ttf-brill Brill Typeface by John Hudson for Brill Publishing House A ttf-brill Brill Typeface by John Hudson for Brill Publishing House A
ttf-comic-neue Comic Neue aspires to be the casual script choice for everyone including the typographically savvy. A ttf-comic-neue Comic Neue aspires to be the casual script choice for everyone including the typographically savvy. A
ttf-heuristica A serif latin & cyrillic font, derived from the "Adobe Utopia" font by Apanov A ttf-heuristica A serif latin & cyrillic font, derived from the "Adobe Utopia" font by Apanov A
ttf-iosevka-nerd Typeface family designed for coding, terminal use and technical documents (Nerd Fonts) R ttf-iosevka-nerd Patched font Iosevka from nerd fonts library R
ttf-signika Sans-serif typeface from Google by Anna Giedryś A ttf-signika Sans-serif typeface from Google by Anna Giedryś A
tuir Browse Reddit from your terminal A tuir Browse Reddit from your terminal A
tut A TUI for Mastodon with vim inspired keys A tut A TUI for Mastodon with vim inspired keys A
@ -321,7 +323,7 @@ visidata Terminal spreadsheet multitool for discovering and arranging data R
wallabag-client Command line client for the self hosted read-it-later app Wallabag A wallabag-client Command line client for the self hosted read-it-later app Wallabag A
wavemon Ncurses-based monitoring application for wireless network devices R wavemon Ncurses-based monitoring application for wireless network devices R
waybar Highly customizable Wayland bar for Sway and Wlroots based compositors R waybar Highly customizable Wayland bar for Sway and Wlroots based compositors R
waylock-git A simple screenlocker for Wayland compositors A waylock A simple screenlocker for wayland compositors R
wdisplays GUI display configurator for wlroots compositors A wdisplays GUI display configurator for wlroots compositors A
wev tool for debugging wayland events, similar to xev A wev tool for debugging wayland events, similar to xev A
wezterm A GPU-accelerated cross-platform terminal emulator and multiplexer R wezterm A GPU-accelerated cross-platform terminal emulator and multiplexer R
@ -336,6 +338,7 @@ xdg-user-dirs Manage user directories like ~/Desktop and ~/Music R
xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R
yaml-language-server YAML Language Server R yaml-language-server YAML Language Server R
yarn Fast, reliable, and secure dependency management R yarn Fast, reliable, and secure dependency management R
yubikey-manager Python library and command line tool for configuring a YubiKey R
yt-dlp A youtube-dl fork with additional features and fixes R yt-dlp A youtube-dl fork with additional features and fixes R
ytfzf A POSIX script to find and watch youtube videos from the terminal R ytfzf A POSIX script to find and watch youtube videos from the terminal R
zathura-cb Adds comic book support to zathura R zathura-cb Adds comic book support to zathura R

Can't render this file because it contains an unexpected character in line 299 and column 64.

View file

@ -1,7 +1,6 @@
Name Description Source Target Name Description Source Target
ddrescue GNU data recovery tool R ddrescue GNU data recovery tool R
go-mtpfs-git Simple tool for viewing MTP devices as FUSE filesystems A go-mtpfs-git Simple tool for viewing MTP devices as FUSE filesystems A
libfido2 Library functionality for FIDO 2.0, including communication with a device over USB R
most A terminal pager similar to 'more' and 'less' R most A terminal pager similar to 'more' and 'less' R
netbird-bin A WireGuard-based mesh network that connects your devices into a single private network A netbird-bin A WireGuard-based mesh network that connects your devices into a single private network A
odysseyra1n Bootstraps Procursus and install Sileo/libhooker on devices jailbroken with checkra1n. A odysseyra1n Bootstraps Procursus and install Sileo/libhooker on devices jailbroken with checkra1n. A
@ -11,6 +10,3 @@ shadow-tech Desktop client for Shadow Tech cloud gaming service. A
signal-desktop Signal Private Messenger for Linux R signal-desktop Signal Private Messenger for Linux R
testdisk Checks and undeletes partitions + PhotoRec, signature based recovery tool R testdisk Checks and undeletes partitions + PhotoRec, signature based recovery tool R
texlive-latexextra TeX Live - Large collection of add-on packages for LaTeX R texlive-latexextra TeX Live - Large collection of add-on packages for LaTeX R
ttf-iosevka-nerd Patched font Iosevka from nerd fonts library R
vifm A file manager with curses interface, which provides Vi[m]-like environment R
yubikey-manager Python library and command line tool for configuring a YubiKey R

1 Name Description Source Target
2 ddrescue GNU data recovery tool R
3 go-mtpfs-git Simple tool for viewing MTP devices as FUSE filesystems A
libfido2 Library functionality for FIDO 2.0, including communication with a device over USB R
4 most A terminal pager similar to 'more' and 'less' R
5 netbird-bin A WireGuard-based mesh network that connects your devices into a single private network A
6 odysseyra1n Bootstraps Procursus and install Sileo/libhooker on devices jailbroken with checkra1n. A
10 signal-desktop Signal Private Messenger for Linux R
11 testdisk Checks and undeletes partitions + PhotoRec, signature based recovery tool R
12 texlive-latexextra TeX Live - Large collection of add-on packages for LaTeX R
ttf-iosevka-nerd Patched font Iosevka from nerd fonts library R
vifm A file manager with curses interface, which provides Vi[m]-like environment R
yubikey-manager Python library and command line tool for configuring a YubiKey R

View file

@ -0,0 +1,3 @@
[Sleep]
HibernateDelaySec=120min
SuspendEstimationSec=30min

View file

@ -0,0 +1,84 @@
# Configuration for flavours
# https://github.com/Misterio77/flavours
#
# This file should contain a [[items]] section for each application you want themed
# You can also set a shell (outside items) on which to run hooks
# Check flavours repository for more information and examples
# Explanation and default values for keys:
# # Through which shell command hooks will run. The command will be replaced in '{}'
shell = "bash -c '{}'"
#
# [[items]]
# # File to inject to, supports tilde and env var expansion. required
# file = "~/.config/example"
# # Template to use. required
# template = "example"
#
# # Subtemplate to use
# subtemplate = "default"
# # If not rewriting, on which line (usually a comment) to start replacing
# start = "# Start flavours"
# # If not rewriting, on which line (usually a comment) to stop replacing
# end = "# End flavours"
# # Should we rewrite the entire file, instead of using the above delimiters?
# rewrite = false
# # Command to execute after injecting (goes through shell)
# hook = ""
# # Whether this hook should be executed when flavours is ran with lightweight flag
# light = true
[[items]]
template = "waybar"
file = "~/.local/state/waybar/colorscheme.css"
rewrite = true
light = false
hook = "killall -SIGUSR2 waybar"
[[items]]
# Uses custom nvim template to work together with
# RRethy base16 neovim plugin
template = "nvim"
file = "~/.local/state/nvim/colorscheme.lua"
rewrite = true
[[items]]
# For newer wezterm versions (missing cursor= field)
# make use of my custom wezterm template
template = "wezterm"
file = "~/.local/state/wezterm/colors.toml"
rewrite = true
[[items]]
template = "zathura"
file = "~/.local/state/zathura/zathurarc"
rewrite = true
[[items]]
template = "qutebrowser"
subtemplate = "minimal"
file = "~/.local/state/qutebrowser/colorscheme.py"
rewrite = true
light = false
hook = "pgrep -x qutebrowser && qutebrowser :config-source"
# CSS Webpage styling in qutebrowser
[[item]]
file = "~/.config/qutebrowser/stylesheets/stylesheet.css"
template = "styles"
subtemplate = "css-variables"
rewrite = false
start = "/* Start flavours */"
end = "/* End flavours */"
[[items]]
# MAKO DOES NOT SUPPORT INCLUDES YET
template = "mako"
file = "~/.config/mako/config"
light = false
rewrite = false
start = "# Start flavours"
end = "# End flavours"
hook = "killall mako"

View file

@ -0,0 +1,29 @@
-- base16-nvim (https://github.com/wincent/base16-nvim)
-- by Greg Hurrell (https://github.com/wincent)
-- based on
-- base16-vim (https://github.com/chriskempson/base16-vim)
-- by Chris Kempson (https://github.com/chriskempson)
-- using nvim-base16 neovim plugin
-- by RRethy (https://github.com/RRethy/nvim-base16)
-- {{scheme-name}} scheme by {{scheme-author}}
require('base16-colorscheme').setup({
base00 = '#{{base00-hex}}',
base01 = '#{{base01-hex}}',
base02 = '#{{base02-hex}}',
base03 = '#{{base03-hex}}',
base04 = '#{{base04-hex}}',
base05 = '#{{base05-hex}}',
base06 = '#{{base06-hex}}',
base07 = '#{{base07-hex}}',
base08 = '#{{base08-hex}}',
base09 = '#{{base09-hex}}',
base0A = '#{{base0A-hex}}',
base0B = '#{{base0B-hex}}',
base0C = '#{{base0C-hex}}',
base0D = '#{{base0D-hex}}',
base0E = '#{{base0E-hex}}',
base0F = '#{{base0F-hex}}'
})
-- vim: filetype=lua

View file

@ -0,0 +1,44 @@
# Base16 {{scheme-name}} - wezterm color config
# Scheme by {{scheme-author}}
[colors]
foreground = "#{{base05-hex}}"
background = "#{{base00-hex}}"
cursor_bg = "#{{base05-hex}}"
cursor_border = "#{{base05-hex}}"
selection_bg = "#{{base05-hex}}"
selection_fg = "#{{base00-hex}}"
ansi = [
"#{{base00-hex}}",
"#{{base08-hex}}",
"#{{base0B-hex}}",
"#{{base0A-hex}}",
"#{{base0D-hex}}",
"#{{base0E-hex}}",
"#{{base0C-hex}}",
"#{{base05-hex}}"
]
brights = [
"#{{base03-hex}}",
"#{{base08-hex}}",
"#{{base0B-hex}}",
"#{{base0A-hex}}",
"#{{base0D-hex}}",
"#{{base0E-hex}}",
"#{{base0C-hex}}",
"#{{base07-hex}}"
]
[colors.tab_bar]
background = "#{{base00-hex}}"
[colors.tab_bar.inactive_tab]
bg_color = "#{{base05-hex}}"
fg_color = "#{{base00-hex}}"
[colors.tab_bar.active_tab]
bg_color = "#{{base00-hex}}"
fg_color = "#{{base05-hex}}"
[colors.tab_bar.new_tab]
bg_color = "#{{base05-hex}}"
fg_color = "#{{base00-hex}}"

View file

@ -1,15 +1,15 @@
profile docked { profile docked {
output eDP-1 disable
output "LG Electronics W2442 0x000075FD" position 1920,0 output "LG Electronics W2442 0x000075FD" position 1920,0
output "LG Electronics W2442 0x000075E1" position 0,0 output "LG Electronics W2442 0x000075E1" position 0,0
exec notify-send "💻 Display changed" "Applying docked profile" output eDP-1 disable
exec notify-send "💻 Display changed" "Applying docked LG profile"
} }
profile docked { profile docked {
output eDP-1 disable
output "Goldstar Company Ltd W2442 0x000075FD" position 1920,0 output "Goldstar Company Ltd W2442 0x000075FD" position 1920,0
output "Goldstar Company Ltd W2442 0x000075E1" position 0,0 output "Goldstar Company Ltd W2442 0x000075E1" position 0,0
exec notify-send "💻 Display changed" "Applying docked profile" output eDP-1 disable
exec notify-send "💻 Display changed" "Applying docked Goldstar profile"
} }
profile portable { profile portable {

View file

@ -1,25 +1,18 @@
sort=-time sort=-time
layer=overlay layer=overlay
background-color=#2e3440
width=300 width=300
height=110 height=110
border-size=2 border-size=2
border-color=#88c0d0
border-radius=15 border-radius=15
max-icon-size=64 max-icon-size=64
default-timeout=5000 default-timeout=5000
ignore-timeout=1 ignore-timeout=1
font=monospace 14 font=monospace 14
[urgency=low]
border-color=#cccccc
[urgency=normal]
border-color=#d08770
[urgency=critical] [urgency=critical]
#on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga #on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
border-color=#bf616a
default-timeout=0 default-timeout=0
[mode=do-not-disturb] [mode=do-not-disturb]

View file

@ -71,7 +71,7 @@ riverctl map normal $mod+Shift T spawn "bemenu-translate"
# Desktop theming # Desktop theming
# shellcheck disable=SC2016 # shellcheck disable=SC2016
riverctl map normal $mod+Shift S spawn 'styler set $(styler list themes | bemenu)' riverctl map normal $mod+Shift S spawn 'flavours list -l | bemenu | xargs flavours apply'
# Password dropdown frontend # Password dropdown frontend
riverctl map normal $mod+Shift P spawn "pass-pick" riverctl map normal $mod+Shift P spawn "pass-pick"
@ -235,16 +235,17 @@ for pad in $(riverctl list-inputs | grep -i touchscreen); do
done done
setxkbmap -option "compose:menu" setxkbmap -option "compose:menu"
# set a nice wallpaper # set a nice wallpaper
if exist wlopm && exist swww; then if exist swww; then
riverctl spawn "swww init" riverctl spawn "swww init"
if [ -e "$HOME/pictures/wall.jpg" ]; then outputs=$(swww query | cut -d':' -f1)
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg"
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_r.jpg"
elif [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg" swww img "$HOME/pictures/wall.jpg"
fi fi
if wlopm | grep -q DP-5 && wlopm | grep -q DP-3 && [ -e "$HOME/pictures/wall_l.jpg" ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o DP-5 "$HOME/pictures/wall_l.jpg"
swww img -o DP-3 "$HOME/pictures/wall_r.jpg"
fi
fi fi
# start status bar # start status bar
@ -268,7 +269,6 @@ unset loc
# start screen idle locking/dimming/sleep tool # start screen idle locking/dimming/sleep tool
killall swayidle killall swayidle
riverctl spawn "swayidle \ riverctl spawn "swayidle \
timeout ${time_to_suspend} \"systemctl suspend-then-hibernate\" \
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\" timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
timeout ${time_to_screendim} \"wlopm --off '*'\" \ timeout ${time_to_screendim} \"wlopm --off '*'\" \
resume \"wlopm --on '*'\" \ resume \"wlopm --on '*'\" \

View file

@ -149,4 +149,4 @@ window#waybar.hidden {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
@import "/home/marty/.local/share/waybar/colorscheme.css"; @import "/home/marty/.local/state/waybar/colorscheme.css";

View file

@ -48,8 +48,6 @@ item_fields:
musicbrainz: musicbrainz:
extra_tags: [year, catalognum, country, media, label] extra_tags: [year, catalognum, country, media, label]
user: martyo
pass: u^a<7YKULz\#CKX\-Fm]K%Up0
auto: yes auto: yes
remove: yes remove: yes

View file

@ -72,7 +72,7 @@ def_key "P"
move_selected_items_to move_selected_items_to
def_key "f" def_key "f"
seek_forward seek_forward
def_key "b" def_key "F"
seek_backward seek_backward
def_key "'" def_key "'"
jump_to_playing_song jump_to_playing_song

View file

@ -0,0 +1,5 @@
local ns = vim.api.nvim_create_namespace('gitcommit')
vim.api.nvim_set_hl(ns, 'ColorColumn', { bg = '#a33a3a', blend = 90 })
vim.api.nvim_win_set_hl_ns(0, ns)
vim.bo.textwidth = 72
vim.wo.colorcolumn = '+0'

View file

@ -0,0 +1,94 @@
-- Start quarto session
local startsession = function(file, args)
file = file or "/tmp/jupyter-magma-session.json"
if args then file = args[0] end
vim.fn.jobstart({ "jupyter", "console", "-f", file }, {
on_stdout = function(_)
vim.cmd("MagmaInit " .. file)
vim.cmd("JupyterAttach " .. file)
end,
on_exit = function(_)
vim.notify(string.format("jupyter kernel stopped: %s", file), vim.log.levels.INFO)
end,
stdin = nil
})
end
vim.api.nvim_create_user_command("JupyterStart", function() startsession() end,
{})
local map = vim.keymap.set
-- filetype mappings
-- PLUGIN: magma-nvim
-- Operate jupyter notebooks from within vim
map('n', '<localleader>cc', ':MagmaEvaluateLine<cr>', { silent = true })
map('n', '<localleader>C', '?^```{<cr>jV/```<cr>k:<C-u>MagmaEvaluateVisual<cr>',
{ silent = true, desc = 'Evaluate current code cell' })
map('x', '<localleader>c', ':<C-u>MagmaEvaluateVisual<cr>', { silent = true })
map('n', '<localleader>c', "nvim_exec('MagmaEvaluateOperator', v:true)",
{ expr = true, silent = true, desc = '+code-evaluation' })
map('n', '<localleader>cr', ':MagmaReevaluateCell<cr>', { silent = true })
map('n', '<localleader>cu', ':MagmaShowOutput<cr>', { silent = true })
map('n', '<localleader>cU', ':noautocmd :MagmaEnterOutput<cr>',
{ silent = true, desc = 'MagmaEnterOutput' })
map('n', '<localleader>cd', ':MagmaDelete<cr>', { silent = true })
map('n', '<localleader>cs', ':MagmaInterrupt<cr>')
map('n', '<localleader>ci', ':MagmaInit ')
map('n', '<localleader>cD', ':MagmaDeinit<cr>')
map('n', '<localleader>cR', ':MagmaRestart<cr>')
-- jump to beginning of previous/ next cell code
map('n', ']c', '/^```{<cr>}:nohl<cr>', { desc = 'Next quarto cell' })
map('n', '[c', '?^```<cr>n}:nohl<cr>', { desc = 'Previous quarto cell' })
-- insert cell header above/below
map('n', '<localleader>co', 'o```{python}<cr><cr>```<esc>k',
{ desc = 'Insert quarto cell below' })
map('n', '<localleader>cO', 'O```{python}<cr><cr>```<esc>k',
{ desc = 'Insert quarto cell above' })
local bufnr = 0
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>',
{ buffer = bufnr, desc = 'Previous diagnostic' })
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>',
{ buffer = bufnr, desc = 'Next diagnostic' })
map('n', '[e',
'<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>',
{ buffer = bufnr, desc = 'Previous error' })
map('n', ']e',
'<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>',
{ buffer = bufnr, desc = 'Next error' })
-- TODO find better way to enable lsp key mappings for quarto buffers
local prefix = require('which-key').register
prefix({ ['<localleader>l'] = { name = "+lsp" } })
map('n', '<localleader>li', '<cmd>LspInfo<cr>',
{ buffer = bufnr, desc = 'Lsp Info' })
map('n', '<localleader>ld', '<cmd>lua vim.diagnostic.open_float()<cr>',
{ buffer = bufnr, desc = 'Line diagnostics' })
map('n', '<localleader>la', '<cmd>lua vim.lsp.buf.code_action()<cr>',
{ buffer = bufnr, desc = 'Codeactions' })
map('n', '<localleader>ln', '<cmd>lua vim.lsp.buf.rename()<cr>',
{ buffer = bufnr, desc = 'Rename element' })
map('n', '<localleader>lr', '<cmd>lua vim.lsp.buf.references()<cr>',
{ buffer = bufnr, desc = 'References' })
if client and client.server_capabilities.document_formatting then
map('n', '<localleader>lf', "<cmd>lua vim.lsp.buf.formatting()<CR>",
{ buffer = bufnr, desc = 'Format document' })
end
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>',
{ buffer = bufnr, desc = 'Hover definition' })
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>',
{ buffer = bufnr, desc = 'Definition' })
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>',
{ buffer = bufnr, desc = 'Declaration' })
map('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>',
{ buffer = bufnr, desc = 'Signature help' })
map('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<cr>',
{ buffer = bufnr, desc = 'Implementation' })
map('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<cr>',
{ buffer = bufnr, desc = 'Type definition' })
if vim.b['sessionfile'] == nil then
vim.b['sessionfile'] = vim.fn.tempname() .. '.json'
startsession(vim.b['sessionfile'])
end

View file

@ -2,45 +2,14 @@
-- https://github.com/elianiva/dotfiles/ - with much gratitude -- https://github.com/elianiva/dotfiles/ - with much gratitude
local api = vim.api local api = vim.api
-- Highlight whatever is being yanked
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
desc = "Highlight yanked text whenevery yanking something",
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true })
})
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
pattern = {
"/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt",
"$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt"
},
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
desc = "Don't leak any information when editing potential password files",
group = vim.api.nvim_create_augroup('passnoleak', { clear = true })
})
api.nvim_exec('runtime abbrev.vim', false) api.nvim_exec('runtime abbrev.vim', false)
-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
end,
desc = "Fix neovim sizing issues if opening same time as alacritty",
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
})
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git", "clone", "--filter=blob:none",
"clone", "https://github.com/folke/lazy.nvim.git", "--branch=stable", -- latest stable release
"--filter=blob:none", lazypath
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
@ -50,7 +19,11 @@ vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " " vim.g.mapleader = " "
require('settings') require('settings')
require("lazy").setup("plugins") require('autocmds')
require("lazy").setup("plugins", {
defaults = { version = "*" },
performance = { rtp = { disabled_plugins = { "netrw", "netrwPlugin" } } }
})
require('look') require('look')
require('maps') require('maps')

View file

@ -4,70 +4,71 @@
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" }, "bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, "cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
"cmp-pandoc.nvim": { "branch": "main", "commit": "cb2980263e14fb3c1b776edbd2c7a312b67c65ae" }, "cmp-pandoc-references": { "branch": "master", "commit": "2c808dff631a783ddd2c554c4c6033907589baf6" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" }, "cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
"cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" }, "cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" }, "completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" }, "dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
"formatter.nvim": { "branch": "master", "commit": "8a4c961330cc4688087f23d18fa7d2f1af9a4902" }, "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" },
"friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" }, "formatter.nvim": { "branch": "master", "commit": "ed949c13e1a942db29ababa35e8c7864ced90eb6" },
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" }, "friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" },
"guihua.lua": { "branch": "master", "commit": "d3f6d01639b52e6a83ea98dd6ca244c9aa98b79b" }, "fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"lazy.nvim": { "branch": "main", "commit": "273081443471cbc52c327bcb99614c32f247998d" }, "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
"jupyter-kernel.nvim": { "branch": "main", "commit": "92eee2a9fcff65aedaba8f0544b87db44981673b" },
"lazy.nvim": { "branch": "main", "commit": "14075657131b9a19883a8845c47f1ab65461cd6f" },
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" }, "lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" }, "lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
"lsp-zero.nvim": { "branch": "main", "commit": "42bc5a1081666098a7154532e6ff5e3edc483b39" }, "lsp-zero.nvim": { "branch": "main", "commit": "79d2091809a295aba94f9ea72cd622bca198d046" },
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" }, "lsp_signature.nvim": { "branch": "master", "commit": "4665921ff8e30601c7c1328625b3abc1427a6143" },
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" }, "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
"magma-nvim-goose": { "branch": "main", "commit": "94370733757d550594fe4a1d65643949d7485989" }, "magma-nvim-goose": { "branch": "main", "commit": "d54719dad7771061678a77dace5bef43b4462be8" },
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "a31e011135a79d63c71254c250c9158e1056a1cb" },
"mason.nvim": { "branch": "main", "commit": "14ae1ca58440b158a0a35cf90773013caddf788a" }, "mason.nvim": { "branch": "main", "commit": "3ee3174e30e33c9d58fa07b0a73a6e180474b59c" },
"mini.nvim": { "branch": "main", "commit": "dc0ccf1b0499d649a6177d2a406babcfe73b97de" }, "mini.nvim": { "branch": "main", "commit": "427751024313e2270ca723eb16af7b218c83a7fc" },
"nabla.nvim": { "branch": "master", "commit": "ddbfc6e244e79db9280c535ee85c81388c5d1b46" }, "neural": { "branch": "main", "commit": "155618730b87a67655bdde373ee27bfce8b07ac9" },
"navigator.lua": { "branch": "master", "commit": "66d84151e94052f710b1dfb0d1fce2faaca6dced" }, "nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" },
"neorg": { "branch": "main", "commit": "36cc15300c0dfc19d483b0a4176cb89e94f4730a" }, "nvim-base16": { "branch": "master", "commit": "0cab02bac9ca02a70db9e1d07e25fdb630b18a21" },
"nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" }, "nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" },
"nvim-base16.lua": { "branch": "master", "commit": "b336f40462b3ca1ad16a17c195b83731a2942d9a" },
"nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-lspconfig": { "branch": "master", "commit": "aeb76066212b09c7c01a3abb42fe82f0130ef402" }, "nvim-lspconfig": { "branch": "master", "commit": "1a2d5f5224c65b0709bf5da0ccd9cad29272083a" },
"nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" },
"nvim-surround": { "branch": "main", "commit": "a06dea11e7fdcf338776fa51fa5277163ffb048d" }, "nvim-surround": { "branch": "main", "commit": "a06dea11e7fdcf338776fa51fa5277163ffb048d" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" }, "nvim-toggleterm.lua": { "branch": "main", "commit": "a5638b2206c3930a16a24e5c184dddd572f8cd34" },
"nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" }, "nvim-treesitter": { "branch": "master", "commit": "c38646edf2bdfac157ca619697ecad9ea87fd469" },
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" }, "nvim-treesitter-context": { "branch": "master", "commit": "895ec44f5c89bc67ba5440aef3d1f2efa3d59a41" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "bc047b20768845fd54340eb76272b2cf2f6fa3f3" }, "nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" },
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b2d1f4f51b1bd20de419ffb6f5d0876c4f20d9db" },
"otter.nvim": { "branch": "main", "commit": "e32e432988fddc7fc96f08300e56750a838f0893" }, "otter.nvim": { "branch": "main", "commit": "8b46caf113918c26a9247031d6482709078ec907" },
"papis.nvim": { "branch": "main", "commit": "4023d30b336c147b12a249ce103561d03fbedef8" }, "playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" },
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" }, "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"quarto-nvim": { "branch": "main", "commit": "a30db854054973ab8f140adf3e6b565bf2febf0f" }, "quarto-nvim": { "branch": "main", "commit": "b44f8772686241e563c7d0f200748fd71766b64e" },
"significant.nvim": { "branch": "main", "commit": "5450e9d5917dc6aa9afb0fcbe32355799b8303fb" },
"spellsitter.nvim": { "branch": "master", "commit": "4af8640d9d706447e78c13150ef7475ea2c16b30" }, "spellsitter.nvim": { "branch": "master", "commit": "4af8640d9d706447e78c13150ef7475ea2c16b30" },
"sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" }, "telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" },
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" }, "twilight.nvim": { "branch": "main", "commit": "8bb7fa7b918baab1ca81b977102ddb54afa63512" },
"vifm.vim": { "branch": "master", "commit": "199af91d6b1b4997450da2098e7e756627c6583b" }, "vifm.vim": { "branch": "master", "commit": "6898b7fcbc36324c127ba42cabe488ab15c785f4" },
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" }, "vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
"vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }, "vim-easy-align": { "branch": "master", "commit": "0db4ea6132110631ec678a99a82aa49a0686ae65" },
"vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" }, "vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" },
"vim-numbertoggle": { "branch": "main", "commit": "075b7478777e694fbac330ee34a74590dad0fee1" }, "vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
"vim-oscyank": { "branch": "main", "commit": "e6298736a7835bcb365dd45a8e8bfe86d935c1f8" }, "vim-oscyank": { "branch": "main", "commit": "ffe827a27dae98aa826e2295336c650c9a434da0" },
"vim-pandoc": { "branch": "master", "commit": "9f406d964ca70d959b7867f1b5cee3d4884d4d3c" },
"vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" }, "vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" },
"vim-spellsync": { "branch": "master", "commit": "27e103f2d283a1f6e24cc99dbdcd624713aff277" }, "vim-spellsync": { "branch": "master", "commit": "3d6dd50de9c4d953cc16638112a6ae196df41463" },
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" }, "which-key.nvim": { "branch": "main", "commit": "2a0c2d80c0a60f041afb1b789cfedbd510e2b2b6" },
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" }, "wrapping.nvim": { "branch": "master", "commit": "a4013c377e2ffa3be00fb67791d3605ae3115acb" },
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" } "zen-mode.nvim": { "branch": "main", "commit": "4bd28fb3a44317c6258cebc7d92243d4b11dfe2c" },
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" },
"zk-nvim": { "branch": "main", "commit": "0413c52500cd0133b0cd8e7e7d43084855ac1760" }
} }

View file

@ -0,0 +1,33 @@
-- Highlight whatever is being yanked
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
desc = "Highlight yanked text whenevery yanking something",
group = vim.api.nvim_create_augroup('highlightyanks', { clear = true })
})
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
pattern = {
"/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt",
"$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt"
},
command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
desc = "Don't leak any information when editing potential password files",
group = vim.api.nvim_create_augroup('passnoleak', { clear = true })
})
-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH
vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20)
end,
desc = "Fix neovim sizing issues if opening same time as alacritty",
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
})
-- remove line numbers from terminal buffers
vim.api.nvim_create_autocmd({ "TermOpen" }, {
pattern = '*',
command = 'setlocal nonumber norelativenumber'
})

View file

@ -1,27 +0,0 @@
-- augroup utility function
--
-- Let's you create and use autogroups through lua
-- which (as of now) is not possible through official nvim api
--
-- Cribbed from the very helpful https://icyphox.sh/blog/nvim-lua - Thank you!
--
-- Example usage settings.lua
-- local cmd = vim.cmd
-- local u = require('utils')
-- u.create_augroup({
-- { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' },
-- { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' },
-- }, 'ftmail')
-- cmd('au BufNewFile,BufRead * if &ft == "" | set ft=text | endif')
local cmd = vim.cmd
return function(cmds, groupname)
cmd('augroup ' .. groupname)
cmd('autocmd!')
for _, autocmd in ipairs(cmds) do
cmd('autocmd ' .. table.concat(autocmd, ' '))
end
cmd('augroup END')
end

View file

@ -1,16 +1,15 @@
local b = require('base16') local colorsfile = vim.fn.stdpath('state') .. '/colorscheme.lua'
local function source_colors()
-- italic comments if supported if vim.fn.filereadable(colorsfile) == 1 then
local set_hl = require("helpers.highlight") vim.cmd("source " .. colorsfile)
set_hl("Comment", {gui = "italic"}) end
vim.api.nvim_set_var('gruvbox_italic', 1)
vim.api.nvim_set_var('one_allow_italics', 1)
vim.api.nvim_set_var('pencil_terminal_italics', 1)
function B16theme(theme)
local base16scheme = b.themes[theme]
b(base16scheme, true)
end end
-- set the default colorscheme -- set on startup
B16theme('eighties') source_colors()
-- continuously watch colors file for changes
local fwatch = require('fwatch')
fwatch.watch(colorsfile, {
on_event = vim.schedule_wrap(function() source_colors() end)
})

View file

@ -1,4 +1,5 @@
local map = vim.keymap.set local map = vim.keymap.set
local prefix = require('which-key').register
-- The general ideas behind these mappings: -- The general ideas behind these mappings:
-- --
@ -50,6 +51,11 @@ map('n', '<Tab>', '%')
map('i', '<C-u>', '<esc>gUiw`]a') map('i', '<C-u>', '<esc>gUiw`]a')
map('i', '<C-y>', '<esc>guiw`]a') map('i', '<C-y>', '<esc>guiw`]a')
-- Add undo break-points at punctuations for plaintext editing
for _, char in pairs({ ",", ".", ";", "?", "!" }) do
map("i", char, string.format("%s<c-g>u", char))
end
-- yank current filename/filepath to f buffer -- yank current filename/filepath to f buffer
map('n', 'yp', ':let @p = expand("%")<Cr>', { desc = 'yank filename' }) map('n', 'yp', ':let @p = expand("%")<Cr>', { desc = 'yank filename' })
map('n', 'yP', ':let @p = expand("%:p")<Cr>', { desc = 'yank filepath' }) map('n', 'yP', ':let @p = expand("%:p")<Cr>', { desc = 'yank filepath' })
@ -114,49 +120,55 @@ map('n', '<leader>e', ':Vifm<cr>', { desc = 'browse files' })
-- open current file tree with current file directory -- open current file tree with current file directory
map('n', '<leader>E', ':Vifm getcwd()<cr>', { desc = 'browse project' }) map('n', '<leader>E', ':Vifm getcwd()<cr>', { desc = 'browse project' })
-- set 'v'im-related options
prefix({ ['<leader>v'] = { name = "+vim" } })
map('n', '<leader>vc', ':Vifm ' .. vim.fn.stdpath('config') .. '/lua<cr>',
{ desc = 'open config' })
map('n', '<leader>vh', ":lua require 'telescope.builtin'.help_tags()<cr>",
{ desc = 'help tags' })
map('n', '<leader>vH', ":lua require 'telescope.builtin'.man_pages()<cr>",
{ desc = 'man pages' })
map('n', '<leader>vC',
":lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())<cr>",
{ desc = 'colorschemes' })
map('n', '<leader>vl', ":Lazy<cr>", { desc = 'Lazy' })
map('n', '<leader>vm', ":Mason<cr>", { desc = 'Mason' })
-- Set vim to distraction free prose mode with F11
map('n', '<leader>vz', ':ZenMode<cr>', { silent = true })
-- PLUGIN: Telescope GLOBAL FUZZY FINDING -- PLUGIN: Telescope GLOBAL FUZZY FINDING
-- buffers and files in current workdir -- buffers and files in current workdir
map('n', '<leader>s', prefix({ ['<leader>f'] = { name = '+find' } })
map('n', '<leader>fb',
":lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())<cr>", ":lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())<cr>",
{ desc = 'list buffers' }) { desc = 'list buffers' })
-- most recently used / MRU, bound to S since it is essentially a larger -- most recently used / MRU, bound to S since it is essentially a larger
-- go-back intention than just buffers -- go-back intention than just buffers
map('n', '<leader>S', map('n', '<leader>fo',
":lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>", ":lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>",
{ desc = 'list old files' }) { desc = 'list old files' })
-- fuzzy find files in cwd -- fuzzy find files in cwd
map('n', '<leader>f', ":lua require 'telescope.builtin'.find_files()<cr>", map('n', '<leader>ff', ":lua require 'telescope.builtin'.find_files()<cr>",
{ desc = 'find files' }) { desc = 'find files' })
-- fuzzy find hidden files in cwd -- fuzzy find hidden files in cwd
map('n', '<leader><c-f>', map('n', '<leader>fh',
":lua require 'telescope.builtin'.find_files({hidden=true})<cr>", ":lua require 'telescope.builtin'.find_files({hidden=true})<cr>",
{ desc = 'find hidden files' }) { desc = 'find hidden files' })
-- general full-text search in cwd with rg -- general full-text search in cwd with rg
map('n', '<leader>F', ":lua require 'telescope.builtin'.live_grep()<cr>", map('n', '<leader>fF', ":lua require 'telescope.builtin'.live_grep()<cr>",
{ desc = 'grep search' }) { desc = 'grep search' })
-- git status -- git status
map('n', '<leader>gs', ":lua require 'telescope.builtin'.git_status()<cr>", map('n', '<leader>fg', ":lua require 'telescope.builtin'.git_status()<cr>",
{ desc = 'git status' }) { desc = 'git status' })
-- git buffercommits -- git buffercommits
map('n', '<leader>gb', ":lua require 'telescope.builtin'.git_bcommits()<cr>", map('n', '<leader>fc', ":lua require 'telescope.builtin'.git_bcommits()<cr>",
{ desc = 'git buffer commits' }) { desc = 'git buffer commits' })
-- git commitlog -- git commitlog
map('n', '<leader>gl', ":lua require 'telescope.builtin'.git_commits()<cr>", map('n', '<leader>fl', ":lua require 'telescope.builtin'.git_commits()<cr>",
{ desc = 'git commit log' }) { desc = 'git commit log' })
-- helptags
map('n', '<leader><F1>', ":lua require 'telescope.builtin'.help_tags()<cr>",
{ desc = 'help tags' })
-- manpages
map('n', '<leader><F2>', ":lua require 'telescope.builtin'.man_pages()<cr>",
{ desc = 'man pages' })
-- colorschemes
map('n', '<leader><F8>',
":lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())<cr>",
{ desc = 'colorschemes' })
-- spell suggestions -- spell suggestions
map('n', 'z=', map('n', 'z=',
":lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())<cr>") ":lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())<cr>")
@ -176,12 +188,10 @@ map('n', '<localleader>mp', '<Plug>MarkdownPreviewToggle',
map('n', '<localleader>f', ':FormatLock<cr>') map('n', '<localleader>f', ':FormatLock<cr>')
map('n', '<localleader>F', ':FormatWriteLock<cr>') map('n', '<localleader>F', ':FormatWriteLock<cr>')
-- Enter distraction free prose mode with F11
map('n', '<F11>', ':ZenMode<cr>', { silent = true })
-- SPELL CHECKING -- SPELL CHECKING
-- Move to the prev/next spelling error with [S ]S -- Move to the prev/next spelling error with [S ]S
-- Move to the prev/next spelling error or suggestion with [s ]s -- Move to the prev/next spelling error or suggestion with [s ]s
prefix({ ['<localleader>Z'] = { name = '+Spelling' } })
map('n', '<localleader>ZZ', ':setlocal spell! spelllang=en_us,de_de<cr>', map('n', '<localleader>ZZ', ':setlocal spell! spelllang=en_us,de_de<cr>',
{ desc = 'Toggle spellcheck' }) { desc = 'Toggle spellcheck' })
map('n', '<localleader>ZE', ':setlocal spell! spelllang=en_us<cr>', map('n', '<localleader>ZE', ':setlocal spell! spelllang=en_us<cr>',
@ -193,7 +203,14 @@ map('i', '<c-s>', '<C-G>u<Esc>[s1z=`]a<C-G>u')
map('n', '<localleader>s', 'ms[s1z=`s', { desc = 'Fix last spell error' }) map('n', '<localleader>s', 'ms[s1z=`s', { desc = 'Fix last spell error' })
-- PLUGIN: mini.nvim -- PLUGIN: mini.nvim
map('n', '<leader>m', ':lua MiniMap.toggle()<cr>', { silent = true }) prefix({ ['<leader>s'] = { name = '+show' } })
map('n', '<leader>sm', ':lua MiniMap.toggle()<cr>',
{ silent = true, desc = 'toggle minimap' })
map('n', '<leader>ss', ":lua MiniStarter.open()<cr>", { desc = 'show startpage' })
-- PLUGIN: symbols-outline.nvim
map('n', '<leader>so', '<cmd>SymbolsOutline<cr>',
{ silent = true, desc = 'toggle symbol outline' })
-- PLUGIN: easy-align -- PLUGIN: easy-align
-- Start interactive EasyAlign in visual mode (e.g. vipga) -- Start interactive EasyAlign in visual mode (e.g. vipga)
@ -201,17 +218,6 @@ map('x', 'ga', '<Plug>(EasyAlign)')
-- Start interactive EasyAlign for a motion/text object (e.g. gaip) -- Start interactive EasyAlign for a motion/text object (e.g. gaip)
map('n', 'ga', '<Plug>(EasyAlign)') map('n', 'ga', '<Plug>(EasyAlign)')
-- PLUGIN: vnsip
-- jump around in snippets
map('i', '<Tab>', [[vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>']],
{ expr = true })
map('i', '<S-Tab>',
[[vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-next)' : '<S-Tab>']],
{ expr = true })
-- PLUGIN: symbols-outline.nvim
map('n', '<leader>o', '<cmd>SymbolsOutline<cr>', { silent = true })
-- trim trailing whitespaces with mini.nvim trailspace -- trim trailing whitespaces with mini.nvim trailspace
map("n", "<localleader>w", function() require("mini.trailspace").trim() end, map("n", "<localleader>w", function() require("mini.trailspace").trim() end,
{ noremap = true }) { noremap = true })
@ -227,35 +233,10 @@ map("v", "g<C-x>", 'g<Plug>(dial-increment)')
-- PLUGIN: zettelkasten.nvim -- PLUGIN: zettelkasten.nvim
map('n', '<cr>', [[:silent lua require 'zettelkasten'.link_follow()<cr>]]) map('n', '<cr>', [[:silent lua require 'zettelkasten'.link_follow()<cr>]])
map('v', '<cr>', [[:lua require 'zettelkasten'.link_follow(true)<cr>]]) map('v', '<cr>', [[:lua require 'zettelkasten'.link_follow(true)<cr>]])
map('n', '<leader>ww', [[:lua require 'zettelkasten'.index_open()<cr> ]]) prefix({ ['<leader>w'] = { name = '+wiki' } })
map('n', '<leader>ww', [[:lua require 'zettelkasten'.index_open()<cr> ]],
{ desc = "open wiki" })
-- PLUGIN: toggleterm.nvim -- PLUGIN: toggleterm.nvim
-- create a lazygit window, set up in toggleterm settings -- create a lazygit window, set up in toggleterm settings
map('n', '<leader>G', ':Lazygit<cr>') map('n', '<leader>G', ':Lazygit<cr>')
-- PLUGIN: magma-nvim
-- Operate jupyter notebooks from within vim
map('n', '<localleader>mm', ':MagmaEvaluateLine<cr>', { silent = true })
map('n', '<localleader>M', '?^```{<cr>jV/```<cr>k:<C-u>MagmaEvaluateVisual<cr>',
{ silent = true, desc = 'Evaluate current quarto cell' })
map('x', '<localleader>m', ':<C-u>MagmaEvaluateVisual<cr>', { silent = true })
map('n', '<localleader>m', "nvim_exec('MagmaEvaluateOperator', v:true)",
{ expr = true, silent = true })
map('n', '<localleader>mr', ':MagmaReevaluateCell<cr>', { silent = true })
map('n', '<localleader>ma', ':MagmaShowOutput<cr>', { silent = true })
map('n', '<localleader>mq', ':noautocmd :MagmaEnterOutput<cr>',
{ silent = true, desc = 'MagmaEnterOutput' })
map('n', '<localleader>md', ':MagmaDelete<cr>', { silent = true })
map('n', '<localleader>ms', ':MagmaInterrupt<cr>')
map('n', '<localleader>mI', ':MagmaInit ')
map('n', '<localleader>mD', ':MagmaDeinit<cr>')
map('n', '<localleader>mR', ':MagmaRestart<cr>')
-- jump to beginning of previous/ next cell code
map('n', ']c', '/^```{<cr>}:nohl<cr>', { desc = 'Next quarto cell' })
map('n', '[c', '?^```<cr>n}:nohl<cr>', { desc = 'Previous quarto cell' })
-- insert cell header above/below
map('n', '<localleader>mo', 'o```{python}<cr><cr>```<esc>k',
{ desc = 'Insert quarto cell below' })
map('n', '<localleader>mO', 'O```{python}<cr><cr>```<esc>k',
{ desc = 'Insert quarto cell above' })

View file

@ -1,40 +0,0 @@
local lsp = require("lsp-zero")
lsp.preset("recommended")
lsp.on_attach(function(client, bufnr)
require("lsp-format").on_attach(client, bufnr)
end)
lsp.nvim_workspace()
lsp.setup_nvim_cmp({
sources = {
{ name = 'path' }, { name = 'nvim_lsp', keyword_length = 2 },
{ name = 'buffer', keyword_length = 3 },
{ name = 'luasnip', keyword_length = 2 }, { name = 'tmux' },
{ name = 'otter' }, { name = 'latex_symbols' }, { name = 'vCard' },
{ name = 'nvim_lua' }, { name = 'buffer' }, { name = 'spell' }
},
documentation = {
max_height = 50,
max_width = 90,
border = 'rounded',
col_offset = 0,
side_padding = 1,
winhighlight = 'Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None',
zindex = 1001
}
})
lsp.setup()
vim.diagnostic.config { virtual_text = true }
local cmp = require 'cmp'
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = { { name = 'buffer' } }
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ { name = 'path' } }, {
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
})
})

View file

@ -1,3 +1,96 @@
-- The arch package defaults to the following directory local lsp = require("lsp-zero")
require'navigator'.setup()
require"lsp_signature".setup() vim.diagnostic.config { virtual_text = true }
lsp.preset({
name = "recommended",
set_lsp_keymaps = false,
suggest_lsp_servers = true
})
lsp.on_attach(function(client, bufnr)
require("lsp-format").on_attach(client, bufnr)
local map = vim.keymap.set
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>',
{ buffer = bufnr, desc = 'Previous diagnostic' })
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>',
{ buffer = bufnr, desc = 'Next diagnostic' })
map('n', '[e',
'<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>',
{ buffer = bufnr, desc = 'Previous error' })
map('n', ']e',
'<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>',
{ buffer = bufnr, desc = 'Next error' })
local prefix = require('which-key').register
prefix({ ['<localleader>l'] = { name = "+lsp" } })
map('n', '<localleader>li', '<cmd>LspInfo<cr>',
{ buffer = bufnr, desc = 'Lsp Info' })
map('n', '<localleader>ld', '<cmd>lua vim.diagnostic.open_float()<cr>',
{ buffer = bufnr, desc = 'Line diagnostics' })
map('n', '<localleader>la', '<cmd>lua vim.lsp.buf.code_action()<cr>',
{ buffer = bufnr, desc = 'Codeactions' })
map('n', '<localleader>ln', '<cmd>lua vim.lsp.buf.rename()<cr>',
{ buffer = bufnr, desc = 'Rename element' })
map('n', '<localleader>lr', '<cmd>lua vim.lsp.buf.references()<cr>',
{ buffer = bufnr, desc = 'References' })
if client.server_capabilities.document_formatting then
map('n', '<localleader>lf', "<cmd>lua vim.lsp.buf.formatting()<CR>",
{ buffer = bufnr, desc = 'Format document' })
end
map('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>',
{ buffer = bufnr, desc = 'Hover definition' })
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>',
{ buffer = bufnr, desc = 'Definition' })
map('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>',
{ buffer = bufnr, desc = 'Declaration' })
map('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>',
{ buffer = bufnr, desc = 'Signature help' })
map('n', 'gI', '<cmd>lua vim.lsp.buf.implementation()<cr>',
{ buffer = bufnr, desc = 'Implementation' })
map('n', 'gt', '<cmd>lua vim.lsp.buf.type_definition()<cr>',
{ buffer = bufnr, desc = 'Type definition' })
end)
lsp.nvim_workspace()
-- ensure python virtualenv is determined automatically on lsp start
lsp.configure("pyright", {
on_attach = function(client, _)
local python_path, msg = require('util.pyenv').get_path(client.config
.root_dir)
vim.notify(string.format('%s\n%s', msg, python_path))
client.config.settings.python.pythonPath = python_path
end
})
lsp.setup_nvim_cmp({
sources = {
{ name = 'path' }, { name = 'nvim_lsp', keyword_length = 2 },
{ name = 'pandoc_references' }, { name = 'buffer', keyword_length = 3 },
{ name = 'luasnip', keyword_length = 2 }, { name = 'tmux' },
{ name = 'otter' }, { name = 'latex_symbols' }, { name = 'vCard' },
{ name = 'nvim_lua' }, { name = 'buffer' }, { name = 'spell' }
},
documentation = {
max_height = 50,
max_width = 90,
border = 'rounded',
col_offset = 0,
side_padding = 1,
winhighlight = 'Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None',
zindex = 1001
}
})
lsp.setup()
local cmp = require 'cmp'
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = { { name = 'buffer' } }
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ { name = 'path' } }, {
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
})
})

View file

@ -1,11 +1,17 @@
require('mini.ai').setup() require('mini.ai').setup()
require('mini.comment').setup() require('mini.comment').setup({
require('mini.cursorword').setup({delay = 500}) hooks = {
pre = function()
require('ts_context_commentstring.internal').update_commentstring()
end
}
})
require('mini.cursorword').setup({ delay = 500 })
require('mini.fuzzy').setup() require('mini.fuzzy').setup()
require('mini.indentscope').setup({ require('mini.indentscope').setup({
symbol = "", symbol = "",
draw = {animation = require('mini.indentscope').gen_animation('none')}, draw = { animation = require('mini.indentscope').gen_animation.none() },
options = {indent_at_cursor = false} options = { indent_at_cursor = false }
}) })
require('mini.map').setup() require('mini.map').setup()
-- require('mini.move').setup() -- has not hit stable yet -- require('mini.move').setup() -- has not hit stable yet

View file

@ -1,8 +0,0 @@
require("neorg").setup {
load = {
["core.defaults"] = {},
["core.norg.concealer"] = {},
["core.norg.completion"] = { config = { engine = "nvim-cmp" } },
["core.norg.qol.toc"] = {}
}
}

View file

@ -1,14 +1,21 @@
require'nvim-treesitter.configs'.setup { local rainbow = require('ts-rainbow')
require 'nvim-treesitter.configs'.setup {
-- one of "all", "maintained" (parsers with maintainers), or a list of languages -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "all", ensure_installed = "all",
highlight = {enable = true}, highlight = { enable = true },
incremental_selection = {enable = true}, incremental_selection = { enable = true },
textobjects = {enable = true}, textobjects = { enable = true },
indent = {enable = true}, indent = { enable = true },
-- enable rainbow brackets, needs p00f/nvim-ts-rainbow -- enable rainbow brackets, needs p00f/nvim-ts-rainbow
rainbow = {enable = true}, rainbow = {
enable = true,
strategy = { rainbow.strategy.global }
},
-- for improved commentstrings, needs corresponding plugin -- for improved commentstrings, needs corresponding plugin
context_commentstring = {enable = true} context_commentstring = {
enable = true,
enable_autocmd = false -- since we run it as a hook from the mini.comment plugin
}
} }

View file

@ -3,7 +3,7 @@ local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
return { return {
-- vim plugs -- vim plugs
-- essential -- essential
{ 'numToStr/Navigator.nvim', config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits { 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
{ 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative { 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative
{ 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank { 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
{ 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak { 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak
@ -11,9 +11,11 @@ return {
{ 'vifm/vifm.vim' }, -- integrate file manager { 'vifm/vifm.vim' }, -- integrate file manager
{ {
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
config = true, opts = { numhl = true, signcolumn = false },
event = "BufRead" event = "BufRead"
}, { },
{ 'RRethy/nvim-base16', event = "BufWinEnter",
dependencies = { 'rktjmp/fwatch.nvim' } }, {
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme 'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
config = true, config = true,
event = "VeryLazy" event = "VeryLazy"
@ -59,19 +61,21 @@ return {
}, { }, {
'junegunn/vim-easy-align', -- Align tables and other alignable things 'junegunn/vim-easy-align', -- Align tables and other alignable things
event = "VeryLazy" event = "VeryLazy"
}, -- colorschemes }, -- statusline
{ 'norcalli/nvim-base16.lua' }, --
-- statusline
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }, requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function() require('plug._lualine') end config = function() require('plug._lualine') end
}, -- writing }, -- writing
{ 'vim-pandoc/vim-pandoc-syntax', ft = writing_ft },
{ 'vim-pandoc/vim-pandoc', ft = writing_ft },
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, { { 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
'mickael-menu/zk-nvim',
config = function() require('zk').setup({ picker = "telescope" }) end
}, { 'andrewferrier/wrapping.nvim', config = true }, {
'quarto-dev/quarto-nvim', 'quarto-dev/quarto-nvim',
dependencies = { 'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig' }, dependencies = {
'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig',
'vim-pandoc/vim-pandoc-syntax'
},
config = function() config = function()
require 'quarto'.setup { require 'quarto'.setup {
lspFeatures = { lspFeatures = {
@ -82,7 +86,19 @@ return {
} }
} }
end, end,
ft = writing_ft ft = "quarto"
}, {
"lkhphuc/jupyter-kernel.nvim",
config = true,
cmd = "JupyterAttach",
build = ":UpdateRemotePlugins",
keys = {
{
"<localleader>ck",
"<Cmd>JupyterInspect<CR>",
desc = "Inspect object in kernel"
}
}
}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync }, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync
{ 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing { 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing
{ 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs) { 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs)
@ -110,31 +126,40 @@ return {
config = function() require('plug._mini') end config = function() require('plug._mini') end
}, { }, {
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim "akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
config = function() require('plug._toggleterm') end, config = function() require('plug._toggleterm') end
event = "BufWinEnter"
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
config = function() require("which-key").setup {} end config = function() require("which-key").setup {} end
}, { }, -- fuzzy matching
"nvim-neorg/neorg",
config = function() require("plug._neorg") end,
dependencies = { "nvim-lua/plenary.nvim" },
version = "*",
ft = "norg"
}, -- extensive organization plugin mimicking orgmode
-- fuzzy matching
{ "nvim-telescope/telescope-fzf-native.nvim", build = 'make' }, { { "nvim-telescope/telescope-fzf-native.nvim", build = 'make' }, {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim" }, dependencies = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim" },
config = function() require('plug._telescope') end config = function() require('plug._telescope') end
}, {
"dense-analysis/neural",
dependencies = { "MunifTanjim/nui.nvim", "elpiloto/significant.nvim" },
config = function()
require('neural').setup({
source = { openai = { api_key = vim.env.OPENAI_API_KEY } }
})
end
}, -- treesitter }, -- treesitter
{ {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate', build = ':TSUpdate',
config = function() require('plug._treesitter') end config = function() require('plug._treesitter') end,
}, { 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree event = "BufReadPre",
{ 'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true }, -- show current cursor context at top of buffer -- rainbow brackets using treesitter
-- show current cursor context at top of buffer
-- improves commenting plugin above by using ts
dependencies = {
'https://gitlab.com/HiPhish/nvim-ts-rainbow2.git',
{ 'romgrk/nvim-treesitter-context', config = true },
'JoosepAlviste/nvim-ts-context-commentstring'
}
},
{ 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
{ {
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches 'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
config = function() config = function()
@ -149,47 +174,54 @@ return {
} }
end, end,
event = "BufReadPre" event = "BufReadPre"
}, { 'p00f/nvim-ts-rainbow', event = "BufReadPre" }, -- rainbow brackets using treesitter }, {
{ 'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre" }, -- improves commenting plugin above by using ts
{
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors 'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
config = function() require('spellsitter').setup() end, config = function() require('spellsitter').setup() end,
event = "BufReadPre" event = "BufReadPre"
}, -- lsp }, -- lsp
{ {
"VonHeikemen/lsp-zero.nvim", "VonHeikemen/lsp-zero.nvim",
dependencies = { dependencies = {
"neovim/nvim-lspconfig", "williamboman/mason.nvim", { "neovim/nvim-lspconfig", branch = "master" },
"williamboman/mason-lspconfig.nvim", "hrsh7th/nvim-cmp", "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", {
"hrsh7th/nvim-cmp",
branch = "main",
dependencies = {
"hrsh7th/cmp-buffer", "hrsh7th/cmp-path", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp", "saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua", "L3MON4D3/LuaSnip", "hrsh7th/cmp-nvim-lua", "andersevenrud/cmp-tmux",
"rafamadriz/friendly-snippets", "andersevenrud/cmp-tmux",
"hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols", "hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols",
"ray-x/cmp-treesitter", "f3fora/cmp-spell", "hrsh7th/cmp-cmdline", "ray-x/cmp-treesitter", "f3fora/cmp-spell",
"cbarrete/completion-vcard", { "hrsh7th/cmp-cmdline", "cbarrete/completion-vcard",
'aspeddro/cmp-pandoc.nvim', "jc-doyle/cmp-pandoc-references",
dependencies = { 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' },
event = "InsertEnter"
}, { "lukas-reineke/lsp-format.nvim", config = true }
},
config = function() require('plug._cmp') end
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
{ 'ray-x/lsp_signature.nvim', event = "VeryLazy" },
{ 'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy" }, {
'ray-x/navigator.lua',
config = function() require('plug._lsp') end,
event = "VeryLazy"
}, -- and completion
{
"jghauser/papis.nvim",
after = { "telescope.nvim", "nvim-cmp" },
dependencies = {
"kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
},
ft = writing_ft,
rocks = { "lyaml" },
config = true
} }
}, "L3MON4D3/LuaSnip", "rafamadriz/friendly-snippets",
{ "lukas-reineke/lsp-format.nvim", config = true }
},
config = function() require('plug._lsp') end
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
{ 'ray-x/lsp_signature.nvim', config = true }, -- UI improvements
{ 'stevearc/dressing.nvim', config = true }, {
'rcarriga/nvim-notify',
config = function() vim.notify = require("notify") end
}
-- { -- REQUIRES custom `yay -S --asdeps lua51-lyaml invocation` AND is suuper slow
-- "jghauser/papis.nvim",
-- after = { "telescope.nvim", "nvim-cmp" },
-- dependencies = {
-- "kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
-- "MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
-- },
-- ft = writing_ft,
-- rocks = { "lyaml" },
-- config = function()
-- require('papis').setup({
-- papis_python = {
-- dir = "/home/marty/documents/library/academia",
-- info_name = "info.yaml",
-- notes_name = [[notes.qmd]]
-- }
-- })
-- end
-- }
} }

View file

@ -1,4 +1,4 @@
local default_builtins_disabled = {"netrw", "netrwPlugin"} local default_builtins_disabled = { "netrw", "netrwPlugin" }
local disable_builtins = function(builtins) local disable_builtins = function(builtins)
for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end
end end
@ -12,23 +12,19 @@ local o = {
shiftwidth = 4, shiftwidth = 4,
softtabstop = 4, softtabstop = 4,
expandtab = true, expandtab = true,
-- make jumplist behave more like browser, when jumping back -- make jumplist behave more like browser, when jumping back
-- and then adding a new jump discards all the previous -- and then adding a new jump discards all the previous
-- 'future-jump' tree, making more sense for wiki-like movement -- 'future-jump' tree, making more sense for wiki-like movement
jumpoptions = 'stack', jumpoptions = 'stack',
-- set cursor line highlighting, esp useful when using with bracket -- set cursor line highlighting, esp useful when using with bracket
-- highlighting and you don't know which side of the brace the cursor is on -- highlighting and you don't know which side of the brace the cursor is on
cursorline = true, cursorline = true,
-- shows linenumbers relative to the one you are on, for easy movement and -- shows linenumbers relative to the one you are on, for easy movement and
-- dNUMBERd deletions -- dNUMBERd deletions
number = true, number = true,
relativenumber = true, relativenumber = true,
-- puts the numbers into the signcolumn so when git/lsp show signs there's no jump -- puts the numbers into the signcolumn so when git/lsp show signs there's no jump
signcolumn = 'number', signcolumn = 'number',
-- keeps an undofile next to files so that you can even undo if vim is closed -- keeps an undofile next to files so that you can even undo if vim is closed
-- in between -- in between
undofile = true, undofile = true,
@ -38,32 +34,30 @@ local o = {
-- all lowercased -- all lowercased
ignorecase = true, ignorecase = true,
smartcase = true, smartcase = true,
-- shows previews of what substitute command will do (and a couple others) -- shows previews of what substitute command will do (and a couple others)
inccommand = 'split', inccommand = 'split',
-- disables showing us the current mode in the command line since airline takes -- disables showing us the current mode in the command line since airline takes
-- care of it -- care of it
showmode = false, showmode = false,
-- turn off modeline, to ensure security observation -- turn off modeline, to ensure security observation
modeline = false, modeline = false,
-- i feel foldlevel 2 is generally pretty usable, for headlines and similar -- i feel foldlevel 2 is generally pretty usable, for headlines and similar
-- set to use treesitter in treesitter config
foldlevel = 2, foldlevel = 2,
conceallevel = 2, conceallevel = 2,
-- enable mouse, doesn't bug me and might come in useful at some point -- enable mouse, doesn't bug me and might come in useful at some point
mouse = 'a', mouse = 'a',
-- pump all clippings into the system clipboard -- pump all clippings into the system clipboard
clipboard = 'unnamedplus', clipboard = 'unnamedplus',
-- turn of automatic resizing of individual splits -- turn of automatic resizing of individual splits
equalalways = false, equalalways = false,
-- make sure there's always *some* context below cursor -- make sure there's always *some* context below cursor
scrolloff = 4 scrolloff = 4,
-- open new buffers bottomright
splitright = true,
splitbelow = true,
-- remove command line if no command is currently present
cmdheight = 0,
} }
for k, v in pairs(o) do for k, v in pairs(o) do

View file

@ -0,0 +1,45 @@
local util = require('lspconfig/util')
local path = util.path
local T = {}
local exepath = vim.fn.exepath
local path_sep = function()
local is_win = vim.loop.os_uname().sysname:find('Windows')
if is_win then
return '\\'
else
return '/'
end
end
-- from https://github.com/ray-x/navigator.lua/issues/247#issue-1465308677
T.get_path = function(workspace)
-- Use activated virtualenv.
if vim.env.VIRTUAL_ENV then
return path.join(vim.env.VIRTUAL_ENV, 'bin', 'python'), 'virtual env'
end
-- Find and use virtualenv in workspace directory.
for _, pattern in ipairs({ '*', '.*' }) do
local match = vim.fn.glob(path.join(workspace, pattern, 'pyvenv.cfg'))
local sep = path_sep()
local py = 'bin' .. sep .. 'python'
if match ~= '' then
match = string.gsub(match, 'pyvenv.cfg', py)
return match, string.format('venv base folder: %s', match)
end
match = vim.fn.glob(path.join(workspace, pattern, 'poetry.lock'))
if match ~= '' then
local venv_base_folder = vim.fn.trim(vim.fn.system(
'poetry env info -p'))
return path.join(venv_base_folder, 'bin', 'python'),
string.format('venv base folder: %s', venv_base_folder)
end
end
-- Fallback to system Python.
return exepath('python3') or exepath('python') or 'python',
'fallback to system python path'
end
return T

View file

@ -1,8 +0,0 @@
" PLUGIN: notational-fzf-vim
" Configure notational-fzf-vim
if $WIKIROOT ==? ""
let g:nv_search_paths = [ expand('~/documents/notes') ]
else
let g:nv_search_paths = [ $WIKIROOT ]
endif
let g:nv_wrap_preview_text=1

View file

@ -1,34 +0,0 @@
" PLUGIN: vim-pandoc
" handle markdown files with pandoc (and pandoc syntax!)
let g:pandoc#modules#disabled = [ "keyboard", "folding" ]
let g:pandoc#filetypes#pandoc_markdown = 0
let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile"]
" disable all default keymaps
let g:pandoc#keyboard#use_default_mappings=0
" needs to be set for wrapping and unwrapping of lines to work when doing j/k
" or gj/gk respectively, to allow precise relative cursor jumping
let g:pandoc#keyboard#display_motions=0
let g:pandoc#hypertext#use_default_mappings=0
" if there's a pdf and an html or similar, open the pdf
let g:pandoc#command#prefer_pdf=1
" look for bibtex files w/ same name as edited one, then .bib in current dir, yaml frontmatter, and finally the globally set bibs file
let g:pandoc#biblio#sources="bcyg"
" the globally set bibs file
if $BIBFILE ==? ""
let g:pandoc#biblio#bibs=[expand("~/documents/library/academia/academia.bib")]
else
let g:pandoc#biblio#bibs=[expand($BIBFILE)]
endif
let g:pandoc#biblio#use_bibtool=1
let g:pandoc#biblio#use_preview=1
let g:pandoc#completion#bib#mode='citeproc'
let g:pandoc#folding#fold_yaml=1
let g:pandoc#folding#fastfolds=1
" let g:pandoc#folding#level=1
let g:pandoc#spell#default_langs=["en_us", "de_de"]
let g:pandoc#hypertext#ausosave_on_edit_open_link=1
let g:pandoc#hypertext#create_if_no_alternates_exists=1
" PLUGIN: vim-pandoc-syntax
let g:pandoc#syntax#conceal#use = 1
let g:pandoc#syntax#conceal#urls = 1

View file

@ -1,9 +1,9 @@
local accounts = {} local accounts = {}
local status, gmailuser = pipe_from( local _, gmailuser = pipe_from(
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2') 'pass show misc/gmail-app-password | grep username | cut -d: -f2')
local status, gmailpass = pipe_from( local _, gmailpass = pipe_from(
'gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1') 'pass show misc/gmail-app-password | head -n1')
-- Setup an imap account called gmail -- Setup an imap account called gmail
accounts.gmail = IMAP { accounts.gmail = IMAP {
server = "imap.gmail.com", server = "imap.gmail.com",

View file

@ -30,8 +30,8 @@ function getSenderList(rollupfile)
for line in file:lines() do table.insert(rollupSenders, line) end for line in file:lines() do table.insert(rollupSenders, line) end
else else
print( print(
"ERROR: rollup did not find rollup.txt file containing mail addresses at " .. "rollup did not find rollup.txt file containing mail addresses at " ..
rollupfile or "") rollupfile or ". Skipping.")
end end
return rollupSenders return rollupSenders
end end

View file

@ -25,6 +25,7 @@ alias tan="task annotate"
alias tn="task next +READY" alias tn="task next +READY"
alias tun="task next urgency \> 4" alias tun="task next urgency \> 4"
alias tod="task +TODAY or +OVERDUE"
if exist timew; then if exist timew; then
alias tra="task active && timew" alias tra="task active && timew"

View file

@ -80,7 +80,7 @@ include task-sync.rc
include contexts include contexts
# try to fix some color weirdness, especially in tmux # try to fix some color weirdness, especially in tmux
# color.scheduled=on grey color.scheduled=on grey
# only ever show one result in the tasksh # only ever show one result in the tasksh
tasksh.autoclear=1 tasksh.autoclear=1

View file

@ -47,6 +47,7 @@ prehook() {
eval "$MBSYNC_PRE" eval "$MBSYNC_PRE"
return 0 return 0
fi fi
checkwarnuser
imapfilter -c "${XDG_CONFIG_HOME:-$HOME/.config}/imapfilter/config.lua" imapfilter -c "${XDG_CONFIG_HOME:-$HOME/.config}/imapfilter/config.lua"
} }
@ -142,7 +143,6 @@ elif [ -n "$1" ]; then
fi fi
main() { main() {
checkwarnuser
enablegpgagent enablegpgagent
prehook prehook

View file

@ -72,4 +72,7 @@ c.hints.selectors["code"] = [
] ]
# give the browser nice theme colors # give the browser nice theme colors
config.source("colorscheme.py") state_dir=os.environ.get('XDG_STATE_HOME', f"{os.environ['HOME']}/.local/state")
colorscheme=f"{state_dir}/qutebrowser/colorscheme.py"
if os.path.isfile(colorscheme):
config.source(colorscheme)

View file

@ -7,7 +7,6 @@ redirects = {
"source": ["youtube.com"], "source": ["youtube.com"],
"target": [ "target": [
"yt.oelrichsgarcia.de", "yt.oelrichsgarcia.de",
"vid.priv.au",
"invidious.weblibre.org", "invidious.weblibre.org",
"invidious.dhusch.de", "invidious.dhusch.de",
"iv.ggtyler.dev", "iv.ggtyler.dev",
@ -197,7 +196,7 @@ def rewrite(request: interceptor.Request):
matched=True matched=True
if matched: if matched:
target = service["target"][random.randint(0, len(service["target"]))] target = service["target"][random.randint(0, len(service["target"])-1)]
if target is not None and url.setHost(target) is not False: if target is not None and url.setHost(target) is not False:
try: try:
request.redirect(url) request.redirect(url)

View file

@ -25,7 +25,8 @@ test "$XDG_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop"
test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents" test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents"
test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads" test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads"
export XDG_MUSIC_DIR="$HOME/media/audio/music" export XDG_MEDIA_DIR="$HOME/media"
export XDG_MUSIC_DIR="$XDG_MEDIA_DIR/audio/music"
export XDG_PICTURES_DIR="$HOME/pictures" export XDG_PICTURES_DIR="$HOME/pictures"
export XDG_VIDEOS_DIR="$HOME/videos" export XDG_VIDEOS_DIR="$HOME/videos"
@ -49,6 +50,11 @@ xdg_makeForUser() {
chmod 0700 "$1" chmod 0700 "$1"
} }
if [ -h "$XDG_MEDIA_DIR" ] && [ ! -e "$XDG_MEDIA_DIR" ]; then
rm "$XDG_MEDIA_DIR"
xdg_makeForUser "$XDG_MEDIA_DIR"
fi
## ensure directories exist ## ensure directories exist
xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME" xdg_isThere "$XDG_BIN_HOME" || xdg_makeForUser "$XDG_BIN_HOME"
xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME" xdg_isThere "$XDG_CACHE_HOME" || xdg_makeForUser "$XDG_CACHE_HOME"

View file

@ -469,7 +469,8 @@ filextype *.csv
\ {Open with visidata} \ {Open with visidata}
\ vd %f, \ vd %f,
fileviewer *.csv fileviewer *.csv
\ xsv sample 100 %c | xsv table -c8 -p1 -w1, \ tidy-viewer
" \ xsv sample 100 %c | xsv table -c8 -p1 -w1,
" \ {cat %c | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S; } " \ {cat %c | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S; }
" Mindmap " Mindmap

View file

@ -1,78 +1,47 @@
local wezterm = require 'wezterm' local wezterm = require 'wezterm'
local mux = wezterm.mux
local maps = require 'maps' local maps = require 'maps'
require 'statusbar'.setup() require 'statusbar'.setup()
require 'events'.setup() require 'events'.setup()
-- wezterm.on("set-up-dotfile-workspace", function(window, pane) local function file_exists(name)
-- -- Set a workspace for coding on a current project local f = io.open(name, "r")
-- -- Top pane is for the editor, bottom pane is for the build tool if f ~= nil then
-- local project_dir = wezterm.home_dir .. '/projects/test/quarto/quarto-test' io.close(f)
-- local tab, build_pane, window = mux.spawn_window { return true
-- workspace = 'coding', else
-- cwd = project_dir, return false
-- args = args end
-- } end
-- local editor_pane = build_pane:split{
-- direction = 'Top', -- automatically reload colors file
-- size = 0.6, local colorsfile = (os.getenv('XDG_STATE_HOME') or
-- cwd = project_dir (os.getenv('HOME') .. '/.local/state')) ..
-- } '/wezterm/colors.toml'
-- build_pane:send_text 'quarto check' local colors = {}
-- mux.set_active_workspace 'coding' if file_exists(colorsfile) == true then
-- end) wezterm.add_to_config_reload_watch_list(colorsfile)
-- colors = wezterm.color.load_scheme(colorsfile)
-- wezterm.on('gui-startup', function(cmd) end
-- -- allow `wezterm start -- something` to affect what we spawn
-- -- in our initial window
-- local args = {}
-- if cmd then args = cmd.args end
--
-- -- Set a workspace for coding on a current project
-- -- Top pane is for the editor, bottom pane is for the build tool
-- local project_dir = wezterm.home_dir .. '/projects/test/quarto/quarto-test'
-- local tab, build_pane, window = mux.spawn_window {
-- workspace = 'coding',
-- cwd = project_dir,
-- args = args
-- }
-- local editor_pane = build_pane:split {
-- direction = 'Top',
-- size = 0.6,
-- cwd = project_dir
-- }
-- build_pane:send_text 'quarto check'
--
-- -- A workspace for interacting with a local machine that
-- -- runs some docker containners for home automation
-- local tab, pane, window = mux.spawn_window {
-- workspace = 'toppy',
-- args = { 'top' }
-- }
--
-- -- We want to startup in the coding workspace
-- mux.set_active_workspace 'coding'
-- end)
return { return {
enable_wayland = true, enable_wayland = true,
hide_tab_bar_if_only_one_tab = true, hide_tab_bar_if_only_one_tab = true,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
tab_bar_at_bottom = true, tab_bar_at_bottom = true,
window_padding = { left = 0, right = 0, top = 0, bottom = 0 }, window_padding = { left = 0, right = 0, top = 0, bottom = 0 },
colors = colors,
color_scheme = "Railscasts (base16)", color_scheme = "Nord (base16)", -- will be overwritten by colors
-- default_prog = {"nu"}, -- default_prog = {"nu"},
scrollback_lines = 10000, scrollback_lines = 10000,
font = wezterm.font('Iosevka Nerd Font'), font = wezterm.font('Iosevka Nerd Font'),
line_height = 1.0, line_height = 1.0,
leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1500 }, leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1500 },
keys = maps.keys, keys = maps.keys,
key_tables = maps.key_tables key_tables = maps.key_tables,
inactive_pane_hsb = {
saturation = 0.9,
brightness = 0.9,
}
} }

View file

@ -3,11 +3,11 @@
#picktool = fzf #picktool = fzf
default-library = master default-library = master
file-browser = vifm file-browser = vifm
ref-format = {doc[author_list][0][surname]}{doc[year]} ref-format = {doc[author_list][0][family]}{doc[year]}
# edit info.yaml as new papers are added # edit info.yaml as new papers are added
add-edit = True add-edit = True
add-folder-name = {doc[ref]}-{doc[title]} add-folder-name = {doc[author_list][0][family]}-{doc[title]}
add-file-name = {doc[author_list][0][family]}{doc[year]} add-file-name = {doc[author_list][0][family]}{doc[year]}
header-format-file = ~/.config/papis/headerformat header-format-file = ~/.config/papis/headerformat
extra-bibtex-keys = ["tags", "readstatus"] extra-bibtex-keys = ["tags", "readstatus"]
@ -31,5 +31,8 @@ dir = ~/documents/library
[academia] [academia]
dir = ~/documents/library/academia dir = ~/documents/library/academia
[personal]
dir = ~/documents/library/personal
[cs] [cs]
dir = ~/documents/library/cs dir = ~/documents/library/cs

View file

@ -0,0 +1,10 @@
#!/usr/bin/env sh
#
n() {
if [ $# -eq 0 ]; then
zk edit -i
else
zk "${@}"
fi
}

View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
#
export ZK_NOTEBOOK_DIR="${WIKIROOT:-~/documents/notes/}/pinky"

View file

@ -1,4 +1,6 @@
# overwritten by below colors
include colorscheme include colorscheme
include /home/marty/.local/state/zathura/zathurarc
set recolor "true" set recolor "true"
set selection-clipboard "clipboard" set selection-clipboard "clipboard"
@ -7,4 +9,3 @@ set first-page-column 1
map r reload map r reload
map R rotate map R rotate
map p print map p print