diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..ba62764 --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,28 @@ +source /usr/share/cachyos-fish-config/cachyos-config.fish + +fish_config theme choose "Dracula Official" + +oh-my-posh init fish --config ~/.cache/oh-my-posh/themes/dracula.omp.json | source + +# Set Zed as the default editor +set -gx EDITOR /usr/local/bin/zed_sudo_wrapper +set -gx VISUAL "zeditor --wait" +set -gx SUDO_EDITOR "zeditor --wait" + +# Start SSH agent if not already running +if not set -q SSH_AGENT_PID + eval (ssh-agent -c) +end + +function update + sudo pacman -Syu --noconfirm + paru -Syu --noconfirm + sudo pacman -Sc --noconfirm + paru -Sc --noconfirm +end + +function add_ssh_key + set -l ssh_key ~/.ssh/github-ssh + echo "Adding SSH key..." + ssh-add $ssh_key +end diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..480188b --- /dev/null +++ b/.config/fish/fish_variables @@ -0,0 +1,108 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __done_min_cmd_duration:10000 +SETUVAR __done_notification_urgency_level:low +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack\x1e\x2d\x2dbold +SETUVAR fish_color_selection:white\x1e\x2d\x2dbackground\x3dbrblack\x1e\x2d\x2dbold +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_background:\x1d +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan\x1e\x2d\x2dbold +SETUVAR fish_pager_color_secondary_background:\x1d +SETUVAR fish_pager_color_secondary_completion:\x1d +SETUVAR fish_pager_color_secondary_description:\x1d +SETUVAR fish_pager_color_secondary_prefix:\x1d +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_pager_color_selected_completion:\x1d +SETUVAR fish_pager_color_selected_description:\x1d +SETUVAR fish_pager_color_selected_prefix:\x1d +SETUVAR fish_user_paths:\x1d +SETUVAR pure_begin_prompt_with_current_directory:true +SETUVAR pure_check_for_new_release:false +SETUVAR pure_color_at_sign:pure_color_mute +SETUVAR pure_color_aws_profile:pure_color_warning +SETUVAR pure_color_command_duration:pure_color_warning +SETUVAR pure_color_current_directory:pure_color_primary +SETUVAR pure_color_danger:red +SETUVAR pure_color_dark:black +SETUVAR pure_color_git_branch:pure_color_mute +SETUVAR pure_color_git_dirty:pure_color_mute +SETUVAR pure_color_git_stash:pure_color_info +SETUVAR pure_color_git_unpulled_commits:pure_color_info +SETUVAR pure_color_git_unpushed_commits:pure_color_info +SETUVAR pure_color_hostname:pure_color_mute +SETUVAR pure_color_info:cyan +SETUVAR pure_color_jobs:pure_color_normal +SETUVAR pure_color_k8s_context:pure_color_success +SETUVAR pure_color_k8s_namespace:pure_color_primary +SETUVAR pure_color_k8s_prefix:pure_color_info +SETUVAR pure_color_light:white +SETUVAR pure_color_mute:brblack +SETUVAR pure_color_nixdevshell_prefix:pure_color_info +SETUVAR pure_color_nixdevshell_symbol:pure_color_mute +SETUVAR pure_color_normal:normal +SETUVAR pure_color_prefix_root_prompt:pure_color_danger +SETUVAR pure_color_primary:blue +SETUVAR pure_color_prompt_on_error:pure_color_danger +SETUVAR pure_color_prompt_on_success:pure_color_success +SETUVAR pure_color_success:magenta +SETUVAR pure_color_system_time:pure_color_mute +SETUVAR pure_color_username_normal:pure_color_mute +SETUVAR pure_color_username_root:pure_color_light +SETUVAR pure_color_virtualenv:pure_color_mute +SETUVAR pure_color_warning:yellow +SETUVAR pure_enable_aws_profile:true +SETUVAR pure_enable_container_detection:true +SETUVAR pure_enable_git:true +SETUVAR pure_enable_k8s:false +SETUVAR pure_enable_nixdevshell:false +SETUVAR pure_enable_single_line_prompt:false +SETUVAR pure_enable_virtualenv:true +SETUVAR pure_reverse_prompt_symbol_in_vimode:true +SETUVAR pure_separate_prompt_on_error:false +SETUVAR pure_shorten_prompt_current_directory_length:0 +SETUVAR pure_shorten_window_title_current_directory_length:0 +SETUVAR pure_show_jobs:false +SETUVAR pure_show_prefix_root_prompt:false +SETUVAR pure_show_subsecond_command_duration:false +SETUVAR pure_show_system_time:false +SETUVAR pure_symbol_aws_profile_prefix: +SETUVAR pure_symbol_container_prefix: +SETUVAR pure_symbol_git_dirty:\x2a +SETUVAR pure_symbol_git_stash:\u2261 +SETUVAR pure_symbol_git_unpulled_commits:\u21e3 +SETUVAR pure_symbol_git_unpushed_commits:\u21e1 +SETUVAR pure_symbol_k8s_prefix:\u2638 +SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f +SETUVAR pure_symbol_prefix_root_prompt:\x23 +SETUVAR pure_symbol_prompt:\u276f +SETUVAR pure_symbol_reverse_prompt:\u276e +SETUVAR pure_symbol_ssh_prefix: +SETUVAR pure_symbol_title_bar_separator:\x2d +SETUVAR pure_symbol_virtualenv_prefix: +SETUVAR pure_threshold_command_duration:5 +SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1 +SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1 diff --git a/.config/fish/functions/swww_set_wallpaper.fish b/.config/fish/functions/swww_set_wallpaper.fish new file mode 100755 index 0000000..91c1d3c --- /dev/null +++ b/.config/fish/functions/swww_set_wallpaper.fish @@ -0,0 +1,13 @@ +function swww_set_wallpaper + set wallpaper $argv[1] + + # Start swww daemon if not running + if not pgrep swww-daemon > /dev/null + swww-daemon & + sleep 1 + end + + # Set wallpaper with animation + swww img "$wallpaper" \ + --transition-type wipe + end diff --git a/.config/fish/functions/yazi-cd.fish b/.config/fish/functions/yazi-cd.fish new file mode 100755 index 0000000..4e29fbc --- /dev/null +++ b/.config/fish/functions/yazi-cd.fish @@ -0,0 +1,8 @@ +function yazi-cd + set tmpfile (mktemp) + yazi --cwd-file="$tmpfile" + if test -s "$tmpfile" + cd (cat "$tmpfile") + end + rm -f "$tmpfile" +end diff --git a/.config/fish/themes/Dracula Official.theme b/.config/fish/themes/Dracula Official.theme new file mode 100644 index 0000000..6c1fd96 --- /dev/null +++ b/.config/fish/themes/Dracula Official.theme @@ -0,0 +1,55 @@ +# Dracula Color Palette +# +# Foreground: f8f8f2 +# Selection: 44475a +# Comment: 6272a4 +# Red: ff5555 +# Orange: ffb86c +# Yellow: f1fa8c +# Green: 50fa7b +# Purple: bd93f9 +# Cyan: 8be9fd +# Pink: ff79c6 + +# Syntax Highlighting Colors +fish_color_normal f8f8f2 +fish_color_command 8be9fd +fish_color_keyword ff79c6 +fish_color_quote f1fa8c +fish_color_redirection f8f8f2 +fish_color_end ffb86c +fish_color_error ff5555 +fish_color_param bd93f9 +fish_color_comment 6272a4 +fish_color_selection --background=44475a +fish_color_search_match --background=44475a +fish_color_operator 50fa7b +fish_color_escape ff79c6 +fish_color_autosuggestion 6272a4 +fish_color_cancel ff5555 --reverse +fish_color_option ffb86c +fish_color_history_current --bold +fish_color_status ff5555 +fish_color_valid_path --underline + +# Default Prompt Colors +fish_color_cwd 50fa7b +fish_color_cwd_root red +fish_color_host bd93f9 +fish_color_host_remote bd93f9 +fish_color_user 8be9fd + +# Completion Pager Colors +fish_pager_color_progress 6272a4 +fish_pager_color_background +fish_pager_color_prefix 8be9fd +fish_pager_color_completion f8f8f2 +fish_pager_color_description 6272a4 +fish_pager_color_selected_background --background=44475a +fish_pager_color_selected_prefix 8be9fd +fish_pager_color_selected_completion f8f8f2 +fish_pager_color_selected_description 6272a4 +fish_pager_color_secondary_background +fish_pager_color_secondary_prefix 8be9fd +fish_pager_color_secondary_completion f8f8f2 +fish_pager_color_secondary_description 6272a4 diff --git a/.config/godot/editor_settings-4.5.tres b/.config/godot/editor_settings-4.5.tres new file mode 100644 index 0000000..70c49ab --- /dev/null +++ b/.config/godot/editor_settings-4.5.tres @@ -0,0 +1,80 @@ +[gd_resource type="EditorSettings" load_steps=2 format=3] + +[sub_resource type="InputEventKey" id="InputEventKey_ly3hx"] +keycode = 4194326 + +[resource] +interface/theme/preset = "Custom" +interface/theme/base_color = Color(0.15686275, 0.16470589, 0.21176471, 1) +interface/theme/accent_color = Color(0.38431373, 0.44705883, 0.6431373, 1) +interface/theme/contrast = 0.21 +text_editor/theme/color_theme = "dracula" +text_editor/theme/highlighting/symbol_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/keyword_color = Color(1, 0.4745098, 0.7764706, 1) +text_editor/theme/highlighting/control_flow_keyword_color = Color(1, 0.4745098, 0.7764706, 1) +text_editor/theme/highlighting/base_type_color = Color(0.3137255, 0.98039216, 0.48235294, 1) +text_editor/theme/highlighting/engine_type_color = Color(0.54509807, 0.9137255, 0.99215686, 1) +text_editor/theme/highlighting/user_type_color = Color(0.54509807, 0.9137255, 0.99215686, 1) +text_editor/theme/highlighting/comment_color = Color(0.38431373, 0.44705883, 0.6431373, 1) +text_editor/theme/highlighting/doc_comment_color = Color(0.6, 0.7, 0.8, 0.8) +text_editor/theme/highlighting/string_color = Color(0.94509804, 0.98039216, 0.54901963, 1) +text_editor/theme/highlighting/background_color = Color(0.15686275, 0.16470589, 0.21176471, 1) +text_editor/theme/highlighting/completion_background_color = Color(0.17254902, 0.16470589, 0.19607843, 1) +text_editor/theme/highlighting/completion_selected_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/completion_existing_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/completion_scroll_color = Color(0.38431373, 0.44705883, 0.6431373, 1) +text_editor/theme/highlighting/completion_font_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/text_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/line_number_color = Color(0.38431373, 0.44705883, 0.6431373, 1) +text_editor/theme/highlighting/safe_line_number_color = Color(0.7892157, 0.94941175, 0.8029412, 0.75) +text_editor/theme/highlighting/caret_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/caret_background_color = Color(0.15686275, 0.16470589, 0.21176471, 1) +text_editor/theme/highlighting/text_selected_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/selection_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/brace_mismatch_color = Color(1, 0.33333334, 0.33333334, 1) +text_editor/theme/highlighting/current_line_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/line_length_guideline_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/word_highlighted_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/number_color = Color(0.7411765, 0.5764706, 0.9764706, 1) +text_editor/theme/highlighting/function_color = Color(0.54509807, 0.9137255, 0.99215686, 1) +text_editor/theme/highlighting/member_variable_color = Color(0.972549, 0.972549, 0.9490196, 1) +text_editor/theme/highlighting/mark_color = Color(1, 0.33333334, 0.33333334, 0.3019608) +text_editor/theme/highlighting/warning_color = Color(1, 0.87, 0.4, 0.15) +text_editor/theme/highlighting/breakpoint_color = Color(1, 0.72156864, 0.42352942, 1) +text_editor/theme/highlighting/code_folding_color = Color(0.38431373, 0.44705883, 0.6431373, 1) +text_editor/theme/highlighting/search_result_color = Color(0.26666668, 0.2784314, 0.3529412, 1) +text_editor/theme/highlighting/search_result_border_color = Color(0.15686275, 0.16470589, 0.21176471, 1) +text_editor/theme/highlighting/gdscript/function_definition_color = Color(0.3137255, 0.98039216, 0.48235294, 1) +text_editor/theme/highlighting/gdscript/node_reference_color = Color(0.3137255, 0.98039216, 0.48235294, 1) +text_editor/theme/highlighting/gdscript/annotation_color = Color(1, 0.72156864, 0.42352942, 1) +text_editor/theme/highlighting/comment_markers/critical_color = Color(1, 0.33333334, 0.33333334, 1) +text_editor/theme/highlighting/comment_markers/warning_color = Color(0.94509804, 0.98039216, 0.54901963, 1) +text_editor/theme/highlighting/comment_markers/notice_color = Color(0.3137255, 0.98039216, 0.48235294, 1) +text_editor/external/exec_path = "/usr/bin/zeditor" +text_editor/external/exec_flags = "{project} {file}:{line}:{col}" +text_editor/external/use_external_editor = true +editors/3d_gizmos/gizmo_settings/bone_axis_length = 0.1 +editors/animation/default_animation_step = 0.033333335 +export/android/debug_keystore = "/home/henry/.local/share/godot/keystores/debug.keystore" +export/android/debug_keystore_pass = "android" +export/android/java_sdk_path = "" +export/android/android_sdk_path = "/home/henry/Android/Sdk" +export/macos/rcodesign = "" +export/web/http_port = 8060 +export/web/tls_key = "" +export/web/tls_certificate = "" +export/windows/osslsigncode = "" +_editor_settings_advanced_mode = true +_project_settings_advanced_mode = false +_export_template_download_directory = "" +_default_feature_profile = "" +_script_setup_templates_dictionary = {} +_script_setup_use_script_templates = true +_use_favorites_root_selection = false +shortcuts = [{ +"name": "spatial_editor/viewport_zoom_modifier_1", +"shortcuts": [SubResource("InputEventKey_ly3hx")] +}, { +"name": "spatial_editor/viewport_zoom_modifier_2", +"shortcuts": [] +}] diff --git a/.config/godot/recent_dirs b/.config/godot/recent_dirs new file mode 100644 index 0000000..ba4e750 --- /dev/null +++ b/.config/godot/recent_dirs @@ -0,0 +1 @@ +/mnt/data/GodotProjects diff --git a/.config/godot/text_editor_themes/dracula.tet b/.config/godot/text_editor_themes/dracula.tet new file mode 100644 index 0000000..f3d0fa1 --- /dev/null +++ b/.config/godot/text_editor_themes/dracula.tet @@ -0,0 +1,41 @@ +[color_theme] + +background_color="#282a36ff" +completion_background_color="#2c2a32ff" +completion_selected_color="#44475aff" ; updated to proper selection highlight +completion_existing_color="#44475aff" ; aligned with selection background +completion_scroll_color="#6272a4ff" ; Dracula doesn't have pure white; chose 'Comment' +completion_font_color="#f8f8f2ff" ; corrected to Dracula 'Foreground' +caret_color="#f8f8f2ff" ; Dracula's 'Foreground' +caret_background_color="#282a36ff" ; match editor background +line_number_color="#6272a4ff" +text_color="#f8f8f2ff" +text_selected_color="#f8f8f2ff" +keyword_color="#ff79c6ff" +base_type_color="#50fa7bff" +engine_type_color="#8be9fdff" +function_color="#8be9fdff" +member_variable_color="#f8f8f2ff" +comment_color="#6272a4ff" +string_color="#f1fa8cff" +number_color="#bd93f9ff" +symbol_color="#f8f8f2ff" +selection_color="#44475aff" +brace_mismatch_color="#ff5555ff" ; corrected to Dracula 'Red' +current_line_color="#44475aff" ; softened to match selection background +line_length_guideline_color="#44475aff" ; unified with 'current_line_color' +mark_color="#ff55554d" ; reused Dracula 'Pink' +breakpoint_color="#ffb86cff" ; changed to Dracula 'Orange' +code_folding_color="#6272a4ff" ; reused 'Comment' +word_highlighted_color="#44475aff" +search_result_color="#44475aff" +search_result_border_color="#282a36ff" +gdscript/function_definition_color="#50fa7bff" +control_flow_keyword_color="#FF79C6" +user_type_color="#8BE9FD" +gdscript/annotation_color="#FFB86C" +gdscript/node_reference_color="#50FA7B" +comment_markers/critical_color="#FF5555" +comment_markers/warning_color="#F1FA8C" +comment_markers/notice_color="#50FA7B" +gdscript/global_function_color="##BD93F9" \ No newline at end of file diff --git a/.config/gtk-3.0/bookmarks b/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..1e2347a --- /dev/null +++ b/.config/gtk-3.0/bookmarks @@ -0,0 +1,2 @@ +file:///mnt/games games +file:///mnt/data data diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..87a420f --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,17 @@ +[Settings] +gtk-theme-name=Dracula +gtk-icon-theme-name=Dracula +gtk-font-name=Adwaita Sans 11 +gtk-cursor-theme-name=Dracula +gtk-cursor-theme-size=24 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=0 +gtk-menu-images=0 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb +gtk-application-prefer-dark-theme=0 diff --git a/.config/gtk-4.0/assets b/.config/gtk-4.0/assets new file mode 120000 index 0000000..f51bab6 --- /dev/null +++ b/.config/gtk-4.0/assets @@ -0,0 +1 @@ +/usr/share/themes/Dracula/gtk-4.0/assets \ No newline at end of file diff --git a/.config/gtk-4.0/gtk-dark.css b/.config/gtk-4.0/gtk-dark.css new file mode 120000 index 0000000..d758dfd --- /dev/null +++ b/.config/gtk-4.0/gtk-dark.css @@ -0,0 +1 @@ +/usr/share/themes/Dracula/gtk-4.0/gtk-dark.css \ No newline at end of file diff --git a/.config/gtk-4.0/gtk.css b/.config/gtk-4.0/gtk.css new file mode 120000 index 0000000..7d6599c --- /dev/null +++ b/.config/gtk-4.0/gtk.css @@ -0,0 +1 @@ +/usr/share/themes/Dracula/gtk-4.0/gtk.css \ No newline at end of file diff --git a/.config/gtk-4.0/settings.ini b/.config/gtk-4.0/settings.ini new file mode 100644 index 0000000..9dbb4e1 --- /dev/null +++ b/.config/gtk-4.0/settings.ini @@ -0,0 +1,7 @@ +[Settings] +gtk-theme-name=Dracula +gtk-icon-theme-name=Dracula +gtk-font-name=Adwaita Sans 11 +gtk-cursor-theme-name=Dracula +gtk-cursor-theme-size=24 +gtk-application-prefer-dark-theme=0 diff --git a/.config/hypr/config/autostart.conf b/.config/hypr/config/autostart.conf index e985b27..79095e9 100644 --- a/.config/hypr/config/autostart.conf +++ b/.config/hypr/config/autostart.conf @@ -4,7 +4,7 @@ source = ~/.config/hypr/config/defaults.conf -exec-once = xrandr --output HDMI-A-1 --primary +# exec-once = xrandr --output HDMI-A-1 --primary exec-once=hyprctl setcursor Dracula 24 # exec-once = hyprctl dispatch workspace 1 diff --git a/.config/hypr/config/defaults.conf b/.config/hypr/config/defaults.conf index 280b74d..c702860 100644 --- a/.config/hypr/config/defaults.conf +++ b/.config/hypr/config/defaults.conf @@ -5,7 +5,7 @@ # General $webbrowser = firefox -$filemanager = nautilus +$filemanager = kitty -e env EDITOR="/usr/local/bin/zed_sudo_wrapper" VISUAL="zeditor --wait" SUDO_EDITOR="zeditor --wait" yazi $applauncher = rofi -show drun $terminal = kitty $idlehandler = hypridle diff --git a/.config/hypr/config/windowrules.conf b/.config/hypr/config/windowrules.conf index 008d755..2cffddc 100644 --- a/.config/hypr/config/windowrules.conf +++ b/.config/hypr/config/windowrules.conf @@ -4,8 +4,9 @@ # Windows Rules https://wiki.hyprland.org/Configuring/Window-Rules/ # -windowrulev2 = fullscreen, initialTitle:^(ARC Raiders)$, monitor:1 -windowrule = monitor 1, initialTitle:^(Deadlock)$ +windowrulev2 = monitor DP-1, class:(dev.zed.Zed) +windowrulev2 = monitor HDMI-A-1, fullscreen, class:(steam_app_1808500) +windowrule = monitor HDMI-A-1, class:(steam_app_1422450) # Float Necessary Windows windowrule = tile, initialTitle:^(Godot)$ diff --git a/.config/kitty/diff.conf b/.config/kitty/diff.conf new file mode 100644 index 0000000..5fec447 --- /dev/null +++ b/.config/kitty/diff.conf @@ -0,0 +1,19 @@ +foreground #f8f8f2 +background #282a36 +title_fg #f8f8f2 +title_bg #282a36 +margin_bg #6272a4 +margin_fg #44475a +removed_bg #ff5555 +highlight_removed_bg #ff5555 +removed_margin_bg #ff5555 +added_bg #50fa7b +highlight_added_bg #50fa7b +added_margin_bg #50fa7b +filler_bg #44475a +hunk_margin_bg #44475a +hunk_bg #bd93f9 +search_bg #8be9fd +search_fg #282a36 +select_bg #f1fa8c +select_fg #282a36 diff --git a/.config/kitty/dracula.conf b/.config/kitty/dracula.conf new file mode 100644 index 0000000..8f05c52 --- /dev/null +++ b/.config/kitty/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/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..046c8d4 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,10 @@ +include dracula.conf + +confirm_os_window_close 0 + +# BEGIN_KITTY_FONTS +font_family family="JetBrainsMono Nerd Font" +bold_font auto +italic_font auto +bold_italic_font auto +# END_KITTY_FONTS diff --git a/.config/kitty/kitty.conf.bak b/.config/kitty/kitty.conf.bak new file mode 100644 index 0000000..ec898e5 --- /dev/null +++ b/.config/kitty/kitty.conf.bak @@ -0,0 +1 @@ +include dracula.conf diff --git a/.config/mako/config b/.config/mako/config new file mode 100644 index 0000000..abc7d17 --- /dev/null +++ b/.config/mako/config @@ -0,0 +1,14 @@ +width=350 +height=110 +margin=5 +padding=10 +border-size=2 +border-radius=4 +icons=1 +max-icon-size=64 +default-timeout=5000 +text-alignment=left + +background-color=#282a36 +text-color=#BD93F9 +border-color=#44475A diff --git a/.config/nwg-look/config b/.config/nwg-look/config new file mode 100644 index 0000000..3f49ae5 --- /dev/null +++ b/.config/nwg-look/config @@ -0,0 +1,7 @@ +{ + "export-settings-ini": true, + "export-gtkrc-20": true, + "export-index-theme": true, + "export-xsettingsd": true, + "export-gtk4-symlinks": true +} \ No newline at end of file diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 100644 index 0000000..ed7821d --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1,2 @@ + +@theme "/usr/share/rofi/themes/config.rasi" diff --git a/.config/rofi/wallpaper_selector.sh b/.config/rofi/wallpaper_selector.sh new file mode 100755 index 0000000..6b52b98 --- /dev/null +++ b/.config/rofi/wallpaper_selector.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +WALLPAPER_DIR="/mnt/data/Wallpapers" + +WALLPAPERS=$(find "$WALLPAPER_DIR" -type f \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.jpeg" \)) + +SELECTED_WALLPAPER=$(echo "$WALLPAPERS" | rofi -dmenu -i -p "Select Wallpaper:") + +if [ -n "$SELECTED_WALLPAPER" ]; then + fish -c "swww_set_wallpaper '$SELECTED_WALLPAPER'" +fi diff --git a/.config/spotify-player/app.toml b/.config/spotify-player/app.toml new file mode 100644 index 0000000..c7d1760 --- /dev/null +++ b/.config/spotify-player/app.toml @@ -0,0 +1,58 @@ +theme = "dracula" +client_id = "a5e67511fd004d1d96bc0d1cfc8c29fc" +client_port = 8080 +login_redirect_uri = "http://127.0.0.1:8989/login" +playback_format = """ +{status} {track} • {artists} {liked} +{album} • {genres} +{metadata}""" +playback_metadata_fields = [ + "repeat", + "shuffle", + "volume", + "device", +] +notify_timeout_in_secs = 0 +tracks_playback_limit = 50 +app_refresh_duration_in_ms = 32 +playback_refresh_duration_in_ms = 0 +page_size_in_rows = 20 +play_icon = "▶" +pause_icon = "▌▌" +liked_icon = "♥" +border_type = "Plain" +progress_bar_type = "Rectangle" +progress_bar_position = "Bottom" +genre_num = 2 +cover_img_length = 9 +cover_img_width = 5 +cover_img_scale = 1.0 +enable_media_control = true +enable_streaming = "Always" +enable_notify = true +enable_cover_image_cache = true +default_device = "cachyos-player" +notify_streaming_only = false +seek_duration_secs = 5 +sort_artist_albums_by_type = false + +[notify_format] +summary = "{track} • {artists}" +body = "{album}" + +[layout] +playback_window_position = "Top" +playback_window_height = 6 + +[layout.library] +playlist_percent = 40 +album_percent = 40 + +[device] +name = "cachyos-player" +device_type = "speaker" +volume = 70 +bitrate = 320 +audio_cache = false +normalization = false +autoplay = false diff --git a/.config/spotify-player/keymap.toml b/.config/spotify-player/keymap.toml new file mode 100644 index 0000000..401a24d --- /dev/null +++ b/.config/spotify-player/keymap.toml @@ -0,0 +1,34 @@ +[[keymaps]] +command = "NextTrack" +key_sequence = "g n" +[[keymaps]] +command = "PreviousTrack" +key_sequence = "g p" +[[keymaps]] +command = "Search" +key_sequence = "C-c C-x /" +[[keymaps]] +command = "ResumePause" +key_sequence = "M-enter" +[[keymaps]] +command = "None" +key_sequence = "q" +[[keymaps]] +command = { VolumeChange = { offset = 1 } } +key_sequence = "-" +[[keymaps]] +command = { SeekForward = { duration = 10 } } +key_sequence = "E" +[[keymaps]] +command = { SeekBackward = { } } +key_sequence = "Q" +[[actions]] +action = "GoToArtist" +key_sequence = "g A" +[[actions]] +action = "GoToAlbum" +key_sequence = "g B" +target = "PlayingTrack" +[[actions]] +action="ToggleLiked" +key_sequence="C-l" diff --git a/.config/xdg-desktop-portal-termfilechooser/config b/.config/xdg-desktop-portal-termfilechooser/config new file mode 100755 index 0000000..6b1e254 --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/config @@ -0,0 +1,11 @@ +[filechooser] +cmd=yazi-wrapper.sh +default_dir=$HOME +; Uncomment to skip creating destination save files with instructions in them +; create_help_file=0 +; Uncomment and edit the line below to change the terminal emulator command +env=TERMCMD=kitty -e + +; Mode must be one of 'suggested', 'default', or 'last'. +open_mode=suggested +save_mode=suggested diff --git a/.config/xdg-desktop-portal-termfilechooser/lf-wrapper.sh b/.config/xdg-desktop-portal-termfilechooser/lf-wrapper.sh new file mode 100755 index 0000000..dd5504a --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/lf-wrapper.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env sh +# This wrapper script is invoked by xdg-desktop-portal-termfilechooser. +# +# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` + +set -e + +if [ "$6" -ge 4 ]; then + set -x +fi + +multiple="$1" +directory="$2" +save="$3" +path="$4" +out="$5" + +cmd="lf" +termcmd="${TERMCMD:-kitty --title 'termfilechooser'}" + +if [ "$save" = "1" ]; then + # save a file + set -- -selection-path "$out" "$path" +elif [ "$directory" = "1" ]; then + # upload files from a directory + set -- -last-dir-path "$out" "$path" +elif [ "$multiple" = "1" ]; then + # upload multiple files + set -- -selection-path "$out" "$path" +else + # upload only 1 file + set -- -selection-path "$out" "$path" +fi + +command="$termcmd $cmd" +for arg in "$@"; do + # escape double quotes + escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g') + # escape special + command="$command \"$escaped\"" +done + +sh -c "$command" diff --git a/.config/xdg-desktop-portal-termfilechooser/nnn-wrapper.sh b/.config/xdg-desktop-portal-termfilechooser/nnn-wrapper.sh new file mode 100755 index 0000000..2b3bdf0 --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/nnn-wrapper.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env sh +# This wrapper script is invoked by xdg-desktop-portal-termfilechooser. +# +# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` + +set -e + +if [ "$6" -ge 4 ]; then + set -x +fi + +multiple="$1" +directory="$2" +save="$3" +path="$4" +out="$5" + +cmd="nnn" +termcmd="${TERMCMD:-kitty --title 'termfilechooser'}" + +if [ "$save" = "1" ]; then + # save a file + set -- -p "$out" "$path" +elif [ "$directory" = "1" ]; then + # upload files from a directory + set -- -p "$out" "$path" +elif [ "$multiple" = "1" ]; then + # upload multiple files + set -- -p "$out" "$path" +else + # upload only 1 file + set -- -p "$out" "$path" +fi + +command="$termcmd $cmd" +for arg in "$@"; do + # escape double quotes + escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g') + # escape special + command="$command \"$escaped\"" +done + +if [ "$directory" = "1" ]; then + sh -c "env NNN_TMPFILE=\"$out\" $command" +else + sh -c "$command" +fi + +if [ "$directory" = "1" ] && [ -s "$out" ]; then + # select on quit; file data will be `cd '/dir/path'` + if [ "$(cut -c -2 "$out")" = "cd" ]; then + sed -i "s/^cd '\(.*\)'/\1/" "$out" + fi +fi diff --git a/.config/xdg-desktop-portal-termfilechooser/ranger-wrapper.sh b/.config/xdg-desktop-portal-termfilechooser/ranger-wrapper.sh new file mode 100755 index 0000000..f9c6b7e --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/ranger-wrapper.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env sh +# This wrapper script is invoked by xdg-desktop-portal-termfilechooser. +# +# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` + +set -e + +if [ "$6" -ge 4 ]; then + set -x +fi + +multiple="$1" +directory="$2" +save="$3" +path="$4" +out="$5" + +cmd="ranger" +termcmd="${TERMCMD:-kitty --title 'termfilechooser'}" + +if [ "$save" = "1" ]; then + # save a file + set -- --choosefile="$out" --cmd="echo Select save path (see tutorial in preview pane; try pressing zv or zp if no preview)" --selectfile="$path" +elif [ "$directory" = "1" ]; then + # upload files from a directory + set -- --choosedir="$out" --show-only-dirs --cmd="echo Select directory (quit in dir to select it)" "$path" +elif [ "$multiple" = "1" ]; then + # upload multiple files + set -- --choosefiles="$out" --cmd="echo Select file(s) (open file to select it; to select multiple)" "$path" +else + # upload only 1 file + set -- --choosefile="$out" --cmd="echo Select file (open file to select it)" "$path" +fi + +command="$termcmd $cmd" +for arg in "$@"; do + # escape double quotes + escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g') + # escape special + command="$command \"$escaped\"" +done + +sh -c "$command" diff --git a/.config/xdg-desktop-portal-termfilechooser/systemd/xdg-desktop-portal-termfilechooser.service.in b/.config/xdg-desktop-portal-termfilechooser/systemd/xdg-desktop-portal-termfilechooser.service.in new file mode 100644 index 0000000..4f3ad91 --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/systemd/xdg-desktop-portal-termfilechooser.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=Portal service (terminal file chooser implementation) +PartOf=graphical-session.target +After=graphical-session.target + +[Service] +Type=dbus +BusName=org.freedesktop.impl.portal.desktop.termfilechooser +ExecStart=@libexecdir@/xdg-desktop-portal-termfilechooser +Restart=on-failure +Slice=session.slice diff --git a/.config/xdg-desktop-portal-termfilechooser/vifm-wrapper.sh b/.config/xdg-desktop-portal-termfilechooser/vifm-wrapper.sh new file mode 100755 index 0000000..f32ce54 --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/vifm-wrapper.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env sh +# This wrapper script is invoked by xdg-desktop-portal-termfilechooser. +# +# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` + +set -e + +if [ "$6" -ge 4 ]; then + set -x +fi + +multiple="$1" +directory="$2" +save="$3" +path="$4" +out="$5" + +cmd="vifm" +termcmd="${TERMCMD:-kitty --title 'termfilechooser'}" + +if [ "$save" = "1" ]; then + # save a file + set -- --choose-files "$out" -c "only" -c "map :cquit" \ + -c "set statusline='Save file (press to select or to cancel)%NCursorfile is the recommended choice, you can rename/move it%NIf you select another file, it will be overwritten by the save'" \ + --select "$path" >"$path" +elif [ "$directory" = "1" ]; then + # upload files from a directory + set -- --choose-files "$out" --choose-dir "$out" -c "only" -c "map :cquit" -c "set statusline='Select directory (:quit in dir or select and open it, press to cancel)'" +elif [ "$multiple" = "1" ]; then + # upload multiple files + set -- --choose-files "$out" -c "only" -c "map :cquit" -c "set statusline='Select file(s) (press key to select multiple, press to cancel)'" +else + # upload only 1 file + set -- --choose-files "$out" -c "only" -c "map :cquit" -c "set statusline='Select file (open file to select it, press to cancel)'" +fi + +command="$termcmd $cmd" +for arg in "$@"; do + # escape double quotes + escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g') + # escape special + command="$command \"$escaped\"" +done + +sh -c "$command" diff --git a/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh b/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh new file mode 100755 index 0000000..191b18e --- /dev/null +++ b/.config/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env sh +# This wrapper script is invoked by xdg-desktop-portal-termfilechooser. +# +# For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)` + +set -e + +if [ "$6" -ge 4 ]; then + set -x +fi + +multiple="$1" +directory="$2" +save="$3" +path="$4" +out="$5" + +cmd="yazi" +termcmd="${TERMCMD:-kitty --title 'termfilechooser'}" + +if [ "$save" = "1" ]; then + # save a file + set -- --chooser-file="$out" "$path" +elif [ "$directory" = "1" ]; then + # upload files from a directory + set -- --chooser-file="$out" --cwd-file="$out"".1" "$path" +elif [ "$multiple" = "1" ]; then + # upload multiple files + set -- --chooser-file="$out" "$path" +else + # upload only 1 file + set -- --chooser-file="$out" "$path" +fi + +command="$termcmd $cmd" +for arg in "$@"; do + # escape double quotes + escaped=$(printf "%s" "$arg" | sed 's/"/\\"/g') + # escape special + command="$command \"$escaped\"" +done + +sh -c "$command" + +if [ "$directory" = "1" ]; then + if [ ! -s "$out" ] && [ -s "$out"".1" ]; then + cat "$out"".1" > "$out" + rm "$out"".1" + else + rm "$out"".1" + fi +fi diff --git a/.config/xdg-desktop-portal/portals.conf b/.config/xdg-desktop-portal/portals.conf new file mode 100644 index 0000000..d292d89 --- /dev/null +++ b/.config/xdg-desktop-portal/portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland;gtk; +org.freedesktop.impl.portal.FileChooser=termfilechooser; diff --git a/.config/xsettingsd/xsettingsd.conf b/.config/xsettingsd/xsettingsd.conf new file mode 100644 index 0000000..f9320ee --- /dev/null +++ b/.config/xsettingsd/xsettingsd.conf @@ -0,0 +1,9 @@ +Net/ThemeName "Dracula" +Net/IconThemeName "Dracula" +Gtk/CursorThemeName "Dracula" +Net/EnableEventSounds 1 +EnableInputFeedbackSounds 0 +Xft/Antialias 1 +Xft/Hinting 1 +Xft/HintStyle "hintslight" +Xft/RGBA "rgb" diff --git a/.config/yazi/flavors/dracula.yazi/flavor.toml b/.config/yazi/flavors/dracula.yazi/flavor.toml new file mode 100644 index 0000000..58b0080 --- /dev/null +++ b/.config/yazi/flavors/dracula.yazi/flavor.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/.config/yazi/init.lua b/.config/yazi/init.lua new file mode 100644 index 0000000..4617e0b --- /dev/null +++ b/.config/yazi/init.lua @@ -0,0 +1,4 @@ +require("recycle-bin"):setup({ + -- Optional: Override automatic trash directory discovery + -- trash_dir = "~/.local/share/Trash/", -- Uncomment to use specific directory +}) diff --git a/.config/yazi/keymap.toml b/.config/yazi/keymap.toml new file mode 100644 index 0000000..efc60c8 --- /dev/null +++ b/.config/yazi/keymap.toml @@ -0,0 +1,369 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/keymap.json" + +[mgr] + +keymap = [ + { on = ["R","b"], run = "plugin recycle-bin", desc = "Open Recycle Bin menu" }, + { on = "", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" }, + { on = "", run = "escape", desc = "Exit visual mode, clear selection, or cancel search" }, + { on = "q", run = "quit", desc = "Quit the process" }, + { on = "Q", run = "quit --no-cwd-file", desc = "Quit without outputting cwd-file" }, + { on = "", run = "close", desc = "Close the current tab, or quit if it's last" }, + { on = "", run = "suspend", desc = "Suspend the process" }, + + # Hopping + { on = "k", run = "arrow prev", desc = "Previous file" }, + { on = "j", run = "arrow next", desc = "Next file" }, + + { on = "", run = "arrow prev", desc = "Previous file" }, + { on = "", run = "arrow next", desc = "Next file" }, + + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, + + { on = "", run = "arrow -50%", desc = "Move cursor up half page" }, + { on = "", run = "arrow 50%", desc = "Move cursor down half page" }, + { on = "", run = "arrow -100%", desc = "Move cursor up one page" }, + { on = "", run = "arrow 100%", desc = "Move cursor down one page" }, + + { on = [ "g", "g" ], run = "arrow top", desc = "Go to top" }, + { on = "G", run = "arrow bot", desc = "Go to bottom" }, + + # Navigation + { on = "h", run = "leave", desc = "Back to the parent directory" }, + { on = "l", run = "enter", desc = "Enter the child directory" }, + + { on = "", run = "leave", desc = "Back to the parent directory" }, + { on = "", run = "enter", desc = "Enter the child directory" }, + + { on = "H", run = "back", desc = "Back to previous directory" }, + { on = "L", run = "forward", desc = "Forward to next directory" }, + + # Toggle + { on = "", run = [ "toggle", "arrow next" ], desc = "Toggle the current selection state" }, + { on = "", run = "toggle_all --state=on", desc = "Select all files" }, + { on = "", run = "toggle_all", desc = "Invert selection of all files" }, + + # Visual mode + { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" }, + { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, + + # Seeking + { on = "K", run = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = "J", run = "seek 5", desc = "Seek down 5 units in the preview" }, + + # Spotting + { on = "", run = "spot", desc = "Spot hovered file" }, + + # Operation + { on = "o", run = "open", desc = "Open selected files" }, + { on = "O", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "", run = "open", desc = "Open selected files" }, + { on = "", run = "open --interactive", desc = "Open selected files interactively" }, + { on = "y", run = "yank", desc = "Yank selected files (copy)" }, + { on = "x", run = "yank --cut", desc = "Yank selected files (cut)" }, + { on = "p", run = "paste", desc = "Paste yanked files" }, + { on = "P", run = "paste --force", desc = "Paste yanked files (overwrite if the destination exists)" }, + { on = "-", run = "link", desc = "Symlink the absolute path of yanked files" }, + { on = "_", run = "link --relative", desc = "Symlink the relative path of yanked files" }, + { on = "", run = "hardlink", desc = "Hardlink yanked files" }, + { on = "Y", run = "unyank", desc = "Cancel the yank status" }, + { on = "X", run = "unyank", desc = "Cancel the yank status" }, + { on = "d", run = "remove", desc = "Trash selected files" }, + { on = "D", run = "remove --permanently", desc = "Permanently delete selected files" }, + { on = "a", run = "create", desc = "Create a file (ends with / for directories)" }, + { on = "r", run = "rename --cursor=before_ext", desc = "Rename selected file(s)" }, + { on = ";", run = "shell --interactive", desc = "Run a shell command" }, + { on = ":", run = "shell --block --interactive", desc = "Run a shell command (block until finishes)" }, + { on = ".", run = "hidden toggle", desc = "Toggle the visibility of hidden files" }, + { on = "s", run = "search --via=fd", desc = "Search files by name via fd" }, + { on = "S", run = "search --via=rg", desc = "Search files by content via ripgrep" }, + { on = "", run = "escape --search", desc = "Cancel the ongoing search" }, + { on = "z", run = "plugin fzf", desc = "Jump to a file/directory via fzf" }, + { on = "Z", run = "plugin zoxide", desc = "Jump to a directory via zoxide" }, + + # Linemode + { on = [ "m", "s" ], run = "linemode size", desc = "Linemode: size" }, + { on = [ "m", "p" ], run = "linemode permissions", desc = "Linemode: permissions" }, + { on = [ "m", "b" ], run = "linemode btime", desc = "Linemode: btime" }, + { on = [ "m", "m" ], run = "linemode mtime", desc = "Linemode: mtime" }, + { on = [ "m", "o" ], run = "linemode owner", desc = "Linemode: owner" }, + { on = [ "m", "n" ], run = "linemode none", desc = "Linemode: none" }, + + # Copy + { on = [ "c", "c" ], run = "copy path", desc = "Copy the file path" }, + { on = [ "c", "d" ], run = "copy dirname", desc = "Copy the directory path" }, + { on = [ "c", "f" ], run = "copy filename", desc = "Copy the filename" }, + { on = [ "c", "n" ], run = "copy name_without_ext", desc = "Copy the filename without extension" }, + + # Filter + { on = "f", run = "filter --smart", desc = "Filter files" }, + + # Find + { on = "/", run = "find --smart", desc = "Find next file" }, + { on = "?", run = "find --previous --smart", desc = "Find previous file" }, + { on = "n", run = "find_arrow", desc = "Next found" }, + { on = "N", run = "find_arrow --previous", desc = "Previous found" }, + + # Sorting + { on = [ ",", "m" ], run = [ "sort mtime --reverse=no", "linemode mtime" ], desc = "Sort by modified time" }, + { on = [ ",", "M" ], run = [ "sort mtime --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" }, + { on = [ ",", "b" ], run = [ "sort btime --reverse=no", "linemode btime" ], desc = "Sort by birth time" }, + { on = [ ",", "B" ], run = [ "sort btime --reverse", "linemode btime" ], desc = "Sort by birth time (reverse)" }, + { on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" }, + { on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" }, + { on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" }, + { on = [ ",", "A" ], run = "sort alphabetical --reverse", desc = "Sort alphabetically (reverse)" }, + { on = [ ",", "n" ], run = "sort natural --reverse=no", desc = "Sort naturally" }, + { on = [ ",", "N" ], run = "sort natural --reverse", desc = "Sort naturally (reverse)" }, + { on = [ ",", "s" ], run = [ "sort size --reverse=no", "linemode size" ], desc = "Sort by size" }, + { on = [ ",", "S" ], run = [ "sort size --reverse", "linemode size" ], desc = "Sort by size (reverse)" }, + { on = [ ",", "r" ], run = "sort random --reverse=no", desc = "Sort randomly" }, + + # Goto + { on = [ "g", "h" ], run = "cd ~", desc = "Go home" }, + { on = [ "g", "c" ], run = "cd ~/.config", desc = "Go ~/.config" }, + { on = [ "g", "d" ], run = "cd ~/Downloads", desc = "Go ~/Downloads" }, + { on = [ "g", "" ], run = "cd --interactive", desc = "Jump interactively" }, + { on = [ "g", "f" ], run = "follow", desc = "Follow hovered symlink" }, + + # Tabs + { on = "t", run = "tab_create --current", desc = "Create a new tab with CWD" }, + + { on = "1", run = "tab_switch 0", desc = "Switch to first tab" }, + { on = "2", run = "tab_switch 1", desc = "Switch to second tab" }, + { on = "3", run = "tab_switch 2", desc = "Switch to third tab" }, + { on = "4", run = "tab_switch 3", desc = "Switch to fourth tab" }, + { on = "5", run = "tab_switch 4", desc = "Switch to fifth tab" }, + { on = "6", run = "tab_switch 5", desc = "Switch to sixth tab" }, + { on = "7", run = "tab_switch 6", desc = "Switch to seventh tab" }, + { on = "8", run = "tab_switch 7", desc = "Switch to eighth tab" }, + { on = "9", run = "tab_switch 8", desc = "Switch to ninth tab" }, + + { on = "[", run = "tab_switch -1 --relative", desc = "Switch to previous tab" }, + { on = "]", run = "tab_switch 1 --relative", desc = "Switch to next tab" }, + + { on = "{", run = "tab_swap -1", desc = "Swap current tab with previous tab" }, + { on = "}", run = "tab_swap 1", desc = "Swap current tab with next tab" }, + + # Tasks + { on = "w", run = "tasks:show", desc = "Show task manager" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[tasks] + +keymap = [ + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "", run = "close", desc = "Close task manager" }, + { on = "w", run = "close", desc = "Close task manager" }, + + { on = "k", run = "arrow prev", desc = "Previous task" }, + { on = "j", run = "arrow next", desc = "Next task" }, + + { on = "", run = "arrow prev", desc = "Previous task" }, + { on = "", run = "arrow next", desc = "Next task" }, + + { on = "", run = "inspect", desc = "Inspect the task" }, + { on = "x", run = "cancel", desc = "Cancel the task" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[spot] + +keymap = [ + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + { on = "", run = "close", desc = "Close the spot" }, + + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + { on = "h", run = "swipe prev", desc = "Swipe to previous file" }, + { on = "l", run = "swipe next", desc = "Swipe to next file" }, + + { on = "", run = "arrow prev", desc = "Previous line" }, + { on = "", run = "arrow next", desc = "Next line" }, + { on = "", run = "swipe prev", desc = "Swipe to previous file" }, + { on = "", run = "swipe next", desc = "Swipe to next file" }, + + # Copy + { on = [ "c", "c" ], run = "copy cell", desc = "Copy selected cell" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[pick] + +keymap = [ + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close", desc = "Cancel pick" }, + { on = "", run = "close --submit", desc = "Submit the pick" }, + + { on = "k", run = "arrow prev", desc = "Previous option" }, + { on = "j", run = "arrow next", desc = "Next option" }, + + { on = "", run = "arrow prev", desc = "Previous option" }, + { on = "", run = "arrow next", desc = "Next option" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[input] + +keymap = [ + { on = "", run = "close", desc = "Cancel input" }, + { on = "", run = "close --submit", desc = "Submit input" }, + { on = "", run = "escape", desc = "Back to normal mode, or cancel input" }, + { on = "", run = "escape", desc = "Back to normal mode, or cancel input" }, + + # Mode + { on = "i", run = "insert", desc = "Enter insert mode" }, + { on = "I", run = [ "move first-char", "insert" ], desc = "Move to the BOL, and enter insert mode" }, + { on = "a", run = "insert --append", desc = "Enter append mode" }, + { on = "A", run = [ "move eol", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, + { on = "v", run = "visual", desc = "Enter visual mode" }, + { on = "r", run = "replace", desc = "Replace a single character" }, + + # Selection + { on = "V", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" }, + { on = "", run = [ "move eol", "visual", "move bol" ], desc = "Select from EOL to BOL" }, + { on = "", run = [ "move bol", "visual", "move eol" ], desc = "Select from BOL to EOL" }, + + # Character-wise movement + { on = "h", run = "move -1", desc = "Move back a character" }, + { on = "l", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, + { on = "", run = "move -1", desc = "Move back a character" }, + { on = "", run = "move 1", desc = "Move forward a character" }, + + # Word-wise movement + { on = "b", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "B", run = "backward --far", desc = "Move back to the start of the current or previous WORD" }, + { on = "w", run = "forward", desc = "Move forward to the start of the next word" }, + { on = "W", run = "forward --far", desc = "Move forward to the start of the next WORD" }, + { on = "e", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + { on = "E", run = "forward --far --end-of-word", desc = "Move forward to the end of the current or next WORD" }, + { on = "", run = "backward", desc = "Move back to the start of the current or previous word" }, + { on = "", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, + + # Line-wise movement + { on = "0", run = "move bol", desc = "Move to the BOL" }, + { on = "$", run = "move eol", desc = "Move to the EOL" }, + { on = "_", run = "move first-char", desc = "Move to the first non-whitespace character" }, + { on = "^", run = "move first-char", desc = "Move to the first non-whitespace character" }, + { on = "", run = "move bol", desc = "Move to the BOL" }, + { on = "", run = "move eol", desc = "Move to the EOL" }, + { on = "", run = "move bol", desc = "Move to the BOL" }, + { on = "", run = "move eol", desc = "Move to the EOL" }, + + # Delete + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + { on = "", run = "backspace", desc = "Delete the character before the cursor" }, + { on = "", run = "backspace --under", desc = "Delete the character under the cursor" }, + + # Kill + { on = "", run = "kill bol", desc = "Kill backwards to the BOL" }, + { on = "", run = "kill eol", desc = "Kill forwards to the EOL" }, + { on = "", run = "kill backward", desc = "Kill backwards to the start of the current word" }, + { on = "", run = "kill forward", desc = "Kill forwards to the end of the current word" }, + + # Cut/Yank/Paste + { on = "d", run = "delete --cut", desc = "Cut selected characters" }, + { on = "D", run = [ "delete --cut", "move eol" ], desc = "Cut until EOL" }, + { on = "c", run = "delete --cut --insert", desc = "Cut selected characters, and enter insert mode" }, + { on = "C", run = [ "delete --cut --insert", "move eol" ], desc = "Cut until EOL, and enter insert mode" }, + { on = "s", run = [ "delete --cut --insert", "move 1" ], desc = "Cut current character, and enter insert mode" }, + { on = "S", run = [ "move bol", "delete --cut --insert", "move eol" ], desc = "Cut from BOL until EOL, and enter insert mode" }, + { on = "x", run = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut current character" }, + { on = "y", run = "yank", desc = "Copy selected characters" }, + { on = "p", run = "paste", desc = "Paste copied characters after the cursor" }, + { on = "P", run = "paste --before", desc = "Paste copied characters before the cursor" }, + + # Undo/Redo + { on = "u", run = "undo", desc = "Undo the last operation" }, + { on = "", run = "redo", desc = "Redo the last operation" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[confirm] + +keymap = [ + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close", desc = "Cancel the confirm" }, + { on = "", run = "close --submit", desc = "Submit the confirm" }, + + { on = "n", run = "close", desc = "Cancel the confirm" }, + { on = "y", run = "close --submit", desc = "Submit the confirm" }, + + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + + { on = "", run = "arrow prev", desc = "Previous line" }, + { on = "", run = "arrow next", desc = "Next line" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[cmp] + +keymap = [ + { on = "", run = "close", desc = "Cancel completion" }, + { on = "", run = "close --submit", desc = "Submit the completion" }, + { on = "", run = [ "close --submit", "input:close --submit" ], desc = "Complete and submit the input" }, + + { on = "", run = "arrow prev", desc = "Previous item" }, + { on = "", run = "arrow next", desc = "Next item" }, + + { on = "", run = "arrow prev", desc = "Previous item" }, + { on = "", run = "arrow next", desc = "Next item" }, + + { on = "", run = "arrow prev", desc = "Previous item" }, + { on = "", run = "arrow next", desc = "Next item" }, + + # Help + { on = "~", run = "help", desc = "Open help" }, + { on = "", run = "help", desc = "Open help" }, +] + +[help] + +keymap = [ + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "", run = "escape", desc = "Clear the filter, or hide the help" }, + { on = "", run = "close", desc = "Hide the help" }, + + # Navigation + { on = "k", run = "arrow prev", desc = "Previous line" }, + { on = "j", run = "arrow next", desc = "Next line" }, + + { on = "", run = "arrow prev", desc = "Previous line" }, + { on = "", run = "arrow next", desc = "Next line" }, + + # Filtering + { on = "f", run = "filter", desc = "Filter help items" }, +] diff --git a/.config/yazi/package.toml b/.config/yazi/package.toml new file mode 100644 index 0000000..1845e65 --- /dev/null +++ b/.config/yazi/package.toml @@ -0,0 +1,7 @@ +[[plugin.deps]] +use = "uhs-robert/recycle-bin" +rev = "1762676" +hash = "c77042b4296544a9edb4849338056039" + +[flavor] +deps = [] diff --git a/.config/yazi/plugins/recycle-bin.yazi/LICENSE b/.config/yazi/plugins/recycle-bin.yazi/LICENSE new file mode 100644 index 0000000..ef3a9f3 --- /dev/null +++ b/.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/.config/yazi/plugins/recycle-bin.yazi/README.md b/.config/yazi/plugins/recycle-bin.yazi/README.md new file mode 100644 index 0000000..38d790d --- /dev/null +++ b/.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/.config/yazi/plugins/recycle-bin.yazi/main.lua b/.config/yazi/plugins/recycle-bin.yazi/main.lua new file mode 100644 index 0000000..dc999d2 --- /dev/null +++ b/.config/yazi/plugins/recycle-bin.yazi/main.lua @@ -0,0 +1,1584 @@ +-- 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/.config/yazi/theme.toml b/.config/yazi/theme.toml new file mode 100644 index 0000000..ea9a748 --- /dev/null +++ b/.config/yazi/theme.toml @@ -0,0 +1,3 @@ +[flavor] +dark = "dracula" +light = "dracula" diff --git a/.config/yazi/yazi.toml b/.config/yazi/yazi.toml new file mode 100644 index 0000000..f39b7af --- /dev/null +++ b/.config/yazi/yazi.toml @@ -0,0 +1,223 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" + +[mgr] +ratio = [ 1, 4, 3 ] +sort_by = "alphabetical" +sort_sensitive = false +sort_reverse = false +sort_dir_first = true +sort_translit = false +linemode = "none" +show_hidden = true +show_symlink = true +scrolloff = 5 +mouse_events = [ "click", "scroll" ] +title_format = "Yazi: {cwd}" + +[preview] +wrap = "no" +tab_size = 2 +max_width = 600 +max_height = 900 +cache_dir = "" +image_delay = 30 +image_filter = "triangle" +image_quality = 75 +ueberzug_scale = 1 +ueberzug_offset = [ 0, 0, 0, 0 ] + +[opener] +edit = [ + { run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" }, + { run = 'code %*', orphan = true, desc = "code", for = "windows" }, + { run = 'code -w %*', block = true, desc = "code (block)", for = "windows" }, +] +open = [ + { run = 'xdg-open "$1"', desc = "Open", for = "linux" }, + { run = 'open "$@"', desc = "Open", for = "macos" }, + { run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }, + { run = 'termux-open "$1"', desc = "Open", for = "android" }, +] +reveal = [ + { run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" }, + { run = 'open -R "$1"', desc = "Reveal", for = "macos" }, + { run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" }, + { run = 'termux-open "$(dirname "$1")"', desc = "Reveal", for = "android" }, + { run = '''clear; exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" }, +] +extract = [ + { run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, + { run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" }, +] +play = [ + { run = 'mpv --force-window "$@"', orphan = true, for = "unix" }, + { run = 'mpv --force-window %*', orphan = true, for = "windows" }, + { run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" }, +] + +[open] +rules = [ + # Folder + { name = "*/", use = [ "edit", "open", "reveal" ] }, + # Text + { mime = "text/*", use = [ "edit", "reveal" ] }, + # Image + { mime = "image/*", use = [ "open", "reveal" ] }, + # Media + { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] }, + # JSON + { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] }, + { mime = "*/javascript", use = [ "edit", "reveal" ] }, + # Empty file + { mime = "inode/empty", use = [ "edit", "reveal" ] }, + # Fallback + { name = "*", use = [ "open", "reveal" ] }, +] + +[tasks] +micro_workers = 10 +macro_workers = 10 +bizarre_retry = 3 +image_alloc = 536870912 # 512MB +image_bound = [ 5000, 5000 ] +suppress_preload = false + +[plugin] +fetchers = [ + # Mimetype + { id = "mime", name = "*", run = "mime", prio = "high" }, +] +spotters = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # Fallback + { name = "*", run = "file" }, +] +preloaders = [ + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, +] +previewers = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # JSON + { mime = "application/{json,ndjson}", run = "json" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" }, + { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" }, + { name = "*.{AppImage,appimage}", run = "archive" }, + # Virtual Disk / Disk Image + { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" }, + { mime = "application/virtualbox-{vhd,vhdx}", run = "archive" }, + { name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, + # Empty file + { mime = "inode/empty", run = "empty" }, + # Fallback + { name = "*", run = "file" }, +] + +[input] +cursor_blink = false + +# cd +cd_title = "Change directory:" +cd_origin = "top-center" +cd_offset = [ 0, 2, 50, 3 ] + +# create +create_title = [ "Create:", "Create (dir):" ] +create_origin = "top-center" +create_offset = [ 0, 2, 50, 3 ] + +# rename +rename_title = "Rename:" +rename_origin = "hovered" +rename_offset = [ 0, 1, 50, 3 ] + +# filter +filter_title = "Filter:" +filter_origin = "top-center" +filter_offset = [ 0, 2, 50, 3 ] + +# find +find_title = [ "Find next:", "Find previous:" ] +find_origin = "top-center" +find_offset = [ 0, 2, 50, 3 ] + +# search +search_title = "Search via {n}:" +search_origin = "top-center" +search_offset = [ 0, 2, 50, 3 ] + +# shell +shell_title = [ "Shell:", "Shell (block):" ] +shell_origin = "top-center" +shell_offset = [ 0, 2, 50, 3 ] + +[confirm] +# trash +trash_title = "Trash {n} selected file{s}?" +trash_origin = "center" +trash_offset = [ 0, 0, 70, 20 ] + +# delete +delete_title = "Permanently delete {n} selected file{s}?" +delete_origin = "center" +delete_offset = [ 0, 0, 70, 20 ] + +# overwrite +overwrite_title = "Overwrite file?" +overwrite_content = "Will overwrite the following file:" +overwrite_origin = "center" +overwrite_offset = [ 0, 0, 50, 15 ] + +# quit +quit_title = "Quit?" +quit_content = "The following tasks are still running, are you sure you want to quit?" +quit_origin = "center" +quit_offset = [ 0, 0, 50, 15 ] + +[pick] +open_title = "Open with:" +open_origin = "hovered" +open_offset = [ 0, 1, 50, 7 ] + +[which] +sort_by = "none" +sort_sensitive = false +sort_reverse = false +sort_translit = false diff --git a/.config/zed/settings.json b/.config/zed/settings.json new file mode 100644 index 0000000..2dd65cc --- /dev/null +++ b/.config/zed/settings.json @@ -0,0 +1,21 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run `zed: open default settings` from the +// command palette (cmd-shift-p / ctrl-shift-p) +{ + "buffer_font_family": "JetBrainsMono Nerd Font", + "vim_mode": false, + "disable_ai": true, + "telemetry": { + "diagnostics": false, + "metrics": false + }, + "icon_theme": "Zed (Default)", + "ui_font_size": 16, + "buffer_font_size": 15, + "theme": "Dracula" +} diff --git a/.config/zed/themes/dracula.json b/.config/zed/themes/dracula.json new file mode 100644 index 0000000..089850d --- /dev/null +++ b/.config/zed/themes/dracula.json @@ -0,0 +1,1247 @@ +{ + "$schema": "https://zed.dev/schema/themes/v0.2.0.json", + "name": "Dracula", + "author": "Ben Hamment", + "themes": [ + { + "name": "Dracula", + "appearance": "dark", + "style": { + "accents": [ + "#bd93f9ff", + "#ff79c6ff", + "#8be9fdff", + "#50fa7bff", + "#ffb86cff", + "#f1fa8cff", + "#ff5555ff" + ], + "background.appearance": "blurred", + "border": "#3c324bcc", + "border.variant": "#C9A8F933", + "border.focused": "#C9A8F977", + "border.selected": "#C9A8F9bb", + "border.transparent": "#00000000", + "border.disabled": null, + "elevated_surface.background": "#1e1925ff", + "surface.background": "#242631ee", + "background": "#b597e033", + "element.background": "#1c1d26ff", + "element.hover": "#504364ff", + "element.active": "#796595ff", + "element.selected": "#65547dff", + "element.disabled": "#e9dbfdff", + "drop_target.background": "#504364ff", + "ghost_element.background": "#00000000", + "ghost_element.hover": "#C9A8F935", + "ghost_element.active": "#C9A8F950", + "ghost_element.selected": "#C9A8F925", + "ghost_element.disabled": "#ff5555ff", + "text": "#f8f8f2ff", + "text.muted": "#a186c7ff", + "text.placeholder": "#C9A8F980", + "text.disabled": "#C9A8F950", + "text.accent": "#C9A8F9FF", + "icon": "#f8f8f2ff", + "icon.muted": "#f8f8f270", + "icon.disabled": "#f8f8f240", + "icon.placeholder": "#f8f8f250", + "icon.accent": "#C9A8F9FF", + "status_bar.background": "#141119bb", + "title_bar.background": "#141119bb", + "title_bar.inactive_background": "#0a080cbb", + "toolbar.background": "#282a36ff", + "tab_bar.background": "#282232bb", + "tab.inactive_background": "#1c1d26ff", + "tab.active_background": "#282a36ff", + "search.match_background": "#50fa7b50", + "panel.background": "#16121bff", + "panel.focused_border": "#C9A8F9FF", + "panel.indent_guide": "#f8f8f220", + "panel.indent_guide_active": "#C9A8F950", + "panel.indent_guide_hover": "#C9A8F935", + "pane.focused_border": "#C9A8F9FF", + "pane_group.border": "#3c324bcc", + "scrollbar.thumb.background": "#C9A8F977", + "scrollbar.thumb.hover_background": "#C9A8F9FF", + "scrollbar.thumb.border": "#00000000", + "scrollbar.track.background": "#141119ff", + "scrollbar.track.border": "#C9A8F944", + "editor.foreground": "#f8f8f2ff", + "editor.background": "#282a36ff", + "editor.gutter.background": "#282a36ff", + "editor.subheader.background": "#1e1925ff", + "editor.active_line.background": "#C9A8F933", + "editor.highlighted_line.background": "#44475aff", + "editor.line_number": "#f8f8f250", + "editor.active_line_number": "#C9A8F9FF", + "editor.invisible": "#f8f8f230", + "editor.wrap_guide": "#f8f8f228", + "editor.active_wrap_guide": "#bd93f965", + "editor.document_highlight.read_background": "#C9A8F940", + "editor.document_highlight.write_background": "#44475aff", + "editor.document_highlight.bracket_background": "#bd93f935", + "editor.indent_guide": "#f8f8f220", + "editor.indent_guide_active": "#bd93f950", + "link_text.hover": "#8be9fdff", + "conflict": "#dec184ff", + "conflict.background": "#dec18433", + "conflict.border": "#5d4c2fff", + "created": "#73fb95ff", + "created.background": "#222e1dff", + "created.border": "#38482fff", + "deleted": "#ff5555ff", + "deleted.background": "#301b1bff", + "deleted.border": "#4c2b2cff", + "error": "#e67373ff", + "error.background": "#242631ee", + "error.border": "#e67373ff", + "hidden": "#414754ff", + "hidden.background": "#242631ee", + "hidden.border": "#414754ff", + "hint": "#6272a4ff", + "hint.background": "#242631ee", + "hint.border": "#6272a4ff", + "ignored": "#C9A8F950", + "ignored.background": "#3c324bff", + "ignored.border": "#C9A8F950", + "info": "#73ece5ff", + "info.background": "#242631ee", + "info.border": "#73ece5ff", + "modified": "#a2edfdff", + "modified.background": "#242631ee", + "modified.border": "#a2edfdff", + "predictive": "#c6c6c2ff", + "predictive.background": "#242631ee", + "predictive.border": "#c6c6c2ff", + "renamed": "#8be9fdff", + "renamed.background": "#242631ee", + "renamed.border": "#8be9fdff", + "success": "#79e96dff", + "success.background": "#242631ee", + "success.border": "#79e96dff", + "unreachable": "#959591ff", + "unreachable.border": "#959591ff", + "warning": "#e6e373ff", + "warning.background": "#242631ee", + "warning.border": "#e6e373ff", + "players": [ + { + "cursor": "#bd93f9ff", + "background": "#bd93f9ff", + "selection": "#bd93f933" + }, + { + "cursor": "#50fa7bff", + "background": "#50fa7bff", + "selection": "#50fa7b33" + }, + { + "cursor": "#ff79c6ff", + "background": "#ff79c6ff", + "selection": "#ff79c633" + }, + { + "cursor": "#f1fa8cff", + "background": "#f1fa8cff", + "selection": "#f1fa8c33" + }, + { + "cursor": "#8be9fdff", + "background": "#8be9fdff", + "selection": "#8be9fd33" + }, + { + "cursor": "#ffb86cff", + "background": "#ffb86cff", + "selection": "#ffb86c33" + }, + { + "cursor": "#ff5555ff", + "background": "#ff5555ff", + "selection": "#ff555533" + } + ], + "syntax": { + "attribute": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "boolean": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "comment": { + "color": "#6272a4ff", + "font_style": null, + "font_weight": null + }, + "comment.doc": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "constant": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "constructor": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "embedded": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "emphasis": { + "color": "#f1fa8cff", + "font_style": "italic", + "font_weight": null + }, + "emphasis.strong": { + "color": "#ffb86cff", + "font_style": null, + "font_weight": 700 + }, + "enum": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "function": { + "color": "#50fa7bff", + "font_style": null, + "font_weight": null + }, + "hint": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": 700 + }, + "keyword": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "label": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "link_text": { + "color": "#ff79c6ff", + "font_style": "normal", + "font_weight": null + }, + "link_uri": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "number": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "operator": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "predictive": { + "color": "#c6c6c2ff", + "font_style": "italic", + "font_weight": null + }, + "preproc": { + "color": "#6272a4ff", + "font_style": null, + "font_weight": null + }, + "primary": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "property": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "punctuation": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "punctuation.bracket": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "punctuation.delimiter": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "punctuation.list_marker": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "punctuation.special": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string": { + "color": "#f1fa8cff", + "font_style": null, + "font_weight": null + }, + "string.escape": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string.regex": { + "color": "#ff5555ff", + "font_style": null, + "font_weight": null + }, + "string.special": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string.special.symbol": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "tag": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "text.literal": { + "color": "#50fa7bff", + "font_style": null, + "font_weight": null + }, + "title": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": 600 + }, + "type": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "type.interface": { + "color": "#8be9fdff", + "font_style": "italic", + "font_weight": null + }, + "type.super": { + "color": "#8be9fdff", + "font_style": "italic", + "font_weight": null + }, + "variable": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "variable.member": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "variable.parameter": { + "color": "#ffb86cff", + "font_style": "italic", + "font_weight": null + }, + "variable.special": { + "color": "#bd93f9ff", + "font_style": "italic", + "font_weight": null + }, + "variant": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + } + }, + "terminal.background": "#14151bff", + "terminal.foreground": "#f8f8f2ff", + "terminal.bright_foreground": "#f9f9f5ff", + "terminal.dim_foreground": "#c6c6c2ff", + "terminal.ansi.background": "#14151bff", + "terminal.ansi.black": "#21222cff", + "terminal.ansi.bright_black": "#919cbfff", + "terminal.ansi.dim_black": "#1a1b23ff", + "terminal.ansi.red": "#ff5555ff", + "terminal.ansi.bright_red": "#FF6E6Eff", + "terminal.ansi.dim_red": "#cc4444ff", + "terminal.ansi.green": "#50fa7bff", + "terminal.ansi.bright_green": "#69FF94ff", + "terminal.ansi.dim_green": "#40c862ff", + "terminal.ansi.yellow": "#f1fa8cff", + "terminal.ansi.bright_yellow": "#FFFFA5ff", + "terminal.ansi.dim_yellow": "#c1c870ff", + "terminal.ansi.blue": "#9580ffff", + "terminal.ansi.bright_blue": "#D6ACFFff", + "terminal.ansi.dim_blue": "#7766ccff", + "terminal.ansi.magenta": "#ff79c6ff", + "terminal.ansi.bright_magenta": "#FF92DFff", + "terminal.ansi.dim_magenta": "#cc619eff", + "terminal.ansi.cyan": "#8be9fdff", + "terminal.ansi.bright_cyan": "#A4FFFFff", + "terminal.ansi.dim_cyan": "#6fbacaff", + "terminal.ansi.white": "#f8f8f2ff", + "terminal.ansi.bright_white": "ffffffff", + "terminal.ansi.dim_white": "#c6c6c2ff", + "vim.normal.background": "#8be9fdff", + "vim.insert.background": "#50fa7bff", + "vim.replace.background": "#ff5555ff", + "vim.visual.background": "#bd93f9ff", + "vim.visual_line.background": "#bd93f9ff", + "vim.visual_block.background": "#bd93f9ff", + "vim.helix_normal.background": "#8be9fdff", + "vim.helix_select.background": "#50fa7bff", + "vim.mode.text": "#282a36ff" + } + }, + { + "name": "Dracula Solid", + "appearance": "dark", + "style": { + "accents": [ + "#bd93f9ff", + "#ff79c6ff", + "#8be9fdff", + "#50fa7bff", + "#ffb86cff", + "#f1fa8cff", + "#ff5555ff" + ], + "background.appearance": "opaque", + "border": "#3c324bff", + "border.variant": "#504364ff", + "border.focused": "#C9A8F9FF", + "border.selected": "#d4b9faff", + "border.transparent": "#282a36ff", + "border.disabled": "#6272a4ff", + "elevated_surface.background": "#1e1925ff", + "surface.background": "#242631ff", + "background": "#282a36ff", + "element.background": "#1c1d26ff", + "element.hover": "#504364ff", + "element.active": "#796595ff", + "element.selected": "#65547dff", + "element.disabled": "#e9dbfdff", + "drop_target.background": "#504364ff", + "ghost_element.background": "#22222211", + "ghost_element.hover": "#463b57ff", + "ghost_element.active": "#65547dff", + "ghost_element.selected": "#322a3eff", + "ghost_element.disabled": "#ff5555ff", + "text": "#f8f8f2ff", + "text.muted": "#a186c7ff", + "text.placeholder": "#a186c7ff", + "text.disabled": "#65547dff", + "text.accent": "#C9A8F9FF", + "icon": "#f8f8f2ff", + "icon.muted": "#aeaea9ff", + "icon.disabled": "#636361ff", + "icon.placeholder": "#7c7c79ff", + "icon.accent": "#C9A8F9FF", + "status_bar.background": "#141119ff", + "title_bar.background": "#141119ff", + "title_bar.inactive_background": "#0a080cff", + "toolbar.background": "#282a36ff", + "tab_bar.background": "#282232ff", + "tab.inactive_background": "#1c1d26ff", + "tab.active_background": "#282a36ff", + "search.match_background": "#287d3eff", + "panel.background": "#0a080cff", + "panel.focused_border": "#C9A8F9FF", + "panel.indent_guide": "#323230ff", + "panel.indent_guide_active": "#5f4a7dff", + "panel.indent_guide_hover": "#423357ff", + "pane.focused_border": "#C9A8F9FF", + "pane_group.border": "#3c324bff", + "scrollbar.thumb.background": "#C9A8F977", + "scrollbar.thumb.hover_background": "#d4b9faff", + "scrollbar.thumb.border": "#282a36ff", + "scrollbar.track.background": "#141119ff", + "scrollbar.track.border": "#584a6eff", + "editor.foreground": "#f8f8f2ff", + "editor.background": "#282a36ff", + "editor.gutter.background": "#282a36ff", + "editor.subheader.background": "#1e1925ff", + "editor.active_line.background": "#44475aff", + "editor.highlighted_line.background": "#44475aff", + "editor.line_number": "#7c7c79ff", + "editor.active_line_number": "#C9A8F9FF", + "editor.invisible": "#4a4a49ff", + "editor.wrap_guide": "#454544ff", + "editor.active_wrap_guide": "#7b60a2ff", + "editor.document_highlight.read_background": "#504364ff", + "editor.document_highlight.write_background": "#44475aff", + "editor.document_highlight.bracket_background": "#423357ff", + "editor.indent_guide": "#323230ff", + "editor.indent_guide_active": "#5f4a7dff", + "link_text.hover": "#8be9fdff", + "conflict": "#dec184ff", + "conflict.background": "#dec18433", + "conflict.border": "#5d4c2fff", + "created": "#73fb95ff", + "created.background": "#222e1dff", + "created.border": "#38482fff", + "deleted": "#ff5555ff", + "deleted.background": "#301b1bff", + "deleted.border": "#4c2b2cff", + "error": "#e67373ff", + "error.background": "#242631ff", + "error.border": "#e67373ff", + "hidden": "#414754ff", + "hidden.background": "#242631ff", + "hidden.border": "#414754ff", + "hint": "#6272a4ff", + "hint.background": "#242631ff", + "hint.border": "#6272a4ff", + "ignored": "#65547dff", + "ignored.background": "#3c324bff", + "ignored.border": "#65547dff", + "info": "#73ece5ff", + "info.background": "#242631ff", + "info.border": "#73ece5ff", + "modified": "#a2edfdff", + "modified.background": "#242631ff", + "modified.border": "#a2edfdff", + "predictive": "#c6c6c2ff", + "predictive.background": "#242631ff", + "predictive.border": "#c6c6c2ff", + "renamed": "#8be9fdff", + "renamed.background": "#242631ff", + "renamed.border": "#8be9fdff", + "success": "#79e96dff", + "success.background": "#242631ff", + "success.border": "#79e96dff", + "unreachable": "#959591ff", + "unreachable.border": "#959591ff", + "warning": "#e6e373ff", + "warning.background": "#242631ff", + "warning.border": "#e6e373ff", + "players": [ + { + "cursor": "#bd93f9ff", + "background": "#bd93f9ff", + "selection": "#bd93f933" + }, + { + "cursor": "#50fa7bff", + "background": "#50fa7bff", + "selection": "#50fa7b33" + }, + { + "cursor": "#ff79c6ff", + "background": "#ff79c6ff", + "selection": "#ff79c633" + }, + { + "cursor": "#f1fa8cff", + "background": "#f1fa8cff", + "selection": "#f1fa8c33" + }, + { + "cursor": "#8be9fdff", + "background": "#8be9fdff", + "selection": "#8be9fd33" + }, + { + "cursor": "#ffb86cff", + "background": "#ffb86cff", + "selection": "#ffb86c33" + }, + { + "cursor": "#ff5555ff", + "background": "#ff5555ff", + "selection": "#ff555533" + } + ], + "syntax": { + "attribute": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "boolean": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "comment": { + "color": "#6272a4ff", + "font_style": null, + "font_weight": null + }, + "comment.doc": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "constant": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "constructor": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "embedded": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "emphasis": { + "color": "#f1fa8cff", + "font_style": "italic", + "font_weight": null + }, + "emphasis.strong": { + "color": "#ffb86cff", + "font_style": null, + "font_weight": 700 + }, + "enum": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "function": { + "color": "#50fa7bff", + "font_style": null, + "font_weight": null + }, + "hint": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": 700 + }, + "keyword": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "label": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "link_text": { + "color": "#ff79c6ff", + "font_style": "normal", + "font_weight": null + }, + "link_uri": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "number": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "operator": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "predictive": { + "color": "#c6c6c2ff", + "font_style": "italic", + "font_weight": null + }, + "preproc": { + "color": "#6272a4ff", + "font_style": null, + "font_weight": null + }, + "primary": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "property": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "punctuation": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "punctuation.bracket": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "punctuation.delimiter": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "punctuation.list_marker": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "punctuation.special": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string": { + "color": "#f1fa8cff", + "font_style": null, + "font_weight": null + }, + "string.escape": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string.regex": { + "color": "#ff5555ff", + "font_style": null, + "font_weight": null + }, + "string.special": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "string.special.symbol": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + }, + "tag": { + "color": "#ff79c6ff", + "font_style": null, + "font_weight": null + }, + "text.literal": { + "color": "#50fa7bff", + "font_style": null, + "font_weight": null + }, + "title": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": 600 + }, + "type": { + "color": "#8be9fdff", + "font_style": null, + "font_weight": null + }, + "type.interface": { + "color": "#8be9fdff", + "font_style": "italic", + "font_weight": null + }, + "type.super": { + "color": "#8be9fdff", + "font_style": "italic", + "font_weight": null + }, + "variable": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "variable.member": { + "color": "#f8f8f2ff", + "font_style": null, + "font_weight": null + }, + "variable.parameter": { + "color": "#ffb86cff", + "font_style": "italic", + "font_weight": null + }, + "variable.special": { + "color": "#bd93f9ff", + "font_style": "italic", + "font_weight": null + }, + "variant": { + "color": "#bd93f9ff", + "font_style": null, + "font_weight": null + } + }, + "terminal.background": "#14151bff", + "terminal.foreground": "#f8f8f2ff", + "terminal.bright_foreground": "#f9f9f5ff", + "terminal.dim_foreground": "#c6c6c2ff", + "terminal.ansi.background": "#14151bff", + "terminal.ansi.black": "#21222cff", + "terminal.ansi.bright_black": "#919cbfff", + "terminal.ansi.dim_black": "#1a1b23ff", + "terminal.ansi.red": "#ff5555ff", + "terminal.ansi.bright_red": "#FF6E6Eff", + "terminal.ansi.dim_red": "#cc4444ff", + "terminal.ansi.green": "#50fa7bff", + "terminal.ansi.bright_green": "#69FF94ff", + "terminal.ansi.dim_green": "#40c862ff", + "terminal.ansi.yellow": "#f1fa8cff", + "terminal.ansi.bright_yellow": "#FFFFA5ff", + "terminal.ansi.dim_yellow": "#c1c870ff", + "terminal.ansi.blue": "#9580ffff", + "terminal.ansi.bright_blue": "#D6ACFFff", + "terminal.ansi.dim_blue": "#7766ccff", + "terminal.ansi.magenta": "#ff79c6ff", + "terminal.ansi.bright_magenta": "#FF92DFff", + "terminal.ansi.dim_magenta": "#cc619eff", + "terminal.ansi.cyan": "#8be9fdff", + "terminal.ansi.bright_cyan": "#A4FFFFff", + "terminal.ansi.dim_cyan": "#6fbacaff", + "terminal.ansi.white": "#f8f8f2ff", + "terminal.ansi.bright_white": "ffffffff", + "terminal.ansi.dim_white": "#c6c6c2ff" + } + }, + { + "name": "Dracula Light (Alucard)", + "appearance": "light", + "style": { + "accents": [ + "#644AC9", + "#A3144D", + "#036A96", + "#14710A", + "#A34D14", + "#846E15", + "#CB3A2A" + ], + "background.appearance": "opaque", + "border": "#d1c9efff", + "border.variant": "#e4e4e4ff", + "border.focused": "#F5F5F577", + "border.selected": "#F5F5F5bb", + "border.transparent": null, + "border.disabled": null, + "elevated_surface.background": "#f6f6f6ff", + "surface.background": "#ddddddee", + "background": "#F5F5F5", + "element.background": "#dce0e8ff", + "element.hover": "#ccd0daff", + "element.active": "#d6d9e1ff", + "element.selected": "#CFCFDE", + "element.disabled": "#fbfbfbff", + "drop_target.background": "#ACB0BE42", + "ghost_element.background": null, + "ghost_element.hover": "#ccd0daff", + "ghost_element.active": "#d6d9e1ff", + "ghost_element.selected": "#dce0e8ff", + "ghost_element.disabled": "#CB3A2A", + "text": "#1F1F1F", + "text.muted": "#353535ff", + "text.placeholder": "#1F1F1F80", + "text.disabled": "#1F1F1F70", + "text.accent": "#836ed4ff", + "icon": "#1F1F1F", + "icon.muted": "#1F1F1F70", + "icon.disabled": "#1F1F1F40", + "icon.placeholder": "#1F1F1F50", + "icon.accent": "#836ed4ff", + "status_bar.background": "#FEFEFEff", + "title_bar.background": "#FEFEFEff", + "title_bar.inactive_background": "#F0F0F0ff", + "toolbar.background": "#F5F5F570", + "tab_bar.background": "#D5DAE4ff", + "tab.inactive_background": "#EDEFF4ff", + "tab.active_background": "#F5F5F5", + "search.match_background": "#14710A30", + "panel.background": "#EDEFF4ff", + "panel.focused_border": "#644AC9", + "panel.indent_guide": "#1F1F1F30", + "panel.indent_guide_active": "#644AC960", + "panel.indent_guide_hover": "#644AC945", + "pane.focused_border": "#644AC9", + "pane_group.border": "#d1c9efff", + "scrollbar.thumb.background": "#644AC977", + "scrollbar.thumb.hover_background": "#644AC9", + "scrollbar.thumb.border": null, + "scrollbar.track.background": "#F5F5F5", + "scrollbar.track.border": "#d1c9efff", + "editor.foreground": "#1F1F1F", + "editor.background": "#F5F5F5", + "editor.gutter.background": "#F5F5F5", + "editor.subheader.background": "#d0d0d0ff", + "editor.active_line.background": "acb0be30", + "editor.highlighted_line.background": "#CFCFDE", + "editor.line_number": "#1F1F1F80", + "editor.active_line_number": "#1F1F1F", + "editor.invisible": "#1F1F1F40", + "editor.wrap_guide": "#1F1F1F28", + "editor.active_wrap_guide": "#b2a5e4ff", + "editor.document_highlight.read_background": "#036A9630", + "editor.document_highlight.write_background": "#CFCFDE", + "editor.document_highlight.bracket_background": "#644AC925", + "editor.indent_guide": "#1F1F1F30", + "editor.indent_guide_active": "#644AC960", + "link_text.hover": "#036A96", + "conflict": "#dec184ff", + "conflict.background": "#dec18433", + "conflict.border": "#5d4c2fff", + "created": "#5b9c54ff", + "created.background": "#222e1dff", + "created.border": "#38482fff", + "deleted": "#db756aff", + "deleted.background": "#ddddddee", + "deleted.border": "#db756aff", + "error": "#b83233ff", + "error.background": "#ddddddee", + "error.border": "#993a27ff", + "hidden": "#414754ff", + "hidden.background": "#ddddddee", + "hidden.border": "#414754ff", + "hint": "#635D97", + "hint.background": "#f0f0f0ee", + "hint.border": "#635D97", + "ignored": "#1F1F1F70", + "ignored.background": "#4a4a4aff", + "ignored.border": "#1F1F1F50", + "info": "#0067a1ff", + "info.background": "#f0f0f0ee", + "info.border": "#0067a1ff", + "modified": "#4f97b6ff", + "modified.background": "#f0f0f0ee", + "modified.border": "#4f97b6ff", + "predictive": "#575757ff", + "predictive.background": "#f0f0f0ee", + "predictive.border": "#575757ff", + "renamed": "#036A96", + "renamed.background": "#f0f0f0ee", + "renamed.border": "#036A96", + "success": "#1b7108ff", + "success.background": "#f0f0f0ee", + "success.border": "#1b7108ff", + "unreachable": "#575757ff", + "unreachable.background": "#f0f0f0ee", + "unreachable.border": "#575757ff", + "warning": "#ccb517ff", + "warning.background": "#f0f0f0ee", + "warning.border": "#984f00", + "players": [ + { + "cursor": "#644AC9", + "background": "#644AC9", + "selection": "#644AC933" + }, + { + "cursor": "#14710A", + "background": "#14710A", + "selection": "#14710A33" + }, + { + "cursor": "#A3144D", + "background": "#A3144D", + "selection": "#A3144D33" + }, + { + "cursor": "#846E15", + "background": "#846E15", + "selection": "#846E1533" + }, + { + "cursor": "#036A96", + "background": "#036A96", + "selection": "#036A9633" + }, + { + "cursor": "#A34D14", + "background": "#A34D14", + "selection": "#A34D1433" + }, + { + "cursor": "#CB3A2A", + "background": "#CB3A2A", + "selection": "#CB3A2A33" + } + ], + "syntax": { + "attribute": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "boolean": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "comment": { + "color": "#635D97", + "font_style": null, + "font_weight": null + }, + "comment.doc": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "constant": { + "color": "#644AC9", + "font_style": null, + "font_weight": null + }, + "constructor": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "embedded": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "emphasis": { + "color": "#846E15", + "font_style": "italic", + "font_weight": null + }, + "emphasis.strong": { + "color": "#A34D14", + "font_style": null, + "font_weight": 700 + }, + "enum": { + "color": "#644AC9", + "font_style": null, + "font_weight": null + }, + "function": { + "color": "#14710A", + "font_style": null, + "font_weight": null + }, + "hint": { + "color": "#644AC9", + "font_style": null, + "font_weight": 700 + }, + "keyword": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "label": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "link_text": { + "color": "#A3144D", + "font_style": "normal", + "font_weight": null + }, + "link_uri": { + "color": "#036A96", + "font_style": null, + "font_weight": null + }, + "number": { + "color": "#644AC9", + "font_style": null, + "font_weight": null + }, + "operator": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "predictive": { + "color": "#191919ff", + "font_style": "italic", + "font_weight": null + }, + "preproc": { + "color": "#635D97", + "font_style": null, + "font_weight": null + }, + "primary": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "property": { + "color": "#036A96", + "font_style": null, + "font_weight": null + }, + "punctuation": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "punctuation.bracket": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "punctuation.delimiter": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "punctuation.list_marker": { + "color": "#036A96", + "font_style": null, + "font_weight": null + }, + "punctuation.special": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "string": { + "color": "#846E15", + "font_style": null, + "font_weight": null + }, + "string.escape": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "string.regex": { + "color": "#CB3A2A", + "font_style": null, + "font_weight": null + }, + "string.special": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "string.special.symbol": { + "color": "#644AC9", + "font_style": null, + "font_weight": null + }, + "tag": { + "color": "#A3144D", + "font_style": null, + "font_weight": null + }, + "text.literal": { + "color": "#14710A", + "font_style": null, + "font_weight": null + }, + "title": { + "color": "#644AC9", + "font_style": null, + "font_weight": 600 + }, + "type": { + "color": "#036A96", + "font_style": null, + "font_weight": null + }, + "type.interface": { + "color": "#036A96", + "font_style": "italic", + "font_weight": null + }, + "type.super": { + "color": "#036A96", + "font_style": "italic", + "font_weight": null + }, + "variable": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "variable.member": { + "color": "#1F1F1F", + "font_style": null, + "font_weight": null + }, + "variable.parameter": { + "color": "#A34D14", + "font_style": "italic", + "font_weight": null + }, + "variable.special": { + "color": "#644AC9", + "font_style": "italic", + "font_weight": null + }, + "variant": { + "color": "#644AC9", + "font_style": null, + "font_weight": null + } + }, + "terminal.background": "#f3f3f3ff", + "terminal.foreground": "#1F1F1F", + "terminal.bright_foreground": "#1D1D1D", + "terminal.dim_foreground": "#655C95", + "terminal.ansi.background": "#f3f3f3ff", + "terminal.ansi.black": "#F5F5F5", + "terminal.ansi.bright_black": "#928eb6ff", + "terminal.ansi.dim_black": "#1D1D1D", + "terminal.ansi.red": "#CB3A2A", + "terminal.ansi.bright_red": "#D74C3D", + "terminal.ansi.dim_red": "#D74B3B", + "terminal.ansi.green": "#14710A", + "terminal.ansi.bright_green": "#198D0C", + "terminal.ansi.dim_green": "#D74B3B", + "terminal.ansi.yellow": "#846E15", + "terminal.ansi.bright_yellow": "#9E841A", + "terminal.ansi.dim_yellow": "#D74B3B", + "terminal.ansi.blue": "#644AC9", + "terminal.ansi.bright_blue": "#7862D0", + "terminal.ansi.dim_blue": "#D74B3B", + "terminal.ansi.magenta": "#A3144D", + "terminal.ansi.bright_magenta": "#BF185A", + "terminal.ansi.dim_magenta": "#D74B3B", + "terminal.ansi.cyan": "#036A96", + "terminal.ansi.bright_cyan": "#047FB4", + "terminal.ansi.dim_cyan": "#D74B3B", + "terminal.ansi.white": "#1F1F1F", + "terminal.ansi.bright_white": "#2C2B31", + "terminal.ansi.dim_white": "#D74B3B", + "vim.normal.background": "#036A96", + "vim.insert.background": "#14710A", + "vim.replace.background": "#CB3A2A", + "vim.visual.background": "#644AC9", + "vim.visual_line.background": "#644AC9", + "vim.visual_block.background": "#644AC9", + "vim.helix_normal.background": "#036A96", + "vim.helix_select.background": "#14710A", + "vim.mode.text": "#F5F5F5" + } + } + ] +} diff --git a/.pacman.list b/.pacman.list index 8eb9f6f..fabf0e9 100644 --- a/.pacman.list +++ b/.pacman.list @@ -1,8 +1,6 @@ 1password +7zip accountsservice -adobe-source-han-sans-cn-fonts -adobe-source-han-sans-jp-fonts -adobe-source-han-sans-kr-fonts alsa-firmware alsa-plugins alsa-utils @@ -10,8 +8,6 @@ awesome-terminal-fonts base base-devel bash-completion -bemenu -bemenu-wayland bind bluez bluez-hid2hci @@ -23,14 +19,11 @@ btrfs-progs cachyos-fish-config cachyos-gaming-applications cachyos-gaming-meta -cachyos-grub-theme cachyos-hello cachyos-hooks -cachyos-hyprland-settings cachyos-kernel-manager cachyos-keyring cachyos-mirrorlist -cachyos-nord-gtk-theme-git cachyos-packageinstaller cachyos-rate-mirrors cachyos-settings @@ -38,14 +31,13 @@ cachyos-snapper-support cachyos-v3-mirrorlist cachyos-v4-mirrorlist cachyos-wallpapers -capitaine-cursors +cantarell-fonts chwd cpupower cryptsetup device-mapper dhclient diffutils -discord dmidecode dmraid dnsmasq @@ -64,10 +56,10 @@ firefox fsarchiver git glances +go godot gparted -grimblast-git -gslapper +greetd gst-libav gst-plugin-pipewire gst-plugin-va @@ -75,13 +67,12 @@ gst-plugins-bad gst-plugins-ugly haveged hdparm -htop hwdetect hwinfo hypridle hyprland +hyprland-protocols hyprlock -hyprpaper inetutils intel-media-driver intel-ucode @@ -89,9 +80,6 @@ iptables-nft iwd jfsutils kitty -kvantum -kvantum-theme-nordic-git -lazygit less lib32-mesa lib32-nvidia-utils @@ -128,8 +116,8 @@ mtools mumble nano nano-syntax-highlighting -nautilus netctl +network-manager-applet networkmanager networkmanager-openvpn nfs-utils @@ -143,22 +131,20 @@ ntp nvidia-prime nvidia-settings nvidia-utils -nwg-displays nwg-look obsidian octopi opencl-nvidia -opendesktop-fonts openssh os-prober pacman-contrib -pamixer paru pavucontrol perl pipewire-alsa pipewire-pulse pkgfile +playerctl plocate polkit-kde-agent poppler-glib @@ -167,34 +153,27 @@ pv python python-defusedxml python-packaging -qt5ct rebuild-detector reflector +resvg ripgrep rofi -rofi-emoji rsync rtkit s-nail sddm sg3_utils -slurp smartmontools snapper sof-firmware spotify-player -spotifyd stow sudo -swappy -swaybg -swaylock-effects-git -swaylock-fancy-git switcheroo-control swww -sysc-greet-hyprland sysfsutils texinfo +trash-cli ttf-bitstream-vera ttf-dejavu ttf-liberation @@ -209,6 +188,7 @@ usbutils uwsm vi vlc-plugins-all +vpl-gpu-rt vulkan-intel waybar wget @@ -218,9 +198,9 @@ wireplumber wl-clipboard wlogout wob -wofi wpa_supplicant xdg-desktop-portal-hyprland +xdg-desktop-portal-termfilechooser-hunkyburrito-git xdg-user-dirs xf86-input-libinput xfsprogs @@ -232,4 +212,6 @@ xorg-xinput xorg-xkill xorg-xrandr xorg-xwayland +yazi zed +zoxide