diff --git a/dot_config/sway/config b/dot_config/sway/config index 9fbce79..3301244 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -111,8 +111,7 @@ floating_modifier $mod normal bindsym $mod+Shift+r reload # Exit sway (logs you out of your Wayland session) -# bindsym $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu -bindsym $mod+q exec wlogout -p layer-shell +bindsym $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' bindsym $mod+$left focus left @@ -410,7 +409,7 @@ set $ws1ids "footclient|kitty|foot" for_window [app_id=$ws1ids] workspace $ws1 assign [app_id=$ws1ids] $ws1 -set $ws2ids "LibreWolf|firefox|zen" +set $ws2ids "LibreWolf|firefox" for_window [app_id=$ws2ids] workspace $ws2 assign [app_id=$ws2ids] $ws2 diff --git a/dot_config/swayimg/config b/dot_config/swayimg/config deleted file mode 100644 index f32758e..0000000 --- a/dot_config/swayimg/config +++ /dev/null @@ -1,223 +0,0 @@ -# Swayimg configuration file. -# vim: filetype=dosini - -# This file contains the default configuration. -# The viewer searches for the config file in the following locations: -# 1. $XDG_CONFIG_HOME/swayimg/config -# 2. $HOME/.config/swayimg/config -# 3. $XDG_CONFIG_DIRS/swayimg/config -# 4. /etc/xdg/swayimg/config - -# Any of these options can be overridden using the --config argument -# on the command line, for instance: -# $ swayimg --config="general.mode=gallery" - -################################################################################ -# General configuration -################################################################################ -[general] -# Mode at startup (viewer/gallery) -mode = viewer -# Window position (parent or absolute coordinates, e.g. 100,200) -position = parent -# Window size (fullscreen/parent/image, or absolute size, e.g. 800,600) -size = parent -# Use window decoration (yes/no) -decoration = no -# Action performed by SIGUSR1 signal (same format as for key bindings) -sigusr1 = reload -# Action performed by SIGUSR2 signal (same format as for key bindings) -sigusr2 = next_file -# Application ID and window class name -app_id = swayimg - -################################################################################ -# Viewer mode configuration -################################################################################ -[viewer] -# Window background color (RGBA) -window = #00000000 -# Background for transparent images (grid/RGBA) -transparency = grid -# Default image scale (optimal/fit/width/height/fill/real) -scale = optimal -# Fix position of the image on the window surface (yes/no) -fixed = yes -# Anti-aliasing mode (none/box/bilinear/bicubic/mks13) -antialiasing = mks13 -# Run slideshow at startup (yes/no) -slideshow = no -# Slideshow image display time (seconds) -slideshow_time = 3 -# Number of previously viewed images to store in cache -history = 1 -# Number of preloaded images (read ahead) -preload = 1 - -################################################################################ -# Gallery mode configuration -################################################################################ -[gallery] -# Size of the thumbnail (pixels) -size = 200 -# Max number of thumbnails in memory cache, 0 for unlimited -cache = 100 -# Enable/disable storing thumbnails in persistent storage (yes/no) -pstore = no -# Fill the entire tile with thumbnail (yes/no) -fill = yes -# Anti-aliasing mode for thumbnails (none/box/bilinear/bicubic/mks13) -antialiasing = mks13 -# Background color of the window (RGBA) -window = #00000000 -# Background color of the tile (RGBA) -background = #202020ff -# Background color of the selected tile (RGBA) -select = #404040ff -# Border color of the selected tile (RGBA) -border = #000000ff -# Shadow color of the selected tile (RGBA) -shadow = #000000ff - -################################################################################ -# Image list configuration -################################################################################ -[list] -# Default order (none/alpha/reverse/random) -order = alpha -# Looping list of images (yes/no) -loop = yes -# Read directories recursively (yes/no) -recursive = no -# Open all files in the directory of the specified file (yes/no) -all = yes - -################################################################################ -# Font configuration -################################################################################ -[font] -# Font name -name = monospace -# Font size (pt) -size = 14 -# Font color (RGBA) -color = #ccccccff -# Shadow color (RGBA) -shadow = #000000a0 - -################################################################################ -# Image meta info scheme (format, size, EXIF, etc) -################################################################################ -[info] -# Show on startup (yes/no) -show = yes -# Timeout to hide info (seconds, 0 to always show) -info_timeout = 5 -# Timeout to hide status message (seconds) -status_timeout = 3 - -# Display scheme for viewer mode (position = content) -[info.viewer] -top_left = +name,+format,+filesize,+imagesize,+exif -top_right = index -bottom_left = scale,frame -bottom_right = status - -# Display scheme for gallery mode (position = content) -[info.gallery] -top_left = none -top_right = none -bottom_left = none -bottom_right = name,status - -################################################################################ -# Viewer mode key binding configuration: key = action [parameters] -################################################################################ -[keys.viewer] -F1 = help -Home = first_file -End = last_file -Prior = prev_file -Next = next_file -Space = next_file -h = prev_file -j = next_file -k = prev_file -l = next_file -Shift+d = prev_dir -d = next_dir -Shift+o = prev_frame -o = next_frame -c = skip_file -Shift+s = slideshow -s = animation -f = fullscreen -Return = mode -Left = step_left 10 -Right = step_right 10 -Up = step_up 10 -Down = step_down 10 -Equal = zoom +10 -Plus = zoom +10 -Minus = zoom -10 -w = zoom width -Shift+w = zoom height -z = zoom fit -Shift+z = zoom fill -0 = zoom real -BackSpace = zoom optimal -bracketleft = rotate_left -bracketright = rotate_right -m = flip_vertical -Shift+m = flip_horizontal -a = antialiasing -r = reload -i = info -Shift+Delete = exec rm "%"; skip_file -Escape = exit -q = exit -# Mouse related -ScrollLeft = step_right 5 -ScrollRight = step_left 5 -ScrollUp = prev_file -ScrollDown = next_file -Alt+s = scale -Alt+z = keep_zoom -Ctrl+ScrollUp = zoom +10 -Ctrl+ScrollDown = zoom -10 -Alt+ScrollUp = prev_frame -Alt+ScrollDown = next_frame -Shift+ScrollUp = step_up 5 -Shift+ScrollDown = step_down 5 - -################################################################################ -# Gallery mode key binding configuration: key = action [parameters] -################################################################################ -[keys.gallery] -F1 = help -Home = first_file -End = last_file -Left = step_left -Right = step_right -Up = step_up -Down = step_down -l = step_right -h = step_left -k = step_up -j = step_down -Prior = page_up -Next = page_down -c = skip_file -f = fullscreen -Return = mode -a = antialiasing -r = reload -i = info -Shift+Delete = exec rm "%"; skip_file -Escape = exit -q = exit -# Mouse related -ScrollLeft = step_right -ScrollRight = step_left -ScrollUp = step_up -ScrollDown = step_down diff --git a/dot_config/yazi/keymap.toml b/dot_config/yazi/keymap.toml index fcd393a..a6ec8e9 100644 --- a/dot_config/yazi/keymap.toml +++ b/dot_config/yazi/keymap.toml @@ -42,27 +42,22 @@ keymap = [ { on = "H", run = "back", desc = "Go back to the previous directory" }, { on = "L", run = "forward", desc = "Go forward to the next directory" }, - # Toggle - { on = "", run = [ "toggle", "arrow 1" ], 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" }, + # Selection + { on = "", run = [ "toggle --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, + { on = "v", run = "visual_mode", desc = "Enter visual mode (selection mode)" }, + { on = "V", run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, + { on = "", run = "toggle_all --state=true", desc = "Select all files" }, + { on = "", run = "toggle_all --state=none", desc = "Inverse selection of all files" }, # Operation { on = "o", run = "open", desc = "Open selected files" }, { on = "O", run = "open --interactive", desc = "Open selected files interactively" }, - { on = "", run = "enter", desc = "Open selected files" }, - { on = "", run = "enter", 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" }, @@ -79,22 +74,19 @@ keymap = [ { 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 using fd" }, - { on = "S", run = "search --via=rg", desc = "Search files by content using ripgrep" }, + { on = "s", run = "search fd", desc = "Search files by name using fd" }, + { on = "S", run = "search rg", desc = "Search files by content using ripgrep" }, { on = "", run = "escape --search", desc = "Cancel the ongoing search" }, { on = "z", run = "plugin zoxide", desc = "Jump to a directory using zoxide" }, { on = "Z", run = "plugin fzf", desc = "Jump to a directory or reveal a file using fzf" }, - { on = [ "" ], run = ''' - shell 'ripdrag "$@" -x 2>/dev/null &' --confirm - ''' }, # 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" }, + { on = [ "m", "s" ], run = "linemode size", desc = "Set linemode to size" }, + { on = [ "m", "p" ], run = "linemode permissions", desc = "Set linemode to permissions" }, + { on = [ "m", "c" ], run = "linemode ctime", desc = "Set linemode to ctime" }, + { on = [ "m", "m" ], run = "linemode mtime", desc = "Set linemode to mtime" }, + { on = [ "m", "o" ], run = "linemode owner", desc = "Set linemode to owner" }, + { on = [ "m", "n" ], run = "linemode none", desc = "Set linemode to none" }, # Copy { on = [ "c", "c" ], run = "copy path", desc = "Copy the file path" }, @@ -112,10 +104,10 @@ keymap = [ { on = "N", run = "find_arrow --previous", desc = "Go to the 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 = [ ",", "c" ], run = [ "sort btime --reverse=no", "linemode btime" ], desc = "Sort by birth time" }, - { on = [ ",", "C" ], run = [ "sort btime --reverse", "linemode btime" ], desc = "Sort by birth time (reverse)" }, + { on = [ ",", "m" ], run = [ "sort modified --reverse=no", "linemode mtime" ], desc = "Sort by modified time" }, + { on = [ ",", "M" ], run = [ "sort modified --reverse", "linemode mtime" ], desc = "Sort by modified time (reverse)" }, + { on = [ ",", "c" ], run = [ "sort created --reverse=no", "linemode ctime" ], desc = "Sort by created time" }, + { on = [ ",", "C" ], run = [ "sort created --reverse", "linemode ctime" ], desc = "Sort by created 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" }, @@ -157,6 +149,9 @@ keymap = [ # Help { on = "~", run = "help", desc = "Open help" }, { on = "", run = "help", desc = "Open help" }, + { on = [ "" ], run = ''' + shell 'ripdrag "$@" -x 2>/dev/null &' --confirm + ''' }, ] [tasks] @@ -181,39 +176,13 @@ keymap = [ { on = "", run = "help", desc = "Open help" }, ] -[spot] +[select] 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 -1", desc = "Move cursor up" }, - { on = "j", run = "arrow 1", desc = "Move cursor down" }, - { on = "h", run = "swipe -1", desc = "Swipe to the next file" }, - { on = "l", run = "swipe 1", desc = "Swipe to the previous file" }, - - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, - { on = "", run = "swipe -1", desc = "Swipe to the next file" }, - { on = "", run = "swipe 1", desc = "Swipe to the previous 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 = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close", desc = "Cancel selection" }, + { on = "", run = "close --submit", desc = "Submit the selection" }, { on = "k", run = "arrow -1", desc = "Move cursor up" }, { on = "j", run = "arrow 1", desc = "Move cursor down" }, @@ -296,28 +265,6 @@ keymap = [ { 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 -1", desc = "Move cursor up" }, - { on = "j", run = "arrow 1", desc = "Move cursor down" }, - - { on = "", run = "arrow -1", desc = "Move cursor up" }, - { on = "", run = "arrow 1", desc = "Move cursor down" }, - - # Help - { on = "~", run = "help", desc = "Open help" }, - { on = "", run = "help", desc = "Open help" }, -] - [completion] keymap = [ diff --git a/dot_config/yazi/yazi.toml b/dot_config/yazi/yazi.toml index d49ba2d..bbd77a0 100644 --- a/dot_config/yazi/yazi.toml +++ b/dot_config/yazi/yazi.toml @@ -17,7 +17,6 @@ mouse_events = [ "click", "scroll" ] title_format = "Yazi: {cwd}" [preview] -wrap = "no" tab_size = 2 max_width = 600 max_height = 900 @@ -91,19 +90,6 @@ fetchers = [ # Mimetype { id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" }, ] -spotters = [ - { name = "*/", run = "folder" }, - # Code - { mime = "text/*", run = "code" }, - { mime = "*/{xml,javascript,wine-extension-ini}", run = "code" }, - # Image - { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, - { mime = "image/*", run = "image" }, - # Video - { mime = "video/*", run = "video" }, - # Fallback - { name = "*", run = "file" }, -] preloaders = [ # Image { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, @@ -114,15 +100,15 @@ preloaders = [ { mime = "application/pdf", run = "pdf" }, # Font { mime = "font/*", run = "font" }, - { mime = "application/ms-opentype", run = "font" }, + { mime = "application/vnd.ms-opentype", run = "font" }, ] previewers = [ { name = "*/", run = "folder", sync = true }, # Code { mime = "text/*", run = "code" }, - { mime = "*/{xml,javascript,wine-extension-ini}", run = "code" }, + { mime = "*/{xml,javascript,x-wine-extension-ini}", run = "code" }, # JSON - { mime = "application/{json,ndjson}", run = "json" }, + { mime = "application/{json,x-ndjson}", run = "json" }, # Image { mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" }, { mime = "image/*", run = "image" }, @@ -131,18 +117,13 @@ previewers = [ # 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" }, + { mime = "application/{,g}zip", run = "archive" }, + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar,iso9660-image}", run = "archive" }, # Font { mime = "font/*", run = "font" }, - { mime = "application/ms-opentype", run = "font" }, + { mime = "application/vnd.ms-opentype", run = "font" }, # Empty file - { mime = "inode/empty", run = "empty" }, + { mime = "inode/x-empty", run = "empty" }, # Fallback { name = "*", run = "file" }, ] @@ -156,7 +137,7 @@ cd_origin = "top-center" cd_offset = [ 0, 2, 50, 3 ] # create -create_title = [ "Create:", "Create (dir):" ] +create_title = ["Create:", "Create (dir):"] create_origin = "top-center" create_offset = [ 0, 2, 50, 3 ] @@ -165,6 +146,16 @@ rename_title = "Rename:" rename_origin = "hovered" rename_offset = [ 0, 1, 50, 3 ] +# trash +trash_title = "Move {n} selected file{s} to trash? (y/N)" +trash_origin = "top-center" +trash_offset = [ 0, 2, 50, 3 ] + +# delete +delete_title = "Delete {n} selected file{s} permanently? (y/N)" +delete_origin = "top-center" +delete_offset = [ 0, 2, 50, 3 ] + # filter filter_title = "Filter:" filter_origin = "top-center" @@ -185,30 +176,17 @@ 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 ] +overwrite_title = "Overwrite an existing file? (y/N)" +overwrite_origin = "top-center" +overwrite_offset = [ 0, 2, 50, 3 ] # quit -quit_title = "Quit?" -quit_content = "The following task is still running, are you sure you want to quit?" -quit_origin = "center" -quit_offset = [ 0, 0, 50, 15 ] +quit_title = "{n} task{s} running, sure to quit? (y/N)" +quit_origin = "top-center" +quit_offset = [ 0, 2, 50, 3 ] -[pick] +[select] open_title = "Open with:" open_origin = "hovered" open_offset = [ 0, 1, 50, 7 ] @@ -218,3 +196,6 @@ sort_by = "none" sort_sensitive = false sort_reverse = false sort_translit = false + +[log] +enabled = false