2
This commit is contained in:
136
minimal-niri-dotfiles/.config/Thunar/accels.scm
Normal file
136
minimal-niri-dotfiles/.config/Thunar/accels.scm
Normal file
@ -0,0 +1,136 @@
|
||||
; thunar GtkAccelMap rc-file -*- scheme -*-
|
||||
; this file is an automated accelerator map dump
|
||||
;
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-last-modified" "")
|
||||
; (gtk_accel_path "<Actions>/Thunarwindow/menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/cut" "<Primary>x")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-size" "")
|
||||
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1769427857102992-1" "<Primary><Shift>v")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/file-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/close-tab" "<Primary>w")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab-alt" "<Primary><Shift>ISO_Left_Tab")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/new-window" "<Primary>n")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/clear-directory-specific-settings" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/close-window" "<Primary>q")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-parent" "<Alt>Up")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-size-in-bytes" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/switch-previous-tab" "<Primary>Page_Up")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/43958e0ed33f21f69df101ad8063a653" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/open" "<Primary>o")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-ascending" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-split-view" "F3")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/copy-2" "<Primary>Insert")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete" "Delete")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-recent" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-configure-toolbar" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/forward" "<Alt>Right")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/restore" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-location-alt" "<Alt>d")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/select-by-pattern" "<Primary>s")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out-alt" "<Primary>KP_Subtract")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/contents" "F1")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-menu" "F10")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/54761b802eb6de69c74ff01588374999" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/show-highlight" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-descending" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-name" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/select-all-files" "<Primary>a")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/execute" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/properties" "<Alt>Return")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/cut-2" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-dtime" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-templates" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/paste-2" "<Shift>Insert")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab" "<Primary>Page_Down")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-filetype" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/close-all-windows" "<Primary><Shift>w")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/create-document" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/detach-tab" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/cancel-search" "Escape")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt2" "<Primary>equal")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-hidden-count" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarShortcutsPane/sendto-shortcuts" "<Primary>d")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/undo" "<Primary>z")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-entry" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/toggle-sort-order" "")
|
||||
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1769429285959977-2" "<Primary><Alt>v")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/974ddf6f60ae0a85b557432c4c4f2cd9" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/paste" "<Primary>v")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in-alt1" "<Primary>KP_Add")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-menubar" "<Primary>m")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/restore-show" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-desktop" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-detailed-list" "<Primary>2")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/back" "<Alt>Left")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-out" "<Primary>minus")
|
||||
; (gtk_accel_path "<Actions>/ThunarStatusBar/toggle-display-name" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/sendto-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/go-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/remove-from-recent" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/cfa69549cdb5c4c993b09b04df44c6b4" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/open-with-other" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/invert-selection" "<Primary><Shift>i")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-shortcuts" "<Primary>b")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/cab0112e8c7d4b26ba7cf8d0f8b46cc6" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-2" "Reload")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/edit-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/copy" "<Primary>c")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/sort-by-mtime" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/forward-alt" "Forward")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/move-to-trash" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/reload-alt-1" "F5")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-3" "<Shift>KP_Delete")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/unselect-all-files" "Escape")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/arrange-items-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/bookmarks-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/reload" "<Primary>r")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-computer" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-image-preview" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/toggle-side-pane" "F9")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-icons" "<Primary>1")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/delete-2" "<Shift>Delete")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-in" "<Primary>plus")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/rename" "F2")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-location" "<Primary>l")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-as-compact-list" "<Primary>3")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/search" "<Primary>f")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/new-tab" "<Primary>t")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset" "<Primary>0")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/contents/help-menu" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-tab" "<Primary><Shift>p")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-location-selector-buttons" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt2" "Back")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/redo" "<Primary><Shift>z")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-trash" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/open-in-new-window" "<Primary><Shift>o")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-statusbar" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/open-location" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/duplicate" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/trash-delete-2" "KP_Delete")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/back-alt1" "BackSpace")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/8b904a8394ac05541f9a6e2192949ce2" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarBookmarks/88b2652848ed389ddc7f23513e177f1d" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/create-folder" "<Primary><Shift>n")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-home" "<Alt>Home")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/switch-focused-split-view-pane" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/show-hidden" "<Primary>h")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/set-default-app" "")
|
||||
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1763109685799433-1" "<Alt>t")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/empty-trash" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/preferences" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/delete" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-network" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/view-side-pane-tree" "<Primary>e")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/open-file-system" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/search-alt" "Search")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/switch-next-tab-alt" "<Primary>Tab")
|
||||
; (gtk_accel_path "<Actions>/ThunarActionManager/sendto-desktop" "")
|
||||
; (gtk_accel_path "<Actions>/ThunarStandardView/make-link" "")
|
||||
(gtk_accel_path "<Actions>/ThunarActions/uca-action-1770297188807065-1" "<Primary>space")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/zoom-reset-alt" "<Primary>KP_0")
|
||||
; (gtk_accel_path "<Actions>/ThunarWindow/about" "")
|
||||
123
minimal-niri-dotfiles/.config/Thunar/uca.xml
Normal file
123
minimal-niri-dotfiles/.config/Thunar/uca.xml
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actions>
|
||||
<action>
|
||||
<icon>utilities-terminal</icon>
|
||||
<name>Open Terminal Here</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1763109685799433-1</unique-id>
|
||||
<command>kitty -e fish</command>
|
||||
<description>Example for a custom action</description>
|
||||
<range></range>
|
||||
<patterns>*</patterns>
|
||||
<startup-notify/>
|
||||
<directories/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>多媒体信息</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1769424941490550-1</unique-id>
|
||||
<command>kitty --class "media_info" -e media-info %f </command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<audio-files/>
|
||||
<video-files/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>粘贴为链接</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1769427857102992-1</unique-id>
|
||||
<command>sh -c 'wl-paste -t text/uri-list | python3 -c "
|
||||
import sys, os, urllib.parse
|
||||
dest_dir = sys.argv[1]
|
||||
|
||||
# 逐行读取剪贴板里的文件
|
||||
for line in sys.stdin:
|
||||
# 1. 清理路径:解码URL并去掉 file:// 前缀
|
||||
src = urllib.parse.unquote(line.strip()).replace(\"file://\", \"\")
|
||||
|
||||
# 2. 基础检查
|
||||
if not src or not os.path.exists(src): continue
|
||||
|
||||
# 3. 计算目标文件名
|
||||
filename = os.path.basename(src)
|
||||
target = os.path.join(dest_dir, filename)
|
||||
|
||||
# 4. 重名检测循环:如果有同名文件,变成 \"文件名 (1).后缀\"
|
||||
root, ext = os.path.splitext(filename)
|
||||
counter = 1
|
||||
while os.path.exists(target):
|
||||
target = os.path.join(dest_dir, f\"{root} ({counter}){ext}\")
|
||||
counter += 1
|
||||
|
||||
# 5. 创建链接
|
||||
try: os.symlink(src, target)
|
||||
except: pass
|
||||
" %f'</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<directories/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>粘贴剪贴板图片</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1769429285959977-2</unique-id>
|
||||
<command>bash -c 'd="%f";[ -d "$d" ]||d="$(dirname "$d")";cd "$d"||exit;n="img_$(date -Iseconds|cut -d+ -f1|tr T _|tr : -)";t=$(wl-paste -l);if echo "$t"|grep -q "^image/";then wl-paste -t image/png>"$n.png";elif echo "$t"|grep -q "text/uri-list";then u=$(wl-paste -t text/uri-list|head -n1);if [[ "$u" == file://* ]];then p="${u#file://}";f=$(python3 -c "import sys,urllib.parse;print(urllib.parse.unquote(sys.argv[1]))" "$p");[ -f "$f" ]&&cp "$f" "$n.${f##*.}";fi;fi'</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<directories/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>视频转gif</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1769514623477685-1</unique-id>
|
||||
<command>kitty --class="floating-term" -e video2gif %F</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<video-files/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>图片转png</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1769516013413116-2</unique-id>
|
||||
<command>bash -c 'exec 1>>/tmp/img_err.log 2>&1; /usr/bin/notify-send "图片转换" "正在后台处理 $# 张图片..."; for f in "$@"; do /usr/bin/magick -background none "$f" -delete 1--1 "$(echo "$f" | sed "s/\.[^.]*$//").png"; done; /usr/bin/notify-send "图片转换" "处理完成"' -- %F</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<image-files/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>压缩视频大小</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1770021157399945-1</unique-id>
|
||||
<command>kitty --class floating-term bash -c 'f="$1"; out="$(echo "$f" | sed "s/\.[^.]*$//")_compressed.mp4"; echo "正在处理: $f"; if ffmpeg -i "$f" -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 26 -preset slow -c:a aac -b:a 128k -pix_fmt yuv420p "$out"; then echo -e "\n✅ 压缩完成!文件已保存为: $out"; else echo -e "\n❌ 压缩失败,请查看上方报错信息。"; fi; read -n 1 -s -r -p "按任意键退出..."' -- %f</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<video-files/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>快速查看</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1770297188807065-1</unique-id>
|
||||
<command>kitty --class="floating-term" -e bash -c "~/.local/bin/preview \"\$1\"; read -n 1 -s -r" -- %f</command>
|
||||
<description></description>
|
||||
<range>*</range>
|
||||
<patterns>*</patterns>
|
||||
<directories/>
|
||||
<audio-files/>
|
||||
<image-files/>
|
||||
<text-files/>
|
||||
<video-files/>
|
||||
</action>
|
||||
</actions>
|
||||
Reference in New Issue
Block a user