From 5e54bed17405d23640ea642ce5b44f5b400eb83c Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 25 Apr 2026 10:47:49 +0200 Subject: [PATCH] Nvim: R now instantly and automatically displays plots. --- .Rprofile | 11 +++++++++++ .config/zathura/zathurarc | 2 +- .local/share/applications/img.desktop | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .Rprofile diff --git a/.Rprofile b/.Rprofile new file mode 100644 index 0000000..dc68ebb --- /dev/null +++ b/.Rprofile @@ -0,0 +1,11 @@ +if (!interactive()) { + options(device = function(...) pdf("Rplot.pdf")) + + .Last <- function() { + if (dev.cur() > 1) { + dev.off() + system("xdg-open Rplot.pdf", wait = FALSE) + Sys.sleep(2) + } + } +} diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 5445854..56b1562 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -1,7 +1,7 @@ set statusbar-h-padding 0 set statusbar-v-padding 0 set guioptions none -set page-padding 1 +#set page-padding 1 map u scroll full-up map d scroll full-down map D toggle_page_mode diff --git a/.local/share/applications/img.desktop b/.local/share/applications/img.desktop index d8d8959..2d14b1e 100644 --- a/.local/share/applications/img.desktop +++ b/.local/share/applications/img.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Image viewer -Exec=sxiv -a %u +Exec=imv %u