Switch Thunar+Xarchiver for GNOME Nautilus and File-Roller

Add Sushi (NautilusPreviewer) for quick file previews

Add zathura back as PDF viewer

Update mimeapps for swayimg, mpv, zathura, etc...
This commit is contained in:
Evie Litherland-Smith 2024-10-25 12:19:00 +01:00
parent 7b9d0a41d6
commit 048d44ce6d
9 changed files with 252 additions and 35 deletions

View file

@ -11,8 +11,6 @@
home = {
stateVersion = "23.05";
packages = with pkgs; [
krita
kdenlive
helvum
prusa-slicer
blender

View file

@ -14,9 +14,9 @@
libsecret
libnotify
xdg-utils
xarchiver
hunspell
hunspellDicts.en_GB-large
gnome.nautilus
];
};
security = {
@ -34,16 +34,10 @@
dconf.enable = true;
noisetorch.enable = true;
seahorse.enable = true;
file-roller.enable = true;
kdeconnect.enable = true;
hyprland.enable = true;
xwayland.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
};
gtk.iconCache.enable = true;
qt = {
@ -57,6 +51,7 @@
printing.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gnome.sushi.enable = true;
gvfs = {
enable = true;
package = pkgs.gnome3.gvfs;

View file

@ -23,7 +23,7 @@
:on-primary-color "${scheme.withHashtag.base05}"
:secondary-color "${scheme.withHashtag.base03}"
:on-secondary-color "${scheme.withHashtag.base05}"
:accent-color "${scheme.withHashtag.base0D}"
:accent-color "${scheme.withHashtag.base0E}"
:on-accent-color "${scheme.withHashtag.base01}"
:action-color "${scheme.withHashtag.cyan}"
:on-action-color "${scheme.withHashtag.base01}"

View file

@ -7,9 +7,11 @@
./terminal/default.nix
./emacs/default.nix
./browser/default.nix
./zathura/default.nix
];
home.packages = with pkgs; [
wl-clipboard
remmina
webcord
signal-desktop
whatsapp-for-linux

View file

@ -277,10 +277,9 @@
"center, title:Library,class:firefox"
"pin, title:Picture-in-Picture,class:firefox"
# Thunar extra windows
"float, title:File Operation Progress,class:thunar"
"size 800 600, title:File Operation Progress,class:thunar"
"center, title:File Operation Progress,class:thunar"
# NautilusPreviewer (Sushi)
"float, class:org.gnome.NautilusPreviewer"
"center, class:org.gnome.NautilusPreviewer"
# LibreOffice
# "nofullscreenrequest, class:(libreoffice|soffice)(.*)"
@ -295,18 +294,11 @@
"float, title:Steam Settings,class:steam"
"size 800 600, title:Steam Settings,class:steam"
# X2Go / Remmina / NoMachine
# "nofullscreenrequest, class:x2goclient|org.remmina.Remmina|Nxplayer.bin"
# "nomaximizerequest, class:x2goclient|org.remmina.Remmina|Nxplayer.bin"
"float, title:(X2Go Client|Freia|Heimdall), class:x2goclient"
# Remmina / NoMachine
# "nofullscreenrequest, class:org.remmina.Remmina|Nxplayer.bin"
# "nomaximizerequest, class:org.remmina.Remmina|Nxplayer.bin"
"float, title:Remmina Remote Desktop Client, class:org.remmina.Remmina"
"float, title:(NoMachine)(.*), class:Nxplayer.bin"
"center, title:(X2Go Client|Freia|Heimdall), class:x2goclient"
"center, title:Remmina Remote Desktop Client, class:org.remmina.Remmina"
"center, title:(NoMachine)(.*), class:Nxplayer.bin"
"size 800 600, title:X2Go Client, class:x2goclient"
"size 1920 1080, title:Freia|Heimdall, class:x2goclient"
"size 1920 1080, title:(NoMachine)(.*), class:Nxplayer.bin"
];
bind =
let
@ -353,7 +345,7 @@
"SUPER, Return, exec, ${config.programs.alacritty.package}/bin/alacritty"
"SUPER SHIFT, Return, exec, ${config.programs.emacs.finalPackage}/bin/emacsclient -c"
"SUPER, W, exec, ${config.programs.firefox.package}/bin/firefox"
"SUPER, F, exec, ${pkgs.xfce.thunar}/bin/thunar"
"SUPER, F, exec, ${pkgs.gnome.nautilus}/bin/nautilus"
# fuzzel binds
"SUPER, Space, exec, ${config.programs.fuzzel.package}/bin/fuzzel"

View file

@ -3,6 +3,13 @@ let
browser = [ "firefox.desktop" ];
in
{
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
"inode/symlink" = [ "org.gnome.Nautilus.desktop" ];
"image/jpeg" = [ "swayimg.desktop" ];
"image/png" = [ "swayimg.desktop" ];
"video/mp4" = [ "mpv.desktop" ];
"text/plain" = emacs;
"text/richtext" = emacs;
"text/org" = emacs;
@ -34,14 +41,14 @@ in
"application/rss+xml" = emacs;
"application/xhtml+xml" = emacs;
"application/oxps" = emacs;
"application/zip" = [ "org.gnome.FileRoller.desktop" ];
"application/pdf" = [ "org.pwmt.zathura.desktop" ];
"application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
"application/msword" = [ "writer.desktop" ];
"application/x-shellscript" = emacs;
"application/x-docbook+xml" = emacs;
"application/x-yaml" = emacs;
"application/msword" = [ "writer.desktop" ];
"application/zip" = [ "xarchiver.desktop" ];
"application/x-archive" = [ "xarchiver.desktop" ];
"application/x-archive" = [ "org.gnome.FileRoller.desktop" ];
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;

View file

@ -65,12 +65,12 @@
"swappy" = "󰹑 swappy";
"(btm)" = " Resource Usage [$1]";
"(cava)" = "󰝚 Music Visualiser [$1]";
"(.*) - Thunar" = "󰝰 $1";
"Mozilla Firefox" = "󰈹 $1";
"(.*) Mozilla Firefox" = "󰈹 $1";
"Nyxt - (.*)" = "󰀹 $1";
"(.*) - Chromium" = "󰊯 $1";
"(Signal.*)" = "󰭹 $1";
"(WhatsApp for Linux.*)" = "󰖣 $1";
"((?:.*)WebCord.*)" = "󰙯 $1";
"(Cartridges.*)" = "󰊗 $1";
"([Ss]team.*)" = "󰓓 $1";
@ -79,8 +79,8 @@
"(.*)(?: *)PrusaSlicer G-code Viewer-(.*)" = "󰹛 $1 G-code Viewer ($2)";
"FreeCAD (.*)" = "󰻬 FreeCAD $1";
"(.*) - Blender.* " = "󰂫 $1";
"(X2Go Client)" = "󰢹 $1";
"(NoMachine|Nxplayer.bin) (.*)" = "󰢹 $1 $2";
"(Remmina Remote Desktop Client)" = "󰢹 $1";
"(NoMachine|Nxplayer.bin)(?: *)(.*)" = "󰢹 $1 $2";
};
};
mpris = {
@ -307,7 +307,7 @@
tooltip {
background: alpha(${scheme.base00}, ${alpha});
border: 1px solid ${scheme.base0D};
border: 1px solid ${scheme.base0E};
border-radius: 5px;
box-shadow: none;
}

View file

@ -0,0 +1,15 @@
{ ... }:
{
# TODO add emacs keybinds
programs.zathura = {
enable = true;
options = {
adjust-open = "best-fit";
database = "null";
dbus-service = true;
sandbox = "normal";
scroll-page-aware = true;
synctex = true;
};
};
}

View file

@ -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] <C-b> scroll left
map [normal] <C-n> scroll down
map [normal] <C-p> scroll up
map [normal] <C-f> scroll right
map [normal] <C-g> abort
map [insert] <C-g> abort
map [normal] <C-[> abort
map [normal] <A-\<> goto top
map [normal] <A-\>> goto bottom
map [normal] a adjust_window best-fit
map [normal] s adjust_window width
map [normal] F display_link
map [normal] <C-c> 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] <A-Right> navigate next
map [normal] <A-Left> navigate previous
map [normal] <PageDown> scroll full-down
map [normal] <PageUp> scroll full-up
map [normal] <C-P> print
map [normal] c recolor
map [normal] R reload
map [normal] v rotate rotate_cw
map [normal] V rotate rotate_ccw
map [normal] <Left> scroll left
map [normal] <Up> scroll up
map [normal] <Down> scroll down
map [normal] <Right> scroll right
map [normal] <A-a> scroll half-left
map [normal] <C-V> scroll half-down
map [normal] <A-V> scroll half-up
map [normal] <A-e> scroll half-right
map [normal] <C-a> scroll full-left
map [normal] <C-v> scroll full-down
map [normal] <Return> scroll full-down
map [normal] <A-v> scroll full-up
map [normal] <C-e> scroll full-right
map [normal] <Space> scroll full-down
map [normal] <C-h> scroll full-up
map [normal] <BackSpace> scroll full-up
map [normal] <S-Space> scroll full-up
map [normal] l jumplist backward
map [normal] r jumplist forward
map [normal] <A-r> bisect forward
map [normal] <A-l> bisect backward
# still need to use '/' to trigger search
map [normal] <C-s> search forward
map [normal] <C-r> search backward
map [normal] p snap_to_page
map [normal] <C-i> toggle_index
map [normal] i toggle_index
map [normal] <Tab> toggle_index
map [normal] <A-s> toggle_statusbar
map [normal] <A-i> 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] <A-P> toggle_presentation
map [normal] <A-F> toggle_fullscreen
map [normal] j toggle_fullscreen
map [fullscreen] j toggle_fullscreen
map [fullscreen] q toggle_fullscreen
map [fullscreen] <C-b> scroll left
map [fullscreen] <C-n> scroll down
map [fullscreen] <C-p> scroll up
map [fullscreen] <C-f> scroll right
map [fullscreen] <C-g> abort
map [fullscreen] <C-[> abort
map [fullscreen] <A-\<> goto top
map [fullscreen] <A-\>> goto bottom
map [fullscreen] a adjust_window best-fit
map [fullscreen] s adjust_window width
map [fullscreen] F display_link
map [fullscreen] <C-c> 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] <A-Right> navigate next
map [fullscreen] <A-Left> navigate previous
map [fullscreen] <PageDown> scroll full-down
map [fullscreen] <PageUp> scroll full-up
map [fullscreen] <C-P> print
map [fullscreen] c recolor
map [fullscreen] R reload
map [fullscreen] v rotate rotate_cw
map [fullscreen] V rotate rotate_ccw
map [fullscreen] <Left> scroll left
map [fullscreen] <Up> scroll up
map [fullscreen] <Down> scroll down
map [fullscreen] <Right> scroll right
map [fullscreen] <A-a> scroll half-left
map [fullscreen] <C-V> scroll half-down
map [fullscreen] <A-V> scroll half-up
map [fullscreen] <A-e> scroll half-right
map [fullscreen] <C-a> scroll full-left
map [fullscreen] <C-v> scroll full-down
map [fullscreen] <Return> scroll full-down
map [fullscreen] <A-v> scroll full-up
map [fullscreen] <C-e> scroll full-right
map [fullscreen] <Space> scroll full-down
map [fullscreen] <C-h> scroll full-up
map [fullscreen] <BackSpace> scroll full-up
map [fullscreen] <S-Space> scroll full-up
map [fullscreen] l jumplist backward
map [fullscreen] r jumplist forward
map [fullscreen] <A-r> bisect forward
map [fullscreen] <A-l> bisect backward
map [fullscreen] <C-s> search forward
map [fullscreen] <C-r> search backward
map [fullscreen] p snap_to_page
map [fullscreen] i toggle_index
map [fullscreen] <C-i> toggle_index
map [fullscreen] <Tab> toggle_index
map [fullscreen] <A-s> toggle_statusbar
map [fullscreen] <A-i> 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] <A-s> toggle_statusbar
map [index] q toggle_index
map [index] i toggle_index
map [index] <C-p> navigate_index up
map [index] <C-h> navigate_index up
map [index] <BackSpace> navigate_index up
map [index] <C-n> navigate_index down
map [index] <A-v> navigate_index up
map [index] <C-v> navigate_index down
map [index] \< navigate_index top
map [index] \> navigate_index bottom
map [index] <A-\<> navigate_index top
map [index] <A-\>> navigate_index bottom
map [index] <C-b> navigate_index collapse
map [index] <C-f> navigate_index expand
map [index] <C-i> navigate_index expand-all
map [index] <A-i> navigate_index collapse-all
map [index] <Up> navigate_index up
map [index] <Down> navigate_index down
map [index] <Left> navigate_index collapse
map [index] <Right> navigate_index expand
map [index] <C-m> navigate_index select
map [index] <Space> navigate_index select
map [index] <Return> navigate_index select
map [index] <C-j> navigate_index select
map [index] <Esc> toggle_index
map [index] <C-[> toggle_index
map [index] <C-g> toggle_index
map [index] <C-c> toggle_index
map [presentation] i toggle_index
map [presentation] r navigate next
map [presentation] <Down> navigate next
map [presentation] <Right> navigate next
map [presentation] <PageDown> navigate next
map [presentation] <Space> navigate next
map [presentation] l navigate previous
map [presentation] <Left> navigate previous
map [presentation] <Up> navigate previous
map [presentation] <PageUp> navigate previous
map [presentation] <S-Space> navigate previous
map [presentation] <BackSpace> navigate previous
map [presentation] <F5> toggle_presentation
map [presentation] q toggle_presentation
map [presentation] <C-h> navigate previous
map [presentation] <M-v> navigate previous
map [presentation] <C-v> navigate next
map [presentation] <A-\<> goto top
map [presentation] <A-\>> goto bottom