diff --git a/system/home/desktop.nix b/system/home/desktop.nix index da6e9cff..6be435b7 100644 --- a/system/home/desktop.nix +++ b/system/home/desktop.nix @@ -5,6 +5,7 @@ ./alacritty/default.nix ./emacs/default.nix ./browser/default.nix + ./zathura/default.nix ./services/email/default.nix ]; home = { diff --git a/system/home/mimeapps/default.nix b/system/home/mimeapps/default.nix index ef8463fb..3f0c0693 100644 --- a/system/home/mimeapps/default.nix +++ b/system/home/mimeapps/default.nix @@ -45,8 +45,8 @@ in "application/x-docbook+xml" = emacs; "application/x-yaml" = emacs; - "application/pdf" = [ "evince.desktop" ]; - "application/epub+zip" = [ "evince.desktop" ]; + "application/pdf" = [ "org.pwmt.zathura.desktop" ]; + "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; "application/msword" = [ "writer.desktop" ]; "application/zip" = [ "xarchiver.desktop" ]; diff --git a/system/home/sway/default.nix b/system/home/sway/default.nix index 201c2ad5..ecfcfea4 100644 --- a/system/home/sway/default.nix +++ b/system/home/sway/default.nix @@ -18,7 +18,6 @@ ]; home.packages = with pkgs; [ ffmpeg - evince grim slurp wl-clipboard diff --git a/system/home/work.nix b/system/home/work.nix index 26cf0250..e725d53b 100644 --- a/system/home/work.nix +++ b/system/home/work.nix @@ -12,5 +12,4 @@ proton.primary = lib.mkForce false; outlook.primary = lib.mkForce true; }; - xdg.configFile."autostart/twinkle.desktop".source = "${pkgs.twinkle}/share/applications/twinkle.desktop"; } diff --git a/system/home/zathura/default.nix b/system/home/zathura/default.nix new file mode 100644 index 00000000..50d19e53 --- /dev/null +++ b/system/home/zathura/default.nix @@ -0,0 +1,39 @@ +{ config, fonts, ... }: +{ + # TODO add emacs keybinds + programs.zathura = + let + sc = config.scheme.withHashtag; + in + { + enable = true; + options = { + adjust-open = "best-fit"; + database = "null"; + dbus-service = true; + sandbox = "normal"; + scroll-page-aware = true; + synctex = true; + font = "${fonts.monospace.name} ${toString fonts.sizes.applications}"; + # Colour scheme + default-bg = sc.base00; + default-fg = sc.base05; + # completion-bg = ""; + # completion-fg = ""; + # completion-group-bg = ""; + # completion-group-fg = ""; + # completion-highlight-bg = ""; + # completion-highlight-fg = ""; + # inputbar-bg = ""; + # inputbar-fg = ""; + # notification-bg = ""; + # notification-fg = ""; + # notification-error-bg = ""; + # notification-error-fg = ""; + # notification-warning-bg = ""; + # notification-warning-fg = ""; + # statusbar-bg = ""; + # statusbar-fg = ""; + }; + }; +} diff --git a/system/home/zathura/emacs-keys-for-zathura.txt b/system/home/zathura/emacs-keys-for-zathura.txt new file mode 100644 index 00000000..276da37a --- /dev/null +++ b/system/home/zathura/emacs-keys-for-zathura.txt @@ -0,0 +1,208 @@ +# Being an Emacs user, it is natural for me to use emacs-like and info-like keybindings for zathura. +# +# Zathura configuration documentation is available at +# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/doc/man/zathurarc.5.rst +# A full list of available functions and default keybindings is available at +# https://git.pwmt.org/pwmt/zathura/-/blob/e5d2ca487147e79d0bb7acbf5174cd9dcc92a86c/zathura/config.c#L301 +# +# If you want to integrate Zathura with Emacs AUCTeX mode, see +# [emacs wiki](https://www.emacswiki.org/emacs/AUCTeX). +# +# Put the following inside `$XDG_CONFIG_HOME/zathura/zathurarc + +## niceties +# when selecting text with mouse, +# copy to clipboard +set selection-clipboard clipboard + +# keep several lines of text when +# scrolling a screenful +set scroll-full-overlap 0.2 + +# see documentation for details +set scroll-page-aware true +set window-title-basename true +set adjust-open width +set statusbar-home-tilde true +set vertical-center true +set synctex true +# large bold font easier on the eyes in index mode +# status bar can be disabled with A-s +set font "FreeSans bold 16" +set zoom-step 3 + +map [normal] scroll left +map [normal] scroll down +map [normal] scroll up +map [normal] scroll right +map [normal] abort +map [insert] abort +map [normal] abort +map [normal] goto top +map [normal] > goto bottom +map [normal] a adjust_window best-fit +map [normal] s adjust_window width +map [normal] F display_link +map [normal] copy_link +map [normal] f follow +map [normal] m mark_add +map [normal] \' mark_evaluate +map [normal] \, navigate next +map [normal] \. navigate previous +map [normal] navigate next +map [normal] navigate previous +map [normal] scroll full-down +map [normal] scroll full-up +map [normal] print +map [normal] c recolor +map [normal] R reload +map [normal] v rotate rotate_cw +map [normal] V rotate rotate_ccw +map [normal] scroll left +map [normal] scroll up +map [normal] scroll down +map [normal] scroll right +map [normal] scroll half-left +map [normal] scroll half-down +map [normal] scroll half-up +map [normal] scroll half-right +map [normal] scroll full-left +map [normal] scroll full-down +map [normal] scroll full-down +map [normal] scroll full-up +map [normal] scroll full-right +map [normal] scroll full-down +map [normal] scroll full-up +map [normal] scroll full-up +map [normal] scroll full-up +map [normal] l jumplist backward +map [normal] r jumplist forward +map [normal] bisect forward +map [normal] bisect backward +# still need to use '/' to trigger search +map [normal] search forward +map [normal] search backward +map [normal] p snap_to_page +map [normal] toggle_index +map [normal] i toggle_index +map [normal] toggle_index +map [normal] toggle_statusbar +map [normal] focus_inputbar +map [normal] d toggle_page_mode +map [normal] q quit +map [normal] + zoom in +map [normal] - zoom out +map [normal] = zoom in +map [normal] toggle_presentation +map [normal] toggle_fullscreen +map [normal] j toggle_fullscreen +map [fullscreen] j toggle_fullscreen +map [fullscreen] q toggle_fullscreen +map [fullscreen] scroll left +map [fullscreen] scroll down +map [fullscreen] scroll up +map [fullscreen] scroll right +map [fullscreen] abort +map [fullscreen] abort +map [fullscreen] goto top +map [fullscreen] > goto bottom +map [fullscreen] a adjust_window best-fit +map [fullscreen] s adjust_window width +map [fullscreen] F display_link +map [fullscreen] copy_link +map [fullscreen] f follow +map [fullscreen] m mark_add +map [fullscreen] \' mark_evaluate +map [fullscreen] \, navigate next +map [fullscreen] \. navigate previous +map [fullscreen] navigate next +map [fullscreen] navigate previous +map [fullscreen] scroll full-down +map [fullscreen] scroll full-up +map [fullscreen] print +map [fullscreen] c recolor +map [fullscreen] R reload +map [fullscreen] v rotate rotate_cw +map [fullscreen] V rotate rotate_ccw +map [fullscreen] scroll left +map [fullscreen] scroll up +map [fullscreen] scroll down +map [fullscreen] scroll right +map [fullscreen] scroll half-left +map [fullscreen] scroll half-down +map [fullscreen] scroll half-up +map [fullscreen] scroll half-right +map [fullscreen] scroll full-left +map [fullscreen] scroll full-down +map [fullscreen] scroll full-down +map [fullscreen] scroll full-up +map [fullscreen] scroll full-right +map [fullscreen] scroll full-down +map [fullscreen] scroll full-up +map [fullscreen] scroll full-up +map [fullscreen] scroll full-up +map [fullscreen] l jumplist backward +map [fullscreen] r jumplist forward +map [fullscreen] bisect forward +map [fullscreen] bisect backward +map [fullscreen] search forward +map [fullscreen] search backward +map [fullscreen] p snap_to_page +map [fullscreen] i toggle_index +map [fullscreen] toggle_index +map [fullscreen] toggle_index +map [fullscreen] toggle_statusbar +map [fullscreen] focus_inputbar +map [fullscreen] d toggle_page_mode +map [fullscreen] + zoom in +map [fullscreen] - zoom out +map [fullscreen] = zoom in +# status bar will obscure last item in index mode +map [index] toggle_statusbar +map [index] q toggle_index +map [index] i toggle_index +map [index] navigate_index up +map [index] navigate_index up +map [index] navigate_index up +map [index] navigate_index down +map [index] navigate_index up +map [index] navigate_index down +map [index] \< navigate_index top +map [index] \> navigate_index bottom +map [index] navigate_index top +map [index] > navigate_index bottom +map [index] navigate_index collapse +map [index] navigate_index expand +map [index] navigate_index expand-all +map [index] navigate_index collapse-all +map [index] navigate_index up +map [index] navigate_index down +map [index] navigate_index collapse +map [index] navigate_index expand +map [index] navigate_index select +map [index] navigate_index select +map [index] navigate_index select +map [index] navigate_index select +map [index] toggle_index +map [index] toggle_index +map [index] toggle_index +map [index] toggle_index +map [presentation] i toggle_index +map [presentation] r navigate next +map [presentation] navigate next +map [presentation] navigate next +map [presentation] navigate next +map [presentation] navigate next +map [presentation] l navigate previous +map [presentation] navigate previous +map [presentation] navigate previous +map [presentation] navigate previous +map [presentation] navigate previous +map [presentation] navigate previous +map [presentation] toggle_presentation +map [presentation] q toggle_presentation +map [presentation] navigate previous +map [presentation] navigate previous +map [presentation] navigate next +map [presentation] goto top +map [presentation] > goto bottom