From 239e0a407a9cab35ac0d67bb72ee54ea00f76cc1 Mon Sep 17 00:00:00 2001 From: Amolith Date: Thu, 31 Aug 2023 12:52:08 -0400 Subject: [PATCH] add joshuta config --- dot_config/joshuto/joshuto.toml | 1 + dot_config/joshuto/keymap.toml | 172 +++++++++++++++++++++++++ dot_config/joshuto/mimetype.toml | 208 +++++++++++++++++++++++++++++++ 3 files changed, 381 insertions(+) create mode 100644 dot_config/joshuto/joshuto.toml create mode 100644 dot_config/joshuto/keymap.toml create mode 100644 dot_config/joshuto/mimetype.toml diff --git a/dot_config/joshuto/joshuto.toml b/dot_config/joshuto/joshuto.toml new file mode 100644 index 0000000000000000000000000000000000000000..806ff8bd10c7c6084f2b92be44f33bbc1eec8fca --- /dev/null +++ b/dot_config/joshuto/joshuto.toml @@ -0,0 +1 @@ +use_trash = true diff --git a/dot_config/joshuto/keymap.toml b/dot_config/joshuto/keymap.toml new file mode 100644 index 0000000000000000000000000000000000000000..a5c2f1289aa434f8c8648fc10eebf50e2355d6a3 --- /dev/null +++ b/dot_config/joshuto/keymap.toml @@ -0,0 +1,172 @@ +[default_view] + +keymap = [ + { keys = ["escape"], commands = ["escape"] }, + { keys = ["ctrl+t"], commands = ["new_tab"] }, + { keys = ["alt+t"], commands = ["new_tab --cursor"] }, + { keys = ["T"], commands = ["new_tab --current"] }, + { keys = ["W"], commands = ["close_tab"] }, + { keys = ["ctrl+w"], commands = ["close_tab"] }, + { keys = ["q"], commands = ["close_tab"] }, + { keys = ["ctrl+c"], commands = ["quit"] }, + { keys = ["Q"], commands = ["quit --output-current-directory"] }, + + { keys = ["R"], commands = ["reload_dirlist"] }, + { keys = ["z", "h"], commands = ["toggle_hidden"] }, + { keys = ["ctrl+h"], commands = ["toggle_hidden"] }, + { keys = ["\t"], commands = ["tab_switch 1"] }, + { keys = ["backtab"], commands = ["tab_switch -1"] }, + + { keys = ["alt+1"], commands = ["tab_switch_index 1"] }, + { keys = ["alt+2"], commands = ["tab_switch_index 2"] }, + { keys = ["alt+3"], commands = ["tab_switch_index 3"] }, + { keys = ["alt+4"], commands = ["tab_switch_index 4"] }, + { keys = ["alt+5"], commands = ["tab_switch_index 5"] }, + + { keys = ["1"], commands = ["numbered_command 1"] }, + { keys = ["2"], commands = ["numbered_command 2"] }, + { keys = ["3"], commands = ["numbered_command 3"] }, + { keys = ["4"], commands = ["numbered_command 4"] }, + { keys = ["5"], commands = ["numbered_command 5"] }, + { keys = ["6"], commands = ["numbered_command 6"] }, + { keys = ["7"], commands = ["numbered_command 7"] }, + { keys = ["8"], commands = ["numbered_command 8"] }, + { keys = ["9"], commands = ["numbered_command 9"] }, + + # arrow keys + { keys = ["arrow_up"], commands = ["cursor_move_up"] }, + { keys = ["arrow_down"], commands = ["cursor_move_down"] }, + { keys = ["arrow_left"], commands = ["cd .."] }, + { keys = ["arrow_right"], commands = ["open"] }, + { keys = ["\n"], commands = ["open"] }, + { keys = ["home"], commands = ["cursor_move_home"] }, + { keys = ["end"], commands = ["cursor_move_end"] }, + { keys = ["page_up"], commands = ["cursor_move_page_up"] }, + { keys = ["page_down"], commands = ["cursor_move_page_down"] }, + { keys = ["ctrl+u"], commands = ["cursor_move_page_up 0.5"] }, + { keys = ["ctrl+d"], commands = ["cursor_move_page_down 0.5"] }, + { keys = ["ctrl+b"], commands = ["cursor_move_page_up"] }, + { keys = ["ctrl+f"], commands = ["cursor_move_page_down"] }, + + # vim-like keybindings + { keys = ["j"], commands = ["cursor_move_down"] }, + { keys = ["k"], commands = ["cursor_move_up"] }, + { keys = ["h"], commands = ["cd .."] }, + { keys = ["l"], commands = ["open"] }, + { keys = ["g", "g"], commands = ["cursor_move_home"] }, + { keys = ["G"], commands = ["cursor_move_end"] }, + { keys = ["r"], commands = ["open_with"] }, + + { keys = ["H"], commands = ["cursor_move_page_home"] }, + { keys = ["L"], commands = ["cursor_move_page_middle"] }, + { keys = ["M"], commands = ["cursor_move_page_end"] }, + + { keys = ["["], commands = ["parent_cursor_move_up"] }, + { keys = ["]"], commands = ["parent_cursor_move_down"] }, + + { keys = ["c", "d"], commands = [":cd "] }, + { keys = ["d", "d"], commands = ["cut_files"] }, + { keys = ["y", "y"], commands = ["copy_files"] }, + { keys = ["y", "n"], commands = ["copy_filename"] }, + { keys = ["y", "."], commands = ["copy_filename_without_extension"] }, + { keys = ["y", "p"], commands = ["copy_filepath"] }, + { keys = ["y", "a"], commands = ["copy_filepath --all-selected=true"] }, + { keys = ["y", "d"], commands = ["copy_dirpath"] }, + + { keys = ["p", "l"], commands = ["symlink_files --relative=false"] }, + { keys = ["p", "L"], commands = ["symlink_files --relative=true"] }, + + { keys = ["delete"], commands = ["delete_files --noconfirm"] }, + { keys = ["d", "D"], commands = ["delete_files --noconfirm"] }, + + { keys = ["p", "p"], commands = ["paste_files"] }, + { keys = ["p", "o"], commands = ["paste_files --overwrite=true"] }, + + { keys = ["a"], commands = ["rename_append"] }, + { keys = ["A"], commands = ["rename_prepend"] }, + + { keys = ["f", "t"], commands = [":touch "] }, + + { keys = [" "], commands = ["select --toggle=true"] }, + { keys = ["t"], commands = ["select --all=true --toggle=true"] }, + { keys = ["V"], commands = ["toggle_visual"] }, + + { keys = ["w"], commands = ["show_tasks --exit-key=w"] }, + { keys = ["b", "b"], commands = ["bulk_rename"] }, + { keys = ["="], commands = ["set_mode"] }, + + { keys = [":"], commands = [":"] }, + { keys = [";"], commands = [":"] }, + + { keys = ["'"], commands = [":shell "] }, + { keys = ["m", "k"], commands = [":mkdir "] }, + { keys = ["c", "w"], commands = [":rename "] }, + + { keys = ["/"], commands = [":search "] }, + { keys = ["|"], commands = [":search_inc "] }, + { keys = ["\\"], commands = [":search_glob "] }, + { keys = ["S"], commands = ["search_fzf"] }, + { keys = ["C"], commands = ["subdir_fzf"] }, + + { keys = ["n"], commands = ["search_next"] }, + { keys = ["N"], commands = ["search_prev"] }, + + { keys = ["s", "r"], commands = ["sort reverse"] }, + { keys = ["s", "l"], commands = ["sort lexical"] }, + { keys = ["s", "m"], commands = ["sort mtime"] }, + { keys = ["s", "n"], commands = ["sort natural"] }, + { keys = ["s", "s"], commands = ["sort size"] }, + { keys = ["s", "e"], commands = ["sort ext"] }, + + { keys = ["m", "s"], commands = ["linemode size"] }, + { keys = ["m", "m"], commands = ["linemode mtime"] }, + { keys = ["m", "M"], commands = ["linemode size | mtime"] }, + { keys = ["m", "u"], commands = ["linemode user"] }, + { keys = ["m", "U"], commands = ["linemode user | group"] }, + { keys = ["m", "p"], commands = ["linemode perm"] }, + + { keys = ["g", "r"], commands = ["cd /"] }, + { keys = ["g", "c"], commands = ["cd ~/.config"] }, + { keys = ["g", "d"], commands = ["cd ~/Downloads"] }, + { keys = ["g", "e"], commands = ["cd /etc"] }, + { keys = ["g", "h"], commands = ["cd ~/"] }, + { keys = ["?"], commands = ["help"] }, +] + +[task_view] + +keymap = [ + # arrow keys + { keys = ["arrow_up"], commands = ["cursor_move_up"] }, + { keys = ["arrow_down"], commands = ["cursor_move_down"] }, + { keys = ["home"], commands = ["cursor_move_home"] }, + { keys = ["end"], commands = ["cursor_move_end"] }, + + # vim-like keybindings + { keys = ["j"], commands = ["cursor_move_down"] }, + { keys = ["k"], commands = ["cursor_move_up"] }, + { keys = ["g", "g"], commands = ["cursor_move_home"] }, + { keys = ["G"], commands = ["cursor_move_end"] }, + + { keys = ["w"], commands = ["show_tasks"] }, + { keys = ["escape"], commands = ["show_tasks"] }, +] + +[help_view] + +keymap = [ + # arrow keys + { keys = ["arrow_up"], commands = ["cursor_move_up"] }, + { keys = ["arrow_down"], commands = ["cursor_move_down"] }, + { keys = ["home"], commands = ["cursor_move_home"] }, + { keys = ["end"], commands = ["cursor_move_end"] }, + + # vim-like keybindings + { keys = ["j"], commands = ["cursor_move_down"] }, + { keys = ["k"], commands = ["cursor_move_up"] }, + { keys = ["g", "g"], commands = ["cursor_move_home"] }, + { keys = ["G"], commands = ["cursor_move_end"] }, + + { keys = ["w"], commands = ["show_tasks"] }, + { keys = ["escape"], commands = ["show_tasks"] }, +] diff --git a/dot_config/joshuto/mimetype.toml b/dot_config/joshuto/mimetype.toml new file mode 100644 index 0000000000000000000000000000000000000000..30970f3128ff3e6373131f8e04065f739af0950b --- /dev/null +++ b/dot_config/joshuto/mimetype.toml @@ -0,0 +1,208 @@ +[class] +audio_default = [ + { command = "mpv", args = ["--",] }, + { command = "mediainfo", confirm_exit = true }, +] + +image_default = [ + { command = "sxiv", args = ["--",], fork = true, silent = true }, + { command = "krita", args = ["--",], fork = true, silent = true }, + { command = "exiftool", confirm_exit = true }, + { command = "swappy", args = ["-f",], fork = true }, +] + +video_default = [ + { command = "mpv", args = ["--",], fork = true, silent = true }, + { command = "mediainfo", confirm_exit = true }, + { command = "mpv", args = ["--mute", "on", "--",], fork = true, silent = true }, +] + +text_default = [ + { command = "micro" }, + { command = "gedit", fork = true, silent = true }, + { command = "bat", args = ["--paging=always",] }, +] + +reader_default = [{ command = "evince", fork = true, silent = true }] + +libreoffice_default = [{ command = "libreoffice", fork = true, silent = true }] + +[extension] + +## image formats +avif.inherit = "image_default" +bmp.inherit = "image_default" +gif.inherit = "image_default" +heic.inherit = "image_default" +jpeg.inherit = "image_default" +jpe.inherit = "image_default" +jpg.inherit = "image_default" +jxl.inherit = "image_default" +pgm.inherit = "image_default" +png.inherit = "image_default" +ppm.inherit = "image_default" +webp.inherit = "image_default" + +svg.app_list = [ + { command = "inkview", fork = true, silent = true }, + { command = "inkscape", fork = true, silent = true }, +] +tiff.app_list = [ + { command = "qimgv", fork = true, silent = true }, + { command = "krita", fork = true, silent = true }, +] + +## audio formats +aac.inherit = "audio_default" +ac3.inherit = "audio_default" +aiff.inherit = "audio_default" +ape.inherit = "audio_default" +dts.inherit = "audio_default" +flac.inherit = "audio_default" +m4a.inherit = "audio_default" +mp3.inherit = "audio_default" +oga.inherit = "audio_default" +ogg.inherit = "audio_default" +opus.inherit = "audio_default" +wav.inherit = "audio_default" +wv.inherit = "audio_default" + +## video formats +avi.inherit = "video_default" +av1.inherit = "video_default" +flv.inherit = "video_default" +mkv.inherit = "video_default" +m4v.inherit = "video_default" +mov.inherit = "video_default" +mp4.inherit = "video_default" +ts.inherit = "video_default" +webm.inherit = "video_default" +wmv.inherit = "video_default" + +## text formats +build.inherit = "text_default" +c.inherit = "text_default" +cmake.inherit = "text_default" +conf.inherit = "text_default" +cpp.inherit = "text_default" +css.inherit = "text_default" +csv.inherit = "text_default" +cu.inherit = "text_default" +ebuild.inherit = "text_default" +eex.inherit = "text_default" +env.inherit = "text_default" +ex.inherit = "text_default" +exs.inherit = "text_default" +go.inherit = "text_default" +h.inherit = "text_default" +hpp.inherit = "text_default" +hs.inherit = "text_default" +html.inherit = "text_default" +ini.inherit = "text_default" +java.inherit = "text_default" +js.inherit = "text_default" +json.inherit = "text_default" +kt.inherit = "text_default" +lua.inherit = "text_default" +log.inherit = "text_default" +md.inherit = "text_default" +micro.inherit = "text_default" +ninja.inherit = "text_default" +py.inherit = "text_default" +rkt.inherit = "text_default" +rs.inherit = "text_default" +scss.inherit = "text_default" +sh.inherit = "text_default" +srt.inherit = "text_default" +svelte.inherit = "text_default" +toml.inherit = "text_default" +tsx.inherit = "text_default" +txt.inherit = "text_default" +vim.inherit = "text_default" +xml.inherit = "text_default" +yaml.inherit = "text_default" +yml.inherit = "text_default" + +# archive formats +7z.app_list = [ + { command = "7z", args = ["x",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +bz2.app_list = [ + { command = "tar", args = ["-xvjf",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +gz.app_list = [ + { command = "tar", args = ["-xvzf",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +tar.app_list = [ + { command = "tar", args = ["-xvf",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +tgz.app_list = [ + { command = "tar", args = ["-xvzf",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +rar.app_list = [ + { command = "unrar", args = ["x",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +xz.app_list = [ + { command = "tar", args = ["-xvJf",], confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] +zip.app_list = [ + { command = "unzip", confirm_exit = true }, + { command = "file-roller", fork = true, silent = true }, +] + +# misc formats +aup.app_list = [{ command = "audacity", fork = true, silent = true }] + +m3u.app_list = [ + { command = "micro" }, + { command = "mpv" }, + { command = "gedit", fork = true, silent = true }, + { command = "bat", confirm_exit = true }, +] + +odt.inherit = "libreoffice_default" +odf.inherit = "libreoffice_default" +ods.inherit = "libreoffice_default" +odp.inherit = "libreoffice_default" + +doc.inherit = "libreoffice_default" +docx.inherit = "libreoffice_default" +xls.inherit = "libreoffice_default" +xlsx.inherit = "libreoffice_default" +ppt.inherit = "libreoffice_default" +pptx.inherit = "libreoffice_default" + +pdf.inherit = "reader_default" + +kra.app_list = [{ command = "krita", fork = true, silent = true }] +kdenlive.app_list = [{ command = "kdenlive", fork = true, silent = true }] + +tex.app_list = [ + { command = "micro" }, + { command = "gedit", fork = true, silent = true }, + { command = "bat", confirm_exit = true }, + { command = "pdflatex" }, +] + +torrent.app_list = [{ command = "transmission-gtk" }] + +[mimetype] + +# application/octet-stream +[mimetype.application.subtype.octet-stream] +inherit = "video_default" + +# text/* +[mimetype.text] +inherit = "text_default" + +# text/* +[mimetype.video] +inherit = "video_default"