mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(gwenview): gwenviewrc partial override and keymaps
This commit is contained in:
parent
f818ffb1bc
commit
94d176692c
9 changed files with 189 additions and 18 deletions
|
|
@ -62,7 +62,8 @@ vim:ft=gotmpl
|
||||||
.config/krunnerrc
|
.config/krunnerrc
|
||||||
.config/fcitx5
|
.config/fcitx5
|
||||||
.config/niri
|
.config/niri
|
||||||
.local/share/**
|
.local/share/kio/**
|
||||||
|
.local/share/fonts/**
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* Linux */}}
|
{{/* Linux */}}
|
||||||
|
|
|
||||||
119
home/dot_local/share/kxmlgui5/gwenview/gwenviewui.rc
Normal file
119
home/dot_local/share/kxmlgui5/gwenview/gwenviewui.rc
Normal file
|
|
@ -0,0 +1,119 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!DOCTYPE gui SYSTEM 'kpartgui.dtd'>
|
||||||
|
<gui name="gwenview" version="70">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="file">
|
||||||
|
<Action name="file_save"/>
|
||||||
|
<Action name="file_save_as"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="reload"/>
|
||||||
|
<Action name="file_print"/>
|
||||||
|
<Action name="file_print_preview"/>
|
||||||
|
<Separator/>
|
||||||
|
<ActionList name="file_action_list"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="add_folder_to_places"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="quit"/>
|
||||||
|
</Menu>
|
||||||
|
<Menu name="view">
|
||||||
|
<Action name="browse"/>
|
||||||
|
<Action name="view"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="view_toggle_spotlightmode"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="fullscreen"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="toggle_slideshow"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="view_actual_size"/>
|
||||||
|
<Action name="view_zoom_to_fit"/>
|
||||||
|
<Action name="view_zoom_in"/>
|
||||||
|
<Action name="view_zoom_out"/>
|
||||||
|
<Action name="view_toggle_birdeyeview"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="view_background_colormode_auto"/>
|
||||||
|
<Action name="view_background_colormode_light"/>
|
||||||
|
<Action name="view_background_colormode_neutral"/>
|
||||||
|
<Action name="view_background_colormode_dark"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="sort_by"/>
|
||||||
|
<Action name="thumbnail_details"/>
|
||||||
|
<Action name="view_toggle_showhiddenfiles"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="toggle_sidebar"/>
|
||||||
|
</Menu>
|
||||||
|
<Menu name="edit">
|
||||||
|
<Action name="edit_undo"/>
|
||||||
|
<Action name="edit_redo"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="edit_cut"/>
|
||||||
|
<Action name="edit_copy"/>
|
||||||
|
<Action name="edit_paste"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="edit_tags"/>
|
||||||
|
<Menu name="rating">
|
||||||
|
<text>&Rating</text>
|
||||||
|
<Action name="rate_0"/>
|
||||||
|
<Action name="rate_1"/>
|
||||||
|
<Action name="rate_2"/>
|
||||||
|
<Action name="rate_3"/>
|
||||||
|
<Action name="rate_4"/>
|
||||||
|
<Action name="rate_5"/>
|
||||||
|
</Menu>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="rotate_left"/>
|
||||||
|
<Action name="rotate_right"/>
|
||||||
|
<Action name="mirror"/>
|
||||||
|
<Action name="flip"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="resize"/>
|
||||||
|
<Action name="crop"/>
|
||||||
|
<Action name="brightness_contrast_gamma"/>
|
||||||
|
<Action name="red_eye_reduction"/>
|
||||||
|
<Action name="annotate"/>
|
||||||
|
</Menu>
|
||||||
|
<Menu name="go">
|
||||||
|
<Action name="go_first"/>
|
||||||
|
<Action name="go_previous"/>
|
||||||
|
<Action name="go_next"/>
|
||||||
|
<Action name="go_last"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="go_up"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="go_start_page"/>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
<ToolBar name="mainToolBar" noMerge="1">
|
||||||
|
<text>Main Toolbar</text>
|
||||||
|
<Action name="go_start_page"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="browse"/>
|
||||||
|
<Action name="view"/>
|
||||||
|
<Action name="align_with_sidebar"/>
|
||||||
|
<Separator/>
|
||||||
|
<Action name="go_previous"/>
|
||||||
|
<Action name="go_next"/>
|
||||||
|
<Action name="toggle_operations_sidebar"/>
|
||||||
|
<Action name="share"/>
|
||||||
|
<Spacer/>
|
||||||
|
<Action name="fullscreen"/>
|
||||||
|
<Action name="hamburger_menu"/>
|
||||||
|
</ToolBar>
|
||||||
|
<ActionProperties scheme="Default">
|
||||||
|
<Action name="fullscreen" priority="0"/>
|
||||||
|
<Action name="go_next" shortcut="]; N"/>
|
||||||
|
<Action name="edit_cut" shortcut="Ctrl+X"/>
|
||||||
|
<Action name="go_previous" shortcut="[; P"/>
|
||||||
|
<Action name="file_quit" shortcut="Ctrl+Q; Q"/>
|
||||||
|
<Action name="view_zoom_to_fit" shortcut="Z"/>
|
||||||
|
<Action name="toggle_thumbnailbar" shortcut="Ctrl+B; T"/>
|
||||||
|
<Action name="open_kcommand_bar" shortcut="Ctrl+Alt+I; Ctrl+Shift+P"/>
|
||||||
|
<Action name="view" shortcut="V; Space"/>
|
||||||
|
<Action name="toggle_operations_sidebar" shortcut="E"/>
|
||||||
|
<Action name="view_toggle_spotlightmode" shortcut="O"/>
|
||||||
|
<Action name="view_zoom_in" shortcut="=; Ctrl+="/>
|
||||||
|
<Action name="view_zoom_out" shortcut="Ctrl+-; -"/>
|
||||||
|
</ActionProperties>
|
||||||
|
</gui>
|
||||||
|
<!-- vim:ft=xml -->
|
||||||
|
|
@ -17,10 +17,6 @@ in {
|
||||||
then "/Users/${username}"
|
then "/Users/${username}"
|
||||||
else "/home/${username}";
|
else "/home/${username}";
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
home-manager
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
home.sessionVariables.TERMINAL = config.currentUser.defaultTerminal;
|
home.sessionVariables.TERMINAL = config.currentUser.defaultTerminal;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
sioyek
|
sioyek
|
||||||
|
|
||||||
# Image Viewer
|
# Image Viewer
|
||||||
vimiv-qt # Default
|
|
||||||
loupe # SUPER FAST 有催人跑的感觉 w/ GPU Accel.
|
loupe # SUPER FAST 有催人跑的感觉 w/ GPU Accel.
|
||||||
|
|
||||||
kdePackages.elisa
|
kdePackages.elisa
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
../gwenview.nix
|
||||||
|
];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# kdePackages.yakuake
|
# kdePackages.yakuake
|
||||||
krunner-vscodeprojects
|
krunner-vscodeprojects
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,20 @@
|
||||||
];
|
];
|
||||||
open-focused = false;
|
open-focused = false;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{
|
||||||
|
app-id = "^org.kde.(ark|dolphin)$";
|
||||||
|
title = "^Extracting";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
open-focused = false;
|
||||||
|
default-floating-position = {
|
||||||
|
x = 50;
|
||||||
|
y = 50;
|
||||||
|
relative-to = "top-right";
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
matches = [
|
matches = [
|
||||||
# Anki add new flashcard
|
# Anki add new flashcard
|
||||||
|
|
@ -58,6 +72,10 @@
|
||||||
app-id = "^QQ$";
|
app-id = "^QQ$";
|
||||||
title = "^图片查看器$";
|
title = "^图片查看器$";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
app-id = "^QQ$";
|
||||||
|
title = "^群聊的聊天记录$";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
app-id = "^org.telegram.desktop$";
|
app-id = "^org.telegram.desktop$";
|
||||||
title = "^Media viewer$";
|
title = "^Media viewer$";
|
||||||
|
|
|
||||||
29
nixcfgs/users/js0ny/programs/gwenview.nix
Normal file
29
nixcfgs/users/js0ny/programs/gwenview.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = with pkgs.kdePackages; [
|
||||||
|
gwenview
|
||||||
|
];
|
||||||
|
xdg.configFile."gwenviewrc-override".text = lib.generators.toINI {} {
|
||||||
|
ImageView = {
|
||||||
|
AnimationMethod = "DocumentView::NoAnimation";
|
||||||
|
MouseWheelBehavior = "MouseWheelBehavior::Browse";
|
||||||
|
NavigationEndNotification = "NavigationEndNotification::AlwaysWarn";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Manually merge gwenview config to existing file
|
||||||
|
home.activation.mergeGwenviewrc = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
if [ -f ~/.config/gwenviewrc-override ]; then
|
||||||
|
# Create gwenviewrc if it doesn't exist
|
||||||
|
touch ~/.config/gwenviewrc
|
||||||
|
|
||||||
|
# Merge the override file into the main config
|
||||||
|
${pkgs.crudini}/bin/crudini --merge ~/.config/gwenviewrc < ~/.config/gwenviewrc-override
|
||||||
|
|
||||||
|
$DRY_RUN_CMD rm -f ~/.config/gwenviewrc-override
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{...}: let
|
||||||
|
gvim = "nvim-qt.desktop";
|
||||||
|
in {
|
||||||
xdg.configFile."mimeapps.list".force = true;
|
xdg.configFile."mimeapps.list".force = true;
|
||||||
xdg.mime.enable = true;
|
xdg.mime.enable = true;
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
|
|
@ -8,20 +10,24 @@
|
||||||
# PDF
|
# PDF
|
||||||
"application/pdf" = "org.kde.okular.desktop";
|
"application/pdf" = "org.kde.okular.desktop";
|
||||||
# Plain text
|
# Plain text
|
||||||
"text/plain" = "nvim-qt.desktop";
|
"text/plain" = gvim;
|
||||||
# Source Code - C
|
# Source Code - C
|
||||||
"text/x-csrc" = "nvim-qt.desktop";
|
"text/x-csrc" = gvim; # .c
|
||||||
"text/x-chdr" = "nvim-qt.desktop";
|
"text/x-chdr" = gvim; # .h
|
||||||
|
# CSV
|
||||||
|
"text/csv" = gvim;
|
||||||
# File Explorer
|
# File Explorer
|
||||||
"inode/directory" = "org.kde.dolphin.desktop";
|
"inode/directory" = "org.kde.dolphin.desktop";
|
||||||
# Image Viewer
|
# Image Viewer:
|
||||||
|
# gwenview: keyboard driven, high compatibility
|
||||||
# loupe: Performance is incredible
|
# loupe: Performance is incredible
|
||||||
"image/jpeg" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/jpeg" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
"image/jpg" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/jpg" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
"image/png" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/png" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
"image/gif" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/gif" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
"image/bmp" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/bmp" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
"image/webp" = "vimiv.desktop;org.gnome.Loupe.desktop";
|
"image/avif" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
|
"image/webp" = "org.kde.gwenview.desktop;org.gnome.Loupe.desktop";
|
||||||
|
|
||||||
# Audio:
|
# Audio:
|
||||||
# music: elisa: fully featured, good cjk support
|
# music: elisa: fully featured, good cjk support
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
fishInit = builtins.concatStringsSep "\n" (
|
fishInit = builtins.concatStringsSep "\n" (
|
||||||
lib.mapAttrsToList (name: path: ''
|
lib.mapAttrsToList (name: path: ''
|
||||||
if test -r ${path}
|
if test -r ${path}
|
||||||
set -gx ${name} (< ${path})
|
set -gx "${name}" (cat "${path}")
|
||||||
end
|
end
|
||||||
'')
|
'')
|
||||||
secretPaths
|
secretPaths
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue