diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf index 0f03a2b..712d20e 100644 --- a/aerc/.config/aerc/aerc.conf +++ b/aerc/.config/aerc/aerc.conf @@ -98,7 +98,8 @@ index-format=notmuch://~/.local/share/mail #index-columns=flags:4,name<20%,subject,date>= border-char-vertical="│" border-char-horizontal="─" -styleset-name=catppuccin-mocha +# styleset-name=catppuccin-mocha +styleset-name=rose-pine # # Each name in index-columns must have a corresponding column-$name setting. diff --git a/aerc/.config/aerc/stylesets/rose-pine b/aerc/.config/aerc/stylesets/rose-pine new file mode 100644 index 0000000..3007a45 --- /dev/null +++ b/aerc/.config/aerc/stylesets/rose-pine @@ -0,0 +1,85 @@ +# vim: filetype=dosini + +# Rosé Pine Theme for Aerc +# All natural pine, faux fur and a bit of soho vibes for the classy minimalist +# Save as ~/.config/aerc/stylesets/rose-pine + +# Base styling +default.fg=#9ccfd8 +default.bg=#191724 + +success.fg=#31748f +error.fg=#eb6f92 +warning.fg=#f6c177 + +title.bg=#26233a +title.fg=#c4a7e7 + +header.fg=#c4a7e7 + +spinner.fg=#6e6a86 + +part_filename.fg=#f6c177 +part_mimetype.fg=#c4a7e7 + +# Global selection +*.selected.fg=#191724 +*.selected.bg=#ebbcba +*.selected.bold=true + +# Message list +msglist_default.fg=#9ccfd8 +msglist_default.bg=#1f1d2e +msglist_unread.fg=#524f67 +msglist_unread.bold=true +msglist_read.fg=#6e6a86 +msglist_flagged.fg=#f6c177 +msglist_flagged.bold=true +msglist_deleted.bg=#eb6f92 +msglist_deleted.fg=#191724 +msglist_deleted.bold=true +msglist_marked.fg=#191724 +msglist_marked.bg=#31748f +msglist_marked.bold=true + +# Status bar +statusline_*.bold=true +statusline_*.fg=#191724 +statusline_default.fg=#9ccfd8 +statusline_default.bg=#191724 +statusline_error.bg=#eb6f92 +statusline_success.bg=#31748f + +# Completion +completion_default.fg=#9ccfd8 +completion_default.bg=#1f1d2e +completion_gutter.bg=#26233a +completion_description.bg=#26233a + +# Scrollbars +*_pill.fg=#191724 +*_pill.bg=#6e6a86 + +# Border +border.fg=#191724 +border.bg=#191724 + +# Tab +tab.bg=#191724 +tab.selected.fg=#ebbcba +tab.selected.bg=#191724 +tab.selected.bold=true + +[viewer] +url.fg=#c4a7e7 +url.underline=true +header.bold=true +signature.dim=true +diff_meta.bold=true +diff_chunk.fg=#c4a7e7 +diff_chunk_func.fg=#c4a7e7 +diff_chunk_func.bold=true +diff_add.fg=#524f67 +diff_del.fg=#eb6f92 +quote_*.fg=#908caa +quote_1.fg=#21202e diff --git a/aerc/.config/aerc/stylesets/catppuccin-mocha b/aerc/.config/aerc/themes/catppuccin-mocha similarity index 100% rename from aerc/.config/aerc/stylesets/catppuccin-mocha rename to aerc/.config/aerc/themes/catppuccin-mocha diff --git a/aerc/.config/aerc/themes/rose-pine b/aerc/.config/aerc/themes/rose-pine new file mode 100644 index 0000000..3007a45 --- /dev/null +++ b/aerc/.config/aerc/themes/rose-pine @@ -0,0 +1,85 @@ +# vim: filetype=dosini + +# Rosé Pine Theme for Aerc +# All natural pine, faux fur and a bit of soho vibes for the classy minimalist +# Save as ~/.config/aerc/stylesets/rose-pine + +# Base styling +default.fg=#9ccfd8 +default.bg=#191724 + +success.fg=#31748f +error.fg=#eb6f92 +warning.fg=#f6c177 + +title.bg=#26233a +title.fg=#c4a7e7 + +header.fg=#c4a7e7 + +spinner.fg=#6e6a86 + +part_filename.fg=#f6c177 +part_mimetype.fg=#c4a7e7 + +# Global selection +*.selected.fg=#191724 +*.selected.bg=#ebbcba +*.selected.bold=true + +# Message list +msglist_default.fg=#9ccfd8 +msglist_default.bg=#1f1d2e +msglist_unread.fg=#524f67 +msglist_unread.bold=true +msglist_read.fg=#6e6a86 +msglist_flagged.fg=#f6c177 +msglist_flagged.bold=true +msglist_deleted.bg=#eb6f92 +msglist_deleted.fg=#191724 +msglist_deleted.bold=true +msglist_marked.fg=#191724 +msglist_marked.bg=#31748f +msglist_marked.bold=true + +# Status bar +statusline_*.bold=true +statusline_*.fg=#191724 +statusline_default.fg=#9ccfd8 +statusline_default.bg=#191724 +statusline_error.bg=#eb6f92 +statusline_success.bg=#31748f + +# Completion +completion_default.fg=#9ccfd8 +completion_default.bg=#1f1d2e +completion_gutter.bg=#26233a +completion_description.bg=#26233a + +# Scrollbars +*_pill.fg=#191724 +*_pill.bg=#6e6a86 + +# Border +border.fg=#191724 +border.bg=#191724 + +# Tab +tab.bg=#191724 +tab.selected.fg=#ebbcba +tab.selected.bg=#191724 +tab.selected.bold=true + +[viewer] +url.fg=#c4a7e7 +url.underline=true +header.bold=true +signature.dim=true +diff_meta.bold=true +diff_chunk.fg=#c4a7e7 +diff_chunk_func.fg=#c4a7e7 +diff_chunk_func.bold=true +diff_add.fg=#524f67 +diff_del.fg=#eb6f92 +quote_*.fg=#908caa +quote_1.fg=#21202e diff --git a/backgrounds/.config/backgrounds/breathwork.jpg b/backgrounds/.config/backgrounds/breathwork.jpg new file mode 100644 index 0000000..93ae508 Binary files /dev/null and b/backgrounds/.config/backgrounds/breathwork.jpg differ diff --git a/backgrounds/.config/backgrounds/scene.jpg b/backgrounds/.config/backgrounds/scene.jpg new file mode 100644 index 0000000..07f190b Binary files /dev/null and b/backgrounds/.config/backgrounds/scene.jpg differ diff --git a/backgrounds/.config/backgrounds/sight.jpg b/backgrounds/.config/backgrounds/sight.jpg new file mode 100644 index 0000000..548bffc Binary files /dev/null and b/backgrounds/.config/backgrounds/sight.jpg differ diff --git a/backgrounds/.config/backgrounds/spirit.jpg b/backgrounds/.config/backgrounds/spirit.jpg new file mode 100644 index 0000000..7d8524f Binary files /dev/null and b/backgrounds/.config/backgrounds/spirit.jpg differ diff --git a/hypr/.config/hypr/hyprlock.conf b/hypr/.config/hypr/hyprlock.conf index 51a5ed7..87b82ed 100644 --- a/hypr/.config/hypr/hyprlock.conf +++ b/hypr/.config/hypr/hyprlock.conf @@ -1,4 +1,4 @@ -source = /home/liph/.config/hypr/niri_mocha.conf +source = /home/liph/.config/hypr/mocha.conf $accent = $mauve $accentAlpha = $mauveAlpha diff --git a/kitty/.config/kitty/current-theme.conf b/kitty/.config/kitty/current-theme.conf index 77800ed..4d4de88 100644 --- a/kitty/.config/kitty/current-theme.conf +++ b/kitty/.config/kitty/current-theme.conf @@ -1,80 +1,56 @@ -# vim:ft=kitty +## name: Rosé Pine Moon +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist -## name: Catppuccin-Mocha -## author: Pocco81 (https://github.com/Pocco81) -## license: MIT -## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf -## blurb: Soothing pastel theme for the high-spirited! +foreground #e0def4 +background #232136 +selection_foreground #e0def4 +selection_background #44415a -window_padding_width 5 10 +cursor #56526e +cursor_text_color #e0def4 -# The basic colors -foreground #CDD6F4 -background #1E1E2E -selection_foreground #1E1E2E -selection_background #F5E0DC +url_color #c4a7e7 -# Cursor colors -cursor #F5E0DC -cursor_text_color #1E1E2E +active_tab_foreground #e0def4 +active_tab_background #393552 +inactive_tab_foreground #6e6a86 +inactive_tab_background #232136 -# URL underline color when hovering with mouse -url_color #F5E0DC - -# Kitty window border colors -active_border_color #B4BEFE -inactive_border_color #6C7086 -bell_border_color #F9E2AF - -# OS Window titlebar colors -wayland_titlebar_color system -macos_titlebar_color system - -# Tab bar colors -active_tab_foreground #11111B -active_tab_background #CBA6F7 -inactive_tab_foreground #CDD6F4 -inactive_tab_background #181825 -tab_bar_background #11111B - -# Colors for marks (marked text in the terminal) -mark1_foreground #1E1E2E -mark1_background #B4BEFE -mark2_foreground #1E1E2E -mark2_background #CBA6F7 -mark3_foreground #1E1E2E -mark3_background #74C7EC - -# The 16 terminal colors +active_border_color #3e8fb0 +inactive_border_color #44415a # black -color0 #45475A -color8 #585B70 +color0 #393552 +color8 #6e6a86 # red -color1 #F38BA8 -color9 #F38BA8 +color1 #eb6f92 +color9 #eb6f92 # green -color2 #A6E3A1 -color10 #A6E3A1 +color2 #3e8fb0 +color10 #3e8fb0 # yellow -color3 #F9E2AF -color11 #F9E2AF +color3 #f6c177 +color11 #f6c177 # blue -color4 #89B4FA -color12 #89B4FA +color4 #9ccfd8 +color12 #9ccfd8 # magenta -color5 #F5C2E7 -color13 #F5C2E7 +color5 #c4a7e7 +color13 #c4a7e7 # cyan -color6 #94E2D5 -color14 #94E2D5 +color6 #ea9a97 +color14 #ea9a97 # white -color7 #BAC2DE -color15 #A6ADC8 +color7 #e0def4 +color15 #e0def4 + diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index fd5bcde..ac36485 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -1,5 +1,5 @@ # BEGIN_KITTY_THEME -# Catppuccin-Mocha +# Rosé Pine Moon include current-theme.conf # END_KITTY_THEME # @@ -11,11 +11,12 @@ bold_italic_font JetBrainsMono Nerd Font Bold Italic font_size 12 -background_opacity 0.90 +# background_opacity 0.95 term xterm-256color -allow_hyperlinks yes +# allow_hyperlinks yes + +# copy_on_select yes +# paste_actions confirm-if-large -copy_on_select yes -paste_actions confirm-if-large diff --git a/kitty/.config/kitty/kitty.conf.bak b/kitty/.config/kitty/kitty.conf.bak new file mode 100644 index 0000000..4bd6cc0 --- /dev/null +++ b/kitty/.config/kitty/kitty.conf.bak @@ -0,0 +1,22 @@ +# BEGIN_KITTY_THEME +# Dracula +include current-theme.conf +# END_KITTY_THEME +# + +font_family JetBrainsMono Nerd Font +bold_font JetBrainsMono Nerd Font Bold +italic_font JetBrainsMono Nerd Font Italic +bold_italic_font JetBrainsMono Nerd Font Bold Italic + +font_size 12 + +# background_opacity 0.95 + +term xterm-256color + +# allow_hyperlinks yes + +# copy_on_select yes +# paste_actions confirm-if-large + diff --git a/kitty/.config/kitty/themes/carbonfox.conf b/kitty/.config/kitty/themes/carbonfox.conf new file mode 100644 index 0000000..e89c8fa --- /dev/null +++ b/kitty/.config/kitty/themes/carbonfox.conf @@ -0,0 +1,104 @@ +# vim:ft=kitty +## name: Carbonfox +## author: EdenEast +## license: MIT +## upstream: https://github.com/EdenEast/nightfox.nvim/blob/main/extra/carbonfox/kitty.conf +## blurb: Carbonfox theme from the neovim colorscheme nightfox.nvim. + +#: All the settings below are colors, which you can choose to modify, or use the +#: defaults. You can also add non-color based settings if needed but note that +#: these will not work with using kitty @ set-colors with this theme. For a +#: reference on what these settings do see https://sw.kovidgoyal.net/kitty/conf/ + +#: The basic colors + +foreground #f2f4f8 +background #161616 +selection_foreground #f2f4f8 +selection_background #2a2a2a + + +#: Cursor colors + +cursor #f2f4f8 +cursor_text_color #161616 + + +#: URL underline color when hovering with mouse + +url_color #25be6a + + +#: kitty window border colors and terminal bell colors + +active_border_color #78a9ff +inactive_border_color #535353 +bell_border_color #3ddbd9 +# visual_bell_color none + + +#: OS Window titlebar colors + +# wayland_titlebar_color system +# macos_titlebar_color system + + +#: Tab bar colors + +active_tab_foreground #0c0c0c +active_tab_background #78a9ff +inactive_tab_foreground #6e6f70 +inactive_tab_background #2a2a2a +# tab_bar_background none +# tab_bar_margin_color none + + +#: Colors for marks (marked text in the terminal) + +# mark1_foreground black +# mark1_background #98d3cb +# mark2_foreground black +# mark2_background #f2dcd3 +# mark3_foreground black +# mark3_background #f274bc + + +#: The basic 16 colors + +#: black +color0 #282828 +color8 #484848 + +#: red +color1 #ee5396 +color9 #f16da6 + +#: green +color2 #25be6a +color10 #46c880 + +#: yellow +color3 #ebcb8b +color11 #f0d399 + +#: blue +color4 #78a9ff +color12 #8cb6ff + +#: magenta +color5 #be95ff +color13 #c8a5ff + +#: cyan +color6 #33b1ff +color14 #52bdff + +#: white +color7 #dfdfe0 +color15 #e4e4e5 + + +#: You can set the remaining 240 colors as color16 to color255. + +color16 #3ddbd9 +color17 #ff7eb6 diff --git a/kitty/.config/kitty/themes/dracula.conf b/kitty/.config/kitty/themes/dracula.conf new file mode 100644 index 0000000..8f05c52 --- /dev/null +++ b/kitty/.config/kitty/themes/dracula.conf @@ -0,0 +1,66 @@ +# https://draculatheme.com/kitty +# +# Installation instructions: +# +# cp dracula.conf ~/.config/kitty/ +# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf +# +# Then reload kitty for the config to take affect. +# Alternatively copy paste below directly into kitty.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a + +url_color #8be9fd + +# black +color0 #21222c +color8 #6272a4 + +# red +color1 #ff5555 +color9 #ff6e6e + +# green +color2 #50fa7b +color10 #69ff94 + +# yellow +color3 #f1fa8c +color11 #ffffa5 + +# blue +color4 #bd93f9 +color12 #d6acff + +# magenta +color5 #ff79c6 +color13 #ff92df + +# cyan +color6 #8be9fd +color14 #a4ffff + +# white +color7 #f8f8f2 +color15 #ffffff + +# Cursor colors +cursor #f8f8f2 +cursor_text_color background + +# Tab bar colors +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 + +# Marks +mark1_foreground #282a36 +mark1_background #ff5555 + +# Splits/Windows +active_border_color #f8f8f2 +inactive_border_color #6272a4 diff --git a/kitty/.config/kitty/themes/everforest.conf b/kitty/.config/kitty/themes/everforest.conf new file mode 100644 index 0000000..48cfede --- /dev/null +++ b/kitty/.config/kitty/themes/everforest.conf @@ -0,0 +1,22 @@ +# Color theme: Everforest Dark Medium +# Auto-generated by Gogh (https://Gogh-Co.github.io/Gogh/) + +color0 #343F44 +color1 #E67E80 +color2 #A7C080 +color3 #DBBC7F +color4 #7FBBB3 +color5 #D699B6 +color6 #83C092 +color7 #D3C6AA +color8 #5C6A72 +color9 #F85552 +color10 #8DA101 +color11 #DFA000 +color12 #3A94C5 +color13 #DF69BA +color14 #35A77C +color15 #DFDDC8 +background #2D353B +foreground #D3C6AA +cursor #D3C6AA diff --git a/kitty/.config/kitty/themes/gruvbox_material.conf b/kitty/.config/kitty/themes/gruvbox_material.conf new file mode 100644 index 0000000..a856d7f --- /dev/null +++ b/kitty/.config/kitty/themes/gruvbox_material.conf @@ -0,0 +1,47 @@ +background #282828 +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #282828 + +cursor #a89984 +cursor_text_color background + +active_tab_background #282828 +active_tab_foreground #d4be98 +active_tab_font_style bold +inactive_tab_background #282828 +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/kitty/.config/kitty/themes/kanagawa.conf b/kitty/.config/kitty/themes/kanagawa.conf new file mode 100644 index 0000000..f2850cd --- /dev/null +++ b/kitty/.config/kitty/themes/kanagawa.conf @@ -0,0 +1,47 @@ +# vim:ft=kitty + +## name: Kanagawa +## license: MIT +## author: Tommaso Laurenzi +## upstream: https://github.com/rebelot/kanagawa.nvim/ + + +background #1F1F28 +foreground #DCD7BA +selection_background #2D4F67 +selection_foreground #C8C093 +url_color #72A7BC +cursor #C8C093 + +# Tabs +active_tab_background #1F1F28 +active_tab_foreground #C8C093 +inactive_tab_background #1F1F28 +inactive_tab_foreground #727169 +#tab_bar_background #15161E + +# normal +color0 #16161D +color1 #C34043 +color2 #76946A +color3 #C0A36E +color4 #7E9CD8 +color5 #957FB8 +color6 #6A9589 +color7 #C8C093 + +# bright +color8 #727169 +color9 #E82424 +color10 #98BB6C +color11 #E6C384 +color12 #7FB4CA +color13 #938AA9 +color14 #7AA89F +color15 #DCD7BA + + +# extended colors +color16 #FFA066 +color17 #FF5D62 + diff --git a/kitty/.config/kitty/themes/nightfox.conf b/kitty/.config/kitty/themes/nightfox.conf new file mode 100644 index 0000000..6e9772d --- /dev/null +++ b/kitty/.config/kitty/themes/nightfox.conf @@ -0,0 +1,52 @@ +# vim:ft=kitty + +## name: Nightfox +## author: EdenEast +## license: MIT +## upstream: https://github.com/EdenEast/nightfox.nvim/blob/main/extra/nightfox/nightfox_kitty.conf + +background #192330 +foreground #cdcecf +selection_background #2b3b51 +selection_foreground #cdcecf +url_color #81b29a + +# Cursor +# uncomment for reverse background +# cursor none +cursor #cdcecf + +# Border +active_border_color #719cd6 +inactive_border_color #39506d +bell_border_color #f4a261 + +# Tabs +active_tab_background #719cd6 +active_tab_foreground #131a24 +inactive_tab_background #2b3b51 +inactive_tab_foreground #738091 + +# normal +color0 #393b44 +color1 #c94f6d +color2 #81b29a +color3 #dbc074 +color4 #719cd6 +color5 #9d79d6 +color6 #63cdcf +color7 #dfdfe0 + +# bright +color8 #575860 +color9 #d16983 +color10 #8ebaa4 +color11 #e0c989 +color12 #86abdc +color13 #baa1e2 +color14 #7ad5d6 +color15 #e4e4e5 + +# extended colors +color16 #f4a261 +color17 #d67ad2 diff --git a/kitty/.config/kitty/themes/onedark.conf b/kitty/.config/kitty/themes/onedark.conf new file mode 100644 index 0000000..2cdbb2f --- /dev/null +++ b/kitty/.config/kitty/themes/onedark.conf @@ -0,0 +1,32 @@ +# One Dark by Giuseppe Cesarano, https://github.com/GiuseppeCesarano +# This work is licensed under the terms of the GPL-2.0 license. +# For a copy, see https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. + +# Colors + +foreground #979eab +background #282c34 + +color0 #282c34 +color1 #e06c75 +color2 #98c379 +color3 #e5c07b +color4 #61afef +color5 #be5046 +color6 #56b6c2 +color7 #979eab +color8 #393e48 +color9 #d19a66 +color10 #56b6c2 +color11 #e5c07b +color12 #61afef +color13 #be5046 +color14 #56b6c2 +color15 #abb2bf + +# Tab Bar + +active_tab_foreground #282c34 +active_tab_background #979eab +inactive_tab_foreground #abb2bf +inactive_tab_background #282c34 diff --git a/kitty/.config/kitty/themes/rose-pine-moon.conf b/kitty/.config/kitty/themes/rose-pine-moon.conf new file mode 100644 index 0000000..4d4de88 --- /dev/null +++ b/kitty/.config/kitty/themes/rose-pine-moon.conf @@ -0,0 +1,56 @@ +## name: Rosé Pine Moon +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist + +foreground #e0def4 +background #232136 +selection_foreground #e0def4 +selection_background #44415a + +cursor #56526e +cursor_text_color #e0def4 + +url_color #c4a7e7 + +active_tab_foreground #e0def4 +active_tab_background #393552 +inactive_tab_foreground #6e6a86 +inactive_tab_background #232136 + +active_border_color #3e8fb0 +inactive_border_color #44415a + +# black +color0 #393552 +color8 #6e6a86 + +# red +color1 #eb6f92 +color9 #eb6f92 + +# green +color2 #3e8fb0 +color10 #3e8fb0 + +# yellow +color3 #f6c177 +color11 #f6c177 + +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ea9a97 +color14 #ea9a97 + +# white +color7 #e0def4 +color15 #e0def4 + diff --git a/kitty/.config/kitty/themes/sonokai.conf b/kitty/.config/kitty/themes/sonokai.conf new file mode 100644 index 0000000..f20d300 --- /dev/null +++ b/kitty/.config/kitty/themes/sonokai.conf @@ -0,0 +1,51 @@ +# vim:ft=kitty + +## name: Sonokai Sushia +## license: MIT +## author: Dustin Miao +## upstream: https://github.com/selenebun/sonokai-kitty + +## blurb: A Kitty port for the Sonokai theme (https://github.com/sainnhe/sonokai) + +#: Disclaimer: I am not the original creator of this theme. I have ported it over from +#: https://github.com/selenebun/sonokai-kitty/blob/main/colors/sonokai-shusia.conf. + +foreground #e3e1e4 +background #2d2a2e + +selection_foreground #e3e1e4 +selection_background #423f46 + +cursor #e3e1e4 +cursor_text_color background + +active_tab_background #2d2a2e +active_tab_foreground #e3e1e4 +active_tab_font_style bold +inactive_tab_background #2d2a2e +inactive_tab_foreground #e3e1e4 +inactive_tab_font_style normal + +color0 #1a181a +color8 #848089 + +color1 #f85e84 +color9 #f85e84 + +color2 #9ecd6f +color10 #9ecd6f + +color3 #e5c463 +color11 #e5c463 + +color4 #7accd7 +color12 #7accd7 + +color5 #ab9df2 +color13 #ab9df2 + +color6 #ef9062 +color7 #ef9062 + +color7 #e3e1e4 +color15 #e3e1e4 diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index ce83e17..05a6532 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -26,7 +26,7 @@ xwayland-satellite { path "xwayland-satellite" } environment { - ELECTRON_OZONE_PLATFORM_HINT "auto" + ELECTRON_OZONE_PLATFORM_HINT "x11" ELECTRON_ENABLE_LOGGING "1" } output "eDP-1" { @@ -467,4 +467,5 @@ binds { power-off-monitors } } + // include "theme.kdl" diff --git a/niri/.config/niri/waybar-niri/colors.css b/niri/.config/niri/waybar-niri/colors.css new file mode 100644 index 0000000..8af0bb9 --- /dev/null +++ b/niri/.config/niri/waybar-niri/colors.css @@ -0,0 +1,48 @@ +.base { + color: @base; +} +.surface { + color: @surface; +} +.overlay { + color: @overlay; +} +.muted { + color: @muted; +} +.subtle { + color: @subtle; +} +.text { + color: @text; +} +.red { + color: @red; +} +.yellow { + color: @yellow; +} +.green { + color: @green; +} +.rose { + color: @rose; +} +.blue { + color: @blue; +} +.sky { + color: @sky; +} +.mauve { + color: @lavender; +} +.highlightLow { + color: @highlightLow; +} +.highlightMed { + color: @highlightMed; +} +.highlightHigh { + color: @highlightHigh; +} diff --git a/niri/.config/niri/waybar-niri/config.jsonc b/niri/.config/niri/waybar-niri/config.jsonc index ce0dd96..0b4cde9 100644 --- a/niri/.config/niri/waybar-niri/config.jsonc +++ b/niri/.config/niri/waybar-niri/config.jsonc @@ -54,12 +54,13 @@ "interval": 1, }, "cpu": { - "format": " {usage}%", + "format": "{usage}%", "tooltip": false, "interval": 1, }, "memory": { - "format": " {}%", + "format": "{}%", + // "format": " {}%", "interval": 1, }, "battery": { @@ -68,14 +69,14 @@ "warning": 30, "critical": 15, }, - "format": "{icon} {capacity}%", - "format-full": "{icon} {capacity}%", - "format-charging": "󰂄 {capacity}%", - "format-plugged": "󰂄 {capacity}%", + "format": "{icon} {capacity}%", + "format-full": "{icon} {capacity}%", + "format-charging": "󰂄 {capacity}%", + "format-plugged": "󰂄 {capacity}%", "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󰂂", "󰁹"], }, "power-profiles-daemon": { - "format": "{icon}", + "format": "{icon}", "tooltip-format": "Power profile: {profile}\nDriver: {driver}", "tooltip": true, "format-icons": { @@ -86,14 +87,14 @@ }, }, "network": { - "format-wifi": "󰖩 ", - "format-ethernet": "󰈀", - "format-disconnected": "󱚵", + "format-wifi": "󰖩 ", + "format-ethernet": "󰈀", + "format-disconnected": "󱚵", "format-alt": "{bandwidthDownBytes}", "interval": 1, }, "pulseaudio": { - "format": "{icon} {volume}%", + "format": "{icon} {volume}%", "format-muted": "󰝟", "format-source": "{volume}% ", "format-source-muted": "", @@ -119,8 +120,8 @@ }, "bluetooth": { "format": "󰂯", - "format-disabled": "󰂲", - "format-connected": "󰂱", + "format-disabled": "󰂲", + "format-connected": "󰂱", "on-click": "blueman-manager", }, } diff --git a/niri/.config/niri/waybar-niri/config_2.jsonc b/niri/.config/niri/waybar-niri/config_2.jsonc new file mode 100644 index 0000000..a46cb05 --- /dev/null +++ b/niri/.config/niri/waybar-niri/config_2.jsonc @@ -0,0 +1,160 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": ["clock", "custom/power_btn", "custom/lock_screen", "niri/workspaces"], + "modules-center": ["niri/window"], + "modules-right": [ + "network", + "bluetooth", + "pulseaudio", + "pulseaudio#microphone", + "tray" + ], + "niri/workspaces": { + "all-outputs": true, + "on-click": "activate", + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [] + } + }, + "custom/launch_wofi": { + "format": "", + "on-click": "pkill wofi; wofi -n", + "tooltip": false + }, + "custom/lock_screen": { + "format": "", + "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown", + "tooltip": false + }, + "custom/light_dark": { + "format": "󰐾", + "on-click": "~/.config/waybar/scripts/baraction light", + "tooltip": false + }, + "custom/power_btn": { + "format": "", + "on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown", + "tooltip": false + }, + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "disk": { + "interval": 30, + "format": "󰋊 {percentage_used}%", + "path": "/", + "tooltip": true, + "tooltip-format": "HDD - {used} used out of {total} on {path} ({percentage_used}%)", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "memory": { + "interval": 30, + "format": " {}%", + "max-length": 10, + "tooltip": true, + "tooltip-format": "Memory - {used:0.1f}GB used", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "custom/updates": { + "format": " {}", + "tooltip-format": "{}", + "escape": true, + "return-type": "json", + "exec": "~/.config/waybar/scripts/update-sys", + "restart-interval": 60, + "on-click": "kitty -e ~/.config/waybar/scripts/update-sys update", + "tooltip": false + }, + "tray": { + "icon-size": 13, + "tooltip": false, + "spacing": 10 + }, + "clock": { + "format": "{: %R %d/%m}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-icons": ["", "", ""], + "on-scroll-up": "brightnessctl set 1%+", + "on-scroll-down": "brightnessctl set 1%-", + "min-length": 6 + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "tooltip": false, + "format-muted": " Muted", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "tooltip": false, + "format-source": " {volume}%", + "format-source-muted": " Muted", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + }, + "temperature": { + "thermal-zone": 1, + "format": "{temperatureF}°F ", + "critical-threshold": 80, + "format-critical": "{temperatureC}°C " + }, + "network": { + "format-wifi": " {signalStrength}%", + "format-ethernet": "󰈀 100% ", + "tooltip-format": "Connected to {essid} {ifname} via {gwaddr}", + "format-linked": "{ifname} (No IP)", + "format-disconnected": "󰖪 0% ", + "on-click": "~/.config/rofi/wifi/wifi.sh" + }, + "bluetooth": { + "format": " {status}", + "format-disabled": "", + "format-off": "", + "interval": 30, + "on-click": "blueman-manager", + "format-no-controller": "" + } +} diff --git a/niri/.config/niri/waybar-niri/theme.css b/niri/.config/niri/waybar-niri/theme.css new file mode 120000 index 0000000..4d54996 --- /dev/null +++ b/niri/.config/niri/waybar-niri/theme.css @@ -0,0 +1 @@ +/home/liph/.config/niri/waybar-niri/themes/catppuccin-mocha.css \ No newline at end of file diff --git a/niri/.config/niri/waybar-niri/themes/catppuccin-mocha.css b/niri/.config/niri/waybar-niri/themes/catppuccin-mocha.css new file mode 100644 index 0000000..a2f5229 --- /dev/null +++ b/niri/.config/niri/waybar-niri/themes/catppuccin-mocha.css @@ -0,0 +1,26 @@ +@define-color rosewater #f5e0dc; +@define-color flamingo #f2cdcd; +@define-color pink #f5c2e7; +@define-color mauve #cba6f7; +@define-color red #f38ba8; +@define-color maroon #eba0ac; +@define-color rose #fab387; +@define-color yellow #f9e2af; +@define-color green #a6e3a1; +@define-color teal #94e2d5; +@define-color sky #89dceb; +@define-color sapphire #74c7ec; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color text #cdd6f4; +@define-color subtext1 #bac2de; +@define-color subtext0 #a6adc8; +@define-color overlay2 #9399b2; +@define-color overlay1 #7f849c; +@define-color overlay #6c7086; +@define-color highlightedHigh #585b70; +@define-color highlightedMed #45475a; +@define-color highlightedlow #313244; +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; diff --git a/niri/.config/niri/waybar-niri/themes/rose-pine-moon.css b/niri/.config/niri/waybar-niri/themes/rose-pine-moon.css new file mode 100644 index 0000000..53e95cd --- /dev/null +++ b/niri/.config/niri/waybar-niri/themes/rose-pine-moon.css @@ -0,0 +1,16 @@ +/* +@define-color base #232136; +@define-color surface #2a273f; +@define-color overlay #393552; +@define-color muted #6e6a86; +@define-color subtle #908caa; +@define-color text #e0def4; +@define-color red #eb6f92; +@define-color yellow #f6c177; +@define-color rose #ea9a97; +@define-color blue #3e8fb0; +@define-color sky #9ccfd8; +@define-color mauve #c4a7e7; +@define-color highlightLow #2a283e; +@define-color highlightMed #44415a; +@define-color highlightHigh #56526e; diff --git a/niri/.config/niri/waybar-niri_2/CLAUDE.md b/niri/.config/niri/waybar-niri_2/CLAUDE.md new file mode 100644 index 0000000..88fe5e3 --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/CLAUDE.md @@ -0,0 +1,36 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Overview + +This is a Waybar configuration for the Niri Wayland compositor. Waybar is a status bar that displays system information (CPU, memory, battery, network, etc.) and workspace indicators. + +## Architecture + +### Configuration Files +- `config.jsonc` - Primary Waybar configuration (modules, layout, icons, click actions) +- `config_2.jsonc` - Alternative configuration variant with different module arrangement + +### Theming System +The styling uses a layered CSS approach with theme variable support: + +1. `theme.css` - Symlink pointing to the active theme in `themes/` +2. `themes/*.css` - Theme definitions (catppuccin-mocha, rose-pine-moon) that define `@define-color` variables +3. `colors.css` - Utility classes that map theme variables to CSS classes (`.red`, `.blue`, `.base`, etc.) +4. `style.css` - Main styling that uses `@theme_*` GTK variables and custom theme colors + +**Theme switching**: Change the `theme.css` symlink to point to a different theme file in `themes/`. + +### Module Layout +The bar uses three sections: +- **Left**: Logo/launcher, system monitors (CPU, memory), bluetooth +- **Center**: Workspace indicators (niri/workspaces) +- **Right**: Tray, power profiles, audio, network, battery, clock, power button + +## Key Patterns + +- Icons use Nerd Font glyphs wrapped in `` for sizing +- Click handlers launch external tools: `wofi` (launcher), `wlogout` (power menu), `pavucontrol` (audio), `blueman-manager` (bluetooth) +- CSS uses `alpha()` function for transparency and `@theme_*` GTK theme integration +- Module styling uses consistent `border-radius: 20px` pill shapes with `5px 15px` padding diff --git a/niri/.config/niri/waybar-niri_2/colors.css b/niri/.config/niri/waybar-niri_2/colors.css new file mode 100644 index 0000000..8af0bb9 --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/colors.css @@ -0,0 +1,48 @@ +.base { + color: @base; +} +.surface { + color: @surface; +} +.overlay { + color: @overlay; +} +.muted { + color: @muted; +} +.subtle { + color: @subtle; +} +.text { + color: @text; +} +.red { + color: @red; +} +.yellow { + color: @yellow; +} +.green { + color: @green; +} +.rose { + color: @rose; +} +.blue { + color: @blue; +} +.sky { + color: @sky; +} +.mauve { + color: @lavender; +} +.highlightLow { + color: @highlightLow; +} +.highlightMed { + color: @highlightMed; +} +.highlightHigh { + color: @highlightHigh; +} diff --git a/niri/.config/niri/waybar-niri/config_1.jsonc b/niri/.config/niri/waybar-niri_2/config.jsonc similarity index 80% rename from niri/.config/niri/waybar-niri/config_1.jsonc rename to niri/.config/niri/waybar-niri_2/config.jsonc index 1ea7023..ce0dd96 100644 --- a/niri/.config/niri/waybar-niri/config_1.jsonc +++ b/niri/.config/niri/waybar-niri_2/config.jsonc @@ -4,7 +4,7 @@ "position": "top", "height": 30, "spacing": 0, - "modules-left": ["custom/logo", "cpu", "memory", "bluetooth", "mpris"], + "modules-left": ["custom/logo", "cpu", "memory", "bluetooth"], "modules-center": ["niri/workspaces"], "modules-right": [ "tray", @@ -32,23 +32,23 @@ "default": "", }, }, - "mpris": { - "format": "DEFAULT: {player_icon} {dynamic}", - "format-paused": "DEFAULT: {status_icon} {dynamic}", - "player-icons": { - "default": "▶", - "mpv": "🎵", - }, - "status-icons": { - "paused": "⏸", - }, - }, + // "mpris": { + // "format": "DEFAULT: {player_icon} {dynamic}", + // "format-paused": "DEFAULT: {status_icon} {dynamic}", + // "player-icons": { + // "default": "▶", + // "mpv": "🎵", + // }, + // "status-icons": { + // "paused": "⏸", + // }, + // }, "tray": { "icon-size": 14, "spacing": 10, }, "clock": { - "format": "{:%I:%M:%S %p}", + "format": "{:%H:%M:%S}", "tooltip-format": "{:%Y %B}\n{calendar}", "format-alt": "{:%Y-%m-%d}", "interval": 1, @@ -75,14 +75,14 @@ "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󰂂", "󰁹"], }, "power-profiles-daemon": { - "format": "{icon}", + "format": "{icon}", "tooltip-format": "Power profile: {profile}\nDriver: {driver}", "tooltip": true, "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "󰌪", + "default": " ", + "performance": " ", + "balanced": " ", + "power-saver": "󰌪 ", }, }, "network": { @@ -99,11 +99,11 @@ "format-source-muted": "", "format-icons": { "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", + // "hands-free": "", + // "headset": "", + // "phone": "", + // "portable": "", + // "car": "", "default": ["󰕿", "󰖀", "󰕾"], }, "on-click": "pavucontrol", diff --git a/niri/.config/niri/waybar-niri_2/config_2.jsonc b/niri/.config/niri/waybar-niri_2/config_2.jsonc new file mode 100644 index 0000000..a46cb05 --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/config_2.jsonc @@ -0,0 +1,160 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 0, + "modules-left": ["clock", "custom/power_btn", "custom/lock_screen", "niri/workspaces"], + "modules-center": ["niri/window"], + "modules-right": [ + "network", + "bluetooth", + "pulseaudio", + "pulseaudio#microphone", + "tray" + ], + "niri/workspaces": { + "all-outputs": true, + "on-click": "activate", + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [] + } + }, + "custom/launch_wofi": { + "format": "", + "on-click": "pkill wofi; wofi -n", + "tooltip": false + }, + "custom/lock_screen": { + "format": "", + "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown", + "tooltip": false + }, + "custom/light_dark": { + "format": "󰐾", + "on-click": "~/.config/waybar/scripts/baraction light", + "tooltip": false + }, + "custom/power_btn": { + "format": "", + "on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown", + "tooltip": false + }, + "cpu": { + "interval": 10, + "format": " {usage}%", + "max-length": 10, + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "disk": { + "interval": 30, + "format": "󰋊 {percentage_used}%", + "path": "/", + "tooltip": true, + "tooltip-format": "HDD - {used} used out of {total} on {path} ({percentage_used}%)", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "memory": { + "interval": 30, + "format": " {}%", + "max-length": 10, + "tooltip": true, + "tooltip-format": "Memory - {used:0.1f}GB used", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + "custom/updates": { + "format": " {}", + "tooltip-format": "{}", + "escape": true, + "return-type": "json", + "exec": "~/.config/waybar/scripts/update-sys", + "restart-interval": 60, + "on-click": "kitty -e ~/.config/waybar/scripts/update-sys update", + "tooltip": false + }, + "tray": { + "icon-size": 13, + "tooltip": false, + "spacing": 10 + }, + "clock": { + "format": "{: %R %d/%m}", + "tooltip-format": "{:%Y %B}\n{calendar}" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-icons": ["", "", ""], + "on-scroll-up": "brightnessctl set 1%+", + "on-scroll-down": "brightnessctl set 1%-", + "min-length": 6 + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "tooltip": false, + "format-muted": " Muted", + "on-click": "pamixer -t", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + } + }, + "pulseaudio#microphone": { + "format": "{format_source}", + "tooltip": false, + "format-source": " {volume}%", + "format-source-muted": " Muted", + "on-click": "pamixer --default-source -t", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + }, + "temperature": { + "thermal-zone": 1, + "format": "{temperatureF}°F ", + "critical-threshold": 80, + "format-critical": "{temperatureC}°C " + }, + "network": { + "format-wifi": " {signalStrength}%", + "format-ethernet": "󰈀 100% ", + "tooltip-format": "Connected to {essid} {ifname} via {gwaddr}", + "format-linked": "{ifname} (No IP)", + "format-disconnected": "󰖪 0% ", + "on-click": "~/.config/rofi/wifi/wifi.sh" + }, + "bluetooth": { + "format": " {status}", + "format-disabled": "", + "format-off": "", + "interval": 30, + "on-click": "blueman-manager", + "format-no-controller": "" + } +} diff --git a/niri/.config/niri/waybar-niri_2/style.css b/niri/.config/niri/waybar-niri_2/style.css new file mode 100644 index 0000000..e5fcf09 --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/style.css @@ -0,0 +1,165 @@ +@import "theme.css"; +@import "colors.css"; + +* { + font-family: "JetBrainsMono"; + font-size: 12px; +} +window#waybar { + background-color: rgba(43, 48, 59, 0.5); + /* background: color: @rose, @theme_base_color); */ + color: @text; + transition-property { @rose} ; + transition-duration [0.5s]; +} + +window#waybar.hidden { + opacity: 0.2; +} +button { + border: none; + border-radius: 0; +} +button:hover { + background: inherit; +} +#workspaces { + padding: 5px; +} +#workspaces button { + padding: 0 10px; + background-color: transparent; + color: @muted; + border-radius: 10px; +} +#workspaces button:hover { + color: #e5c890; +} +#workspaces button.active, +#workspaces button.default, +#workspaces button.focused { + background: #babbf1; +} +#workspaces button.urgent { + background-color: #eb4d4b; +} +/* #clock, */ +/* #battery, */ +/* #cpu, */ +/* #memory, */ +#disk, +#temperature, +#backlight, +#network, +/* #pulseaudio, */ +#wireplumber, +/* #custom-media, */ +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#mpd { + padding: 0 10px; + color: @theme_fg_color; +} +#window, +#workspaces { + margin: 0 4px; +} +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} +#clock, +#cpu { + color: @yellow; +} +#memory { + color: @mauve; +} +/* #backlight, */ +/* #network, */ +/* #pulseaudio, */ +/* #custom-media, */ +/* #tray, */ +/* #custom-power, */ +/* #bluetooth, */ +#battery.charging { + color: @rose; +} +#battery.plugged { + color: @yellow; +} +#battery.full { + color: @mauve; +} +#power-profiles-daemon { + padding: 5px 15px; + color: @sky; + background-color: alpha(@theme_unfocused_bg_color, 0.4); + border-radius: 20px; + margin: 0 4px; +} +#power-profiles-daemon.performance { + color: @red; +} +#power-profiles-daemon.power-saver { + color: @yellow; +} + +#battery.charging { + color: @sky; +} +#custom-power { + background-color: @red; + border-radius: 20px 0 0 20px; + transition: all 250ms ease-in-out; +} +#tray { + border-radius: 20px; + margin: 0 5px; +} +#clock { + border-radius: 20px; + margin: 0 5px; +} +#network.wifi { + color: @rose; +} +#network.ethernet { + color: @blue; +} +#network.disconnected { + color: @red; +} +#pulseaudio { + color: @yellow; +} +#pulseaudio.muted { + color: @red; +} +#custom-power { + color: @text; + margin: 0; +} +#custom-logo { + background-color: @blue; + padding: 0 17px; + border-radius: 0 20px 20px 0; +} +#bluetooth { + color: @mauve; + border-radius: 20px; + margin: 0 5px; +} +#bluetooth.connected { + color: @mauve; +} +#bluetooth.disabled { + color: @red; +} diff --git a/niri/.config/niri/waybar-niri_2/theme.css b/niri/.config/niri/waybar-niri_2/theme.css new file mode 100644 index 0000000..53e95cd --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/theme.css @@ -0,0 +1,16 @@ +/* +@define-color base #232136; +@define-color surface #2a273f; +@define-color overlay #393552; +@define-color muted #6e6a86; +@define-color subtle #908caa; +@define-color text #e0def4; +@define-color red #eb6f92; +@define-color yellow #f6c177; +@define-color rose #ea9a97; +@define-color blue #3e8fb0; +@define-color sky #9ccfd8; +@define-color mauve #c4a7e7; +@define-color highlightLow #2a283e; +@define-color highlightMed #44415a; +@define-color highlightHigh #56526e; diff --git a/niri/.config/niri/waybar-niri/mocha.css b/niri/.config/niri/waybar-niri_2/themes/catppuccin-mocha.css similarity index 100% rename from niri/.config/niri/waybar-niri/mocha.css rename to niri/.config/niri/waybar-niri_2/themes/catppuccin-mocha.css diff --git a/niri/.config/niri/waybar-niri_2/themes/rose-pine-moon.css b/niri/.config/niri/waybar-niri_2/themes/rose-pine-moon.css new file mode 100644 index 0000000..53e95cd --- /dev/null +++ b/niri/.config/niri/waybar-niri_2/themes/rose-pine-moon.css @@ -0,0 +1,16 @@ +/* +@define-color base #232136; +@define-color surface #2a273f; +@define-color overlay #393552; +@define-color muted #6e6a86; +@define-color subtle #908caa; +@define-color text #e0def4; +@define-color red #eb6f92; +@define-color yellow #f6c177; +@define-color rose #ea9a97; +@define-color blue #3e8fb0; +@define-color sky #9ccfd8; +@define-color mauve #c4a7e7; +@define-color highlightLow #2a283e; +@define-color highlightMed #44415a; +@define-color highlightHigh #56526e; diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 41c7066..4bfcabf 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,3 +1,6 @@ +-- In your init.lua or after lazy setup +vim.opt.termguicolors = true + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ @@ -46,3 +49,11 @@ require("lazy").setup({ dependencies = "hrsh7th/nvim-cmp", }, }) + +-- In your init.lua or after lazy setup +local theme_file = vim.fn.stdpath("config") .. "/lua/current_theme.lua" +if vim.fn.filereadable(theme_file) == 1 then + dofile(theme_file) +else + vim.cmd.colorscheme("catppuccin") -- fallback +end diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 74ff961..3e1b9f2 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -11,14 +11,18 @@ "conform.nvim": { "branch": "master", "commit": "8314f4c9e205e7f30b62147069729f9a1227d8bf" }, "dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "dracula.nvim": { "branch": "main", "commit": "ae752c13e95fb7c5f58da4b5123cb804ea7568ee" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, + "everforest": { "branch": "master", "commit": "b90025cc84dbb9c46df5a2ae540d3f01cf85af74" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "fzf-lua": { "branch": "main", "commit": "b8d1356b7120f5cf111709cb2fa504096248fb26" }, "gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" }, "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, + "gruvbox-mat": { "branch": "master", "commit": "e4359a2f80ef7275b080be180841c62ca8322757" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, @@ -27,10 +31,12 @@ "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" }, + "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, "nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" }, "nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" }, "nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" }, @@ -43,12 +49,16 @@ "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, "nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, + "onedark-warm": { "branch": "master", "commit": "213c23ae45a04797572242568d5d51937181792d" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "portal.nvim": { "branch": "main", "commit": "77d9d53fec945bfa407d5fd7120f1b4f117450ed" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "8aafe2cbd89cd4090f573a98cab6b20366576fde" }, "render-markdown.nvim": { "branch": "main", "commit": "73a6ebc842cf81926eb1d424820b800f6f6a1227" }, + "rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" }, + "sonokai": { "branch": "master", "commit": "5c7f88c0cac01b32cfce634f2a28947ab426537f" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, + "tokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "vim-test": { "branch": "master", "commit": "aa619692ff48a3cf3e6bdb893765039488d4e5f3" }, "vimtex": { "branch": "master", "commit": "3abfa1ff75b81c01e4305e8062549ac0ea5cc9b8" }, diff --git a/nvim/.config/nvim/lua/current_theme.lua b/nvim/.config/nvim/lua/current_theme.lua new file mode 100644 index 0000000..5dfd683 --- /dev/null +++ b/nvim/.config/nvim/lua/current_theme.lua @@ -0,0 +1,11 @@ +vim.cmd.colorscheme("rose-pine") +-- sonokai +-- rose-pine +-- onedark +-- nightfox +-- kanagawa +-- gruvbox-mat +-- everforest +-- dracula +-- carbonfox +-- tokyonight diff --git a/nvim/.config/nvim/lua/plugins/catppuccin.lua b/nvim/.config/nvim/lua/plugins/catppuccin.lua deleted file mode 100644 index 988b00f..0000000 --- a/nvim/.config/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - { - "catppuccin/nvim", - lazy = false, - name = "catppuccin", - priority = 1000, - config = function() - vim.cmd.colorscheme "catppuccin-mocha" - end - } -} diff --git a/nvim/.config/nvim/lua/plugins/colorschemes.lua b/nvim/.config/nvim/lua/plugins/colorschemes.lua new file mode 100644 index 0000000..e259dbd --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/colorschemes.lua @@ -0,0 +1,112 @@ +return { + { + "catppuccin/nvim", + lazy = false, + name = "catppuccin", + config = function() + vim.cmd("colorscheme catppuccin-mocha") + end, + }, + { + "sainnhe/everforest", + lazy = false, + config = function() + vim.g.everforest_enable_italic = true + vim.cmd.colorscheme("everforest") + end, + }, + { + "folke/tokyonight.nvim", + lazy = false, + opts = {}, + name = "tokyonight", + config = function() + vim.cmd("colorscheme tokyonight-moon") + end, + }, + { + "rose-pine/neovim", + lazy = false, + name = "rose-pine", + config = function() + vim.cmd("colorscheme rose-pine-moon") + end, + }, + { + "Mofiqul/dracula.nvim", + lazy = false, + config = function() + vim.cmd("colorscheme dracula") + end, + }, + { + "sainnhe/gruvbox-material", + lazy = false, + name = "gruvbox-mat", --medium + config = function() + vim.g.gruvbox_material_enable_italic = true + vim.cmd.colorscheme("gruvbox-material") + end, + }, + { + "navarasu/onedark.nvim", + lazy = false, + name = "onedark-warm", + config = function() + require("onedark").setup({ + style = "warm", + }) + require("onedark").load() + end, + }, + { + "EdenEast/nightfox.nvim", + lazy = false, + config = function() + vim.cmd.colorscheme("nordfox") + end, + }, + { + "sainnhe/sonokai", + lazy = false, -- Load during startup since it's a colorscheme + config = function() + vim.g.sonokai_style = "shusia" -- default, atlantis, shusia, espresso + + -- Optional: Additional configuration + vim.g.sonokai_better_performance = 1 + vim.g.sonokai_enable_italic = 1 + vim.g.sonokai_disable_italic_comment = 0 + vim.g.sonokai_transparent_background = 0 + + -- Apply the colorscheme + vim.cmd.colorscheme("sonokai") + end, + }, + { + "rebelot/kanagawa.nvim", + lazy = false, + config = function() + require("kanagawa").setup({ + -- Optional: customize the theme + compile = false, -- Enable for faster load times + undercurl = true, + commentStyle = { italic = true }, + functionStyle = {}, + keywordStyle = { italic = true }, + statementStyle = { bold = true }, + typeStyle = {}, + transparent = false, + dimInactive = false, + terminalColors = true, + + -- Available themes: "wave" (default), "dragon", "lotus" + theme = "wave", -- or "dragon" for darker, "lotus" for light + background = { + dark = "wave", + }, + }) + + vim.cmd.colorscheme("kanagawa") + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/lsp-config.lua b/nvim/.config/nvim/lua/plugins/lsp-config.lua index 791a894..91205fc 100644 --- a/nvim/.config/nvim/lua/plugins/lsp-config.lua +++ b/nvim/.config/nvim/lua/plugins/lsp-config.lua @@ -23,6 +23,7 @@ return { "dockerls", -- Fixed: correct name "yamlls", -- Fixed: correct name (not yaml-language-server) "taplo", -- TOML LSP + "cssls", -- css }, }, }, @@ -121,6 +122,30 @@ return { }, }, }, + cssls = { + capabilities = capabilities, + on_attach = on_attach, + settings = { + css = { + validate = true, + lint = { + unknownAtRules = "ignore", -- Important for @define-color in GTK CSS + }, + }, + scss = { + validate = true, + lint = { + unknownAtRules = "ignore", + }, + }, + less = { + validate = true, + lint = { + unknownAtRules = "ignore", + }, + }, + }, + }, pyright = { capabilities = capabilities, on_attach = on_attach, diff --git a/nvim/.config/nvim/lua/plugins/lualine.lua b/nvim/.config/nvim/lua/plugins/lualine.lua index ad3617a..6da1afe 100644 --- a/nvim/.config/nvim/lua/plugins/lualine.lua +++ b/nvim/.config/nvim/lua/plugins/lualine.lua @@ -1,10 +1,17 @@ return { - "nvim-lualine/lualine.nvim", - config = function () - require('lualine').setup({ - options = { - theme = 'dracula' - } + "nvim-lualine/lualine.nvim", + config = function() + require("lualine").setup({ + options = { + theme = "auto", + -- theme = "gruvbox-mat", + -- theme = "kanagawa", + -- theme = "nightfox", + -- theme = "rose-pine", + -- theme = "everforest", + -- theme = "sonokai", + -- theme = 'dracula' + }, }) - end + end, } diff --git a/nvim/.config/nvim/lua/plugins/nvim-colorizer.lua b/nvim/.config/nvim/lua/plugins/nvim-colorizer.lua new file mode 100644 index 0000000..fca9b59 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/nvim-colorizer.lua @@ -0,0 +1,8 @@ +return { + { + "norcalli/nvim-colorizer.lua", + config = function() + require("colorizer").setup() + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/tokyonight.lua b/nvim/.config/nvim/lua/plugins/tokyonight.lua new file mode 100644 index 0000000..d18dd13 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/tokyonight.lua @@ -0,0 +1,8 @@ +return { + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, +} diff --git a/ohmyposh/.config/ohmyposh/zen.toml b/ohmyposh/.config/ohmyposh/zen.toml index bbe222a..b08a62b 100644 --- a/ohmyposh/.config/ohmyposh/zen.toml +++ b/ohmyposh/.config/ohmyposh/zen.toml @@ -3,78 +3,84 @@ version = 3 final_space = true [secondary_prompt] - template = '❯❯ ' - foreground = 'magenta' - background = 'transparent' +template = '❯❯ ' +foreground = 'magenta' +background = 'transparent' [transient_prompt] - template = '❯ ' - background = 'transparent' - foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}'] +template = '❯ ' +background = 'transparent' +foreground_templates = [ + '{{if gt .Code 0}}red{{end}}', + '{{if eq .Code 0}}magenta{{end}}', +] [[blocks]] - type = 'prompt' - alignment = 'left' - newline = true +type = 'prompt' +alignment = 'left' +newline = true - [[blocks.segments]] - template = '{{ .Path }}' - foreground = 'blue' - background = 'transparent' - type = 'path' - style = 'plain' +[[blocks.segments]] +template = '{{ .Path }}' +foreground = 'blue' +background = 'transparent' +type = 'path' +style = 'plain' - [blocks.segments.properties] - cache_duration = 'none' - style = 'full' +[blocks.segments.properties] +cache_duration = 'none' +style = 'full' - [[blocks.segments]] - template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' - foreground = 'yellow' - background = 'transparent' - type = 'git' - style = 'plain' +[[blocks.segments]] +template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' +foreground = 'yellow' +background = 'transparent' +type = 'git' +style = 'plain' - [blocks.segments.properties] - branch_icon = '' - cache_duration = 'none' - commit_icon = '@' - fetch_status = true +[blocks.segments.properties] +branch_icon = '' +cache_duration = 'none' +commit_icon = '@' +fetch_status = true [[blocks]] - type = 'rprompt' - overflow = 'hidden' +type = 'rprompt' +overflow = 'hidden' - [[blocks.segments]] - template = '{{ .FormattedMs }}' - foreground = 'yellow' - background = 'transparent' - type = 'executiontime' - style = 'plain' +# [[blocks.segments]] +# template = '{{ .FormattedMs }}' +# foreground = 'yellow' +# background = 'transparent' +# type = 'executiontime' +# style = 'plain' - [blocks.segments.properties] - cache_duration = 'none' - threshold = 5000 +# [blocks.segments.properties] +# cache_duration = 'none' +# threshold = 5000 - [[blocks.segments]] - type = "python" - style = "powerline" - powerline_symbol = "" - foreground = "cyan" - background = "transparent" - template = "  {{ .Full }} " +[[blocks.segments]] +type = "python" +style = "powerline" +powerline_symbol = "" +foreground = "cyan" +background = "transparent" +template = "  {{ .Full }} " [[blocks]] - type = 'prompt' - alignment = 'left' - newline = true +type = 'prompt' +alignment = 'left' +newline = true - [[blocks.segments]] - template = '❯' - background = 'transparent' - type = 'text' - style = 'plain' - foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}magenta{{end}}'] +[[blocks.segments]] +template = '❯' +background = 'transparent' +type = 'text' +style = 'plain' +foreground_templates = [ + '{{if gt .Code 0}}red{{end}}', + '{{if eq .Code 0}}magenta{{end}}', +] - [blocks.segments.properties] - cache_duration = 'none' +[blocks.segments.properties] +cache_duration = 'none' diff --git a/scripts/scripts/theme-switch b/scripts/scripts/theme-switch new file mode 100755 index 0000000..cfd6bd3 --- /dev/null +++ b/scripts/scripts/theme-switch @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +set -e + +THEME="${1:-catppuccin-mocha}" +CONFIG_DIR="$HOME/.config" +# WAYBAR_DIR="$CONFIG_DIR/niri/waybar-niri" + +declare -A THEMES=( + ["cat"]="catppuccin-mocha" + ["rose"]="rose-pine-moon" + ["dracula"]="dracula" +) + +if [[ ! -v "THEMES[$THEME]" ]]; then + echo "Unknown theme: $THEME" + echo "Available themes: ${!THEMES[@]}" + exit 1 +fi + +echo "Switching to theme: $THEME" + +# Neovim +echo "vim.cmd.colorscheme('${THEMES[$THEME]}')" >"$CONFIG_DIR/nvim/lua/current_theme.lua" +echo " ✓ Neovim" + +# Kitty +if command -v kitty &>/dev/null && [[ -f "$CONFIG_DIR/kitty/themes/${THEME}.conf" ]]; then + ln -sf "$CONFIG_DIR/kitty/themes/${THEME}.conf" "$CONFIG_DIR/kitty/current-theme.conf" + kill -SIGUSR1 $(pgrep kitty) 2>/dev/null || true + echo " ✓ Kitty" +fi + +# Btop +if [[ -f "$CONFIG_DIR/btop/themes/${THEME}.theme" ]]; then + sed -i "s|^color_theme = .*|color_theme = \"$CONFIG_DIR/btop/themes/${THEME}.theme\"|" "$CONFIG_DIR/btop/btop.conf" + echo " ✓ Btop" +fi + +# Yazi +if [[ -f "$CONFIG_DIR/yazi/themes/${THEME}.toml" ]]; then + ln -sf "$CONFIG_DIR/yazi/themes/${THEME}.toml" "$CONFIG_DIR/yazi/theme.toml" + echo " ✓ Yazi" +fi + +# # Waybar - simply copy the theme file to theme.css +# if [[ -f "$WAYBAR_DIR/themes/${THEME}.css" ]]; then +# cp "$WAYBAR_DIR/themes/${THEME}.css" "$WAYBAR_DIR/theme.css" +# +# pkill waybar 2>/dev/null || true +# sleep 0.5 +# waybar -c "$WAYBAR_DIR/config.jsonc" -s "$WAYBAR_DIR/style.css" & +# echo " ✓ Waybar" +# else +# echo " ✗ Waybar: theme file not found at $WAYBAR_DIR/themes/${THEME}.css" +# fi + +# Bat +if command -v bat &>/dev/null; then + case $THEME in + catppuccin-mocha) BAT_THEME="Catppuccin Mocha" ;; + rose-pine-moon) BAT_THEME="TwoDark" ;; + *) BAT_THEME="Monokai Extended" ;; + esac + + if [[ -f "$CONFIG_DIR/bat/config" ]]; then + sed -i "s/^--theme=.*/--theme=\"${BAT_THEME}\"/" "$CONFIG_DIR/bat/config" + else + mkdir -p "$CONFIG_DIR/bat" + echo "--theme=\"${BAT_THEME}\"" >"$CONFIG_DIR/bat/config" + fi + echo " ✓ Bat" +fi + +echo "" +echo "✓ Theme switched to: $THEME" diff --git a/swaync/.config/swaync/style.css b/swaync/.config/swaync/style.css index 40f8646..2b50efe 100644 --- a/swaync/.config/swaync/style.css +++ b/swaync/.config/swaync/style.css @@ -1,3 +1,5 @@ +@import "theme.css"; + * { all: unset; font-size: 18px; @@ -29,7 +31,9 @@ trough slider { } trough slider:hover { - box-shadow: 0 0 2px rgba(0, 0, 0, 0.8), 0 0 8px #89b4fa; + box-shadow: + 0 0 2px rgba(0, 0, 0, 0.8), + 0 0 8px #89b4fa; } trough { @@ -38,7 +42,9 @@ trough { /* notifications */ .notification-background { - box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #45475a; + box-shadow: + 0 0 8px 0 rgba(0, 0, 0, 0.8), + inset 0 0 0 1px #45475a; border-radius: 12.6px; margin: 18px; background: #181825; @@ -135,7 +141,9 @@ trough { /* control center */ .control-center { - box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244; + box-shadow: + 0 0 8px 0 rgba(0, 0, 0, 0.8), + inset 0 0 0 1px #313244; border-radius: 12.6px; background-color: #1e1e2e; color: #cdd6f4; @@ -206,8 +214,8 @@ scrollbar trough { border-radius: 8px; background: #313244; box-shadow: none; - min-height: 24px; /* Add this */ - min-width: 48px; /* Add this */ + min-height: 24px; /* Add this */ + min-width: 48px; /* Add this */ } .widget-dnd > switch:checked { @@ -217,8 +225,8 @@ scrollbar trough { .widget-dnd > switch slider { background: #45475a; border-radius: 8px; - min-height: 20px; /* Add this */ - min-width: 20px; /* Add this */ + min-height: 20px; /* Add this */ + min-width: 20px; /* Add this */ } /* mpris */ diff --git a/swaync/.config/swaync/theme.css b/swaync/.config/swaync/theme.css new file mode 120000 index 0000000..ef30866 --- /dev/null +++ b/swaync/.config/swaync/theme.css @@ -0,0 +1 @@ +/home/liph/.config/swaync/themes/rose-pine-moon.css \ No newline at end of file diff --git a/swaync/.config/swaync/themes/rose-pine-moon.css b/swaync/.config/swaync/themes/rose-pine-moon.css new file mode 100644 index 0000000..d9387ea --- /dev/null +++ b/swaync/.config/swaync/themes/rose-pine-moon.css @@ -0,0 +1,313 @@ +* { + all: unset; + font-family: FiraCode Nerd Font; + transition: 0.3s; + font-size: 1.2rem; +} + +.floating-notifications.background .notification-row { + padding: 1rem; +} + +.floating-notifications.background .notification-row .notification-background { + border-radius: 0.5rem; + background-color: #232136; + color: #e0def4; + border: 1px solid #6e6a86; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification { + padding: 0.5rem; + border-radius: 0.5rem; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification.critical { + border: 1px solid #eb6f92; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content + .summary { + margin: 0.5rem; + color: #e0def4; + font-weight: bold; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + .notification-content + .body { + margin: 0.5rem; + color: #908caa; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * { + min-height: 3rem; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action { + border-radius: 0.5rem; + color: #e0def4; + background-color: #2a273f; + border: 1px solid #6e6a86; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:hover { + background-color: #393552; +} + +.floating-notifications.background + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:active { + background-color: #6e6a86; +} + +.floating-notifications.background + .notification-row + .notification-background + .close-button { + margin: 0.5rem; + padding: 0.25rem; + border-radius: 0.5rem; + color: #e0def4; + background-color: #eb6f92; +} + +.floating-notifications.background + .notification-row + .notification-background + .close-button:hover { + color: #232136; +} + +.floating-notifications.background + .notification-row + .notification-background + .close-button:active { + background-color: #ea9a97; +} + +.control-center { + border-radius: 0.5rem; + margin: 1rem; + background-color: #232136; + color: #e0def4; + padding: 1rem; + border: 1px solid #6e6a86; +} + +.control-center .widget-title { + color: #ea9a97; + font-weight: bold; +} + +.control-center .widget-title button { + border-radius: 0.5rem; + color: #e0def4; + background-color: #2a273f; + border: 1px solid #6e6a86; + padding: 0.5rem; +} + +.control-center .widget-title button:hover { + background-color: #393552; +} + +.control-center .widget-title button:active { + background-color: #6e6a86; +} + +.control-center .notification-row .notification-background { + border-radius: 0.5rem; + margin: 0.5rem 0; + background-color: #2a273f; + color: #e0def4; + border: 1px solid #6e6a86; +} + +.control-center .notification-row .notification-background .notification { + padding: 0.5rem; + border-radius: 0.5rem; +} + +.control-center + .notification-row + .notification-background + .notification.critical { + border: 1px solid #eb6f92; +} + +.control-center + .notification-row + .notification-background + .notification + .notification-content { + color: #e0def4; +} + +.control-center + .notification-row + .notification-background + .notification + .notification-content + .summary { + margin: 0.5rem; + color: #e0def4; + font-weight: bold; +} + +.control-center + .notification-row + .notification-background + .notification + .notification-content + .body { + margin: 0.5rem; + color: #908caa; +} + +.control-center + .notification-row + .notification-background + .notification + > *:last-child + > * { + min-height: 3rem; +} + +.control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action { + border-radius: 0.5rem; + color: #e0def4; + background-color: #2a273f; + border: 1px solid #6e6a86; +} + +.control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:hover { + background-color: #393552; +} + +.control-center + .notification-row + .notification-background + .notification + > *:last-child + > * + .notification-action:active { + background-color: #6e6a86; +} + +.control-center .notification-row .notification-background .close-button { + margin: 0.5rem; + padding: 0.25rem; + border-radius: 0.5rem; + color: #e0def4; + background-color: #eb6f92; +} + +.control-center .notification-row .notification-background .close-button:hover { + color: #232136; +} + +.control-center + .notification-row + .notification-background + .close-button:active { + background-color: #ea9a97; +} + +progressbar, +progress, +trough { + border-radius: 0.5rem; +} + +.notification.critical progress { + background-color: #eb6f92; +} + +.notification.low progress, +.notification.normal progress { + background-color: #9ccfd8; +} + +trough { + background-color: #2a273f; +} + +.control-center trough { + background-color: #6e6a86; +} + +.control-center-dnd { + margin: 1rem 0; + border-radius: 0.5rem; +} + +.control-center-dnd slider { + background: #393552; + border-radius: 0.5rem; +} + +.widget-dnd { + color: #908caa; +} + +.widget-dnd > switch { + border-radius: 0.5rem; + background: #393552; + border: 1px solid #6e6a86; +} + +.widget-dnd > switch:checked slider { + background: #3e8fb0; +} + +.widget-dnd > switch slider { + background: #6e6a86; + border-radius: 0.5rem; + margin: 0.25rem; +} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index fab9dd5..4902eb9 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -141,3 +141,4 @@ button:hover { border-radius: 20px; margin: 0 5px; } +@import "theme.css"; diff --git a/wofi/.config/wofi/style.css b/wofi/.config/wofi/style.css index a1d3662..3dc0445 100644 --- a/wofi/.config/wofi/style.css +++ b/wofi/.config/wofi/style.css @@ -1,138 +1,57 @@ -@define-color rosewater #f5e0dc; -@define-color rosewater-rgb rgb(245, 224, 220); -@define-color flamingo #f2cdcd; -@define-color flamingo-rgb rgb(242, 205, 205); -@define-color pink #f5c2e7; -@define-color pink-rgb rgb(245, 194, 231); -@define-color mauve #cba6f7; -@define-color mauve-rgb rgb(203, 166, 247); -@define-color red #f38ba8; -@define-color red-rgb rgb(243, 139, 168); -@define-color maroon #eba0ac; -@define-color maroon-rgb rgb(235, 160, 172); -@define-color peach #fab387; -@define-color peach-rgb rgb(250, 179, 135); -@define-color yellow #f9e2af; -@define-color yellow-rgb rgb(249, 226, 175); -@define-color green #a6e3a1; -@define-color green-rgb rgb(166, 227, 161); -@define-color teal #94e2d5; -@define-color teal-rgb rgb(148, 226, 213); -@define-color sky #89dceb; -@define-color sky-rgb rgb(137, 220, 235); -@define-color sapphire #74c7ec; -@define-color sapphire-rgb rgb(116, 199, 236); -@define-color blue #89b4fa; -@define-color blue-rgb rgb(137, 180, 250); -@define-color lavender #b4befe; -@define-color lavender-rgb rgb(180, 190, 254); -@define-color text #cdd6f4; -@define-color text-rgb rgb(205, 214, 244); -@define-color subtext1 #bac2de; -@define-color subtext1-rgb rgb(186, 194, 222); -@define-color subtext0 #a6adc8; -@define-color subtext0-rgb rgb(166, 173, 200); -@define-color overlay2 #9399b2; -@define-color overlay2-rgb rgb(147, 153, 178); -@define-color overlay1 #7f849c; -@define-color overlay1-rgb rgb(127, 132, 156); -@define-color overlay0 #6c7086; -@define-color overlay0-rgb rgb(108, 112, 134); -@define-color surface2 #585b70; -@define-color surface2-rgb rgb(88, 91, 112); -@define-color surface1 #45475a; -@define-color surface1-rgb rgb(69, 71, 90); -@define-color surface0 #313244; -@define-color surface0-rgb rgb(49, 50, 68); -@define-color base #1e1e2e; -@define-color base-rgb rgb(30, 30, 46); -@define-color mantle #181825; -@define-color mantle-rgb rgb(24, 24, 37); -@define-color crust #11111b; -@define-color crust-rgb rgb(17, 17, 27); +/* * { */ +/* font-family: "CaskaydiaCove Nerd Font", monospace; */ +/* font-size: 18px; */ +/* } */ -* { - font-family: 'CaskaydiaCove Nerd Font', monospace; - font-size: 18px; -} - -/* Window */ window { margin: 0px; - padding: 10px; - border: 2px solid @lavender; + border: 1px solid #bd93f9; border-radius: 8px; - background-color: @base; + background-color: #282a36; +} + +#input { + margin: 5px; + border: none; + color: #f8f8f2; + background-color: #44475a; } -/* Inner Box */ #inner-box { margin: 5px; - padding: 10px; border: none; - background-color: @base; + background-color: #282a36; } -/* Outer Box */ #outer-box { margin: 5px; - padding: 10px; border: none; - background-color: @base; + background-color: #282a36; } -/* Scroll */ #scroll { margin: 0px; - padding: 10px; border: none; - background-color: @base; } -/* Input */ -#input { - margin: 5px 20px; - padding: 10px; - border: none; - border-radius: 0.1em; - color: @text; - background-color: @base; -} - -#input image { - border: none; - color: @red; -} - -#input * { - outline: 4px solid @red!important; -} - -/* Text */ #text { margin: 5px; border: none; - color: @text; + color: #f8f8f2; } -#entry { - background-color: @base; +#entry.activatable #text { + color: #282a36; } -#entry arrow { - border: none; - color: @lavender; +#entry > * { + color: #f8f8f2; } -/* Selected Entry */ #entry:selected { - border: 0.11em solid @lavender; + background-color: #44475a; } #entry:selected #text { - color: @mauve; -} - -#entry:drop(active) { - background-color: @lavender!important; + font-weight: bold; } diff --git a/wofi/.config/wofi/style_1.css b/wofi/.config/wofi/style_1.css new file mode 100644 index 0000000..2c0aaa2 --- /dev/null +++ b/wofi/.config/wofi/style_1.css @@ -0,0 +1,87 @@ +@import "theme.css"; + +* { + font-family: "CaskaydiaCove Nerd Font", monospace; + font-size: 18px; +} + +/* Window */ +window { + margin: 0px; + padding: 10px; + border: 2px solid @lavender; + border-radius: 8px; + background-color: @base; +} + +/* Inner Box */ +#inner-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; +} + +/* Outer Box */ +#outer-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; +} + +/* Scroll */ +#scroll { + margin: 0px; + padding: 10px; + border: none; + background-color: @base; +} + +/* Input */ +#input { + margin: 5px 20px; + padding: 10px; + border: none; + border-radius: 0.1em; + color: @text; + background-color: @base; +} + +#input image { + border: none; + color: @red; +} + +#input * { + outline: 4px solid @red!important; +} + +/* Text */ +#text { + margin: 5px; + border: none; + color: @text; +} + +#entry { + background-color: @base; +} + +#entry arrow { + border: none; + color: @lavender; +} + +/* Selected Entry */ +#entry:selected { + border: 0.11em solid @lavender; +} + +#entry:selected #text { + color: @mauve; +} + +#entry:drop(active) { + background-color: @lavender!important; +} diff --git a/wofi/.config/wofi/themes/dracula.css b/wofi/.config/wofi/themes/dracula.css new file mode 100644 index 0000000..9476152 --- /dev/null +++ b/wofi/.config/wofi/themes/dracula.css @@ -0,0 +1,51 @@ +window { + margin: 0px; + border: 1px solid #bd93f9; + background-color: #282a36; +} + +#input { + margin: 5px; + border: none; + color: #f8f8f2; + background-color: #44475a; +} + +#inner-box { + margin: 5px; + border: none; + background-color: #282a36; +} + +#outer-box { + margin: 5px; + border: none; + background-color: #282a36; +} + +#scroll { + margin: 0px; + border: none; +} + +#text { + margin: 5px; + border: none; + color: #f8f8f2; +} + +#entry.activatable #text { + color: #282a36; +} + +#entry > * { + color: #f8f8f2; +} + +#entry:selected { + background-color: #44475a; +} + +#entry:selected #text { + font-weight: bold; +} diff --git a/wofi/.config/wofi/themes/rose-pine-moon.css b/wofi/.config/wofi/themes/rose-pine-moon.css new file mode 100644 index 0000000..2f484d2 --- /dev/null +++ b/wofi/.config/wofi/themes/rose-pine-moon.css @@ -0,0 +1,57 @@ +window { + margin: 0px; + background-color: #232136; + border-radius: 0px; + border: 2px solid #eb6f92; + color: #e0def4; + font-family: "Monofur Nerd Font"; + font-size: 20px; +} + +#input { + margin: 5px; + border-radius: 0px; + border: none; + border-radius: 0px; + color: #eb6f92; + background-color: #393552; +} + +#inner-box { + margin: 5px; + border: none; + background-color: #393552; + color: #232136; + border-radius: 0px; +} + +#outer-box { + margin: 15px; + border: none; + background-color: #232136; +} + +#scroll { + margin: 0px; + border: none; +} + +#text { + margin: 5px; + border: none; + color: #e0def4; +} + +#entry:selected { + background-color: #eb6f92; + color: #232136; + border-radius: 0px; + outline: none; +} + +#entry:selected * { + background-color: #eb6f92; + color: #232136; + border-radius: 0px; + outline: none; +} diff --git a/yazi/.config/yazi/flavors/dracula.yazi b/yazi/.config/yazi/flavors/dracula.yazi new file mode 160000 index 0000000..1b1a8d1 --- /dev/null +++ b/yazi/.config/yazi/flavors/dracula.yazi @@ -0,0 +1 @@ +Subproject commit 1b1a8d1083474defa9e4c1c3de4db9576f23175f diff --git a/yazi/.config/yazi/init.lua b/yazi/.config/yazi/init.lua index 221abb7..2276cd7 100644 --- a/yazi/.config/yazi/init.lua +++ b/yazi/.config/yazi/init.lua @@ -1,3 +1,63 @@ +-- Change this to switch themes +local THEME = "carbonfox" + +local theme_colors = { + carbonfox = { + primary = "#78a9ff", + secondary = "#525252", + yanked = "#3ddbd9", + cut = "#ff7eb6", + }, + kanagawa = { + primary = "#7e9cd8", + secondary = "#54546d", + yanked = "#7aa89f", + cut = "#e82424", + }, + sonokai = { + primary = "#76cce0", + secondary = "#7f8490", + yanked = "#fc5d7c", + cut = "#f85e84", + }, + catppuccin = { + primary = "#89b4fa", + secondary = "#6c7086", + yanked = "#94e2d5", + cut = "#f38ba8", + }, +} + +local c = theme_colors[THEME] + +require("yaziline"):setup({ + color = c.primary, + secondary_color = c.secondary, + default_files_color = "darkgray", + selected_files_color = "white", + yanked_files_color = c.yanked, + cut_files_color = c.cut, + separator_style = "angly", -- "angly" | "curvy" | "liney" | "empty" + separator_open = "", + separator_close = "", + separator_open_thin = "", + separator_close_thin = "", + separator_head = "", + separator_tail = "", + + select_symbol = "", + yank_symbol = "󰆐", + + filename_max_length = 24, -- truncate when filename > 24 + filename_truncate_length = 6, -- leave 6 chars on both sides + filename_truncate_separator = "...", +}) + +-- require("recycle-bin") +-- setup({ +-- trash_dir = "~/.local/share/Trash/", +-- }) + require("omp"):setup({ config = "/home/liph/.config/yazi/omp/omp.toml" }) require("mime-ext"):setup({ @@ -189,29 +249,69 @@ require("simple-tag"):setup({ ["p"] = "", }, }) -require("yaziline"):setup({ - color = "#f9e2af", - secondary_color = "#5A6078", - default_files_color = "darkgray", -- color of the file counter when it's inactive - selected_files_color = "white", - yanked_files_color = "blue", - cut_files_color = "red", - - separator_style = "angly", -- "angly" | "curvy" | "liney" | "empty" - separator_open = "", - separator_close = "", - separator_open_thin = "", - separator_close_thin = "", - separator_head = "", - separator_tail = "", - - select_symbol = "", - yank_symbol = "󰆐", - - filename_max_length = 24, -- truncate when filename > 24 - filename_truncate_length = 6, -- leave 6 chars on both sides - filename_truncate_separator = "...", -}) -- require("omp"):setup({ -- config = "/home/liph/.config/ohmyposh/yazi-zen.json", -- }) + +-- default config +require("fchar"):setup({ + -- if true: f -> file, File, FILE + insensitive = true, + -- if true: f -> file, .file, @file, #file, ...file + skip_symbols = true, + -- if {"yazi-"}: f -> file, yazi-file + skip_prefix = {}, + -- start: f -> file + -- word: f -> file, also-file + -- all: f -> file, also-file, alsofile, elf + search_location = "start", + aliases = {}, +}) + +-- aliases for German +require("fchar"):setup({ + aliases = { + a = "ä", + o = "ö", + u = "ü", + s = "ß", + }, +}) + +-- you may want to turn off the search regex from +-- showing up in the header by doing this +function Header:flags() + local cwd = self._current.cwd + local filter = self._current.files.filter + + local t = {} + if cwd.is_search then + t[#t + 1] = string.format("search: %s", cwd.domain) + end + if filter then + t[#t + 1] = string.format("filter: %s", filter) + end + return #t == 0 and "" or " (" .. table.concat(t, ", ") .. ")" +end + +require("dupes"):setup({ + -- Global settings + save_op = false, -- Save results to file by default + -- auto_confirm = true, -- Skip confirmation for apply (use with caution!) + + profiles = { + -- Interactive mode: recursively scan and display duplicates + interactive = { + args = { "-r" }, + }, + -- Apply mode: recursively scan and DELETE duplicates + apply = { + args = { "-r", "-N", "-d" }, + save_op = true, -- Save results before deletion + }, + -- Custom profile example (uncomment to use) + -- custom = { + -- args = { "-r", "-s", }, -- Your custom jdupes flags + -- }, + }, +}) diff --git a/yazi/.config/yazi/keymap.toml b/yazi/.config/yazi/keymap.toml index 744d0d3..0448b07 100644 --- a/yazi/.config/yazi/keymap.toml +++ b/yazi/.config/yazi/keymap.toml @@ -1,32 +1,97 @@ [mgr] prepend_keymap = [ - # toggle-pane plugin + + + ### smart-paste plugin ### + { on = "P", run = "plugin smart-paste", desc = "Paste into the hovered directory or CWD" }, + + ### open-with-cmd plugin ### + { on = "o", run = "plugin open-with-cmd -- block", desc = "Open with command in the terminal" }, + { on = "O", run = "plugin open-with-cmd", desc = "Open with command" }, + + ### bypass plugin ### + { on = [ + "L", + ], run = "plugin bypass", desc = "Recursively enter child directory, skipping children with only a single subdirectory" }, + { on = [ + "H", + ], run = "plugin bypass reverse", desc = "Recursively enter parent directory, skipping parents with only a single subdirectory" }, + + ### recycle-bin plugin + { on = [ + "R", + "b", + ], run = "plugin recycle-bin", desc = "Open Recycle Bin menu" }, + + ### dupes plugin ### + { on = [ + "", + "i", + ], run = "plugin dupes interactive", desc = "Run dupes interactive" }, + { on = [ + "", + "o", + ], run = "plugin dupes override", desc = "Run dupes override" }, + { on = [ + "", + "d", + ], run = "plugin dupes dry", desc = "Run dupes dry" }, + { on = [ + "", + "a", + ], run = "plugin dupes apply", desc = "Run dupes apply" }, + { on = [ + "", + "c", + ], run = "plugin dupes custom", desc = "Run dupes custom" }, + + ### toggle-pane plugin ### { on = "W", run = "plugin toggle-pane max-preview", desc = "Maximize or restore the preview pane" }, { on = "E", run = "plugin toggle-pane min-preview", desc = "Minimize or restore the preview pane" }, - # what size plugin - { on = "n", run = "plugin what-size", desc = "Calc size of selection or cwd" }, - { on = "F", run = "plugin smart-filter", desc = "Smart filter" }, - # rsync plugin + + ### what size plugin ### + { on = "i", run = "plugin what-size", desc = "Calc size of selection or cwd" }, + + ### rsync plugin ### { on = [ "R", ], run = "plugin rsync", desc = "Copy files using rsync" }, - # yafg plugin + + ### yafg plugin ### { on = [ "F", "G", ], run = "plugin yafg" }, - # lazygit plugin + + ###### GIT ###### + ### open-git-remote plugin ### + { on = [ + "g", + "l", + ], run = "plugin open-git-remote", desc = "open git remote url" }, + ### lazygit plugin ### { on = [ "g", "i", ], run = "plugin lazygit", desc = "run lazygit" }, - # mount plugin + ### vcs-files plugin ### + { on = [ + "g", + "c", + ], run = "plugin vcs-files", desc = "Show Git file changes" }, + + ### mount plugin ### { on = "M", run = "plugin mount" }, - # smart-enter plugin + + # ### smart-enter plugin ### { on = "l", run = "plugin smart-enter", desc = "Enter the child directory, or open the file" }, - # jump-to-char plugin - { on = "f", run = "plugin jump-to-char", desc = "Jump to char" }, - # whoosh plugin + + ### f-char plugin ### + { on = "f", run = "plugin fchar", desc = "Jump to char" }, + # ### jump-to-char plugin ### + # { on = "f", run = "plugin jump-to-char", desc = "Jump to char" }, + + ### whoosh plugin ### { on = "[", run = "plugin whoosh jump_by_key", desc = "Jump bookmark by key" }, # Direct fuzzy search access { on = "}", run = "plugin whoosh jump_by_fzf", desc = "Direct fuzzy search for bookmarks" }, @@ -39,7 +104,7 @@ prepend_keymap = [ "]", "A", ], run = "plugin whoosh save_cwd", desc = "Add bookmark (current directory)" }, - ## Temporary bookmarks + # Temporary bookmarks { on = [ "]", "t", @@ -48,13 +113,13 @@ prepend_keymap = [ "]", "T", ], run = "plugin whoosh save_cwd_temp", desc = "Add temporary bookmark (current directory)" }, - ## Jump to bookmarks + # Jump to bookmarks { on = "", run = "plugin whoosh jump_key_k", desc = "Jump directly to bookmark with key k" }, { on = [ "]", "f", ], run = "plugin whoosh jump_by_fzf", desc = "Jump bookmark by fzf" }, - ## Delete bookmarks + # Delete bookmarks { on = [ "]", "d", @@ -67,7 +132,7 @@ prepend_keymap = [ "]", "C", ], run = "plugin whoosh delete_all", desc = "Delete all user bookmarks" }, - ## Rename Bookmarks + # Rename Bookmarks { on = [ "]", "r", @@ -80,13 +145,15 @@ prepend_keymap = [ { on = [ "", ], run = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, - { on = [ - "q", - ], run = "quit", desc = "Exit the process" }, + # { on = [ + # "q", + # "q", + # ], run = "quit", desc = "Exit the process" }, { on = [ "", ], run = "close", desc = "Close the current tab, or quit if it is last tab" }, - # projects plugin + + ### projects plugin ### { on = [ "P", "p", @@ -119,7 +186,8 @@ prepend_keymap = [ "P", "M", ], run = "plugin projects 'merge all'", desc = "Merge current project to other projects" }, - # fazif plugin + + ### fazif plugin ### { on = [ "b", "d", @@ -136,8 +204,9 @@ prepend_keymap = [ "b", "R", ], run = "plugin fazif fazifrga", desc = "Find content in documents with ripgrep-all and fzf" }, - # Tagging plugin - # ─────────────────────────── TOGGLE TAG(S) ──────────────────────────── + + ### Tagging plugin ### + # TOGGLE TAG(S) { on = [ "t", "t", @@ -154,7 +223,7 @@ prepend_keymap = [ "t", "i", ], run = "plugin simple-tag -- toggle-tag --input", desc = "Toggle tag(s) with value from (input box)" }, - # ─────────────────────────── ADD TAG(S) ─────────────────────────────── + # ADD TAG(S) { on = [ "t", "a", @@ -166,7 +235,7 @@ prepend_keymap = [ "a", "i", ], run = "plugin simple-tag -- add-tag --input", desc = "Add tag(s) with value from (input box)" }, - # ─────────────────────────── REMOVE/DELETE TAG(S) ─────────────────────────── + # REMOVE/DELETE TAG(S) { on = [ "t", "d", @@ -182,7 +251,7 @@ prepend_keymap = [ "d", "i", ], run = "plugin simple-tag -- remove-tag --input", desc = "Remove tag(s) with value from (input box)" }, - # ─────────────────────────── REPLACE ALL OLD TAG(S) WITH NEW TAG(S) ─────────────────────────── + # REPLACE ALL OLD TAG(S) WITH NEW TAG(S) { on = [ "t", "r", @@ -198,17 +267,17 @@ prepend_keymap = [ "r", "i", ], run = "plugin simple-tag -- replace-tag --input", desc = "Replace tag(s) with value from (input box)" }, - # ─────────────────────────── EDIT TAG(S) ─────────────────────────── + # EDIT TAG(S) { on = [ "t", "e", ], run = "plugin simple-tag -- edit-tag ", desc = "Edit tag(s) (input box)" }, - # ───────────────────────────── CLEAR TAG(S) ───────────────────────────── + # CLEAR TAG(S) { on = [ "t", "c", ], run = "plugin simple-tag -- clear", desc = "Clear all tags from selected or hovered files" }, - # ───────────────────────────── CHANGE UI ───────────────────────────── + # CHANGE UI { on = [ "t", "u", @@ -219,7 +288,7 @@ prepend_keymap = [ "u", "h", ], run = "plugin simple-tag -- toggle-ui --mode=hidden", desc = "Hide all tags indicator" }, - # ─────────────────────── FILTER FILES/FOLDERS BY TAGS: ─────────────────────── + # FILTER FILES/FOLDERS BY TAGS: { on = [ "t", "f", @@ -232,7 +301,7 @@ prepend_keymap = [ "t", "F", ], run = "plugin simple-tag -- filter --input --mode=or", desc = "Filter files/folders by contain tags (input box)" }, - # ─────────────────────── VISUAL SELECT FILES/FOLDERS BY TAGS: ─────────────────────── + # VISUAL SELECT FILES/FOLDERS BY TAGS: # Available selection actions: # replace → Replaces the current selection list with files/folders that have the selected tag. # unite → Combines the currently selected files/folders with those that have the selected tag. @@ -321,6 +390,7 @@ prepend_keymap = [ "s", "u", ], run = "plugin simple-tag -- undo-select", desc = "Undos/Redos the last selection action" }, + # Directory navigation { on = [ "k", @@ -395,26 +465,6 @@ prepend_keymap = [ { on = [ "3", ], run = "tab_switch 2", desc = "Switch to tab 3" }, - # Preview - { on = [ - "z", - ], run = "plugin --sync hide-preview", desc = "Toggle preview" }, - # Other - { on = [ - "g", - "h", - ], run = "cd ~", desc = "Go to home directory" }, - { on = [ - "g", - "c", - ], run = "cd ~/.config", desc = "Go to config directory" }, - { on = [ - "g", - "d", - ], run = "cd ~/Downloads", desc = "Go to downloads" }, - { on = [ - "~", - ], run = "help", desc = "Open help" }, ] [tasks] diff --git a/yazi/.config/yazi/omp/omp.json b/yazi/.config/yazi/omp/omp.json index d64d4e1..11ad18c 100644 --- a/yazi/.config/yazi/omp/omp.json +++ b/yazi/.config/yazi/omp/omp.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "palette": { "gb_bright_aqua": "#8ec07c", - "gb_bright_blue": "#83a598", + "gb_bright_blue": "#6272a4", "gb_bright_green": "#b8bb26", "gb_bright_orange": "#fe8019", "gb_bright_purple": "#d3869b", @@ -96,7 +96,7 @@ }, "leading_diamond": "\ue0b0", "trailing_diamond": "\ue0b0", - "template": "<#fabd2f,#427b58>{{.Var.Dir}}<#427b58,p:gb_bright_aqua>{{.Var.RightSep}} {{ .Path}}", + "template": "<#f1fa8c,#427b58>{{.Var.Dir}}<#427b58,p:gb_bright_aqua>{{.Var.RightSep}} {{ .Path}}", "foreground": "transparent", "background": "p:gb_bright_aqua", "type": "path", diff --git a/yazi/.config/yazi/omp/omp.toml b/yazi/.config/yazi/omp/omp.toml index d5fb7b0..d985a71 100644 --- a/yazi/.config/yazi/omp/omp.toml +++ b/yazi/.config/yazi/omp/omp.toml @@ -3,8 +3,8 @@ pwd = "osc7" version = 3 [palette] -gb_bright_lavender = "#b4befe" -gb_bright_maroon = "#f2cdcd" +gb_bright_path = "#89b4fa" +gb_bright_git = "#f9e2af" gb_dark0_hard = "#1d2021" gb_faded_green = "#79740e" gb_faded_red = "#9d0006" @@ -19,19 +19,19 @@ ssh = "🌐" type = "prompt" alignment = "left" -[[blocks.segments]] -template = "{{ if .Root }}# {{ else }}{{ end }}{{ .UserName }}{{ if .SSHSession }} {{.Var.ssh}}{{ end }} " -foreground = "p:gb_text" -background = "transparent" -type = "session" -style = "plain" +# [[blocks.segments]] +# template = "{{ if .Root }}# {{ else }}{{ end }}{{ .UserName }}{{ if .SSHSession }} {{.Var.ssh}}{{ end }} " +# foreground = "p:gb_text" +# background = "transparent" +# type = "session" +# style = "plain" -[blocks.segments.properties] -cache_duration = "none" +# [blocks.segments.properties] +# cache_duration = "none" [[blocks.segments]] template = "{{ .Path }} " -foreground = "p:gb_bright_lavender" +foreground = "p:gb_bright_path" background = "transparent" type = "path" style = "plain" @@ -42,7 +42,7 @@ enable_hyperlink = true [[blocks.segments]] template = "{{ .HEAD }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }} " -foreground = "p:gb_bright_maroon" +foreground = "p:gb_bright_git" background = "transparent" type = "git" style = "plain" diff --git a/yazi/.config/yazi/package.toml b/yazi/.config/yazi/package.toml index 0f71487..a85ea63 100644 --- a/yazi/.config/yazi/package.toml +++ b/yazi/.config/yazi/package.toml @@ -3,11 +3,6 @@ use = "yazi-rs/plugins:smart-enter" rev = "4e55902" hash = "56fdabc96fc1f4d53c96eb884b02a5be" -[[plugin.deps]] -use = "yazi-rs/plugins:jump-to-char" -rev = "4e55902" -hash = "ce67445ebb1bf3d97b8e44f50904b2c5" - [[plugin.deps]] use = "yazi-rs/plugins:git" rev = "4e55902" @@ -98,6 +93,46 @@ use = "yazi-rs/plugins:toggle-pane" rev = "57f1863" hash = "8a7c58225816a163a6e8730c0adafbc8" +[[plugin.deps]] +use = "AminurAlam/yazi-plugins:fchar" +rev = "658a099" +hash = "b484ff674a30268991b67f819f4625da" + +[[plugin.deps]] +use = "mshnwq/dupes" +rev = "18a9395" +hash = "730ddf5e1179f34ccb81f8d5ed564823" + +[[plugin.deps]] +use = "uhs-robert/recycle-bin" +rev = "69d7d4c" +hash = "38dac2fc8f4b50bbdaa46e699720a54a" + +[[plugin.deps]] +use = "Rolv-Apneseth/bypass" +rev = "c1e5fcf" +hash = "208e77480824f62558a5b037c8569d61" + +[[plugin.deps]] +use = "Ape/open-with-cmd" +rev = "e3d430f" +hash = "d29c1ffa99099181faf8c01d1f59aa4c" + +[[plugin.deps]] +use = "yazi-rs/plugins:smart-paste" +rev = "56971d0" +hash = "75fd60b2df7115e0a6ca31a6a804d320" + +[[plugin.deps]] +use = "larry-oates/open-git-remote" +rev = "95b3043" +hash = "8d17dcc063217b558a08ed8bb5e9e8ad" + +[[plugin.deps]] +use = "yazi-rs/plugins:vcs-files" +rev = "56971d0" +hash = "5cfd9b2bd3f8ec4e3245e3426a967f82" + [[flavor.deps]] use = "yazi-rs/flavors:catppuccin-mocha" rev = "4a1802a" diff --git a/yazi/.config/yazi/plugins/bypass.yazi/LICENSE b/yazi/.config/yazi/plugins/bypass.yazi/LICENSE new file mode 100644 index 0000000..c03ce66 --- /dev/null +++ b/yazi/.config/yazi/plugins/bypass.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Rolv Apneseth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/bypass.yazi/README.md b/yazi/.config/yazi/plugins/bypass.yazi/README.md new file mode 100644 index 0000000..9f10d04 --- /dev/null +++ b/yazi/.config/yazi/plugins/bypass.yazi/README.md @@ -0,0 +1,50 @@ +# bypass.yazi + +[Yazi](https://github.com/sxyazi/yazi) plugin for bidirectional skipping of directories which only have a single subdirectory + + + +## Requirements + +- [Yazi](https://github.com/sxyazi/yazi) v25.3.2+ + +## Installation + +```bash +ya pkg add Rolv-Apneseth/bypass +``` + +### Manual + +```sh +# Linux / MacOS +git clone https://github.com/Rolv-Apneseth/bypass.yazi.git ~/.config/yazi/plugins/bypass.yazi +# Windows +git clone https://github.com/Rolv-Apneseth/bypass.yazi.git %AppData%\yazi\config\plugins\bypass.yazi +``` + +## Usage + +Add this to your `keymap.toml`: + +```toml +[[mgr.prepend_keymap]] +on = [ "L" ] +run = "plugin bypass" +desc = "Recursively enter child directory, skipping children with only a single subdirectory" +[[mgr.prepend_keymap]] +on = [ "H" ] +run = "plugin bypass reverse" +desc = "Recursively enter parent directory, skipping parents with only a single subdirectory" +``` + +And that's it. You can bind any key you like, including overriding the default `enter` and `leave` bindings by setting them to `l` and `h` respectively. + +Note that if you're using the [smart enter tip](https://yazi-rs.github.io/docs/tips#smart-enter) from the documentation, this plugin can replace that entirely by using this keybind instead: + +```toml +[[mgr.prepend_keymap]] +on = [ "l" ] +run = "plugin bypass smart-enter" +desc = "Open a file, or recursively enter child directory, skipping children with only a single subdirectory" +``` diff --git a/yazi/.config/yazi/plugins/bypass.yazi/main.lua b/yazi/.config/yazi/plugins/bypass.yazi/main.lua new file mode 100644 index 0000000..7190f25 --- /dev/null +++ b/yazi/.config/yazi/plugins/bypass.yazi/main.lua @@ -0,0 +1,106 @@ +---@since 25.3.2 + +-- For development +--[[ local function notify(message) ]] +--[[ ya.notify({ title = "Bypass", content = message, timeout = 5 }) ]] +--[[ end ]] + +-- `ya.emit` as of 25.5.28 +local emit = ya.emit or ya.manager_emit + +---Returns the loading state of the current directory +---@type fun(): boolean +local is_directory_loading = ya.sync(function(_) + -- Try to use the v25.4.8 interface + local ok, res = pcall(cx.active.current.stage) + if ok then + return not res + -- Fallback to the v25.3.2 interface + else + return cx.active.current.stage.is_loading + end +end) + +---Enter hovered item if it is a directory +---@type fun(use_smart_enter: boolean): boolean +local initial = ya.sync(function(_, use_smart_enter) + local hovered = cx.active.current.hovered + if hovered == nil then + return false + end + + if not hovered.cha.is_dir then + -- Open file if using "smart enter" + if use_smart_enter then + emit("escape", { visual = true, select = true }) + emit("open", { hovered = true }) + end + return false + end + + emit("escape", { visual = true, select = true }) + emit("enter", { hovered = true }) + + return true +end) + +---Enter hovered item if it is a directory and is the only item in the parent +---@type fun(): boolean +local bypass = ya.sync(function(_) + local hovered = cx.active.current.hovered + + if hovered == nil or not hovered.cha.is_dir or #cx.active.current.files > 1 then + return false + end + + emit("enter", { hovered = true }) + + return true +end) + +---Leave the CWD, if the CWD has a parent +---@type fun(): boolean +local initial_rev = ya.sync(function(_) + if cx.active.parent == nil then + return false + end + + emit("escape", { visual = true, select = true }) + emit("leave", {}) + + return true +end) + +---Leave the CWD, if the CWD has a parent and contains only one item +---@type fun(): boolean +local bypass_rev = ya.sync(function(_) + if cx.active.parent == nil or #cx.active.current.files > 1 then + return false + end + + emit("leave", {}) + + return true +end) + +return { + entry = function(_, job) + -- old version of Yazi will pass args directly, new version passes job. Below code ensures we derive args in both 0.3 and 0.4 Yazi API versions. + local args = job.args or job + local use_smart_enter = args and args[1] == "smart-enter" + local is_reverse = args and args[1] == "reverse" + + -- Initial run, should behave like a regular enter/smart-enter/leave + local run = is_reverse and initial_rev() or initial(use_smart_enter) + + while run do + -- Wait for directory to have loaded + while is_directory_loading() do + ya.sleep(0.002) + end + + -- Conditional enter/smart-enter/leave + run = is_reverse and bypass_rev() or bypass() + end + end, +} diff --git a/yazi/.config/yazi/plugins/dupes.yazi/LICENSE b/yazi/.config/yazi/plugins/dupes.yazi/LICENSE new file mode 100644 index 0000000..e0f91df --- /dev/null +++ b/yazi/.config/yazi/plugins/dupes.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Mshnwq + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/dupes.yazi/README.md b/yazi/.config/yazi/plugins/dupes.yazi/README.md new file mode 100644 index 0000000..b2cc8a2 --- /dev/null +++ b/yazi/.config/yazi/plugins/dupes.yazi/README.md @@ -0,0 +1,221 @@ +# Dupes Plugin for Yazi + +Duplicate files plugin for [Yazi](https://github.com/sxyazi/yazi) file manager, leveraging [jdupes](https://codeberg.org/jbruchon/jdupes) for fast and efficient duplicate detection. + +> [!NOTE] +> The latest release of Yazi is required at the moment. + +https://github.com/user-attachments/assets/1d87bb52-d326-4720-834c-baac74008d7d + +## Features + +- 🔍 **Fast Duplicate Detection** - Uses jdupes for high-performance scanning +- 👁️ **Visual Preview** - See duplicates directly in Yazi with deletion markers +- 🧪 **Dry Run Mode** - Preview what will be deleted before applying changes +- ⚙️ **Profile System** - Define custom scanning or override profiles for different use cases +- 💾 **Export Results** - Save scan results to JSON or text files +- 🔒 **Safe by Default** - Confirmation required for destructive operations + +## Requirements + +- [Yazi](https://github.com/sxyazi/yazi) file manager (v25.5.31+) +- [jdupes](https://codeberg.org/jbruchon/jdupes) command-line tool + +## Installation + +**Using yazi package manager:** +```sh +ya pkg add mshnwq/dupes +``` + +**Using nix home-manager (nixpkgs): (recommended)** +```nix +{ pkgs, ... }: { + programs.yazi = { + enable = true; + plugins = { + # jdupes is self contained within + dupes = pkgs.yaziPlugins.dupes + }; + }; +} +``` + +**Using nix home-manager (github):** +```nix +{ pkgs, ... }: { + home.packages = with pkgs; [ jdupes ]; + programs.yazi = { + enable = true; + plugins = { + dupes = pkgs.fetchFromGitHub { + owner = "mshnwq"; + repo = "dupes.yazi"; + rev = "4666b6f299c2257c011f622319ae97fab8adbabe"; + hash = "sha256-v9xuSY/i/trIHHbOPbijd0AmcUb2vufNL9BSjBE6+Vo="; + }; + }; + }; +} +``` + +**Manual installation:** +```sh +git clone https://github.com/mshnwq/dupes.yazi.git ~/.config/yazi/plugins/dupes.yazi +``` + +## Usage + +Configuration in `~/.config/yazi/init.lua`: +```lua +require("dupes"):setup { + -- Global settings + save_op = false, -- Save results to file by default + -- auto_confirm = true, -- Skip confirmation for apply (use with caution!) + + profiles = { + -- Interactive mode: recursively scan and display duplicates + interactive = { + args = { "-r" }, + }, + -- Apply mode: recursively scan and DELETE duplicates + apply = { + args = { "-r", "-N", "-d" }, + save_op = true, -- Save results before deletion + }, + -- Custom profile example (uncomment to use) + -- custom = { + -- args = { "-r", "-s", }, -- Your custom jdupes flags + -- }, + }, +} +``` + +Keybindings in `~/.config/yazi/keymap.toml`: +```toml +[[manager.prepend_keymap]] +on = ["", "i"] +run = "plugin dupes interactive" +desc = "Run dupes interactive" + +[[manager.prepend_keymap]] +on = ["", "o"] +run = "plugin dupes override" +desc = "Run dupes override" + +[[manager.prepend_keymap]] +on = ["", "d"] +run = "plugin dupes dry" +desc = "Run dupes dry" + +[[manager.prepend_keymap]] +on = ["", "a"] +run = "plugin dupes apply" +desc = "Run dupes apply" + +# [[mgr.prepend_keymap]] +# on = ["", "c"] +# run = "plugin dupes custom" +# desc = "Run dupes custom" +``` + +### Profiles + +#### 🔍 Interactive Mode +Scans for duplicates and displays them in Yazi. Safe to use - no files are deleted. + +```lua +interactive = { + args = { "-r" }, -- Recursive scan +} +``` +#### 🧪 Dry Run Mode (inherits apply mode) +Shows what **would** be deleted using the same settings as apply mode. Files marked 'X' will be deleted. The first file in each duplicate set is kept. + +- Normal files: displayed normally (will be kept) +- Files marked 'X': will be deleted + +#### ⚠️ Apply Mode +**DESTRUCTIVE OPERATION** - Permanently deletes duplicate files. + +```lua +apply = { + args = { "-r", "-N", "-d" }, + save_op = true, -- Saves results to dupes.json +} +``` + +#### 🛠️ Override Mode +Opens an input dialog where you can enter custom jdupes arguments for one-time scans. + +**Example inputs:** +- `-r -s` - Recursive, follow symlinks + +## Configuration Options + +### Global Settings + +```lua +require("dupes"):setup { + save_op = false, -- Default: don't save results to file + auto_confirm = false, -- Default: prompt before deletion + profiles = { + -- Your profiles here + }, +} +``` + +### Profile Settings + +Each profile can have: + +```lua +profile_name = { + args = { "-r", "-N" }, -- jdupes command arguments + save_op = true, -- Override global save_op for this profile +} +``` + +### Common jdupes Flags + +| Flag | Description | +|------|-------------| +| `-r` | Recursive search in subdirectories | +| `-d` | **DELETE duplicates (DESTRUCTIVE!)** | +| `-j` | JSON output (added by plugin) | +| `-s` | Follows symbolic links | + +See `jdupes --help` for complete flag list. + +## Custom Examples + +### Example: Find duplicates in current directory only +```lua +shallow = { + args = {}, -- No -r flag, current directory only +} +``` + +## Output Files + +When `save_op = true`, results are saved to: + +- **dupes.json** - JSON format +- **dupes.txt** - Text format (when destructive) + +Files are saved in the current working directory. + +## License + +This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. + +## Credits + +- [Yazi](https://github.com/sxyazi/yazi) file manager +- [jdupes](https://codeberg.org/jbruchon/jdupes) for duplicate detection +- [boydaihungst](https://github.com/boydaihungst) for help on Yazi's [Discord](https://discord.gg/qfADduSdJu) channel + +## See Also + +- [jdupes Documentation](https://codeberg.org/jbruchon/jdupes) +- [Yazi Plugins](https://yazi-rs.github.io/docs/plugins/overview) diff --git a/yazi/.config/yazi/plugins/dupes.yazi/main.lua b/yazi/.config/yazi/plugins/dupes.yazi/main.lua new file mode 100644 index 0000000..f3f9aa2 --- /dev/null +++ b/yazi/.config/yazi/plugins/dupes.yazi/main.lua @@ -0,0 +1,600 @@ +--- Dupes Plugin: Dynamic jdupes runner for Yazi file manager +--- @since 25.5.31 +--- @description Finds and manages duplicate files using jdupes + +local M = {} + +-- ============================================================================ +-- STATE MANAGEMENT +-- ============================================================================ + +--- Thread-safe state setter +--- @param state table The global state object +--- @param key string State key to set +--- @param value any Value to store +local set_state = ya.sync(function(state, key, value) state[key] = value end) + +--- Thread-safe state getter +--- @param state table The global state object +--- @param key string State key to retrieve +--- @return any The stored value +local get_state = ya.sync(function(state, key) return state[key] end) + +--- Get current working directory from Yazi context +--- @return string Current working directory path +local get_cwd = ya.sync(function() return cx.active.current.cwd end) + +-- ============================================================================ +-- DISPLAY FUNCTIONS +-- ============================================================================ + +--- Display duplicate files in Yazi's file list +--- @param _cwd string Current working directory +--- @param data table Parsed JSON data from jdupes output +--- @param style boolean If true, shows dry-run preview with deletion markers +local function display_dupes(_cwd, data, style) + -- Validate input data structure + if not data or not data.matchSets then + ya.dbg("Invalid or missing matchSets in JSON data") + ya.notify { + title = "Dupes Plugin", + content = "Invalid JSON data: no matchSets", + level = "error", + timeout = 5, + } + return + end + + ya.dbg(string.format("Entering display_dupes, cwd: %s", _cwd)) + + -- Create unique ID for this file operation + local id = ya.id("ft") + + -- Set search context title based on mode + local cwd + if style then + cwd = _cwd:into_search("Duplicate files Dry Run Preview 'X means will be deleted'") + else + cwd = _cwd:into_search("Duplicate files") + end + + -- Navigate to the search view + ya.emit("cd", { Url(cwd) }) + + -- Initialize empty file list + ya.emit("update_files", { + op = fs.op("part", { id = id, url = Url(cwd), files = {} }), + }) + + -- Build file list from duplicate sets + local files = {} + for i, matchSet in ipairs(data.matchSets) do + local dupe_set = string.format("dup-set-%02d", i) + ya.dbg(string.format("Processing group: %s", dupe_set)) + + -- Process each file in the duplicate set + for j, fileObj in ipairs(matchSet.fileList) do + local url = Url(cwd):join(fileObj.filePath) + local cha = fs.cha(url, true) + + local file + if style then + -- In dry-run mode, mark files for deletion (except first one) + if j == 1 then + -- First file in set: keep it (normal display) + file = File { url = url, cha = cha } + else + -- Subsequent files: mark as dummy (will be deleted) + local dcha = Cha { + kind = 16, + is_dummy = true, + len = cha.len, + gid = cha.gid, + uid = cha.uid, + atime = cha.atime, + btime = cha.btime, + mtime = cha.mtime, + perm = cha.perm, + } + file = File { url = url, cha = dcha } + end + else + -- Normal mode: display all files equally + file = File { url = url, cha = cha } + end + + table.insert(files, file) + ya.dbg(string.format("[Dupes] Added file %s", file.url)) + end + end + + -- Update the file list in Yazi + ya.emit("update_files", { + op = fs.op("part", { id = id, url = Url(cwd), files = files }), + }) + + -- NOTE: Finalization with 'done' operation breaks file ordering + -- Keeping these commented for future investigation + -- ya.emit("update_files", { + -- op = fs.op("done", { + -- id = id, + -- url = Url(cwd), + -- cha = Cha({ kind = 16, mode = tonumber("100644", 8) }) + -- }) + -- }) + + -- Show notification with results + local mode_text = style and " (DRY RUN)" or "" + ya.notify { + title = "Dupes Plugin", + content = string.format("Found %d files%s", #files, mode_text), + level = "info", + timeout = 3, + } +end + +-- ============================================================================ +-- FILE SAVING FUNCTIONS +-- ============================================================================ + +--- Save jdupes output to file (JSON or plain text) +--- @param cwd string Directory to save the file in +--- @param stdout string Raw output from jdupes +--- @param format string Output format: "json" or "txt" +--- @return boolean success True if file was saved successfully +local function save_output(cwd, stdout, format) + -- Validate format + format = format or "json" + if format ~= "json" and format ~= "txt" then + ya.err(string.format("Invalid format '%s', defaulting to 'json'", format)) + format = "json" + end + + -- Construct file path + local file_path = string.format("%s/dupes.%s", cwd, format) + + -- Attempt to write file + local file, err = io.open(file_path, "w") + if not file then + ya.err(string.format("Failed to write dupes.%s to %s: %s", format, file_path, err or "unknown error")) + ya.notify { + title = "Dupes Plugin", + content = string.format("Failed to save file: %s", err or "unknown error"), + level = "error", + timeout = 5, + } + return false + end + + -- Write content and close + file:write(stdout) + file:close() + + -- Success notification + ya.notify { + title = "Dupes Plugin", + content = string.format("Saved dupes.%s to %s", format, file_path), + level = "info", + timeout = 3, + } + + return true +end + +-- ============================================================================ +-- COMMAND BUILDING AND VALIDATION +-- ============================================================================ + +--- Build final command arguments with proper flag handling +--- @param args table User-provided arguments +--- @param no_json boolean Whether to exclude JSON flag +--- @return table Final argument list +local function build_command_args(args, no_json) + -- Check if JSON flag already exists + local has_j_flag = false + for _, arg in ipairs(args) do + if arg:match("^%-[^-]*j") or arg == "-j" then + has_j_flag = true + break + end + end + + -- Build final argument list + local final_args = {} + + -- Add JSON flag if needed and not disabled + if not has_j_flag and not no_json then + table.insert(final_args, "-j") + end + + -- Add all user arguments + for _, arg in ipairs(args) do + table.insert(final_args, arg) + end + + return final_args +end + +--- Execute shell command with proper error handling +--- @param cmdline string Base command (e.g., "jdupes") +--- @param args table Command arguments +--- @return table Command result with status, stdout, stderr +local function execute_command(cmdline, args) + local argstr = table.concat(args, " ") + local full_cmd = string.format("%s . %s 2>&1", cmdline, argstr) + + ya.dbg(string.format("Executing: %s", full_cmd)) + + local cmd = Command(get_state("shell")):arg({ "-c", full_cmd }):stdout(Command.PIPED):stderr(Command.PIPED):output() + + -- Log execution results + ya.dbg(string.format("Exit code: %s", tostring(cmd.status.code))) + + if cmd.stdout and #cmd.stdout > 0 then + ya.dbg(string.format("STDOUT length: %d bytes", #cmd.stdout)) + end + + if cmd.stderr and #cmd.stderr > 0 then + ya.err(string.format("STDERR:\n%s", cmd.stderr)) + end + + return cmd +end + +-- ============================================================================ +-- CORE EXECUTION FUNCTION +-- ============================================================================ + +--- Execute jdupes with given profile configuration +--- @param profile_name string Name of the profile being run +--- @param conf table Configuration with cmdline and args +--- @param save_to_file boolean Whether to save output to file +--- @param no_display boolean Whether to skip displaying results in Yazi +--- @param no_json boolean Whether to output plain text instead of JSON +local function run_dupes(profile_name, conf, save_to_file, no_display, no_json) + -- Validate configuration + if not conf then + ya.err(string.format("ERROR: Profile '%s' configuration is nil!", profile_name)) + return + end + + if not conf.cmdline then + ya.err(string.format("ERROR: Profile '%s' missing cmdline", profile_name)) + return + end + + -- Extract configuration with defaults + local cmdline = conf.cmdline + local args = conf.args or {} + save_to_file = save_to_file or false + no_display = no_display or false + no_json = no_json or false + + -- Build command arguments + local final_args = build_command_args(args, no_json) + + -- Execute command + local cwd = get_cwd() + local cmd = execute_command(cmdline, final_args) + + -- Handle command results + if cmd.status.success then + -- Save output to file if requested + if save_to_file then + local format = no_json and "txt" or "json" + save_output(cwd, cmd.stdout, format) + end + + -- Display results in Yazi unless suppressed + if not no_display and not no_json then + local parsed_data = ya.json_decode(cmd.stdout) + if parsed_data then + local is_dry_run = (profile_name == "dry") + display_dupes(cwd, parsed_data, is_dry_run) + else + ya.err("Failed to parse JSON output from jdupes") + ya.notify { + title = "Dupes Plugin", + content = "Failed to parse command output", + level = "error", + timeout = 5, + } + return + end + end + + -- Success notification + ya.notify { + title = "Dupes Plugin", + content = string.format("Profile '%s' completed successfully", profile_name), + level = "info", + timeout = 3, + } + else + -- Error notification with details + local error_msg = cmd.stderr or "(no error details available)" + ya.notify { + title = "Dupes Plugin", + content = string.format("Command failed:\n%s", error_msg), + level = "error", + timeout = 5, + } + end +end + +-- ============================================================================ +-- PROFILE HANDLING +-- ============================================================================ + +--- Create dry-run configuration from apply profile +--- @param apply_conf table Apply profile configuration +--- @return table Dry-run configuration +local function create_dry_config(apply_conf) + local dry_args = {} + + -- Copy all arguments except destructive ones + for _, arg in ipairs(apply_conf.args) do + if arg ~= "-d" and arg ~= "--delete" then + table.insert(dry_args, arg) + else + ya.dbg(string.format("Excluded destructive flag: %s", arg)) + end + end + + return { + cmdline = apply_conf.cmdline, + args = dry_args, + } +end + +--- Parse custom arguments from user input +--- @param input string Space-separated argument string +--- @return table Parsed arguments +local function parse_custom_args(input) + local args = {} + for arg in input:gmatch("%S+") do + table.insert(args, arg) + end + return args +end + +-- ============================================================================ +-- UTILITY FUNCTIONS +-- ============================================================================ + +--- Recursively dump table contents for debugging +--- @param tbl table Table to dump +--- @param indent number Current indentation level +--- @return table Array of formatted lines +local function dump_table(tbl, indent) + indent = indent or 0 + local lines = {} + local prefix = string.rep(" ", indent) + + for k, v in pairs(tbl or {}) do + if type(v) == "table" then + table.insert(lines, string.format("%s%s = {", prefix, tostring(k))) + for _, line in ipairs(dump_table(v, indent + 1)) do + table.insert(lines, line) + end + table.insert(lines, string.format("%s},", prefix)) + else + table.insert(lines, string.format("%s%s = %q,", prefix, tostring(k), tostring(v))) + end + end + + return lines +end + +--- Count table entries +--- @param tbl table Table to count +--- @return number Number of entries +local function count_table(tbl) + local count = 0 + for _ in pairs(tbl or {}) do + count = count + 1 + end + return count +end + +-- ============================================================================ +-- PLUGIN LIFECYCLE FUNCTIONS +-- ============================================================================ + +--- Initialize the plugin with user configuration +--- Called from yazi/init.lua +--- @param opts table Configuration options +function M:setup(opts) + opts = opts or {} + + -- Set global options with defaults + set_state("save_op", opts.save_op or false) + set_state("auto_confirm", opts.auto_confirm or false) + set_state("cmdline", "jdupes") + set_state("shell", "bash") + + ya.dbg("Dupes Plugin Setup: Starting profile processing") + + -- Process and store user-defined profiles + local profiles = {} + if opts.profiles then + for profile_name, profile_conf in pairs(opts.profiles) do + -- Validate profile configuration + if not profile_conf then + ya.err(string.format("Profile '%s' has nil configuration, skipping", profile_name)) + else + local profile = { + cmdline = profile_conf.cmdline or get_state("cmdline"), + args = profile_conf.args or {}, + -- Profile-specific save_op overrides global setting + save_op = profile_conf.save_op ~= nil and profile_conf.save_op or get_state("save_op"), + } + profiles[profile_name] = profile + + -- Log detailed profile configuration + local profile_lines = dump_table(profile) + ya.dbg(string.format("Setup profile '%s':\n%s", tostring(profile_name), table.concat(profile_lines, "\n"))) + end + end + else + ya.dbg("Dupes Plugin Setup: No profiles provided in opts.profiles") + end + + set_state("profiles", profiles) + + -- Log summary + local profile_count = count_table(profiles) + ya.dbg(string.format("Dupes Plugin Setup: Complete with %d profiles", profile_count)) + + -- Register custom linemode to show deletion markers + -- Priority 1500 ensures it runs before most other linemodes + Linemode:children_add(function(self) + if not self._file.cha.is_dummy then + -- Normal file: no marker + return "" + elseif self._file.is_hovered then + -- Hovered dummy file: show black background 'X' + return ui.Line { " ", ui.Span("X"):style(ui.Style():bg("black")) } + else + -- Non-hovered dummy file: show red 'X' + return ui.Line({ " ", "X" }):style(ui.Style():fg("red")) + end + end, 1500) +end + +--- Main entry point when plugin is invoked +--- @param job string|table Profile name or job configuration +function M:entry(job) + -- Exit visual mode if active + ya.mgr_emit("escape", { visual = true }) + + -- Parse profile name from job argument + local profile_name = "interactive" -- default profile + if type(job) == "string" then + profile_name = job + elseif type(job) == "table" then + profile_name = (type(job.args) == "table" and job.args[1]) + or (type(job.args) == "string" and job.args) + or "interactive" + end + + ya.dbg(string.format("== Invoked profile: %s ==", profile_name)) + + -- ======================================================================== + -- SPECIAL PROFILE: override + -- Allows user to input custom jdupes arguments interactively + -- ======================================================================== + if profile_name == "override" then + ya.dbg("INFO: Waiting for custom input") + + local ov_args, ok = ya.input { + title = "Dupes Override - Enter custom args", + value = "-j", + position = { "top-center", y = 3, w = 45 }, + } + + if ok ~= 1 then + ya.dbg("Override cancelled by user") + return + end + + -- Parse and execute custom arguments + local p_args = parse_custom_args(ov_args) + run_dupes("override", { + cmdline = get_state("cmdline"), + args = p_args, + }, get_state("save_op")) + return + end + + -- ======================================================================== + -- SPECIAL PROFILE: dry + -- Inherits 'apply' profile but removes destructive flags for preview + -- ======================================================================== + if profile_name == "dry" then + local profiles = get_state("profiles") + local apply_conf = profiles["apply"] + + if not apply_conf then + ya.notify { + title = "Dupes Plugin", + content = "Cannot run dry: 'apply' profile missing.", + level = "error", + timeout = 4, + } + return + end + + -- Create dry-run configuration + local dry_conf = create_dry_config(apply_conf) + dry_conf.save_op = apply_conf.save_op + + run_dupes("dry", dry_conf, dry_conf.save_op) + return + end + + -- ======================================================================== + -- REGULAR PROFILE EXECUTION + -- ======================================================================== + local profiles = get_state("profiles") + local conf = profiles[profile_name] + + if not conf then + ya.err(string.format("ERROR: Profile '%s' not found", profile_name)) + ya.notify { + title = "Dupes Plugin", + content = string.format("Profile not found: %s", profile_name), + level = "error", + timeout = 3, + } + return + end + + -- ======================================================================== + -- SPECIAL PROFILE: apply + -- Destructive operation - requires confirmation and runs dry preview first + -- ======================================================================== + if profile_name == "apply" then + -- Check for auto-confirm or prompt user + local apply_confirm = get_state("auto_confirm") + or ya.confirm { + pos = { "center", y = -8, w = 36, h = 8 }, + title = "Confirm Deduplication operation?", + content = ui.Text { + ui.Line(""), + ui.Line("This will DELETE duplicate files!"):style(ui.Style():fg("red")), + ui.Line("If unsure, try dry run first"):style(th.confirm.content), + ui.Line(""), + }, + } + + if not apply_confirm then + ya.dbg("Apply cancelled by user") + ya.notify { + title = "Dupes Plugin", + content = "Operation cancelled", + level = "info", + timeout = 3, + } + return + end + + ya.dbg("Apply confirmed by user") + + -- First, run silent dry-run preview for logging + local dry_conf = create_dry_config(conf) + run_dupes("dry", dry_conf, conf.save_op, true) -- no_display = true + + -- Then execute actual deletion + run_dupes(profile_name, conf, conf.save_op, true, true) -- no_display, no_json + return + end + + -- ======================================================================== + -- STANDARD PROFILE EXECUTION + -- For 'interactive' and other custom profiles + -- ======================================================================== + run_dupes(profile_name, conf, conf.save_op) +end + +return M diff --git a/yazi/.config/yazi/plugins/fchar.yazi/LICENSE b/yazi/.config/yazi/plugins/fchar.yazi/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/yazi/.config/yazi/plugins/fchar.yazi/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/yazi/.config/yazi/plugins/fchar.yazi/README.md b/yazi/.config/yazi/plugins/fchar.yazi/README.md new file mode 100644 index 0000000..b687a92 --- /dev/null +++ b/yazi/.config/yazi/plugins/fchar.yazi/README.md @@ -0,0 +1,97 @@ +list of files with highlighted matching characters + +# Features + +- case insensitive matching +- supports aliases for different languages +- ignores leading non-alphabet +- can match characters anywhere in filename + +# Installation + +```sh +ya pkg add AminurAlam/yazi-plugins:fchar +``` + +# Usage + +in `~/.config/yazi/keymap.toml` + +```toml +[mgr] +prepend_keymap = [ + { on = "f", run = "plugin fchar", desc = "Jump to char" }, +] +``` + +in `~/.config/yazi/init.lua` + +```lua +-- default config +require('fchar'):setup { + -- if true: f -> file, File, FILE + insensitive = true, + -- if true: f -> file, .file, @file, #file, ...file + skip_symbols = true, + -- if {"yazi-"}: f -> file, yazi-file + skip_prefix = {}, + -- start: f -> file + -- word: f -> file, also-file + -- all: f -> file, also-file, alsofile, elf + search_location = 'start', + aliases = {}, +} + +-- aliases for German +require('fchar'):setup { + aliases = { + a = 'ä', + o = 'ö', + u = 'ü', + s = 'ß' + }, +} + +-- aliases for Japanese +require('fchar'):setup { + aliases = { + a = 'あア', + b = 'ばびぶべぼバビブベボ', + c = 'ちチ', + d = 'だぢづでどダヂヅデド', + e = 'えエ', + g = 'がぎぐげごガギグゲゴ', + h = 'はひふへほハヒフヘホ', + i = 'いイ', + j = 'じジ', + k = 'かきくけこカキクケコ', + m = 'まみむめもマミムメモ', + n = 'なにぬねのんナニヌネノン', + o = 'おオ', + p = 'ぱぴぷぺぽパピプペポ', + r = 'らりるれろラリルレロ', + s = 'さしすせそサシスセソ', + t = 'たつてとタツテト', + u = 'うウ', + w = 'わをワヲ', + y = 'やゆよヤユヨ', + z = 'ざずぜぞザズゼゾ', + }, +} + +-- you may want to turn off the search regex from +-- showing up in the header by doing this +function Header:flags() + local cwd = self._current.cwd + local filter = self._current.files.filter + + local t = {} + if cwd.is_search then + t[#t + 1] = string.format('search: %s', cwd.domain) + end + if filter then + t[#t + 1] = string.format('filter: %s', filter) + end + return #t == 0 and '' or ' (' .. table.concat(t, ', ') .. ')' +end +``` diff --git a/yazi/.config/yazi/plugins/fchar.yazi/main.lua b/yazi/.config/yazi/plugins/fchar.yazi/main.lua new file mode 100644 index 0000000..d7c6cea --- /dev/null +++ b/yazi/.config/yazi/plugins/fchar.yazi/main.lua @@ -0,0 +1,159 @@ +--- @since 25.5.31 + +local M = {} + +local changed = ya.sync(function(st, new) + local b = st.last ~= new + st.last = new + return b or not cx.active.finder +end) + +---@type fun(opts: FCharConf): nil +local set_config = ya.sync(function(st, opts) + st.opts = opts +end) + +---@type fun(): FCharConf +local get_config = ya.sync(function(st) + return st.opts + or { + -- if true: f -> file, File, FILE + insensitive = true, + -- if true: f -> file, .file, @file, #file, ...file + skip_symbols = true, + -- if {"yazi-"}: f -> file, yazi-file + skip_prefix = {}, + -- start: f -> file + -- word: f -> file, also-file + -- all: f -> file, also-file, twofile, elf + search_location = 'start', + aliases = {}, + } +end) + +local function tbl_deep_extend(default, config) + if type(config) ~= 'table' then + return config + end + + default = (type(default) == 'table') and default or {} + for key, _ in pairs(config) do + default[key] = tbl_deep_extend(default[key], config[key]) + end + + return default +end + +---@type fun(self, config: FCharConf): nil +function M:setup(config) + set_config(tbl_deep_extend(get_config(), config)) +end + +-- TODO: process `--flags` +function M:entry() + local cands = { + { on = '0' }, + { on = '1' }, + { on = '2' }, + { on = '3' }, + { on = '4' }, + { on = '5' }, + { on = '6' }, + { on = '7' }, + { on = '8' }, + { on = '9' }, + { on = '_' }, + { on = 'a' }, + { on = 'b' }, + { on = 'c' }, + { on = 'd' }, + { on = 'e' }, + { on = 'f' }, + { on = 'g' }, + { on = 'h' }, + { on = 'i' }, + { on = 'j' }, + { on = 'k' }, + { on = 'l' }, + { on = 'm' }, + { on = 'n' }, + { on = 'o' }, + { on = 'p' }, + { on = 'q' }, + { on = 'r' }, + { on = 's' }, + { on = 't' }, + { on = 'u' }, + { on = 'v' }, + { on = 'w' }, + { on = 'x' }, + { on = 'y' }, + { on = 'z' }, + { on = 'A' }, + { on = 'B' }, + { on = 'C' }, + { on = 'D' }, + { on = 'E' }, + { on = 'F' }, + { on = 'G' }, + { on = 'H' }, + { on = 'I' }, + { on = 'J' }, + { on = 'K' }, + { on = 'L' }, + { on = 'M' }, + { on = 'N' }, + { on = 'O' }, + { on = 'P' }, + { on = 'Q' }, + { on = 'R' }, + { on = 'S' }, + { on = 'T' }, + { on = 'U' }, + { on = 'V' }, + { on = 'W' }, + { on = 'X' }, + { on = 'Y' }, + { on = 'Z' }, + } + local opts = get_config() + + if opts.skip_symbols then + local additional_keys = '~.!@#-' + for i = 1, #additional_keys do + cands[#cands + 1] = { on = additional_keys:sub(i, i) } + end + end + + local idx = ya.which { cands = cands, silent = true } + if not idx then + return + end + + local loc = { + start = '^', + word = '(^|\\W)', + all = '', + } + + -- TODO: autodetect common prefix + local prefixes = '' + for _, prefix in ipairs(opts.skip_prefix) do + prefixes = prefixes .. '(' .. prefix .. ')?' + end + + local re = loc[opts.search_location] + .. ((opts.search_location == 'start' and opts.skip_symbols) and [[\W?]] or '') + .. prefixes + .. '[' + .. cands[idx].on + .. (opts.aliases[cands[idx].on] or '') + .. ']' + if changed(re) then + ya.emit('find_do', { re, insensitive = opts.insensitive }) + else + ya.emit('find_arrow', {}) + end +end + +return M diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua b/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua deleted file mode 100644 index 8a434f1..0000000 --- a/yazi/.config/yazi/plugins/jump-to-char.yazi/main.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- @since 25.5.31 - -local AVAILABLE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789." - -local changed = ya.sync(function(st, new) - local b = st.last ~= new - st.last = new - return b or not cx.active.finder -end) - -local escape = function(s) return s == "." and "\\." or s end - -return { - entry = function() - local cands = {} - for i = 1, #AVAILABLE_CHARS do - cands[#cands + 1] = { on = AVAILABLE_CHARS:sub(i, i) } - end - - local idx = ya.which { cands = cands, silent = true } - if not idx then - return - end - - local kw = escape(cands[idx].on) - if changed(kw) then - ya.emit("find_do", { "^" .. kw }) - else - ya.emit("find_arrow", {}) - end - end, -} diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE b/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE new file mode 100644 index 0000000..2720559 --- /dev/null +++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Ou + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md b/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md new file mode 100644 index 0000000..c6fcbcf --- /dev/null +++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/README.md @@ -0,0 +1,43 @@ +# open-git-remote.yazi +Plugin for [Yazi](https://github.com/sxyazi/yazi) to open git repos's remote url quickly with a shortcut. +Jump to the github page from yazi! + +Inspired by [Sylvan Franklin](https://www.youtube.com/watch?v=YDd0MYtfIp8&t=153s) +## Dependencies +- Git +- A web browser +- A browser opener: + - `open` (macOS) + - `xdg-open` (Linux) + - `start` (Windows/Git Bash) + - `wslview` (WSL) + - [GitHub CLI (`gh`)](https://cli.github.com/) - (**and/or** - just opens github links) + + + +## Installation + +### Using `ya pkg` +``` + ya pkg add larry-oates/open-git-remote +``` + +### Manual +**Linux/macOS** +``` +git clone https://github.com/larry-oates/open-git-remote.yazi.git ~/.config/yazi/plugins/open-git-remote.yazi +``` +**Windows** +``` +git clone https://github.com/larry-oates/open-git-remote.yazi.git %AppData%\yazi\config\plugins\open-git-remote.yazi +``` +## Configuration +add this to your **keymap.toml** file: +```toml +[[mgr.prepend_keymap]] +on = [ "g", "l" ] +run = "plugin open-git-remote" +desc = "open git remote url" +``` +I use g then l for "Git Link" but you can customize the keybinding however you like. Please refer to the [keymap.toml](https://yazi-rs.github.io/docs/configuration/keymap) documentation + diff --git a/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua b/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua new file mode 100644 index 0000000..4240e1c --- /dev/null +++ b/yazi/.config/yazi/plugins/open-git-remote.yazi/main.lua @@ -0,0 +1,58 @@ +-- ~/.config/yazi/plugins/git-open.yazi/init.lua +-- Plugin to open Git remote URL in browser + +return { + entry = function() + ya.emit("shell", { + [[ + # Check if we're in a git repository + if ! git rev-parse --git-dir >/dev/null 2>&1; then + echo "Not in a Git repository" >&2 + exit 1 + fi + + # Try gh browse first (best option for GitHub repos) + if command -v gh >/dev/null 2>&1; then + if gh browse 2>/dev/null; then + echo "Opened with gh browse" + exit 0 + fi + fi + + # Fallback: Get remote URL and open manually + remote_url=$(git remote get-url origin 2>/dev/null) || { + echo "No remote 'origin' found" >&2 + exit 1 + } + + # Convert SSH URL to HTTPS + browser_url=$(echo "$remote_url" | sed -E ' + s|^https?://(.+)\.git$|https://\1|; + s|^https?://(.+)$|https://\1|; + s|^git@([^:]+):(.+)\.git$|https://\1/\2|; + s|^git@([^:]+):(.+)$|https://\1/\2|; + s|^ssh://git@([^/]+)/(.+)\.git$|https://\1/\2|; + s|^ssh://git@([^/]+)/(.+)$|https://\1/\2| + ') + + # Open in browser + if command -v open >/dev/null 2>&1; then + open "$browser_url" + elif command -v xdg-open >/dev/null 2>&1; then + xdg-open "$browser_url" + elif command -v start >/dev/null 2>&1; then + start "$browser_url" + elif command -v wslview >/dev/null 2>&1; then + wslview "$browser_url" + else + echo "No browser opener found" >&2 + exit 1 + fi + + echo "Opened: $browser_url" + ]], + confirm = false, + orphan = true, + }) + end, +} diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE new file mode 100644 index 0000000..0399f1c --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2024 Lauri Niskanen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md new file mode 100644 index 0000000..ffef1cd --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/README.md @@ -0,0 +1,25 @@ +# open-with-cmd.yazi + +This is a Yazi plugin for opening files with a prompted command. + +## Installation + +Install the plugin: + +``` +ya pkg add Ape/open-with-cmd +``` + +Create `~/.config/yazi/keymap.toml` and add: + +``` +[[manager.prepend_keymap]] +on = "o" +run = "plugin open-with-cmd -- block" +desc = "Open with command in the terminal" + +[[manager.prepend_keymap]] +on = "O" +run = "plugin open-with-cmd" +desc = "Open with command" +``` diff --git a/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua new file mode 100644 index 0000000..7233873 --- /dev/null +++ b/yazi/.config/yazi/plugins/open-with-cmd.yazi/main.lua @@ -0,0 +1,19 @@ +return { + entry = function(_, job) + local block = job.args[1] and job.args[1] == "block" + + local value, event = ya.input({ + title = block and "Open with (block):" or "Open with:", + pos = { "hovered", y = 1, w = 50 }, + }) + + if event == 1 then + local s = ya.target_family() == "windows" and " %*" or ' "$@"' + ya.mgr_emit("shell", { + value .. s, + block = block, + orphan = not block, + }) + end + end, +} diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE b/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE new file mode 100644 index 0000000..ef3a9f3 --- /dev/null +++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Robert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md b/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md new file mode 100644 index 0000000..88c486f --- /dev/null +++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/README.md @@ -0,0 +1,183 @@ +

+ Trash emoji +

+

recycle-bin.yazi

+ +

+ + Yazi 0.25+ + + + +

+ +

+A blazing fast, minimal Recycle Bin for the Yazi terminal file‑manager. +

+ +## 🕶️ What does it do? + +Browse, restore, or permanently delete trashed files without leaving your terminal. Includes age-based cleanup and bulk actions. + + + +> [!NOTE] +> +> **Cross-Platform Support** +> +> This plugin supports Linux and macOS systems. + +## 🧠 What it does under the hood + +This plugin serves as a wrapper for the [trash-cli](https://github.com/andreafrancia/trash-cli) command, integrating it seamlessly with Yazi. + +## ✨ Features + +- **📂 Browse trash**: Navigate to trash directory directly in Yazi +- **🔄 Restore files**: Bulk restore selected files from trash to their original locations + - **⚠️ Conflict resolution**: Intelligent handling when restored files already exist at destination + - **🛡️ Safety dialogs**: Preview conflicts with skip/overwrite options before restoration +- **🗑️ Empty trash**: Clear entire trash with detailed file previews and confirmation dialog +- **📅 Empty by days**: Remove trash items older than specified number of days with size information +- **❌ Permanent delete**: Bulk delete selected files from trash permanently +- **🔧 Configurable**: Customize trash directory + +## 📋 Requirements + +| Software | Minimum | Notes | +| --------- | ----------- | ----------------------------------------------------------------------------------------- | +| Yazi | `>=25.5.31` | untested on 25.6+ | +| trash-cli | any | **Linux**: `sudo dnf/apt/pacman install trash-cli`
**macOS**: `brew install trash-cli` | + +The plugin uses the following trash-cli commands: `trash-list`, `trash-empty`, `trash-restore`, and `trash-rm`. + +## 📦 Installation + +Install the plugin via Yazi's package manager: + +```sh +# via Yazi’s package manager +ya pkg add uhs-robert/recycle-bin +``` + +Then add the following to your `~/.config/yazi/init.lua` to enable the plugin with default settings: + +```lua +require("recycle-bin"):setup() +``` + +## ⚙️ Configuration + +The plugin automatically discovers your system's trash directories using `trash-list --trash-dirs`. If you need to customize the behavior, you can pass a config table to `setup()`: + +```lua +require("recycle-bin"):setup({ + -- Optional: Override automatic trash directory discovery + -- trash_dir = "~/.local/share/Trash/", -- Uncomment to use specific directory +}) +``` + +> [!NOTE] +> The plugin supports multiple trash directories and will prompt you to choose which one to use if multiple are found. + +## 🎹 Key Mapping + +### 🗝️ Recommended: Preset + +Add this to your `~/.config/yazi/keymap.toml` (substitute `on = ["R","b"]` with your keybind preference): + +```toml +[mgr] +prepend_keymap = [ + { on = ["R","b"], run = "plugin recycle-bin", desc = "Open Recycle Bin menu" }, +] +``` + +The `R b` menu provides access to all trash management functions: + +- `o` → Open Trash +- `r` → Restore from Trash +- `d` → Delete from Trash +- `e` → Empty Trash +- `D` → Empty by Days + +> [!TIP] +> `recycle-bin.yazi` uses the [array form for its keymap example](https://yazi-rs.github.io/docs/configuration/keymap). +> You must pick **only one style** per file; mixing with `[[mgr.prepend_keymap]]` will fail. +> +> **Also note:** some plugins may suggest binding a bare key like `on = "R"`, +> which blocks all `R ` chords (including `R b`). Change those to chords +> (e.g. `["R","r"]`) or choose a different non-conflicting prefix. + +--- + +### 🛠️ Alternative: Custom direct keybinds + +If you prefer direct keybinds, you may also set your own using our API. Here are the available options: + +```toml +[mgr] +prepend_keymap = [ + { on = ["R","o"], run = "plugin recycle-bin -- open", desc = "Open Trash" }, + { on = ["R","e"], run = "plugin recycle-bin -- empty", desc = "Empty Trash" }, + { on = ["R","D"], run = "plugin recycle-bin -- emptyDays", desc = "Empty by days deleted" }, + { on = ["R","d"], run = "plugin recycle-bin -- delete", desc = "Delete from Trash" }, + { on = ["R","r"], run = "plugin recycle-bin -- restore", desc = "Restore from Trash" }, +] +``` + +> [!IMPORTANT] +> Remember that you are the only one who is responsible for managing and resolving your keybind conflicts. + +## 🚀 Usage + +### 📝 Example using the recommended preset + +- **Recycle Bin Menu (`R b`):** Opens an interactive menu with all trash management options + - **Open Trash (`o`):** Navigate to trash directory directly in Yazi + - **Restore from Trash (`r`):** Bulk restore selected files from trash to their original locations. The plugin automatically detects conflicts when files already exist at the original location and prompts you to skip or overwrite conflicting files with detailed information. + - **Delete from Trash (`d`):** Permanently delete selected files from trash. Shows confirmation dialog before deletion. + - **Empty Trash (`e`):** Clear entire trash with detailed file previews including names, sizes, and deletion dates before confirmation. + - **Empty by Days (`D`):** Remove trash items older than specified number of days (defaults to 30 days). Displays filtered list with file details and total size information. + +> [!TIP] +> Use Yazi's visual selection (`v` or `V` followed by `ESC` to select items) or toggle select (press `Space` on individual files) to select multiple files from the Trash before restoring or deleting +> +> The plugin will show a confirmation dialog for destructive operations + +## 🛠️ Troubleshooting + +### Common Issues + +**"trashcli not found" error:** + +- Ensure trash-cli is installed: `sudo dnf/apt/pacman install trash-cli` +- Verify installation: `trash-list --version` +- Check if trash-cli commands are in your PATH + +**"Trash directory not found" error:** + +- The plugin automatically discovers trash directories using `trash-list --trash-dirs` +- If no directories are found, create the standard location: + - **Linux**: `mkdir -p ~/.local/share/Trash/{files,info}` + - **macOS**: `mkdir -p ~/.Trash` +- You can also specify a custom path in your configuration + +**"No files selected" warning:** + +- Make sure you have files selected in Yazi before running restore/delete operations +- Use `Space` to select files or `v`/`V` for visual selection mode + +## 💡 Recommendations + +### Companion Plugin + +For an even better trash management experience, pair this plugin with: + +**[restore.yazi](https://github.com/boydaihungst/restore.yazi)** - Undo your delete history by your latest deleted files/folders + +This companion plugin adds an "undo" feature that lets you press `u` to instantly restore the last deleted file. You can keep hitting `u` repeatedly to step through your entire delete history, making accidental deletions a thing of the past. + +**Perfect combination:** Use `restore.yazi` for quick single-file undos and `recycle-bin.yazi` for comprehensive trash management and bulk operations. diff --git a/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua b/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua new file mode 100644 index 0000000..ed6a8bb --- /dev/null +++ b/yazi/.config/yazi/plugins/recycle-bin.yazi/main.lua @@ -0,0 +1,1469 @@ +-- main.lua +-- Trash management system for Yazi + +--=========== Plugin Settings ================================================= +local isDebugEnabled = false +local M = {} +local PLUGIN_NAME = "recycle-bin" +local USER_ID = ya.uid() +local XDG_RUNTIME_DIR = os.getenv("XDG_RUNTIME_DIR") or ("/run/user/" .. USER_ID) + +--=========== Compiled Patterns (Performance Optimization) ================== +-- Pre-compiled string patterns for better performance +local PATTERNS = { + filename = "([^/]+)$", + trash_list = "^(%d%d%d%d%-%d%d%-%d%d %d%d:%d%d:%d%d) (.+)$", + line_break = "[^\n]+", + line_break_crlf = "[^\r\n]+", + size_info = "^(%S+)", + whitespace_cleanup = "[\r\n]+", + trailing_space = "%s+$", + first_word = "%l", + upper_first = "^%l", +} + +--=========== Plugin State =========================================================== +---@enum +local STATE_KEY = { + CONFIG = "CONFIG", +} + +--================= Notify / Logger =========================================== +local TIMEOUTS = { + error = 8, + warn = 8, + info = 3, +} +local Notify = {} +---@param level "info"|"warn"|"error"|nil +---@param s string +---@param ... any +function Notify._send(level, s, ...) + debug(s, ...) + local content = Notify._parseContent(s, ...) + local entry = { + title = PLUGIN_NAME, + content = content, + timeout = TIMEOUTS[level] or 3, + level = level, + } + ya.notify(entry) +end + +function Notify._parseContent(s, ...) + local ok, content = pcall(string.format, s, ...) + if not ok then content = s end + content = tostring(content):gsub(PATTERNS.whitespace_cleanup, " "):gsub(PATTERNS.trailing_space, "") + return content +end + +function Notify.error(...) + ya.err(...) + Notify._send("error", ...) +end +function Notify.warn(...) + Notify._send("warn", ...) +end +function Notify.info(...) + Notify._send("info", ...) +end +function debug(...) + if isDebugEnabled then + local msg = Notify._parseContent(...) + ya.dbg(msg) + end +end + +--========= Run terminal commands ======================================================= +---@param cmd string +---@param args? string[] +---@param input? string -- optional stdin input (e.g., password) +---@param is_silent? boolean +---@return string|nil, Output|nil +local function run_command(cmd, args, input, is_silent) + debug("Executing command: " .. cmd .. (args and #args > 0 and (" " .. table.concat(args, " ")) or "")) + local msgPrefix = "Command: " .. cmd .. " - " + local cmd_obj = Command(cmd) + + -- Add arguments + if type(args) == "table" and #args > 0 then + for _, arg in ipairs(args) do + cmd_obj:arg(arg) + end + end + + -- Set stdin mode if input is provided + if input then + cmd_obj:stdin(Command.PIPED) + else + cmd_obj:stdin(Command.INHERIT) + end + + -- Set other streams + cmd_obj:stdout(Command.PIPED):stderr(Command.PIPED):env("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR) + + local child, cmd_err = cmd_obj:spawn() + if not child then + if not is_silent then Notify.error(msgPrefix .. "Failed to start. Error: %s", tostring(cmd_err)) end + return cmd_err and tostring(cmd_err), nil + end + + -- Send stdin input if available + if input then + local ok, err = child:write_all(input) + if not ok then + if not is_silent then Notify.error(msgPrefix .. "Failed to write, stdin: %s", tostring(err)) end + return err and tostring(err), nil + end + + local flushed, flush_err = child:flush() + if not flushed then + if not is_silent then Notify.error(msgPrefix .. "Failed to flush, stdin: %s", tostring(flush_err)) end + return flush_err and tostring(flush_err), nil + end + end + + -- Read output + local output, out_err = child:wait_with_output() + if not output then + if not is_silent then Notify.error(msgPrefix .. "Failed to get output, error: %s", tostring(out_err)) end + return out_err and tostring(out_err), nil + end + + -- Log outputs + if output.stdout ~= "" and not is_silent then debug(msgPrefix .. "stdout: %s", output.stdout) end + if output.status and output.status.code ~= 0 and not is_silent then + debug(msgPrefix .. "Error code `%s`, success: `%s`", output.status.code, tostring(output.status.success)) + end + + -- Handle child output error + if output.stderr ~= "" then + if not is_silent then debug(msgPrefix .. "stderr: %s", output.stderr) end + -- Only treat stderr as error if command actually failed + if output.status and not output.status.success then return output.stderr, output end + end + + return nil, output +end + +--========= Sync helpers ======================================================= +local set_state = ya.sync(function(state, key, value) + state[key] = value +end) + +local get_state = ya.sync(function(state, key) + return state[key] +end) + +--- Get and return string of the pwd/cwd +---@return string -- the current working directory +local get_cwd = ya.sync(function() + return tostring(cx.active.current.cwd) +end) + +---Get selected files from Yazi +---@return string[] +local get_selected_files = ya.sync(function() + local tab, paths = cx.active, {} + for _, u in pairs(tab.selected) do + paths[#paths + 1] = tostring(u) + end + if #paths == 0 and tab.current.hovered then paths[1] = tostring(tab.current.hovered.url) end + return paths +end) + +---Clear the current selection in Yazi +local function clear_selection() + -- Use Yazi's manager_emit to properly clear all selections + ya.manager_emit("select_all", { state = false }) +end + +--=========== Utils ================================================= +--- Deep merge two tables: overrides take precedence +---@param defaults table +---@param overrides table|nil +---@return table +local function deep_merge(defaults, overrides) + if type(overrides) ~= "table" then return defaults end + + local result = {} + + for k, v in pairs(defaults) do + if type(v) == "table" and type(overrides[k]) == "table" then + result[k] = deep_merge(v, overrides[k]) + else + result[k] = overrides[k] ~= nil and overrides[k] or v + end + end + + -- Include any keys in overrides not in defaults + for k, v in pairs(overrides) do + if result[k] == nil then result[k] = v end + end + + return result +end + +---Show an input box. +---@param title string +---@param is_password boolean? +---@param value string? +---@return string|nil +local function prompt(title, is_password, value) + debug("Prompting user for `%s`, is password: `%s`", title, is_password) + local input_value, input_event = ya.input({ + title = title, + value = value or "", + obscure = is_password or false, + pos = { "center", y = 3, w = 60 }, + }) + + if input_event ~= 1 then return nil end + + return input_value +end + +---Create standardized ui.Text with common styling +---@param lines string|string[] Single line or array of lines +---@return table ui.Text object with standard alignment and wrapping +local function create_ui_list(lines) + local line_objects = {} + if type(lines) == "string" then + table.insert(line_objects, ui.Line(lines)) + else + for _, line in ipairs(lines) do + table.insert(line_objects, ui.Line(line)) + end + end + return ui.Text(line_objects):align(ui.Align.LEFT):wrap(ui.Wrap.YES) +end + +---Show a confirmation box. +---@param title string|table Confirmation title (string or structured ui.Line) +---@param body string|string[]|table? Confirmation body (string, string array, or structured ui.Text) +---@param posOpts ui.Pos? A table of position options (e.g. {"center", w = 70, h = 40, x = 0, y = 0}) +---@return boolean +local function confirm(title, body, posOpts) + local title_str = type(title) == "string" and title or tostring(title) + debug("Confirming user action for `%s`", title_str) + local pos = { + posOpts and posOpts[1] or "center", + w = posOpts and posOpts.w or 70, + h = posOpts and posOpts.h or 40, + x = posOpts and posOpts.x or 0, + y = posOpts and posOpts.y or 0, + } + + local confirmation_data = { + title = type(title) == "string" and ui.Line(title) or title, + pos = pos, + } + + if body then + -- Handle different body types + if type(body) == "string" then + confirmation_data.content = create_ui_list(body) + confirmation_data.body = create_ui_list(body) + elseif type(body) == "table" and body[1] and type(body[1]) == "string" then + -- Array of strings + confirmation_data.content = create_ui_list(body) + confirmation_data.body = create_ui_list(body) + else + -- Structured UI component (ui.Text) + confirmation_data.content = body + confirmation_data.body = body + end + end + + local answer = ya.confirm(confirmation_data) + return answer +end + +---Present a simple which‑key style selector and return the chosen item (Max: 36 options). +---@param title string +---@param items string[] +---@return string|nil +local function choose_which(title, items) + local keys = "1234567890abcdefghijklmnopqrstuvwxyz" + local candidates = {} + for i, item in ipairs(items) do + if i > #keys then break end + candidates[#candidates + 1] = { on = keys:sub(i, i), desc = item } + end + + local idx = ya.which({ title = title, cands = candidates }) + return idx and items[idx] +end + +--============== File helpers ==================================== +---Check if a path exists and is a directory +---@param url Url +---@return boolean +local function is_dir(url) + local cha, _ = fs.cha(url) + return cha and cha.is_dir or false +end + +---Get file size in bytes using fs.cha() +---@param file_path string Absolute path to the file +---@return integer|nil, string|nil -- size_in_bytes, error_message +local function get_file_size(file_path) + local url = Url(file_path) + local cha, err = fs.cha(url) + + if not cha then + local error_msg = string.format("Failed to get file info for %s: %s", file_path, err or "unknown error") + debug(error_msg) + return nil, error_msg + end + + if not cha.len then + local error_msg = string.format("File size not available for %s", file_path) + debug(error_msg) + return nil, error_msg + end + + return cha.len, nil +end + +---Format bytes into human-readable format (B, KB, MB, GB, TB) +---@param bytes integer|nil Number of bytes to format +---@return string Formatted size string +local function format_file_size(bytes) + if not bytes or bytes < 0 then return "0 B" end + + local units = { "B", "KB", "MB", "GB", "TB" } + local size = bytes + local unit_index = 1 + + -- Convert to larger units while size >= 1024 and we have larger units + while size >= 1024 and unit_index < #units do + size = size / 1024 + unit_index = unit_index + 1 + end + + -- Format with appropriate decimal places + if unit_index == 1 then + -- Bytes - no decimal places + return string.format("%d %s", size, units[unit_index]) + elseif size >= 100 then + -- >= 100 units - no decimal places (e.g., "156 MB") + return string.format("%.0f %s", size, units[unit_index]) + elseif size >= 10 then + -- >= 10 units - one decimal place (e.g., "15.6 MB") + return string.format("%.1f %s", size, units[unit_index]) + else + -- < 10 units - two decimal places (e.g., "1.56 MB") + return string.format("%.2f %s", size, units[unit_index]) + end +end + +---Get file objects with size information for multiple files +---@param file_paths string[] Array of file paths/names to process +---@param base_dir string Base directory where files are located (e.g., "~/.local/share/Trash/files/") +---@return {name: string, size: string}[] Array of file objects with name and size +local function get_files_with_sizes(file_paths, base_dir) + debug("Getting file sizes for %d files from base directory: %s", #file_paths, base_dir) + + local file_objects = {} + + -- Ensure base_dir ends with a slash for proper path construction + local normalized_base_dir = base_dir + if not normalized_base_dir:match("/$") then normalized_base_dir = normalized_base_dir .. "/" end + + for i, file_path in ipairs(file_paths) do + -- Extract filename from the path + local filename = file_path:match(PATTERNS.filename) or file_path + + -- Construct full path to the file in the base directory + local full_path = normalized_base_dir .. filename + + -- Get file size using existing utility function + local bytes, size_err = get_file_size(full_path) + local formatted_size + + if size_err then + -- Log the error but continue processing other files + debug("Could not get size for file %s: %s", filename, size_err) + formatted_size = "unknown size" + else + -- Format the size using existing utility function + formatted_size = format_file_size(bytes) + end + + -- Create file object with name and size + file_objects[i] = { + name = filename, + size = formatted_size, + } + end + + debug("Successfully processed %d file objects", #file_objects) + return file_objects +end + +--=========== Trash helpers ================================================= +---Get available trash directories from trash-cli +---@return string[], string|nil -- trash_dirs, error +local function get_trash_directories() + local err, output = run_command("trash-list", { "--trash-dirs" }, nil, true) + if err then return {}, err end + + local directories = {} + if output and output.stdout ~= "" then + for line in output.stdout:gmatch(PATTERNS.line_break) do + local trimmed = line:gsub("^%s*(.-)%s*$", "%1") -- trim whitespace + if trimmed ~= "" then + -- Ensure directory path ends with / + if not trimmed:match("/$") then trimmed = trimmed .. "/" end + table.insert(directories, trimmed) + end + end + end + + debug("Found %d trash directories: %s", #directories, table.concat(directories, ", ")) + return directories, nil +end + +---Get the correct trash files directory path based on OS +---@param config table Configuration object containing trash_dir and os +---@return string -- trash_files_directory_path +local function get_trash_files_dir(config) + local trash_files_dir = config.trash_dir + -- On Linux, trash files are in a 'files' subdirectory + if config.os ~= "macos" then + -- Ensure trash_dir ends with / before adding 'files' + if not trash_files_dir:match("/$") then trash_files_dir = trash_files_dir .. "/" end + trash_files_dir = trash_files_dir .. "files" + end + return trash_files_dir +end + +---Verify trash dir exists +---@param config table | nil +local function check_has_trash_directory(config) + -- Get Config + if not config then config = get_state(STATE_KEY.CONFIG) end + -- Verify trash dir + local trash_dir = config.trash_dir + local trash_url = Url(trash_dir) + + if not is_dir(trash_url) then + Notify.error("Trash directory not found: %s. Please check your configuration.", trash_dir) + return false + end + + return true +end + +---Select trash directory from available options +---@param directories string[] Array of trash directory paths +---@return string|nil -- selected_directory +local function select_trash_directory(directories) + if #directories == 0 then return nil end + + -- If only one directory, use it automatically + if #directories == 1 then + debug("Using single trash directory: %s", directories[1]) + return directories[1] + end + + -- Multiple directories - present user with selection + debug("Multiple trash directories found, prompting user selection") + local selected_dir = choose_which("Select trash directory:", directories) + + if selected_dir then + debug("User selected trash directory: %s", selected_dir) + else + debug("User cancelled trash directory selection") + end + + return selected_dir +end + +---Ensure trash directory is set, prompting user if needed +---@param config table +---@return boolean -- true if trash directory is available, false if cancelled or error +local function ensure_trash_directory(config) + -- If trash directory is already set and exists, we're good + if config.trash_dir and check_has_trash_directory(config) then return true end + + -- Get available trash directories + local directories, dir_err = get_trash_directories() + if dir_err then + Notify.error( + "Failed to discover trash directories: %s. Try 'trash-list --trash-dirs' manually to verify trash directories", + dir_err + ) + return false + end + + if #directories == 0 then + Notify.error("No trash directories found. Please check trash-cli installation.") + return false + end + + -- Let user select which trash directory to use + local selected_dir = select_trash_directory(directories) + if not selected_dir then + Notify.info("Trash directory selection cancelled") + return false + end + + -- Save the selected trash directory to config for this session + config.trash_dir = selected_dir + set_state(STATE_KEY.CONFIG, config) + debug("Updated trash_dir for this session: %s", selected_dir) + + return true +end + +---Get mapping of filenames to original paths from trash-list +---@return table, string|nil -- filename_to_path_map, error +local function get_trash_file_mappings() + local err, output = run_command("trash-list", {}) + if err then return {}, err end + + local mappings = {} + if output and output.stdout ~= "" then + for line in output.stdout:gmatch(PATTERNS.line_break) do + local timestamp, original_path = line:match(PATTERNS.trash_list) + if timestamp and original_path then + local filename = original_path:match(PATTERNS.filename) or original_path + mappings[filename] = original_path + end + end + end + + debug("Created %d trash file mappings", #mappings) + return mappings, nil +end + +---Get all files in trash with their sizes for display +---@param config table Configuration object +---@return {name: string, size: string}[], string|nil -- file_objects, error +local function get_trash_files_with_sizes(config) + -- Get all files from trash-list + local err, output = run_command("trash-list", {}) + if err then return {}, err end + + local file_names = {} + if output and output.stdout ~= "" then + for line in output.stdout:gmatch(PATTERNS.line_break) do + local timestamp, original_path = line:match(PATTERNS.trash_list) + if timestamp and original_path then + local filename = original_path:match(PATTERNS.filename) or original_path + table.insert(file_names, filename) + end + end + end + + if #file_names == 0 then return {}, nil end + + -- Get file objects with sizes using existing function + local trash_files_dir = get_trash_files_dir(config) + local file_objects = get_files_with_sizes(file_names, trash_files_dir) + + debug("Retrieved %d trash files with sizes", #file_objects) + return file_objects, nil +end + +---Get trash files older than specified days with their sizes for display +---@param config table Configuration object +---@param days integer Number of days - files older than this will be included +---@return {name: string, size: string, deleted_date: string}[], string|nil -- file_objects, error +local function get_trash_files_older_than_days(config, days) + -- Get all files from trash-list + local err, output = run_command("trash-list", {}) + if err then return {}, err end + + -- Calculate cutoff time (days ago from now) + local current_time = os.time() + local cutoff_time = current_time - (days * 24 * 60 * 60) -- days * hours * minutes * seconds + + local old_files = {} + if output and output.stdout ~= "" then + for line in output.stdout:gmatch(PATTERNS.line_break) do + local timestamp, original_path = line:match(PATTERNS.trash_list) + if timestamp and original_path then + -- Parse timestamp: "2025-08-28 20:27:38" format + local year, month, day, hour, min, sec = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)") + if year and month and day and hour and min and sec then + local file_time = os.time({ + year = tonumber(year), + month = tonumber(month), + day = tonumber(day), + hour = tonumber(hour), + min = tonumber(min), + sec = tonumber(sec), + }) + + -- If file is older than cutoff, include it + if file_time < cutoff_time then + local filename = original_path:match(PATTERNS.filename) or original_path + table.insert(old_files, { + filename = filename, + deleted_date = timestamp, + }) + end + end + end + end + end + + if #old_files == 0 then return {}, nil end + + -- Get file objects with sizes using existing function + local trash_files_dir = get_trash_files_dir(config) + local file_names = {} + for _, file_info in ipairs(old_files) do + table.insert(file_names, file_info.filename) + end + local file_objects = get_files_with_sizes(file_names, trash_files_dir) + + -- Add deleted date information to file objects + for i, file_obj in ipairs(file_objects) do + file_obj.deleted_date = old_files[i].deleted_date + end + + debug("Retrieved %d trash files older than %d days", #file_objects, days) + return file_objects, nil +end + +--- Go to the trash directory +local function open_trash(config) + -- Ensure we have a trash directory selected + if not ensure_trash_directory(config) then return end + + local trash_files_dir = get_trash_files_dir(config) + local trash_files_url = Url(trash_files_dir) + + -- Go to trash files directory if exists, fallback to trash root if not + if is_dir(trash_files_url) then + ya.emit("cd", { trash_files_url }) + else + local trash_root_url = Url(config.trash_dir) + if is_dir(trash_root_url) then + ya.emit("cd", { trash_root_url }) + Notify.info("Trash files directory not found, navigated to trash root: %s", config.trash_dir) + else + Notify.error("Trash directory not found: %s", config.trash_dir) + end + end +end + +---Offer to open trash directory when user attempts operations outside trash +---@param config table +---@return boolean -- true if user chose to navigate to trash and succeeded, false otherwise +local function offer_to_open_trash(config) + local user_wants_to_navigate = confirm("Not in Trash Directory", { + "This command can only be run from within a Trash directory.", + "Would you like to open the Trash now?", + }, { w = 70, h = 10, x = 0, y = 0 }) + + if not user_wants_to_navigate then + Notify.info("Operation cancelled") + return false + end + + -- Try to open trash directory + open_trash(config) + + -- Check if we successfully navigated to a trash directory + local current_dir = get_cwd() + local trash_dirs, dir_err = get_trash_directories() + if dir_err then + Notify.error("Failed to verify navigation: %s", dir_err) + return false + end + + for _, trash_dir in ipairs(trash_dirs) do + if current_dir:find(trash_dir, 1, true) == 1 then return true end + end + + Notify.error("Failed to navigate to trash directory") + return false +end + +---Resolve a path that might be a symlink to its real path using realpath command +---@param path string The path to resolve +---@return string -- The resolved path (or original if resolution fails) +local function resolve_symlink(path) + -- Use realpath command to resolve symlinks + local err, output = run_command("realpath", { path }, nil, true) + + if not err and output and output.stdout then + -- Remove trailing newline and return resolved path + local resolved = output.stdout:gsub("[\r\n]+$", "") + if resolved ~= "" then + debug("Resolved symlink: %s -> %s", path, resolved) + return resolved + end + end + + -- If resolution failed, return original path + debug("Could not resolve symlink for %s, using original path", path) + return path +end + +---Check if current working directory is within a valid trash directory +---If not, offer to navigate to trash directory +---@param config table +---@return boolean -- true if in trash directory or successfully navigated to trash, false otherwise +local is_current_dir_in_trash = function(config) + local current_dir = get_cwd() + -- Resolve symlinks in the current directory path + local resolved_dir = resolve_symlink(current_dir) + + local trash_dirs, dir_err = get_trash_directories() + if dir_err then + Notify.error( + "Failed to find trash directories: %s. Check trash-cli installation with 'trash-list --version'", + dir_err + ) + return false + end + + -- Check if already in trash directory (check both original and resolved paths) + for _, trash_dir in ipairs(trash_dirs) do + if current_dir:find(trash_dir, 1, true) == 1 or resolved_dir:find(trash_dir, 1, true) == 1 then return true end + end + + -- Not in trash directory - offer to navigate there + offer_to_open_trash(config) + return false +end + +---Get count of items in trash +---@return integer, string|nil -- count, error +local function get_trash_item_count() + local err, output = run_command("trash-list", {}) + if err then return 0, err end + + local item_count = 0 + if output and output.stdout ~= "" then + _, item_count = output.stdout:gsub(PATTERNS.line_break, "") + end + + return item_count, nil +end + +---Get size of trash files directory +---@param config table +---@return string, string|nil -- size_string, error +local function get_trash_size(config) + local trash_files_dir = get_trash_files_dir(config) + + local err, output = run_command("du", { "-sh", trash_files_dir }, nil, true) + if err or not output or output.stdout == "" then return "unknown size", err end + + local size_info = output.stdout:match(PATTERNS.size_info) + return size_info or "unknown size", nil +end + +---Get size of trash files directory +---@param config table +---@return {count: integer, size: string}|table, {type: string, msg: string}|nil +local function get_trash_data(config) + -- Default values + local count = 0 + local size = "0M" + + -- Get trash info + local item_count, count_err = get_trash_item_count() + if count_err then + return { count, size }, { type = "error", msg = string.format("Failed to get trash contents: %s", count_err) } + end + + if item_count == 0 then return { count, size }, { type = "info", msg = "Trash is already empty" } end + + local size_info, size_err = get_trash_size(config) + if size_err then debug("Failed to get trash size: %s", size_err) end + + return { + count = item_count, + size = size_info, + }, nil +end + +--=========== Conflict Resolution ================================================= +---Handle restore conflicts by checking if files exist at original locations +---@param restore_items table[] Array of restore items with original_path, filename, and size +---@return table[] non_conflicted_items, table[] conflicted_items +local function detect_restore_conflicts(restore_items) + local conflicts = {} + local non_conflicted_items = {} + + for _, item in ipairs(restore_items) do + local original_url = Url(item.original_path) + local cha, _ = fs.cha(original_url) + + if cha then -- File exists at original location + table.insert(conflicts, { + filename = item.filename, + original_path = item.original_path, + size = item.size, + }) + else + table.insert(non_conflicted_items, item) + end + end + + return non_conflicted_items, conflicts +end + +---Create overwrite warning dialog and get user confirmation +---@param conflicts table[] Array of conflicted items +---@return boolean true if user confirms overwrite, false otherwise +local function create_overwrite_warning_dialog(conflicts) + local overwrite_warning = { + "⚠️ DESTRUCTIVE ACTION WARNING ⚠️", + "", + "You are about to PERMANENTLY OVERWRITE existing files:", + } + for _, conflict in ipairs(conflicts) do + table.insert(overwrite_warning, string.format(" • %s", conflict.original_path)) + end + table.insert(overwrite_warning, "") + table.insert(overwrite_warning, "The existing files will be LOST FOREVER!") + table.insert(overwrite_warning, "This action CANNOT BE UNDONE!") + + -- Create warning dialog with red styling + local warning_components = {} + for i, line in ipairs(overwrite_warning) do + if i == 1 then + -- Main warning title in red + table.insert(warning_components, ui.Line(line):style(th.notify.title_error)) + elseif line:match("^ •") then + -- File paths + table.insert(warning_components, ui.Line(line):style(th.notify.content)) + elseif line:match("LOST FOREVER") or line:match("CANNOT BE UNDONE") then + -- Critical warnings in red + table.insert(warning_components, ui.Line(line):style(th.notify.title_error)) + else + table.insert(warning_components, ui.Line(line)) + end + end + + local warning_body = ui.Text(warning_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES) + return confirm(" CONFIRM DESTRUCTIVE ACTION ", warning_body, { w = 80, h = 20, x = 0, y = 0 }) +end + +---Handle overwrite choice confirmation +---@param conflicts table[] Array of conflicted items +---@return string "cancel"|"overwrite" User's final choice for overwrite action +local function handle_overwrite_choice(conflicts) + local confirmed = create_overwrite_warning_dialog(conflicts) + return confirmed and "overwrite" or "cancel" +end + +---Present conflict resolution dialog to user and return their choice +---@param conflicts table[] Array of conflicted items +---@param non_conflicted_count integer Number of non-conflicted items +---@return string "cancel"|"skip"|"overwrite" User's choice +local function prompt_conflict_resolution(conflicts, non_conflicted_count) + if non_conflicted_count > 0 then + -- Offer choice between cancel, skip conflicts, or overwrite all + local choices = { + "Cancel restore", + "Skip conflicts and restore others", + "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts", + } + local choice = choose_which("Resolve File Conflicts", choices) + + if choice == "Cancel restore" then + return "cancel" + elseif choice == "Skip conflicts and restore others" then + return "skip" + elseif choice == "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" then + return handle_overwrite_choice(conflicts) + else + return "cancel" -- Default to cancel if no choice made + end + else + -- All files have conflicts - offer overwrite option + local choices = { "Cancel restore", "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" } + local choice = choose_which("All Files Have Conflicts", choices) + + if choice == "⚠️ Do not skip conflicts, restore ALL and OVERWRITE any conflicts" then + return handle_overwrite_choice(conflicts) + else + return "cancel" + end + end +end + +---Delete a single conflicting file or directory at its original location +---@param original_path string The path to the conflicting file/directory +---@return boolean success, string|nil error_message +local function delete_conflict_file(original_path) + local original_url = Url(original_path) + + -- Check if it's a file or directory to use the correct removal type + local cha, cha_err = fs.cha(original_url) + if not cha then + local error_msg = string.format("Cannot access conflicting item %s: %s", original_path, cha_err or "unknown error") + return false, error_msg + end + + local remove_type = cha.is_dir and "dir_all" or "file" + local delete_success, delete_err = fs.remove(remove_type, original_url) + + if delete_success then + debug("Successfully deleted conflicting %s: %s", cha.is_dir and "directory" or "file", original_path) + return true, nil + else + local error_msg = string.format( + "Failed to delete existing %s %s: %s", + cha.is_dir and "directory" or "file", + original_path, + delete_err or "unknown error" + ) + return false, error_msg + end +end + +---Handle restore conflicts and return filtered items based on user choice +---@param restore_items table[] Original restore items +---@return table[]|nil filtered_items (nil if user cancelled) +local function handle_restore_conflicts(restore_items) + local non_conflicted_items, conflicts = detect_restore_conflicts(restore_items) + + -- No conflicts found, proceed with all items + if #conflicts == 0 then return restore_items end + + -- Present conflict resolution dialog + local user_choice = prompt_conflict_resolution(conflicts, #non_conflicted_items) + + if user_choice == "cancel" then + return nil + elseif user_choice == "skip" then + if #non_conflicted_items == 0 then + Notify.info("No files to restore after skipping all conflicts") + return nil + end + Notify.info("Skipping %d conflicted files, proceeding with %d files", #conflicts, #non_conflicted_items) + return non_conflicted_items + elseif user_choice == "overwrite" then + -- Mark items that need overwrite and return all items + -- The actual deletion will happen when user confirms the restore operation + Notify.info("Selected overwrite option for %d conflicting files", #conflicts) + + -- Add overwrite metadata to restore items that have conflicts + for _, item in ipairs(restore_items) do + for _, conflict in ipairs(conflicts) do + if item.original_path == conflict.original_path then + item.needs_overwrite = true + break + end + end + end + + return restore_items -- Return all items, with overwrite flags set + end + + -- Fallback to cancel + return nil +end + +--=========== File Selection ================================================= +---Validates file selection and extracts filenames +---@param operation_name string The name of the operation (for logging/notifications) +---@return string[]|nil -- selected_paths +local function validate_and_get_selection(operation_name) + -- Get selected files from Yazi + local selected_paths = get_selected_files() + if #selected_paths == 0 then + Notify.warn("No files selected for " .. operation_name) + return nil + end + debug("Selected paths for %s: %s", operation_name, table.concat(selected_paths, ", ")) + return selected_paths +end + +--=========== Batch Operations ================================================= +---Shows standardized confirmation dialog for batch operations +---@param verb string Action verb (e.g., "delete", "restore") +---@param items {name: string, size: string, needs_overwrite: boolean?}[] List of file objects with name, size, and optional overwrite flag +---@param warning string|nil Optional warning message +---@return boolean +local function confirm_batch_operation(verb, items, warning) + local title = string.format("%s the following %d file(s):", verb:gsub(PATTERNS.upper_first, string.upper), #items) + + -- Create structured UI components for proper alignment and styling + local body_components = {} + + -- Add each item as a formatted line with proper left alignment showing "fileName (size)" + -- Show overwrite warning for files that will overwrite existing files + local overwrite_count = 0 + for _, item in ipairs(items) do + local display_text = string.format("%s (%s)", item.name, item.size) + if item.needs_overwrite then + overwrite_count = overwrite_count + 1 + -- Mark files that will overwrite with warning styling + table.insert( + body_components, + ui.Line({ + ui.Span(" ⚠️ "), + ui.Span(display_text .. " [WILL OVERWRITE]"), + }):style(th.notify.title_warn) + ) + else + table.insert(body_components, ui.Line({ ui.Span(" "), ui.Span(display_text) }):align(ui.Align.LEFT)) + end + end + + -- Add overwrite warning if any files need overwriting + if overwrite_count > 0 then + table.insert(body_components, ui.Line("")) + table.insert( + body_components, + ui.Line(string.format("⚠️ %d existing file(s) will be permanently deleted!", overwrite_count)) + :style(th.notify.title_error) + ) + end + + -- Add warning if provided with styling + if warning then + table.insert(body_components, ui.Line("")) + table.insert(body_components, ui.Line(warning):style(th.notify.title_warn)) + end + + local structured_body = ui.Text(body_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES) + local confirmation = confirm(title, structured_body) + if not confirmation then + Notify.info(verb:gsub(PATTERNS.upper_first, string.upper) .. " cancelled") + return false + end + + return true +end + +---Shows confirmation dialog for batch operations with deletion dates +---@param verb string Action verb (e.g., "delete") +---@param items {name: string, size: string, deleted_date: string}[] List of file objects with name, size, and deletion date +---@param days integer Number of days used for filtering +---@param warning string|nil Optional warning message +---@return boolean +local function confirm_batch_operation_with_dates(verb, items, days, warning) + local title = string.format( + "%s the following %d file(s) older than %d days:", + verb:gsub(PATTERNS.upper_first, string.upper), + #items, + days + ) + + -- Create structured UI components for proper alignment and styling + local body_components = {} + + -- Add each item as a formatted line showing "fileName (size) - deleted: date" + for _, item in ipairs(items) do + local display_text = string.format("%s (%s) - deleted: %s", item.name, item.size, item.deleted_date) + table.insert(body_components, ui.Line({ ui.Span(" "), ui.Span(display_text) }):align(ui.Align.LEFT)) + end + + -- Add warning if provided with styling + if warning then + table.insert(body_components, ui.Line("")) + table.insert(body_components, ui.Line(warning):style(th.notify.title_warn)) + end + + local structured_body = ui.Text(body_components):align(ui.Align.LEFT):wrap(ui.Wrap.YES) + local confirmation = confirm(title, structured_body) + if not confirmation then + Notify.info(verb:gsub(PATTERNS.upper_first, string.upper) .. " cancelled") + return false + end + + return true +end + +---Executes batch operation with progress tracking and error handling +---@param items table[] Array of items to process (can be strings, file objects, or restore items) +---@param operation_name string Name of operation for notifications +---@param operation_func function Function that takes an item and returns error_string|nil +---@return integer, integer -- success_count, failed_count +local function execute_batch_operation(items, operation_name, operation_func) + local success_count = 0 + local failed_count = 0 + + for _, item in ipairs(items) do + local err = operation_func(item) + if err then + failed_count = failed_count + 1 + else + success_count = success_count + 1 + end + end + + return success_count, failed_count +end + +---Reports standardized operation results +---@param operation_name string Name of the operation +---@param success_count integer Number of successful operations +---@param failed_count integer Number of failed operations +local function report_operation_results(operation_name, success_count, failed_count) + local past_tense = operation_name == "deleting" and "deleted" + or operation_name == "restoring" and "restored" + or operation_name .. "d" + + if success_count > 0 and failed_count == 0 then + Notify.info("Successfully %s %d file(s)", past_tense, success_count) + elseif success_count > 0 and failed_count > 0 then + Notify.warn( + "%s %d file(s), failed %d", + past_tense:gsub(PATTERNS.upper_first, string.upper), + success_count, + failed_count + ) + else + Notify.error("Failed to %s any files", operation_name:gsub("ing$", "")) + end +end + +--=========== api actions ================================================= +local function cmd_open_trash(config) + open_trash(config) +end + +local function cmd_empty_trash(config) + -- Ensure we have a trash directory selected + if not ensure_trash_directory(config) then return end + + -- Get trash data + local data, data_err = get_trash_data(config) + if data_err then + Notify[data_err.type](data_err.msg) + return + end + + -- Get all trash files with their sizes for detailed display + local file_objects, file_err = get_trash_files_with_sizes(config) + if file_err then + Notify.error("Failed to get trash file list: %s", file_err) + return + end + + -- If no files found, show simple message + if #file_objects == 0 then + Notify.info("Trash is already empty") + return + end + + -- Show detailed confirmation dialog with file list and sizes + if not confirm_batch_operation("permanently delete", file_objects, "This action cannot be undone!") then return end + + -- Execute trash-empty command + local err, _ = run_command("trash-empty", {}, "y\n") + if err then + Notify.error("Failed to empty trash: %s. Try 'trash-empty' manually to debug", err) + return + end + Notify.info("Trash emptied successfully (%d items, %s freed)", data.count, data.size) +end + +local function cmd_empty_trash_by_days(config) + -- Ensure we have a trash directory selected + if not ensure_trash_directory(config) then return end + + -- Get trash data prior to the operation to calculate difference + local begin_data, begin_err = get_trash_data(config) + if begin_err then + Notify[begin_err.type](begin_err.msg) + return + end + + -- Prompt user for number of days + local days_input = prompt("Delete trash items older than (days)", false, "30") + if not days_input then + Notify.info("Empty trash by days cancelled") + return + end + + -- Validate input is a positive integer + local days = tonumber(days_input) + if not days or days <= 0 or math.floor(days) ~= days then + Notify.error("Invalid input: please enter a positive integer for days") + return + end + + -- Get files older than specified days with sizes and deletion dates + local file_objects, file_err = get_trash_files_older_than_days(config, days) + if file_err then + Notify.error("Failed to get trash file list: %s", file_err) + return + end + + -- If no files found that are older than the specified days + if #file_objects == 0 then + Notify.info("No items found that are older than %d days", days) + return + end + + -- Show detailed confirmation dialog with file list, sizes, and deletion dates + if + not confirm_batch_operation_with_dates("permanently delete", file_objects, days, "This action cannot be undone!") + then + return + end + + -- Execute trash-empty command with days parameter + local err, _ = run_command("trash-empty", { tostring(days) }, "y\n") + if err then + Notify.error("Failed to empty trash by days: %s", err) + return + end + + -- Get trash data after the operation to calculate difference + local end_data, end_err = get_trash_data(config) + if end_err then + Notify[end_err.type](end_err.msg) + return + end + + -- Calculate items deleted + local items_deleted = begin_data.count - end_data.count + if items_deleted > 0 then + Notify.info("Successfully removed %d trash items older than %d days", items_deleted, days) + else + Notify.info("No items found that are older than %d days", days) + end +end + +local function cmd_delete_selection(config) + -- Ensure we have a trash directory selected + if not ensure_trash_directory(config) then return end + + -- Check if current directory is within a valid trash directory + if not is_current_dir_in_trash(config) then return end + + -- Validate selection and get filenames + local selected_paths, _ = validate_and_get_selection("deletion") + if not selected_paths then return end + + -- Get file objects with sizes for confirmation dialog + local trash_files_dir = get_trash_files_dir(config) + -- Ensure it ends with / for get_files_with_sizes + if not trash_files_dir:match("/$") then trash_files_dir = trash_files_dir .. "/" end + local file_objects = get_files_with_sizes(selected_paths, trash_files_dir) + + -- Confirm deletion from trash with warning + if not confirm_batch_operation("permanently delete", file_objects, "This action cannot be undone!") then return end + + -- Create operation function for delete + local function delete_operation(path) + local filename = path:match(PATTERNS.filename) or path + + -- Use trash-rm with the filename as pattern + -- trash-rm uses fnmatch patterns, so we pass the filename directly + local delete_err, _ = run_command("trash-rm", { filename }) + if delete_err then + Notify.error("Failed to delete %s: %s", filename, delete_err) + return delete_err + else + return nil + end + end + + -- Execute batch operation + local success_count, failed_count = execute_batch_operation(selected_paths, "permanently deleting", delete_operation) + + -- Clear selection after successful delete to prevent stale selections + if success_count > 0 then clear_selection() end + + -- Report results + report_operation_results("deleting", success_count, failed_count) +end + +local function cmd_restore_selection(config) + -- Ensure we have a trash directory selected + if not ensure_trash_directory(config) then return end + + -- Check if current directory is within a valid trash directory + if not is_current_dir_in_trash(config) then return end + + -- Validate selection and get filenames + local selected_paths, _ = validate_and_get_selection("restoration") + if not selected_paths then return end + + -- Get trash file mappings from trash-list + local trash_mappings, mapping_err = get_trash_file_mappings() + if mapping_err then + Notify.error("Failed to get trash mappings: %s. Try 'trash-list' manually to verify trash contents", mapping_err) + return + end + + -- Prepare restore items with original paths and size information + local restore_items = {} + local trash_files_dir = get_trash_files_dir(config) + local normalized_trash_files_dir = trash_files_dir + if not normalized_trash_files_dir:match("/$") then normalized_trash_files_dir = normalized_trash_files_dir .. "/" end + + for _, path in ipairs(selected_paths) do + local filename = path:match(PATTERNS.filename) or path + local original_path = trash_mappings[filename] + + if original_path then + -- Get file size from trash files directory + local full_path = normalized_trash_files_dir .. filename + local bytes, size_err = get_file_size(full_path) + local formatted_size = size_err and "unknown size" or format_file_size(bytes) + + restore_items[#restore_items + 1] = { + filename = filename, + original_path = original_path, + name = filename, + size = formatted_size, + } + else + Notify.warn("Could not find original path for file: %s", filename) + end + end + + if #restore_items == 0 then + Notify.info("No files to restore in current trash directory") + return + end + + -- Handle potential conflicts at original file locations + local filtered_items = handle_restore_conflicts(restore_items) + if not filtered_items then + -- User cancelled or no valid items after conflict resolution + return + end + + -- Update restore_items to use filtered list + restore_items = filtered_items + + -- Confirm restoration + if not confirm_batch_operation("restore", restore_items, nil) then return end + + -- Create operation function for restore using original paths + local function restore_operation(item) + debug("Restoring %s from original path: %s", item.filename, item.original_path) + + -- If this item needs overwrite, delete the existing file/directory first + if item.needs_overwrite then + local delete_success, delete_error = delete_conflict_file(item.original_path) + if not delete_success then + Notify.error(delete_error) + return delete_error + end + end + + -- Use trash-restore with the original file path as argument and auto-select first match + local restore_err, _ = run_command("trash-restore", { item.original_path }, "0\n") + if restore_err then + Notify.error("Failed to restore %s: %s", item.name, restore_err) + return restore_err + else + return nil + end + end + + -- Execute batch operation + local success_count, failed_count = execute_batch_operation(restore_items, "restoring", restore_operation) + + -- Clear selection after successful restore to prevent stale selections + if success_count > 0 then clear_selection() end + + -- Report results + report_operation_results("restoring", success_count, failed_count) +end + +local function cmd_show_menu(config) + local choice = ya.which({ + title = "Recycle Bin Menu", + cands = { + { on = "o", desc = "Open Trash" }, + { on = "r", desc = "Restore from Trash" }, + { on = "d", desc = "Delete from Trash" }, + { on = "e", desc = "Empty Trash" }, + { on = "D", desc = "Empty by Days" }, + }, + }) + + if choice == 1 then + cmd_open_trash(config) + elseif choice == 2 then + cmd_restore_selection(config) + elseif choice == 3 then + cmd_delete_selection(config) + elseif choice == 4 then + cmd_empty_trash(config) + elseif choice == 5 then + cmd_empty_trash_by_days(config) + end +end + +--=========== init requirements ================================================ +---Verify all dependencies +local function check_dependencies() + -- Check for trash-cli + local trashcli_err, _ = run_command("trash-list", { "--version" }, nil, true) + if trashcli_err then + local path = os.getenv("PATH") or "(unset)" + Notify.error("trashcli not found. Is it installed and in PATH? PATH=" .. path) + return false + end + return true +end + +---Initialize the plugin and verify dependencies +local function init() + local initialized = get_state("is_initialized") + if not initialized then + if not check_dependencies() then return false end + initialized = true + set_state("is_initialized", true) + end + return initialized +end + +--=========== Plugin start ================================================= +-- Default configuration +local default_config = { + trash_dir = nil, -- Will be auto-discovered from trash-list --trash-dirs + os = ya.target_os(), +} + +---Merges user‑provided configuration options into the defaults. +---@param user_config table|nil +local function set_plugin_config(user_config) + local config = deep_merge(default_config, user_config or {}) + set_state(STATE_KEY.CONFIG, config) +end + +---Setup +function M:setup(cfg) + set_plugin_config(cfg) +end + +---Entry +function M:entry(job) + if not init() then return end + + -- Cache config to avoid multiple state access calls + local config = get_state(STATE_KEY.CONFIG) + local action = job.args[1] + + -- Pass config to functions that need it to avoid additional state calls + if action == "menu" or not action then + cmd_show_menu(config) + elseif action == "open" then + cmd_open_trash(config) + elseif action == "delete" then + cmd_delete_selection(config) + elseif action == "restore" then + cmd_restore_selection(config) + elseif action == "emptyDays" then + cmd_empty_trash_by_days(config) + elseif action == "empty" then + cmd_empty_trash(config) + else + Notify.error("Unknown action '%s'. Valid actions: menu, open, delete, restore, empty, emptyDays", tostring(action)) + end +end + +return M diff --git a/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE b/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE new file mode 100644 index 0000000..ea5b606 --- /dev/null +++ b/yazi/.config/yazi/plugins/smart-paste.yazi/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/README.md b/yazi/.config/yazi/plugins/smart-paste.yazi/README.md similarity index 54% rename from yazi/.config/yazi/plugins/jump-to-char.yazi/README.md rename to yazi/.config/yazi/plugins/smart-paste.yazi/README.md index 3658c35..5daa259 100644 --- a/yazi/.config/yazi/plugins/jump-to-char.yazi/README.md +++ b/yazi/.config/yazi/plugins/smart-paste.yazi/README.md @@ -1,13 +1,13 @@ -# jump-to-char.yazi +# smart-paste.yazi -Vim-like `f`, jump to the next file whose name starts with ``. +Paste files into the hovered directory or to the CWD if hovering over a file. -https://github.com/yazi-rs/plugins/assets/17523360/aac9341c-b416-4e0c-aaba-889d48389869 +https://github.com/user-attachments/assets/b3f6348e-abbe-42fe-9a67-a96e68f11255 ## Installation ```sh -ya pkg add yazi-rs/plugins:jump-to-char +ya pkg add yazi-rs/plugins:smart-paste ``` ## Usage @@ -16,9 +16,9 @@ Add this to your `~/.config/yazi/keymap.toml`: ```toml [[mgr.prepend_keymap]] -on = "f" -run = "plugin jump-to-char" -desc = "Jump to char" +on = "p" +run = "plugin smart-paste" +desc = "Paste into the hovered directory or CWD" ``` Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins. diff --git a/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua b/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua new file mode 100644 index 0000000..0837a4b --- /dev/null +++ b/yazi/.config/yazi/plugins/smart-paste.yazi/main.lua @@ -0,0 +1,14 @@ +--- @since 25.5.31 +--- @sync entry +return { + entry = function() + local h = cx.active.current.hovered + if h and h.cha.is_dir then + ya.emit("enter", {}) + ya.emit("paste", {}) + ya.emit("leave", {}) + else + ya.emit("paste", {}) + end + end, +} diff --git a/yazi/.config/yazi/plugins/jump-to-char.yazi/LICENSE b/yazi/.config/yazi/plugins/vcs-files.yazi/LICENSE similarity index 100% rename from yazi/.config/yazi/plugins/jump-to-char.yazi/LICENSE rename to yazi/.config/yazi/plugins/vcs-files.yazi/LICENSE diff --git a/yazi/.config/yazi/plugins/vcs-files.yazi/README.md b/yazi/.config/yazi/plugins/vcs-files.yazi/README.md new file mode 100644 index 0000000..7997d27 --- /dev/null +++ b/yazi/.config/yazi/plugins/vcs-files.yazi/README.md @@ -0,0 +1,31 @@ +# vcs-files.yazi + +Show Git file changes in Yazi. + +https://github.com/user-attachments/assets/465b801b-3516-4f57-be09-8405da21e34d + +## Installation + +```sh +ya pkg add yazi-rs/plugins:vcs-files +``` + +## Usage + +```toml +# keymap.toml +[[mgr.prepend_keymap]] +on = [ "g", "c" ] +run = "plugin vcs-files" +desc = "Show Git file changes" +``` + +Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins. + +## TODO + +- [ ] Add support for other VCS (e.g. Mercurial, Subversion) + +## License + +This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file. diff --git a/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua b/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua new file mode 100644 index 0000000..066c44a --- /dev/null +++ b/yazi/.config/yazi/plugins/vcs-files.yazi/main.lua @@ -0,0 +1,33 @@ +--- @since 25.12.29 + +local root = ya.sync(function() return cx.active.current.cwd end) + +local function fail(content) return ya.notify { title = "VCS Files", content = content, timeout = 5, level = "error" } end + +local function entry() + local root = root() + local output, err = Command("git"):cwd(tostring(root)):arg({ "diff", "--name-only", "HEAD" }):output() + if err then + return fail("Failed to run `git diff`, error: " .. err) + elseif not output.status.success then + return fail("Failed to run `git diff`, stderr: " .. output.stderr) + end + + local id = ya.id("ft") + local cwd = root:into_search("Git changes") + ya.emit("cd", { Url(cwd) }) + ya.emit("update_files", { op = fs.op("part", { id = id, url = Url(cwd), files = {} }) }) + + local files = {} + for line in output.stdout:gmatch("[^\r\n]+") do + local url = cwd:join("search://Git changes/" .. line) -- TODO: remove "search://Git changes/" + local cha = fs.cha(url, true) + if cha then + files[#files + 1] = File { url = url, cha = cha } + end + end + ya.emit("update_files", { op = fs.op("part", { id = id, url = Url(cwd), files = files }) }) + ya.emit("update_files", { op = fs.op("done", { id = id, url = cwd, cha = Cha { mode = tonumber("100644", 8) } }) }) +end + +return { entry = entry } diff --git a/yazi/.config/yazi/theme.toml b/yazi/.config/yazi/theme.toml deleted file mode 100644 index e69de29..0000000 diff --git a/yazi/.config/yazi/theme.toml b/yazi/.config/yazi/theme.toml new file mode 120000 index 0000000..a82b5b5 --- /dev/null +++ b/yazi/.config/yazi/theme.toml @@ -0,0 +1 @@ +/home/liph/.config/yazi/themes/rose.toml \ No newline at end of file diff --git a/yazi/.config/yazi/themes/cat.toml b/yazi/.config/yazi/themes/cat.toml new file mode 100644 index 0000000..15de14f --- /dev/null +++ b/yazi/.config/yazi/themes/cat.toml @@ -0,0 +1,187 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# : Manager {{{ + +[mgr] +cwd = { fg = "#94e2d5" } + +# TODO: remove +# Hovered +hovered = { reversed = true } +preview_hovered = { underline = true } + +# Find +find_keyword = { fg = "#f9e2af", bold = true, italic = true, underline = true } +find_position = { fg = "#f5c2e7", bg = "reset", bold = true, italic = true } + +# Marker +marker_copied = { fg = "#a6e3a1", bg = "#a6e3a1" } +marker_cut = { fg = "#f38ba8", bg = "#f38ba8" } +marker_marked = { fg = "#94e2d5", bg = "#94e2d5" } +marker_selected = { fg = "#f9e2af", bg = "#f9e2af" } + +# Count +count_copied = { fg = "#1e1e2e", bg = "#a6e3a1" } +count_cut = { fg = "#1e1e2e", bg = "#f38ba8" } +count_selected = { fg = "#1e1e2e", bg = "#f9e2af" } + +# Border +border_symbol = "│" +border_style = { fg = "#7f849c" } + +# : }}} + + +# : Tabs {{{ + +[tabs] +active = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } +inactive = { fg = "#89b4fa", bg = "#313244" } + +# : }}} + + +# : Mode {{{ + +[mode] + +normal_main = { fg = "#1e1e2e", bg = "#89b4fa", bold = true } +normal_alt = { fg = "#89b4fa", bg = "#313244" } + +# Select mode +select_main = { fg = "#1e1e2e", bg = "#94e2d5", bold = true } +select_alt = { fg = "#94e2d5", bg = "#313244" } + +# Unset mode +unset_main = { fg = "#1e1e2e", bg = "#f2cdcd", bold = true } +unset_alt = { fg = "#f2cdcd", bg = "#313244" } + +# : }}} + + +# : Status bar {{{ + +[status] +# Permissions +perm_sep = { fg = "#7f849c" } +perm_type = { fg = "#89b4fa" } +perm_read = { fg = "#f9e2af" } +perm_write = { fg = "#f38ba8" } +perm_exec = { fg = "#a6e3a1" } + +# Progress +progress_label = { fg = "#ffffff", bold = true } +progress_normal = { fg = "#a6e3a1", bg = "#45475a" } +progress_error = { fg = "#f9e2af", bg = "#f38ba8" } + +# : }}} + + +# : Pick {{{ + +[pick] +border = { fg = "#89b4fa" } +active = { fg = "#f5c2e7", bold = true } +inactive = {} + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#89b4fa" } +title = {} +value = {} +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[cmp] +border = { fg = "#89b4fa" } + +# : }}} + + +# : Tasks {{{ + +[tasks] +border = { fg = "#89b4fa" } +title = {} +hovered = { fg = "#f5c2e7", bold = true } + +# : }}} + + +# : Which {{{ + +[which] +mask = { bg = "#313244" } +cand = { fg = "#94e2d5" } +rest = { fg = "#9399b2" } +desc = { fg = "#f5c2e7" } +separator = "  " +separator_style = { fg = "#585b70" } + +# : }}} + + +# : Help {{{ + +[help] +on = { fg = "#94e2d5" } +run = { fg = "#f5c2e7" } +hovered = { reversed = true, bold = true } +footer = { fg = "#313244", bg = "#cdd6f4" } + +# : }}} + + +# : Spotter {{{ + +[spot] +border = { fg = "#89b4fa" } +title = { fg = "#89b4fa" } +tbl_col = { fg = "#94e2d5" } +tbl_cell = { fg = "#f5c2e7", bg = "#45475a" } + +# : }}} + + +# : Notification {{{ + +[notify] +title_info = { fg = "#a6e3a1" } +title_warn = { fg = "#f9e2af" } +title_error = { fg = "#f38ba8" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] + +rules = [ + # Image + { mime = "image/*", fg = "#94e2d5" }, + # Media + { mime = "{audio,video}/*", fg = "#f9e2af" }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#f5c2e7" }, + # Document + { mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" }, + # Virtual file system + { mime = "vfs/{absent,stale}", fg = "#9399b2" }, + # Fallback + { url = "*", fg = "#cdd6f4" }, + { url = "*/", fg = "#89b4fa" }, + # TODO: remove + { name = "*", fg = "#cdd6f4" }, + { name = "*/", fg = "#89b4fa" } +] + +# : }}} diff --git a/yazi/.config/yazi/themes/dracula.toml b/yazi/.config/yazi/themes/dracula.toml new file mode 100644 index 0000000..58b0080 --- /dev/null +++ b/yazi/.config/yazi/themes/dracula.toml @@ -0,0 +1,318 @@ +# Theme Configuration +[theme] +# Theme metadata +name = "Dracula Pro" +author = "Enhanced Dracula Theme" +version = "2.0.0" +description = "A sophisticated dark theme based on Dracula color scheme" + +# Color palette definition +[theme.colors] +background = "#282a36" +current_line = "#44475a" +foreground = "#f8f8f2" +comment = "#6272a4" +purple = "#bd93f9" +green = "#50fa7b" +orange = "#ffb86c" +red = "#ff5555" +pink = "#ff79c6" +cyan = "#8be9fd" +yellow = "#f1fa8c" + +# Animation settings +[theme.animation] +frames_per_second = 60 +duration = 0.2 +easing = "easeInOutCubic" + +# Manager +[manager] +# Enhanced preview options +preview = { tab_size = 2, max_width = 100, max_height = 50, cache_size = 50, scroll_offset = 5 } +preview_ratios = [1, 4, 4] +preview_shown = true +preview_service = { image = "ueberzug", video = "ffmpegthumbnailer", pdf = "pdftoppm" } + +# Sophisticated hover effects +hovered = { fg = "#f8f8f2", bg = "#44475a", italic = true } + +# Enhanced markers with animations +marker_copied = { fg = "#282a36", bg = "#50fa7b" } + +# Dynamic loading indicators +loading_indicator_frames = "⣾⣽⣻⢿⡿⣟⣯⣷" +loading_style = { fg = "#bd93f9", bold = true } + +# Enhanced folder icons +folder_icons = { default = " ", open = " ", empty = " ", empty_open = " ", symlink = " ", symlink_open = " ", error = " " } + +file_size_units = ["B", "KB", "MB", "GB", "TB", "PB", "EB"] + +# Status +[status] +# Dynamic status bar +refresh_rate = 1000 +separator_open = "" +separator_close = "" + +# Progress bar styling +progress_bar_style = { fg = "#bd93f9", bg = "#44475a" } + +# Enhanced modes +mode_normal = { fg = "#282a36", bg = "#bd93f9", bold = true } + +# Input +[input] +# Advanced input styling +cursor_style = { fg = "#f8f8f2", bg = "#6272a4", blink = true, blink_interval = 500 } + +# History features +history_size = 100 +history_unique = true + +# Completion styling +completion_style = { selected_bg = "#44475a", selected_fg = "#f8f8f2", selected_bold = true, selected_italic = true } + +# Notify +[notify] +# Enhanced notification system +position = "top-right" +timeout = 5000 +max_width = 400 +max_height = 200 +margin = 10 +padding = 8 + +[notify.levels] +info = { fg = "#50fa7b", bg = "#282a36", icon = " ", timeout = 3000 } +warn = { fg = "#f1fa8c", bg = "#282a36", icon = " ", timeout = 5000 } +error = { fg = "#ff5555", bg = "#282a36", icon = " ", timeout = 7000 } +debug = { fg = "#6272a4", bg = "#282a36", icon = "󰃤 ", timeout = 2000 } + +[notify.animation] +enabled = true +duration = 200 +slide_in = "right" +fade_out = true + +[notify.border] +fg = "#bd93f9" +bg = "#282a36" +style = "rounded" + +[notify.overlay] +bg = "#282a36" +blend = 0.8 + +# File-specific styles +[filetype] +rules = [ + # Development Environment + { name = ".env*", fg = "#50fa7b", bold = true, prefix = "󰙪 " }, + { name = ".git*", fg = "#ff5555", italic = true, prefix = " " }, + { name = ".docker*", fg = "#8be9fd", bold = true, prefix = "󰡨 " }, + + # Configuration Files + { name = "*.{json,yaml,yml,toml,xml}", fg = "#8be9fd", italic = true, prefix = "󰘦 " }, + { name = "*.{ini,conf,cfg}", fg = "#6272a4", italic = true, prefix = " " }, + + # Web Development + { name = "*.{html,htm}", fg = "#ff79c6", italic = true, prefix = "󰌝 " }, + { name = "*.{css,scss,sass,less}", fg = "#bd93f9", italic = true, prefix = "󰌜 " }, + { name = "*.{jsx,tsx}", fg = "#8be9fd", italic = true, prefix = "󰜈 " }, + { name = "*.{js,ts}", fg = "#f1fa8c", italic = true, prefix = "󰌞 " }, + { name = "*.vue", fg = "#50fa7b", italic = true, prefix = "󰡄 " }, + { name = "*.svelte", fg = "#ff5555", italic = true, prefix = "󰓓 " }, + + # Backend Development + { name = "*.{py,pyc}", fg = "#50fa7b", italic = true, prefix = "󰌠 " }, + { name = "*.{rb,erb}", fg = "#ff5555", italic = true, prefix = "󰴭 " }, + { name = "*.{php,phar}", fg = "#bd93f9", italic = true, prefix = "󰌟 " }, + { name = "*.{java,jar}", fg = "#ff5555", italic = true, prefix = "󰬷 " }, + { name = "*.go", fg = "#8be9fd", italic = true, prefix = "󰟓 " }, + { name = "*.rs", fg = "#ff7043", italic = true, prefix = "󱘗 " }, + + # System Programming + { name = "*.{c,h}", fg = "#bd93f9", italic = true, prefix = "󰙱 " }, + { name = "*.{cpp,hpp}", fg = "#ff79c6", italic = true, prefix = "󰙲 " }, + { name = "*.{asm,s}", fg = "#ff5555", italic = true, prefix = "󰋖 " }, + + # Build Systems + { name = "*Makefile", fg = "#ff79c6", bold = true, prefix = "󰛕 " }, + { name = "*CMakeLists.txt", fg = "#ff79c6", bold = true, prefix = "󰔷 " }, + { name = "*.gradle", fg = "#8be9fd", bold = true, prefix = "󰏗 " }, + + # Package Managers + { name = "package.json", fg = "#ff5555", bold = true, prefix = "󰎙 " }, + { name = "package-lock.json", fg = "#ff5555", italic = true, prefix = "󰎙 " }, + { name = "composer.json", fg = "#ff79c6", bold = true, prefix = "󰎙 " }, + { name = "Cargo.toml", fg = "#ff7043", bold = true, prefix = "󱘗 " }, + + # Documentation + { name = "*.{md,mdx}", fg = "#f1fa8c", italic = true, prefix = "󰍔 " }, + { name = "*.rst", fg = "#f1fa8c", italic = true, prefix = "󰈙 " }, + { name = "*.pdf", fg = "#ff5555", bold = true, prefix = "󰈙 " }, + { name = "LICENSE*", fg = "#50fa7b", bold = true, prefix = "󰿃 " }, + { name = "README*", fg = "#50fa7b", bold = true, prefix = " " }, + + # Media with size categories + { name = "*.{jpg,jpeg,png,gif}", size = "< 1MB", fg = "#8be9fd", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 10MB", fg = "#ffb86c", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "> 10MB", fg = "#ff5555", prefix = "󰋯 " }, + + # Video files with duration indicator + { name = "*.{mp4,mkv}", duration = "< 10:00", fg = "#bd93f9", prefix = "󰕧 " }, + { name = "*.{mp4,mkv}", duration = "< 1:00:00", fg = "#ffb86c", prefix = "󰕧 " }, + { name = "*.{mp4,mkv}", duration = "> 1:00:00", fg = "#ff5555", prefix = "󰕧 " }, + + # Archives with compression ratio + { name = "*.{zip,gz,tar}", ratio = "< 0.5", fg = "#50fa7b", prefix = "󰀼 " }, + { name = "*.{zip,gz,tar}", ratio = "< 0.7", fg = "#f1fa8c", prefix = "󰀼 " }, + { name = "*.{zip,gz,tar}", ratio = "> 0.7", fg = "#ff5555", prefix = "󰀼 " }, + + # Special Directories + { name = "node_modules", fg = "#6272a4", prefix = "󰎙 " }, + { name = ".git", fg = "#ff5555", prefix = " " }, + { name = ".github", fg = "#bd93f9", prefix = " " }, + { name = "dist", fg = "#6272a4", prefix = "󰏗 " }, + { name = "build", fg = "#6272a4", prefix = "󱁤 " }, + + # Additional file types + # Audio files + { name = "*.{mp3,flac,m4a,wav,ogg}", fg = "#bd93f9", italic = true, prefix = "󰎈 " }, + + # Font files + { name = "*.{ttf,otf,woff,woff2}", fg = "#ff79c6", italic = true, prefix = "󰛖 " }, + + # Database files + { name = "*.{sql,sqlite,db}", fg = "#8be9fd", italic = true, prefix = "󰆼 " }, + + # Shell scripts + { name = "*.{sh,bash,zsh,fish}", fg = "#50fa7b", italic = true, prefix = "󰆍 " }, + + # Virtual environments + { name = "venv", fg = "#6272a4", prefix = "󰆧 " }, + { name = ".env", fg = "#50fa7b", prefix = "󰆧 " }, + + # Container files + { name = "*.dockerfile", fg = "#8be9fd", bold = true, prefix = "󰡨 " }, + { name = "docker-compose*.{yml,yaml}", fg = "#8be9fd", bold = true, prefix = "󰡨 " }, + + # Security files + { name = "*.{pem,crt,ca,key}", fg = "#ff5555", bold = true, prefix = "󰌋 " }, + + # Improved size-based rules for media + { name = "*.{jpg,jpeg,png,gif}", size = "< 100KB", fg = "#8be9fd", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 1MB", fg = "#bd93f9", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 10MB", fg = "#ffb86c", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "> 10MB", fg = "#ff5555", prefix = "󰋯 " }, + + # Default Fallbacks + { name = "*", fg = "#f8f8f2" }, + { name = "*/", fg = "#bd93f9", bold = true, prefix = " " }, + + # Additional Development Files + { name = "*.{proto}", fg = "#bd93f9", italic = true, prefix = "󰯍 " }, + { name = "*.{graphql,gql}", fg = "#ff79c6", italic = true, prefix = "󰡷 " }, + { name = "*.{tf,tfvars}", fg = "#8be9fd", italic = true, prefix = "󱁢 " }, + + # Container and Cloud + { name = "*.{yaml,yml}", pattern = "^k8s|^kubernetes", fg = "#8be9fd", bold = true, prefix = "󱃾 " }, + { name = "*.{yaml,yml}", pattern = "^helm", fg = "#8be9fd", bold = true, prefix = "󰠿 " }, + + # Data Files + { name = "*.{csv,tsv}", fg = "#50fa7b", italic = true, prefix = "󰈛 " }, + { name = "*.{parquet,avro}", fg = "#bd93f9", italic = true, prefix = "󰋖 " }, + + # Size-based rules for documents + { name = "*.{pdf,epub,mobi}", size = "< 1MB", fg = "#8be9fd", prefix = "󰈙 " }, + { name = "*.{pdf,epub,mobi}", size = "< 10MB", fg = "#ffb86c", prefix = "󰈙 " }, + { name = "*.{pdf,epub,mobi}", size = "> 10MB", fg = "#ff5555", prefix = "󰈙 " }, + + # Additional Development Files + { name = "*.{sol}", fg = "#bd93f9", italic = true, prefix = "󰡪 " }, # Solidity files + { name = "*.{ex,exs}", fg = "#bd93f9", italic = true, prefix = "󰡁 " }, # Elixir files + { name = "*.{kt,kts}", fg = "#ff79c6", italic = true, prefix = "󱈙 " }, # Kotlin files + { name = "*.{swift}", fg = "#ff5555", italic = true, prefix = "󰛥 " }, # Swift files + + # Config Files + { name = "*.{nginx,nginx.conf}", fg = "#50fa7b", italic = true, prefix = "󰻭 " }, + { name = "*{webpack}*", fg = "#8be9fd", bold = true, prefix = "󰜫 " }, + + # ML/Data Science + { name = "*.{ipynb}", fg = "#ff79c6", italic = true, prefix = "󰠏 " }, + { name = "*.{pkl,pickle}", fg = "#50fa7b", italic = true, prefix = "󰜎 " }, + + # 3D/Graphics + { name = "*.{blend}", fg = "#ff79c6", italic = true, prefix = "󰂫 " }, + { name = "*.{fbx,obj,stl}", fg = "#8be9fd", italic = true, prefix = "󰆧 " }, + + # More granular size-based rules for media files + { name = "*.{jpg,jpeg,png,gif}", size = "< 50KB", fg = "#8be9fd", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 500KB", fg = "#bd93f9", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 2MB", fg = "#ffb86c", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "< 20MB", fg = "#ff7043", prefix = "󰋯 " }, + { name = "*.{jpg,jpeg,png,gif}", size = "> 20MB", fg = "#ff5555", prefix = "󰋯 " }, + + # Size categories for video files + { name = "*.{mp4,mkv,avi,mov}", size = "< 100MB", fg = "#8be9fd", prefix = "󰕧 " }, + { name = "*.{mp4,mkv,avi,mov}", size = "< 1GB", fg = "#ffb86c", prefix = "󰕧 " }, + { name = "*.{mp4,mkv,avi,mov}", size = "> 1GB", fg = "#ff5555", prefix = "󰕧 " }, +] + +# Keybindings +[keys] +# Visual key hints +show_hints = true +hint_style = { fg = "#6272a4", bg = "#44475a", italic = true } + +# Command palette +command_palette = { bg = "#282a36", fg = "#f8f8f2", selected_bg = "#44475a", selected_fg = "#f8f8f2", border = "#bd93f9" } + +# Preview +[preview] +tab_size = 2 +max_width = 120 +max_height = 60 +cache_dir = "/tmp/yazi" + +[preview.image] +enabled = true +format = "rgb" +max_width = 1920 +max_height = 1080 +quality = 90 +animate = true +cache = true + +[preview.preview_service] +image = "ueberzug" +video = "ffmpegthumbnailer" +pdf = "pdftoppm" +epub = "epub-thumbnailer" +office = "libreoffice --headless --convert-to pdf" +markdown = "glow" + +[preview.syntax] +theme = "Dracula" +background = "#282a36" + +# Opener +[opener] +edit = [ + { exec = 'nvim "$@"', desc = "Edit with Neovim" }, + { exec = 'code "$@"', desc = "Edit with VS Code" } +] +open = [ + { exec = 'xdg-open "$@"', desc = "Open with system default" }, + { exec = 'firefox "$@"', desc = "Open in Firefox" } +] +reveal = [ + { exec = 'nautilus "$@"', desc = "Reveal in file manager" } +] + +# Enhanced preview features +max_preview_size = 10485760 # 10MB limit for preview +scroll_offset = 5 +scroll_smooth = true diff --git a/yazi/.config/yazi/themes/rose.toml b/yazi/.config/yazi/themes/rose.toml new file mode 100644 index 0000000..92abd8f --- /dev/null +++ b/yazi/.config/yazi/themes/rose.toml @@ -0,0 +1,650 @@ +[icon] +files = [ + { name = ".babelrc", text = "", fg = "#f6c177" }, + { name = ".bash_profile", text = "", fg = "#f6c177" }, + { name = ".bashrc", text = "", fg = "#f6c177" }, + { name = ".clang-format", text = "", fg = "#6e6a86" }, + { name = ".clang-tidy", text = "", fg = "#6e6a86" }, + { name = ".codespellrc", text = "󰓆", fg = "#f6c177" }, + { name = ".condarc", text = "", fg = "#f6c177" }, + { name = ".dockerignore", text = "󰡨", fg = "#3e8fb0" }, + { name = ".ds_store", text = "", fg = "#2a283e" }, + { name = ".editorconfig", text = "", fg = "#e0def4" }, + { name = ".env", text = "", fg = "#f6c177" }, + { name = ".eslintignore", text = "", fg = "#3e8fb0" }, + { name = ".eslintrc", text = "", fg = "#3e8fb0" }, + { name = ".git-blame-ignore-revs", text = "", fg = "#eb6f92" }, + { name = ".gitattributes", text = "", fg = "#eb6f92" }, + { name = ".gitconfig", text = "", fg = "#eb6f92" }, + { name = ".gitignore", text = "", fg = "#eb6f92" }, + { name = ".gitlab-ci.yml", text = "", fg = "#eb6f92" }, + { name = ".gitmodules", text = "", fg = "#eb6f92" }, + { name = ".gtkrc-2.0", text = "", fg = "#e0def4" }, + { name = ".gvimrc", text = "", fg = "#f6c177" }, + { name = ".justfile", text = "", fg = "#e0def4" }, + { name = ".luacheckrc", text = "", fg = "#3e8fb0" }, + { name = ".luaurc", text = "", fg = "#3e8fb0" }, + { name = ".mailmap", text = "󰊢", fg = "#eb6f92" }, + { name = ".nanorc", text = "", fg = "#3e8fb0" }, + { name = ".npmignore", text = "", fg = "#eb6f92" }, + { name = ".npmrc", text = "", fg = "#eb6f92" }, + { name = ".nuxtrc", text = "󱄆", fg = "#f6c177" }, + { name = ".nvmrc", text = "", fg = "#f6c177" }, + { name = ".pre-commit-config.yaml", text = "󰛢", fg = "#f6c177" }, + { name = ".prettierignore", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.cjs", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.js", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.json", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.json5", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.mjs", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.toml", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.yaml", text = "", fg = "#3e8fb0" }, + { name = ".prettierrc.yml", text = "", fg = "#3e8fb0" }, + { name = ".pylintrc", text = "", fg = "#e0def4" }, + { name = ".settings.json", text = "", fg = "#3e8fb0" }, + { name = ".SRCINFO", text = "󰣇", fg = "#3e8fb0" }, + { name = ".vimrc", text = "", fg = "#f6c177" }, + { name = ".Xauthority", text = "", fg = "#eb6f92" }, + { name = ".xinitrc", text = "", fg = "#eb6f92" }, + { name = ".Xresources", text = "", fg = "#eb6f92" }, + { name = ".xsession", text = "", fg = "#eb6f92" }, + { name = ".zprofile", text = "", fg = "#f6c177" }, + { name = ".zshenv", text = "", fg = "#f6c177" }, + { name = ".zshrc", text = "", fg = "#f6c177" }, + { name = "_gvimrc", text = "", fg = "#f6c177" }, + { name = "_vimrc", text = "", fg = "#f6c177" }, + { name = "AUTHORS", text = "", fg = "#3e8fb0" }, + { name = "AUTHORS.txt", text = "", fg = "#3e8fb0" }, + { name = "brewfile", text = "", fg = "#eb6f92" }, + { name = "bspwmrc", text = "", fg = "#232136" }, + { name = "build", text = "", fg = "#f6c177" }, + { name = "build.gradle", text = "", fg = "#3e8fb0" }, + { name = "build.zig.zon", text = "", fg = "#f6c177" }, + { name = "bun.lockb", text = "", fg = "#e0def4" }, + { name = "cantorrc", text = "", fg = "#3e8fb0" }, + { name = "checkhealth", text = "󰓙", fg = "#3e8fb0" }, + { name = "cmakelists.txt", text = "", fg = "#e0def4" }, + { name = "code_of_conduct", text = "", fg = "#eb6f92" }, + { name = "code_of_conduct.md", text = "", fg = "#eb6f92" }, + { name = "commit_editmsg", text = "", fg = "#eb6f92" }, + { name = "commitlint.config.js", text = "󰜘", fg = "#3e8fb0" }, + { name = "commitlint.config.ts", text = "󰜘", fg = "#3e8fb0" }, + { name = "compose.yaml", text = "󰡨", fg = "#3e8fb0" }, + { name = "compose.yml", text = "󰡨", fg = "#3e8fb0" }, + { name = "config", text = "", fg = "#e0def4" }, + { name = "containerfile", text = "󰡨", fg = "#3e8fb0" }, + { name = "copying", text = "", fg = "#f6c177" }, + { name = "copying.lesser", text = "", fg = "#f6c177" }, + { name = "Directory.Build.props", text = "", fg = "#3e8fb0" }, + { name = "Directory.Build.targets", text = "", fg = "#3e8fb0" }, + { name = "Directory.Packages.props", text = "", fg = "#3e8fb0" }, + { name = "docker-compose.yaml", text = "󰡨", fg = "#3e8fb0" }, + { name = "docker-compose.yml", text = "󰡨", fg = "#3e8fb0" }, + { name = "dockerfile", text = "󰡨", fg = "#3e8fb0" }, + { name = "eslint.config.cjs", text = "", fg = "#3e8fb0" }, + { name = "eslint.config.js", text = "", fg = "#3e8fb0" }, + { name = "eslint.config.mjs", text = "", fg = "#3e8fb0" }, + { name = "eslint.config.ts", text = "", fg = "#3e8fb0" }, + { name = "ext_typoscript_setup.txt", text = "", fg = "#f6c177" }, + { name = "favicon.ico", text = "", fg = "#f6c177" }, + { name = "fp-info-cache", text = "", fg = "#e0def4" }, + { name = "fp-lib-table", text = "", fg = "#e0def4" }, + { name = "FreeCAD.conf", text = "", fg = "#eb6f92" }, + { name = "Gemfile", text = "", fg = "#eb6f92" }, + { name = "gnumakefile", text = "", fg = "#e0def4" }, + { name = "go.mod", text = "", fg = "#3e8fb0" }, + { name = "go.sum", text = "", fg = "#3e8fb0" }, + { name = "go.work", text = "", fg = "#3e8fb0" }, + { name = "gradle-wrapper.properties", text = "", fg = "#3e8fb0" }, + { name = "gradle.properties", text = "", fg = "#3e8fb0" }, + { name = "gradlew", text = "", fg = "#3e8fb0" }, + { name = "groovy", text = "", fg = "#6e6a86" }, + { name = "gruntfile.babel.js", text = "", fg = "#f6c177" }, + { name = "gruntfile.coffee", text = "", fg = "#f6c177" }, + { name = "gruntfile.js", text = "", fg = "#f6c177" }, + { name = "gruntfile.ts", text = "", fg = "#f6c177" }, + { name = "gtkrc", text = "", fg = "#e0def4" }, + { name = "gulpfile.babel.js", text = "", fg = "#eb6f92" }, + { name = "gulpfile.coffee", text = "", fg = "#eb6f92" }, + { name = "gulpfile.js", text = "", fg = "#eb6f92" }, + { name = "gulpfile.ts", text = "", fg = "#eb6f92" }, + { name = "hypridle.conf", text = "", fg = "#3e8fb0" }, + { name = "hyprland.conf", text = "", fg = "#3e8fb0" }, + { name = "hyprlock.conf", text = "", fg = "#3e8fb0" }, + { name = "hyprpaper.conf", text = "", fg = "#3e8fb0" }, + { name = "i18n.config.js", text = "󰗊", fg = "#3e8fb0" }, + { name = "i18n.config.ts", text = "󰗊", fg = "#3e8fb0" }, + { name = "i3blocks.conf", text = "", fg = "#e0def4" }, + { name = "i3status.conf", text = "", fg = "#e0def4" }, + { name = "index.theme", text = "", fg = "#f6c177" }, + { name = "ionic.config.json", text = "", fg = "#3e8fb0" }, + { name = "justfile", text = "", fg = "#e0def4" }, + { name = "kalgebrarc", text = "", fg = "#3e8fb0" }, + { name = "kdeglobals", text = "", fg = "#3e8fb0" }, + { name = "kdenlive-layoutsrc", text = "", fg = "#3e8fb0" }, + { name = "kdenliverc", text = "", fg = "#3e8fb0" }, + { name = "kritadisplayrc", text = "", fg = "#3e8fb0" }, + { name = "kritarc", text = "", fg = "#3e8fb0" }, + { name = "license", text = "", fg = "#f6c177" }, + { name = "license.md", text = "", fg = "#f6c177" }, + { name = "lxde-rc.xml", text = "", fg = "#e0def4" }, + { name = "lxqt.conf", text = "", fg = "#3e8fb0" }, + { name = "makefile", text = "", fg = "#e0def4" }, + { name = "mix.lock", text = "", fg = "#c4a7e7" }, + { name = "mpv.conf", text = "", fg = "#393552" }, + { name = "node_modules", text = "", fg = "#eb6f92" }, + { name = "nuxt.config.cjs", text = "󱄆", fg = "#f6c177" }, + { name = "nuxt.config.js", text = "󱄆", fg = "#f6c177" }, + { name = "nuxt.config.mjs", text = "󱄆", fg = "#f6c177" }, + { name = "nuxt.config.ts", text = "󱄆", fg = "#f6c177" }, + { name = "package-lock.json", text = "", fg = "#eb6f92" }, + { name = "package.json", text = "", fg = "#eb6f92" }, + { name = "PKGBUILD", text = "", fg = "#3e8fb0" }, + { name = "platformio.ini", text = "", fg = "#f6c177" }, + { name = "pom.xml", text = "", fg = "#eb6f92" }, + { name = "prettier.config.cjs", text = "", fg = "#3e8fb0" }, + { name = "prettier.config.js", text = "", fg = "#3e8fb0" }, + { name = "prettier.config.mjs", text = "", fg = "#3e8fb0" }, + { name = "prettier.config.ts", text = "", fg = "#3e8fb0" }, + { name = "procfile", text = "", fg = "#c4a7e7" }, + { name = "PrusaSlicer.ini", text = "", fg = "#f6c177" }, + { name = "PrusaSlicerGcodeViewer.ini", text = "", fg = "#f6c177" }, + { name = "py.typed", text = "", fg = "#f6c177" }, + { name = "QtProject.conf", text = "", fg = "#f6c177" }, + { name = "rakefile", text = "", fg = "#eb6f92" }, + { name = "readme", text = "󰂺", fg = "#e0def4" }, + { name = "readme.md", text = "󰂺", fg = "#e0def4" }, + { name = "rmd", text = "", fg = "#3e8fb0" }, + { name = "robots.txt", text = "󰚩", fg = "#6e6a86" }, + { name = "security", text = "󰒃", fg = "#e0def4" }, + { name = "security.md", text = "󰒃", fg = "#e0def4" }, + { name = "settings.gradle", text = "", fg = "#3e8fb0" }, + { name = "svelte.config.js", text = "", fg = "#eb6f92" }, + { name = "sxhkdrc", text = "", fg = "#232136" }, + { name = "sym-lib-table", text = "", fg = "#e0def4" }, + { name = "tailwind.config.js", text = "󱏿", fg = "#3e8fb0" }, + { name = "tailwind.config.mjs", text = "󱏿", fg = "#3e8fb0" }, + { name = "tailwind.config.ts", text = "󱏿", fg = "#3e8fb0" }, + { name = "tmux.conf", text = "", fg = "#f6c177" }, + { name = "tmux.conf.local", text = "", fg = "#f6c177" }, + { name = "tsconfig.json", text = "", fg = "#3e8fb0" }, + { name = "unlicense", text = "", fg = "#f6c177" }, + { name = "vagrantfile", text = "", fg = "#3e8fb0" }, + { name = "vercel.json", text = "", fg = "#e0def4" }, + { name = "vlcrc", text = "󰕼", fg = "#f6c177" }, + { name = "webpack", text = "󰜫", fg = "#3e8fb0" }, + { name = "weston.ini", text = "", fg = "#f6c177" }, + { name = "workspace", text = "", fg = "#f6c177" }, + { name = "xmobarrc", text = "", fg = "#eb6f92" }, + { name = "xmobarrc.hs", text = "", fg = "#eb6f92" }, + { name = "xmonad.hs", text = "", fg = "#eb6f92" }, + { name = "xorg.conf", text = "", fg = "#eb6f92" }, + { name = "xsettingsd.conf", text = "", fg = "#eb6f92" }, +] +exts = [ + { name = "3gp", text = "", fg = "#f6c177" }, + { name = "3mf", text = "󰆧", fg = "#e0def4" }, + { name = "7z", text = "", fg = "#f6c177" }, + { name = "a", text = "", fg = "#e0def4" }, + { name = "aac", text = "", fg = "#3e8fb0" }, + { name = "adb", text = "", fg = "#3e8fb0" }, + { name = "ads", text = "", fg = "#e0def4" }, + { name = "ai", text = "", fg = "#f6c177" }, + { name = "aif", text = "", fg = "#3e8fb0" }, + { name = "aiff", text = "", fg = "#3e8fb0" }, + { name = "android", text = "", fg = "#f6c177" }, + { name = "ape", text = "", fg = "#3e8fb0" }, + { name = "apk", text = "", fg = "#f6c177" }, + { name = "apl", text = "", fg = "#f6c177" }, + { name = "app", text = "", fg = "#eb6f92" }, + { name = "applescript", text = "", fg = "#e0def4" }, + { name = "asc", text = "󰦝", fg = "#6e6a86" }, + { name = "asm", text = "", fg = "#3e8fb0" }, + { name = "ass", text = "󰨖", fg = "#f6c177" }, + { name = "astro", text = "", fg = "#eb6f92" }, + { name = "avif", text = "", fg = "#c4a7e7" }, + { name = "awk", text = "", fg = "#232136" }, + { name = "azcli", text = "", fg = "#3e8fb0" }, + { name = "bak", text = "󰁯", fg = "#e0def4" }, + { name = "bash", text = "", fg = "#f6c177" }, + { name = "bat", text = "", fg = "#f6c177" }, + { name = "bazel", text = "", fg = "#f6c177" }, + { name = "bib", text = "󱉟", fg = "#f6c177" }, + { name = "bicep", text = "", fg = "#3e8fb0" }, + { name = "bicepparam", text = "", fg = "#c4a7e7" }, + { name = "bin", text = "", fg = "#eb6f92" }, + { name = "blade.php", text = "", fg = "#eb6f92" }, + { name = "blend", text = "󰂫", fg = "#f6c177" }, + { name = "blp", text = "󰺾", fg = "#3e8fb0" }, + { name = "bmp", text = "", fg = "#c4a7e7" }, + { name = "bqn", text = "", fg = "#f6c177" }, + { name = "brep", text = "󰻫", fg = "#9ccfd8" }, + { name = "bz", text = "", fg = "#f6c177" }, + { name = "bz2", text = "", fg = "#f6c177" }, + { name = "bz3", text = "", fg = "#f6c177" }, + { name = "bzl", text = "", fg = "#f6c177" }, + { name = "c", text = "", fg = "#3e8fb0" }, + { name = "c++", text = "", fg = "#eb6f92" }, + { name = "cache", text = "", fg = "#e0def4" }, + { name = "cast", text = "", fg = "#f6c177" }, + { name = "cbl", text = "", fg = "#3e8fb0" }, + { name = "cc", text = "", fg = "#eb6f92" }, + { name = "ccm", text = "", fg = "#eb6f92" }, + { name = "cfg", text = "", fg = "#e0def4" }, + { name = "cjs", text = "", fg = "#f6c177" }, + { name = "clj", text = "", fg = "#f6c177" }, + { name = "cljc", text = "", fg = "#f6c177" }, + { name = "cljd", text = "", fg = "#3e8fb0" }, + { name = "cljs", text = "", fg = "#3e8fb0" }, + { name = "cmake", text = "", fg = "#e0def4" }, + { name = "cob", text = "", fg = "#3e8fb0" }, + { name = "cobol", text = "", fg = "#3e8fb0" }, + { name = "coffee", text = "", fg = "#f6c177" }, + { name = "conda", text = "", fg = "#f6c177" }, + { name = "conf", text = "", fg = "#e0def4" }, + { name = "config.ru", text = "", fg = "#eb6f92" }, + { name = "cow", text = "󰆚", fg = "#f6c177" }, + { name = "cp", text = "", fg = "#3e8fb0" }, + { name = "cpp", text = "", fg = "#3e8fb0" }, + { name = "cppm", text = "", fg = "#3e8fb0" }, + { name = "cpy", text = "", fg = "#3e8fb0" }, + { name = "cr", text = "", fg = "#e0def4" }, + { name = "crdownload", text = "", fg = "#3e8fb0" }, + { name = "cs", text = "󰌛", fg = "#f6c177" }, + { name = "csh", text = "", fg = "#232136" }, + { name = "cshtml", text = "󱦗", fg = "#3e8fb0" }, + { name = "cson", text = "", fg = "#f6c177" }, + { name = "csproj", text = "󰪮", fg = "#3e8fb0" }, + { name = "css", text = "", fg = "#3e8fb0" }, + { name = "csv", text = "", fg = "#f6c177" }, + { name = "cts", text = "", fg = "#3e8fb0" }, + { name = "cu", text = "", fg = "#f6c177" }, + { name = "cue", text = "󰲹", fg = "#ea9a97" }, + { name = "cuh", text = "", fg = "#c4a7e7" }, + { name = "cxx", text = "", fg = "#3e8fb0" }, + { name = "cxxm", text = "", fg = "#3e8fb0" }, + { name = "d", text = "", fg = "#eb6f92" }, + { name = "d.ts", text = "", fg = "#f6c177" }, + { name = "dart", text = "", fg = "#3e8fb0" }, + { name = "db", text = "", fg = "#e0def4" }, + { name = "dconf", text = "", fg = "#e0def4" }, + { name = "desktop", text = "", fg = "#c4a7e7" }, + { name = "diff", text = "", fg = "#232136" }, + { name = "dll", text = "", fg = "#ea9a97" }, + { name = "doc", text = "󰈬", fg = "#3e8fb0" }, + { name = "Dockerfile", text = "󰡨", fg = "#3e8fb0" }, + { name = "docx", text = "󰈬", fg = "#3e8fb0" }, + { name = "dot", text = "󱁉", fg = "#3e8fb0" }, + { name = "download", text = "", fg = "#3e8fb0" }, + { name = "drl", text = "", fg = "#ea9a97" }, + { name = "dropbox", text = "", fg = "#3e8fb0" }, + { name = "dump", text = "", fg = "#e0def4" }, + { name = "dwg", text = "󰻫", fg = "#9ccfd8" }, + { name = "dxf", text = "󰻫", fg = "#9ccfd8" }, + { name = "ebook", text = "", fg = "#f6c177" }, + { name = "ebuild", text = "", fg = "#393552" }, + { name = "edn", text = "", fg = "#3e8fb0" }, + { name = "eex", text = "", fg = "#c4a7e7" }, + { name = "ejs", text = "", fg = "#f6c177" }, + { name = "el", text = "", fg = "#c4a7e7" }, + { name = "elc", text = "", fg = "#c4a7e7" }, + { name = "elf", text = "", fg = "#eb6f92" }, + { name = "elm", text = "", fg = "#3e8fb0" }, + { name = "eln", text = "", fg = "#c4a7e7" }, + { name = "env", text = "", fg = "#f6c177" }, + { name = "eot", text = "", fg = "#e0def4" }, + { name = "epp", text = "", fg = "#f6c177" }, + { name = "epub", text = "", fg = "#f6c177" }, + { name = "erb", text = "", fg = "#eb6f92" }, + { name = "erl", text = "", fg = "#eb6f92" }, + { name = "ex", text = "", fg = "#c4a7e7" }, + { name = "exe", text = "", fg = "#eb6f92" }, + { name = "exs", text = "", fg = "#c4a7e7" }, + { name = "f#", text = "", fg = "#3e8fb0" }, + { name = "f3d", text = "󰻫", fg = "#9ccfd8" }, + { name = "f90", text = "󱈚", fg = "#c4a7e7" }, + { name = "fbx", text = "󰆧", fg = "#e0def4" }, + { name = "fcbak", text = "", fg = "#eb6f92" }, + { name = "fcmacro", text = "", fg = "#eb6f92" }, + { name = "fcmat", text = "", fg = "#eb6f92" }, + { name = "fcparam", text = "", fg = "#eb6f92" }, + { name = "fcscript", text = "", fg = "#eb6f92" }, + { name = "fcstd", text = "", fg = "#eb6f92" }, + { name = "fcstd1", text = "", fg = "#eb6f92" }, + { name = "fctb", text = "", fg = "#eb6f92" }, + { name = "fctl", text = "", fg = "#eb6f92" }, + { name = "fdmdownload", text = "", fg = "#3e8fb0" }, + { name = "feature", text = "", fg = "#f6c177" }, + { name = "fish", text = "", fg = "#232136" }, + { name = "flac", text = "", fg = "#3e8fb0" }, + { name = "flc", text = "", fg = "#e0def4" }, + { name = "flf", text = "", fg = "#e0def4" }, + { name = "fnl", text = "", fg = "#e0def4" }, + { name = "fodg", text = "", fg = "#f6c177" }, + { name = "fodp", text = "", fg = "#f6c177" }, + { name = "fods", text = "", fg = "#f6c177" }, + { name = "fodt", text = "", fg = "#3e8fb0" }, + { name = "fs", text = "", fg = "#3e8fb0" }, + { name = "fsi", text = "", fg = "#3e8fb0" }, + { name = "fsscript", text = "", fg = "#3e8fb0" }, + { name = "fsx", text = "", fg = "#3e8fb0" }, + { name = "gcode", text = "󰐫", fg = "#3e8fb0" }, + { name = "gd", text = "", fg = "#e0def4" }, + { name = "gemspec", text = "", fg = "#eb6f92" }, + { name = "gif", text = "", fg = "#c4a7e7" }, + { name = "git", text = "", fg = "#eb6f92" }, + { name = "glb", text = "", fg = "#f6c177" }, + { name = "gleam", text = "", fg = "#c4a7e7" }, + { name = "gnumakefile", text = "", fg = "#e0def4" }, + { name = "go", text = "", fg = "#3e8fb0" }, + { name = "godot", text = "", fg = "#e0def4" }, + { name = "gpr", text = "", fg = "#3e8fb0" }, + { name = "gql", text = "", fg = "#eb6f92" }, + { name = "gradle", text = "", fg = "#3e8fb0" }, + { name = "graphql", text = "", fg = "#eb6f92" }, + { name = "gresource", text = "", fg = "#e0def4" }, + { name = "gv", text = "󱁉", fg = "#3e8fb0" }, + { name = "gz", text = "", fg = "#f6c177" }, + { name = "h", text = "", fg = "#c4a7e7" }, + { name = "haml", text = "", fg = "#e0def4" }, + { name = "hbs", text = "", fg = "#f6c177" }, + { name = "heex", text = "", fg = "#c4a7e7" }, + { name = "hex", text = "", fg = "#3e8fb0" }, + { name = "hh", text = "", fg = "#c4a7e7" }, + { name = "hpp", text = "", fg = "#c4a7e7" }, + { name = "hrl", text = "", fg = "#eb6f92" }, + { name = "hs", text = "", fg = "#c4a7e7" }, + { name = "htm", text = "", fg = "#eb6f92" }, + { name = "html", text = "", fg = "#eb6f92" }, + { name = "http", text = "", fg = "#3e8fb0" }, + { name = "huff", text = "󰡘", fg = "#3e8fb0" }, + { name = "hurl", text = "", fg = "#eb6f92" }, + { name = "hx", text = "", fg = "#f6c177" }, + { name = "hxx", text = "", fg = "#c4a7e7" }, + { name = "ical", text = "", fg = "#3e8fb0" }, + { name = "icalendar", text = "", fg = "#3e8fb0" }, + { name = "ico", text = "", fg = "#f6c177" }, + { name = "ics", text = "", fg = "#3e8fb0" }, + { name = "ifb", text = "", fg = "#3e8fb0" }, + { name = "ifc", text = "󰻫", fg = "#9ccfd8" }, + { name = "ige", text = "󰻫", fg = "#9ccfd8" }, + { name = "iges", text = "󰻫", fg = "#9ccfd8" }, + { name = "igs", text = "󰻫", fg = "#9ccfd8" }, + { name = "image", text = "", fg = "#e0def4" }, + { name = "img", text = "", fg = "#e0def4" }, + { name = "import", text = "", fg = "#e0def4" }, + { name = "info", text = "", fg = "#9ccfd8" }, + { name = "ini", text = "", fg = "#e0def4" }, + { name = "ino", text = "", fg = "#3e8fb0" }, + { name = "ipynb", text = "", fg = "#f6c177" }, + { name = "iso", text = "", fg = "#e0def4" }, + { name = "ixx", text = "", fg = "#3e8fb0" }, + { name = "java", text = "", fg = "#eb6f92" }, + { name = "jl", text = "", fg = "#c4a7e7" }, + { name = "jpeg", text = "", fg = "#c4a7e7" }, + { name = "jpg", text = "", fg = "#c4a7e7" }, + { name = "js", text = "", fg = "#f6c177" }, + { name = "json", text = "", fg = "#f6c177" }, + { name = "json5", text = "", fg = "#f6c177" }, + { name = "jsonc", text = "", fg = "#f6c177" }, + { name = "jsx", text = "", fg = "#3e8fb0" }, + { name = "jwmrc", text = "", fg = "#3e8fb0" }, + { name = "jxl", text = "", fg = "#c4a7e7" }, + { name = "kbx", text = "󰯄", fg = "#e0def4" }, + { name = "kdb", text = "", fg = "#f6c177" }, + { name = "kdbx", text = "", fg = "#f6c177" }, + { name = "kdenlive", text = "", fg = "#3e8fb0" }, + { name = "kdenlivetitle", text = "", fg = "#3e8fb0" }, + { name = "kicad_dru", text = "", fg = "#e0def4" }, + { name = "kicad_mod", text = "", fg = "#e0def4" }, + { name = "kicad_pcb", text = "", fg = "#e0def4" }, + { name = "kicad_prl", text = "", fg = "#e0def4" }, + { name = "kicad_pro", text = "", fg = "#e0def4" }, + { name = "kicad_sch", text = "", fg = "#e0def4" }, + { name = "kicad_sym", text = "", fg = "#e0def4" }, + { name = "kicad_wks", text = "", fg = "#e0def4" }, + { name = "ko", text = "", fg = "#e0def4" }, + { name = "kpp", text = "", fg = "#3e8fb0" }, + { name = "kra", text = "", fg = "#3e8fb0" }, + { name = "krz", text = "", fg = "#3e8fb0" }, + { name = "ksh", text = "", fg = "#e0def4" }, + { name = "kt", text = "", fg = "#3e8fb0" }, + { name = "kts", text = "", fg = "#3e8fb0" }, + { name = "lck", text = "", fg = "#e0def4" }, + { name = "leex", text = "", fg = "#c4a7e7" }, + { name = "less", text = "", fg = "#c4a7e7" }, + { name = "lff", text = "", fg = "#e0def4" }, + { name = "lhs", text = "", fg = "#c4a7e7" }, + { name = "lib", text = "", fg = "#ea9a97" }, + { name = "license", text = "", fg = "#f6c177" }, + { name = "liquid", text = "", fg = "#f6c177" }, + { name = "lock", text = "", fg = "#e0def4" }, + { name = "log", text = "󰌱", fg = "#e0def4" }, + { name = "lrc", text = "󰨖", fg = "#f6c177" }, + { name = "lua", text = "", fg = "#3e8fb0" }, + { name = "luac", text = "", fg = "#3e8fb0" }, + { name = "luau", text = "", fg = "#3e8fb0" }, + { name = "m", text = "", fg = "#3e8fb0" }, + { name = "m3u", text = "󰲹", fg = "#ea9a97" }, + { name = "m3u8", text = "󰲹", fg = "#ea9a97" }, + { name = "m4a", text = "", fg = "#3e8fb0" }, + { name = "m4v", text = "", fg = "#f6c177" }, + { name = "magnet", text = "", fg = "#eb6f92" }, + { name = "makefile", text = "", fg = "#e0def4" }, + { name = "markdown", text = "", fg = "#e0def4" }, + { name = "material", text = "", fg = "#eb6f92" }, + { name = "md", text = "", fg = "#e0def4" }, + { name = "md5", text = "󰕥", fg = "#908caa" }, + { name = "mdx", text = "", fg = "#3e8fb0" }, + { name = "mint", text = "󰌪", fg = "#3e8fb0" }, + { name = "mjs", text = "", fg = "#f6c177" }, + { name = "mk", text = "", fg = "#e0def4" }, + { name = "mkv", text = "", fg = "#f6c177" }, + { name = "ml", text = "", fg = "#f6c177" }, + { name = "mli", text = "", fg = "#f6c177" }, + { name = "mm", text = "", fg = "#3e8fb0" }, + { name = "mo", text = "", fg = "#3e8fb0" }, + { name = "mobi", text = "", fg = "#f6c177" }, + { name = "mojo", text = "", fg = "#eb6f92" }, + { name = "mov", text = "", fg = "#f6c177" }, + { name = "mp3", text = "", fg = "#3e8fb0" }, + { name = "mp4", text = "", fg = "#f6c177" }, + { name = "mpp", text = "", fg = "#3e8fb0" }, + { name = "msf", text = "", fg = "#3e8fb0" }, + { name = "mts", text = "", fg = "#3e8fb0" }, + { name = "mustache", text = "", fg = "#f6c177" }, + { name = "nfo", text = "", fg = "#9ccfd8" }, + { name = "nim", text = "", fg = "#f6c177" }, + { name = "nix", text = "", fg = "#3e8fb0" }, + { name = "norg", text = "", fg = "#3e8fb0" }, + { name = "nswag", text = "", fg = "#f6c177" }, + { name = "nu", text = "", fg = "#f6c177" }, + { name = "o", text = "", fg = "#eb6f92" }, + { name = "obj", text = "󰆧", fg = "#e0def4" }, + { name = "odf", text = "", fg = "#eb6f92" }, + { name = "odg", text = "", fg = "#f6c177" }, + { name = "odin", text = "󰟢", fg = "#3e8fb0" }, + { name = "odp", text = "", fg = "#f6c177" }, + { name = "ods", text = "", fg = "#f6c177" }, + { name = "odt", text = "", fg = "#3e8fb0" }, + { name = "oga", text = "", fg = "#3e8fb0" }, + { name = "ogg", text = "", fg = "#3e8fb0" }, + { name = "ogv", text = "", fg = "#f6c177" }, + { name = "ogx", text = "", fg = "#f6c177" }, + { name = "opus", text = "", fg = "#3e8fb0" }, + { name = "org", text = "", fg = "#9ccfd8" }, + { name = "otf", text = "", fg = "#e0def4" }, + { name = "out", text = "", fg = "#eb6f92" }, + { name = "part", text = "", fg = "#3e8fb0" }, + { name = "patch", text = "", fg = "#232136" }, + { name = "pck", text = "", fg = "#e0def4" }, + { name = "pcm", text = "", fg = "#3e8fb0" }, + { name = "pdf", text = "", fg = "#eb6f92" }, + { name = "php", text = "", fg = "#c4a7e7" }, + { name = "pl", text = "", fg = "#3e8fb0" }, + { name = "pls", text = "󰲹", fg = "#ea9a97" }, + { name = "ply", text = "󰆧", fg = "#e0def4" }, + { name = "pm", text = "", fg = "#3e8fb0" }, + { name = "png", text = "", fg = "#c4a7e7" }, + { name = "po", text = "", fg = "#3e8fb0" }, + { name = "pot", text = "", fg = "#3e8fb0" }, + { name = "pp", text = "", fg = "#f6c177" }, + { name = "ppt", text = "󰈧", fg = "#eb6f92" }, + { name = "pptx", text = "󰈧", fg = "#eb6f92" }, + { name = "prisma", text = "", fg = "#3e8fb0" }, + { name = "pro", text = "", fg = "#f6c177" }, + { name = "ps1", text = "󰨊", fg = "#3e8fb0" }, + { name = "psb", text = "", fg = "#3e8fb0" }, + { name = "psd", text = "", fg = "#3e8fb0" }, + { name = "psd1", text = "󰨊", fg = "#3e8fb0" }, + { name = "psm1", text = "󰨊", fg = "#3e8fb0" }, + { name = "pub", text = "󰷖", fg = "#f6c177" }, + { name = "pxd", text = "", fg = "#3e8fb0" }, + { name = "pxi", text = "", fg = "#3e8fb0" }, + { name = "py", text = "", fg = "#f6c177" }, + { name = "pyc", text = "", fg = "#f6c177" }, + { name = "pyd", text = "", fg = "#f6c177" }, + { name = "pyi", text = "", fg = "#f6c177" }, + { name = "pyo", text = "", fg = "#f6c177" }, + { name = "pyw", text = "", fg = "#3e8fb0" }, + { name = "pyx", text = "", fg = "#3e8fb0" }, + { name = "qm", text = "", fg = "#3e8fb0" }, + { name = "qml", text = "", fg = "#f6c177" }, + { name = "qrc", text = "", fg = "#f6c177" }, + { name = "qss", text = "", fg = "#f6c177" }, + { name = "query", text = "", fg = "#f6c177" }, + { name = "r", text = "󰟔", fg = "#3e8fb0" }, + { name = "R", text = "󰟔", fg = "#3e8fb0" }, + { name = "rake", text = "", fg = "#eb6f92" }, + { name = "rar", text = "", fg = "#f6c177" }, + { name = "razor", text = "󱦘", fg = "#3e8fb0" }, + { name = "rb", text = "", fg = "#eb6f92" }, + { name = "res", text = "", fg = "#eb6f92" }, + { name = "resi", text = "", fg = "#eb6f92" }, + { name = "rlib", text = "", fg = "#ea9a97" }, + { name = "rmd", text = "", fg = "#3e8fb0" }, + { name = "rproj", text = "󰗆", fg = "#f6c177" }, + { name = "rs", text = "", fg = "#ea9a97" }, + { name = "rss", text = "", fg = "#f6c177" }, + { name = "s", text = "", fg = "#3e8fb0" }, + { name = "sass", text = "", fg = "#eb6f92" }, + { name = "sbt", text = "", fg = "#eb6f92" }, + { name = "sc", text = "", fg = "#eb6f92" }, + { name = "scad", text = "", fg = "#f6c177" }, + { name = "scala", text = "", fg = "#eb6f92" }, + { name = "scm", text = "󰘧", fg = "#e0def4" }, + { name = "scss", text = "", fg = "#eb6f92" }, + { name = "sh", text = "", fg = "#e0def4" }, + { name = "sha1", text = "󰕥", fg = "#908caa" }, + { name = "sha224", text = "󰕥", fg = "#908caa" }, + { name = "sha256", text = "󰕥", fg = "#908caa" }, + { name = "sha384", text = "󰕥", fg = "#908caa" }, + { name = "sha512", text = "󰕥", fg = "#908caa" }, + { name = "sig", text = "󰘧", fg = "#f6c177" }, + { name = "signature", text = "󰘧", fg = "#f6c177" }, + { name = "skp", text = "󰻫", fg = "#9ccfd8" }, + { name = "sldasm", text = "󰻫", fg = "#9ccfd8" }, + { name = "sldprt", text = "󰻫", fg = "#9ccfd8" }, + { name = "slim", text = "", fg = "#eb6f92" }, + { name = "sln", text = "", fg = "#3e8fb0" }, + { name = "slnx", text = "", fg = "#3e8fb0" }, + { name = "slvs", text = "󰻫", fg = "#9ccfd8" }, + { name = "sml", text = "󰘧", fg = "#f6c177" }, + { name = "so", text = "", fg = "#e0def4" }, + { name = "sol", text = "", fg = "#3e8fb0" }, + { name = "spec.js", text = "", fg = "#f6c177" }, + { name = "spec.jsx", text = "", fg = "#3e8fb0" }, + { name = "spec.ts", text = "", fg = "#3e8fb0" }, + { name = "spec.tsx", text = "", fg = "#3e8fb0" }, + { name = "spx", text = "", fg = "#3e8fb0" }, + { name = "sql", text = "", fg = "#e0def4" }, + { name = "sqlite", text = "", fg = "#e0def4" }, + { name = "sqlite3", text = "", fg = "#e0def4" }, + { name = "srt", text = "󰨖", fg = "#f6c177" }, + { name = "ssa", text = "󰨖", fg = "#f6c177" }, + { name = "ste", text = "󰻫", fg = "#9ccfd8" }, + { name = "step", text = "󰻫", fg = "#9ccfd8" }, + { name = "stl", text = "󰆧", fg = "#e0def4" }, + { name = "stp", text = "󰻫", fg = "#9ccfd8" }, + { name = "strings", text = "", fg = "#3e8fb0" }, + { name = "styl", text = "", fg = "#f6c177" }, + { name = "sub", text = "󰨖", fg = "#f6c177" }, + { name = "sublime", text = "", fg = "#f6c177" }, + { name = "suo", text = "", fg = "#3e8fb0" }, + { name = "sv", text = "󰍛", fg = "#f6c177" }, + { name = "svelte", text = "", fg = "#eb6f92" }, + { name = "svg", text = "󰜡", fg = "#f6c177" }, + { name = "svh", text = "󰍛", fg = "#f6c177" }, + { name = "swift", text = "", fg = "#f6c177" }, + { name = "t", text = "", fg = "#3e8fb0" }, + { name = "tbc", text = "󰛓", fg = "#3e8fb0" }, + { name = "tcl", text = "󰛓", fg = "#3e8fb0" }, + { name = "templ", text = "", fg = "#f6c177" }, + { name = "terminal", text = "", fg = "#f6c177" }, + { name = "test.js", text = "", fg = "#f6c177" }, + { name = "test.jsx", text = "", fg = "#3e8fb0" }, + { name = "test.ts", text = "", fg = "#3e8fb0" }, + { name = "test.tsx", text = "", fg = "#3e8fb0" }, + { name = "tex", text = "", fg = "#f6c177" }, + { name = "tf", text = "", fg = "#3e8fb0" }, + { name = "tfvars", text = "", fg = "#3e8fb0" }, + { name = "tgz", text = "", fg = "#f6c177" }, + { name = "tmux", text = "", fg = "#f6c177" }, + { name = "toml", text = "", fg = "#eb6f92" }, + { name = "torrent", text = "", fg = "#3e8fb0" }, + { name = "tres", text = "", fg = "#e0def4" }, + { name = "ts", text = "", fg = "#3e8fb0" }, + { name = "tscn", text = "", fg = "#e0def4" }, + { name = "tsconfig", text = "", fg = "#f6c177" }, + { name = "tsx", text = "", fg = "#3e8fb0" }, + { name = "ttf", text = "", fg = "#e0def4" }, + { name = "twig", text = "", fg = "#f6c177" }, + { name = "txt", text = "󰈙", fg = "#f6c177" }, + { name = "txz", text = "", fg = "#f6c177" }, + { name = "typ", text = "", fg = "#3e8fb0" }, + { name = "typoscript", text = "", fg = "#f6c177" }, + { name = "ui", text = "", fg = "#3e8fb0" }, + { name = "v", text = "󰍛", fg = "#f6c177" }, + { name = "vala", text = "", fg = "#3e8fb0" }, + { name = "vh", text = "󰍛", fg = "#f6c177" }, + { name = "vhd", text = "󰍛", fg = "#f6c177" }, + { name = "vhdl", text = "󰍛", fg = "#f6c177" }, + { name = "vi", text = "", fg = "#f6c177" }, + { name = "vim", text = "", fg = "#f6c177" }, + { name = "vsh", text = "", fg = "#3e8fb0" }, + { name = "vsix", text = "", fg = "#3e8fb0" }, + { name = "vue", text = "", fg = "#f6c177" }, + { name = "wasm", text = "", fg = "#3e8fb0" }, + { name = "wav", text = "", fg = "#3e8fb0" }, + { name = "webm", text = "", fg = "#f6c177" }, + { name = "webmanifest", text = "", fg = "#f6c177" }, + { name = "webp", text = "", fg = "#c4a7e7" }, + { name = "webpack", text = "󰜫", fg = "#3e8fb0" }, + { name = "wma", text = "", fg = "#3e8fb0" }, + { name = "woff", text = "", fg = "#e0def4" }, + { name = "woff2", text = "", fg = "#e0def4" }, + { name = "wrl", text = "󰆧", fg = "#e0def4" }, + { name = "wrz", text = "󰆧", fg = "#e0def4" }, + { name = "wv", text = "", fg = "#3e8fb0" }, + { name = "wvc", text = "", fg = "#3e8fb0" }, + { name = "x", text = "", fg = "#3e8fb0" }, + { name = "xaml", text = "󰙳", fg = "#3e8fb0" }, + { name = "xcf", text = "", fg = "#232136" }, + { name = "xcplayground", text = "", fg = "#f6c177" }, + { name = "xcstrings", text = "", fg = "#3e8fb0" }, + { name = "xls", text = "󰈛", fg = "#3e8fb0" }, + { name = "xlsx", text = "󰈛", fg = "#3e8fb0" }, + { name = "xm", text = "", fg = "#3e8fb0" }, + { name = "xml", text = "󰗀", fg = "#f6c177" }, + { name = "xpi", text = "", fg = "#eb6f92" }, + { name = "xul", text = "", fg = "#f6c177" }, + { name = "xz", text = "", fg = "#f6c177" }, + { name = "yaml", text = "", fg = "#e0def4" }, + { name = "yml", text = "", fg = "#e0def4" }, + { name = "zig", text = "", fg = "#f6c177" }, + { name = "zip", text = "", fg = "#f6c177" }, + { name = "zsh", text = "", fg = "#f6c177" }, + { name = "zst", text = "", fg = "#f6c177" }, + { name = "🔥", text = "", fg = "#eb6f92" }, +] diff --git a/zshrc/.aliases.zsh b/zshrc/.aliases.zsh index abc5f9b..a6fdc9c 100644 --- a/zshrc/.aliases.zsh +++ b/zshrc/.aliases.zsh @@ -4,6 +4,10 @@ alias neo='neofetch' alias f='fuck' alias a='aerc' +# colorscheme +alias col='bash -c "$(wget -qO- https://git.io/vQgMr)"' +alias sc='~/scripts/theme-switch' + # Scripts alias la='/home/liph/scripts/latex.sh' alias ar='/mnt/tank/scripts/aria.sh' @@ -20,6 +24,7 @@ alias bwf='/home/liph/scripts/bw-fzf.sh' alias nano='nvim' alias vim='nvim' alias n='nvim' +alias nv='nvim' alias soz='source ~/.zshrc' alias rmm='sudo rm -R' diff --git a/zshrc/.zshrc b/zshrc/.zshrc index bc7a862..13bd570 100644 --- a/zshrc/.zshrc +++ b/zshrc/.zshrc @@ -1,5 +1,3 @@ - - # set the directory we want to store zinit and plugins ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.locale/share}/zinit/zinit.git"