From 3a685df8128c7d8393e736efd8d7bb25a2507f0f Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Sun, 23 Feb 2025 18:55:37 +0100 Subject: [PATCH] Added yazi as base file manager --- .config/hypr/config/Keybinds.conf | 2 +- .config/hypr/config/WindowRules.conf | 4 ++++ .config/yadm/bootstrap.d/30-Yazi.sh | 3 +++ .config/yazi/keymap.toml | 9 +++++++++ .local/share/applications/yazi.desktop | 8 ++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 .config/yadm/bootstrap.d/30-Yazi.sh create mode 100644 .config/yazi/keymap.toml create mode 100644 .local/share/applications/yazi.desktop diff --git a/.config/hypr/config/Keybinds.conf b/.config/hypr/config/Keybinds.conf index baf7aba..6d194bd 100644 --- a/.config/hypr/config/Keybinds.conf +++ b/.config/hypr/config/Keybinds.conf @@ -98,7 +98,7 @@ bind = $mainMod, F, fullscreen, 1 bind = $mainMod SHIFT, F, fullscreen, 0 $mainMod = SUPER -$files = thunar +$files = gtk-launch yazi $term = ghostty $scriptsDir = $HOME/.config/hypr/scripts diff --git a/.config/hypr/config/WindowRules.conf b/.config/hypr/config/WindowRules.conf index 5dde0d8..8b66b1d 100644 --- a/.config/hypr/config/WindowRules.conf +++ b/.config/hypr/config/WindowRules.conf @@ -19,6 +19,7 @@ windowrulev2 = center, title:^(ROG Control)$ windowrulev2 = center, title:^(Keybindings)$ windowrulev2 = move 72% 7%,title:^(Picture-in-Picture)$ #windowrulev2 = move 72% 7%,title:^(Firefox)$ +windowrulev2 = move cursor -50% -50%, class:blobdrop # windowrule v2 to avoid idle for fullscreen apps windowrulev2 = idleinhibit fullscreen, class:^(*)$ @@ -78,6 +79,7 @@ windowrulev2 = float, title:^(hyprgui)$ windowrulev2 = float, class:^(io.ente.auth)$ windowrulev2 = float, class:^(org.rncbc.qjackctl)$ windowrulev2 = float, class:^(blobdrop)$ +windowrulev2 = float, title:Yazi-STANDALONE # windowrule v2 - size windowrulev2 = size 70% 70%, class:^(gnome-system-monitor|org.gnome.SystemMonitor|io.missioncenter.MissionCenter)$ @@ -94,10 +96,12 @@ windowrulev2 = size 60% 70%, title:^(ROG Control)$ windowrulev2 = size 60% 70%, title:^(hyprgui)$ windowrulev2 = size 240px 450px, class:^(libresplit)$ windowrulev2 = size 500px 1000px, class:^(io.ente.auth)$ +windowrulev2 = size 60% 70%, title:Yazi-STANDALONE # windowrule v2 - pinning windowrulev2 = pin,title:^(Picture-in-Picture)$ windowrulev2 = pin,class: ^(io.ente.auth)$ +windowrulev2 = pin,class:blobdrop #windowrulev2 = pin,title:^(Firefox)$ diff --git a/.config/yadm/bootstrap.d/30-Yazi.sh b/.config/yadm/bootstrap.d/30-Yazi.sh new file mode 100755 index 0000000..83f13eb --- /dev/null +++ b/.config/yadm/bootstrap.d/30-Yazi.sh @@ -0,0 +1,3 @@ +#!/bin/env sh + +yay -S --needed yazi p7zip jq poppler fd ripgrep fzf zoxide imagemagick diff --git a/.config/yazi/keymap.toml b/.config/yazi/keymap.toml new file mode 100644 index 0000000..d7bd4a1 --- /dev/null +++ b/.config/yazi/keymap.toml @@ -0,0 +1,9 @@ +[manager] +prepend_keymap = [ + { on = "", desc = "Move to the tab on the left", run = "tab_switch 1 --relative" }, + { on = "", desc = "Move to the tab on the right", run = "tab_switch -1 --relative" }, + { on = ["", 'z'], desc = "Zip the selected files", run = "shell '7z a .zip \"$@\"' --interactive --cursor=5"} +] +append_keymap = [ + { on = ['c', 'v'], desc = "Drag selected files", run = "shell 'blobdrop -b \"$@\"'" }, +] diff --git a/.local/share/applications/yazi.desktop b/.local/share/applications/yazi.desktop new file mode 100644 index 0000000..9adb081 --- /dev/null +++ b/.local/share/applications/yazi.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Yazi File Manager +Comment=File Manager +Exec=ghostty --working-directory="~/" --title="Yazi-STANDALONE" -e yazi +Categories=Notes;DSA; +Icon=/usr/share/icons/Gruvbox-Material-Dark/128x128/apps/system-file-manager.svg +