├── README.md ├── configs ├── mpv │ └── .config │ │ └── mpv │ │ └── config ├── neovim │ └── .config │ │ └── nvim │ │ └── init.vim ├── ranger │ └── .config │ │ └── ranger │ │ ├── rc.conf │ │ └── rifle.conf ├── redshift │ └── .config │ │ └── redshift │ │ └── redshift.conf ├── tmux │ └── .tmux.conf └── xfce-terminal │ └── .config │ └── xfce4 │ └── terminal │ └── terminalrc ├── install.sh └── scripts ├── install-apps.sh └── install-neovim.sh /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | My dotfiles for my laptop 3 | -------------------------------------------------------------------------------- /configs/mpv/.config/mpv/config: -------------------------------------------------------------------------------- 1 | # vim: syntax=config 2 | use-filedir-conf=yes 3 | screenshot-template=~/Downloads/mpv-screenshot%n 4 | 5 | ### VIDEO ### 6 | cache=8192 7 | cache-default=8192 8 | cache-initial=0 9 | display-fps=60 10 | framedrop=vo 11 | hwdec=vaapi 12 | vo=opengl-hq:icc-profile=~/.icc/AdobeRGB1998.icc 13 | ytdl-format=bestvideo+bestaudio/best 14 | 15 | ### AUDIO ### 16 | alang=jpn,jap,Japanese,en,eng,English,it,ita 17 | ao=alsa:resample=no 18 | audio-channels=2 19 | softvol=no 20 | 21 | ### SUBTITLES ### 22 | ass-force-style=Kerning=yes 23 | slang=en,eng,English,jpn,jap,Japanese,it,ita,Italian 24 | sub-text-font="Noto Sans" 25 | sub-text-font-size=54 26 | sub-text-margin-y=36 27 | sub-text-color="#ffffffff" 28 | sub-text-border-color="#ff262626" 29 | sub-text-border-size=2.30 30 | sub-text-shadow-offset=1 31 | sub-text-shadow-color="#33000000" 32 | sub-text-spacing=0.4 33 | 34 | ### ON SCREEN DISPLAY ### 35 | osd-bar-align-y=0 36 | osd-bar-h=7 37 | osd-border-color='#99000000' 38 | osd-border-size=1 39 | osd-color='#AAFFFFFF' 40 | osd-font="Source Sans Pro" 41 | 42 | ### EXTENSIONS ### 43 | [extension.webm] 44 | loop-file=inf 45 | [extension.mp3] 46 | no-video 47 | [extension.flac] 48 | no-video 49 | -------------------------------------------------------------------------------- /configs/neovim/.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | " Avoid using standard Vim directory names like 'plugin' 2 | call plug#begin('~/.vim/plugged') 3 | 4 | " Make sure you use single quotes 5 | 6 | " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align 7 | Plug 'airblade/vim-gitgutter' 8 | Plug 'junegunn/fzf' 9 | Plug 'junegunn/vim-easy-align' 10 | Plug 'kien/ctrlp.vim' 11 | Plug 'rking/ag.vim' 12 | Plug 'scrooloose/nerdcommenter' 13 | Plug 'scrooloose/nerdtree' 14 | Plug 'scrooloose/syntastic' 15 | Plug 'tpope/vim-fugitive' 16 | Plug 'tpope/vim-surround' 17 | Plug 'vim-airline/vim-airline' 18 | Plug 'vim-scripts/Gundo' 19 | Plug 'xuyuanp/nerdtree-git-plugin' 20 | Plug 'vim-airline/vim-airline-themes' 21 | Plug 'dense-analysis/ale' 22 | 23 | " Initialize plugin system 24 | call plug#end() 25 | 26 | set number 27 | set syntax 28 | 29 | set backupdir=~/.nvim/backup 30 | set directory=~/.nvim/swap 31 | 32 | autocmd StdinReadPre * let s:std_in=1 33 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 34 | map :NERDTreeToggle 35 | let g:NERDTreeWinSize=60 36 | -------------------------------------------------------------------------------- /configs/ranger/.config/ranger/rc.conf: -------------------------------------------------------------------------------- 1 | # =================================================================== 2 | # This file contains the default startup commands for ranger. 3 | # To change them, it is recommended to create either /etc/ranger/rc.conf 4 | # (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom 5 | # commands there. 6 | # 7 | # If you copy this whole file there, you may want to set the environment 8 | # variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. 9 | # 10 | # The purpose of this file is mainly to define keybindings and settings. 11 | # For running more complex python code, please create a plugin in "plugins/" or 12 | # a command in "commands.py". 13 | # 14 | # Each line is a command that will be run before the user interface 15 | # is initialized. As a result, you can not use commands which rely 16 | # on the UI such as :delete or :mark. 17 | # =================================================================== 18 | 19 | # =================================================================== 20 | # == Options 21 | # =================================================================== 22 | 23 | # Which viewmode should be used? Possible values are: 24 | # miller: Use miller columns which show multiple levels of the hierarchy 25 | # multipane: Midnight-commander like multipane view showing all tabs next 26 | # to each other 27 | set viewmode miller 28 | #set viewmode multipane 29 | 30 | # How many columns are there, and what are their relative widths? 31 | set column_ratios 1,1,2 32 | 33 | # Which files should be hidden? (regular expression) 34 | set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ 35 | 36 | # Show hidden files? You can toggle this by typing 'zh' 37 | set show_hidden false 38 | 39 | # Ask for a confirmation when running the "delete" command? 40 | # Valid values are "always", "never", "multiple" (default) 41 | # With "multiple", ranger will ask only if you delete multiple files at once. 42 | set confirm_on_delete multiple 43 | 44 | # Use non-default path for file preview script? 45 | # ranger ships with scope.sh, a script that calls external programs (see 46 | # README.md for dependencies) to preview images, archives, etc. 47 | #set preview_script ~/.config/ranger/scope.sh 48 | 49 | # Use the external preview script or display simple plain text or image previews? 50 | set use_preview_script true 51 | 52 | # Automatically count files in the directory, even before entering them? 53 | set automatically_count_files true 54 | 55 | # Open all images in this directory when running certain image viewers 56 | # like feh or sxiv? You can still open selected files by marking them. 57 | set open_all_images true 58 | 59 | # Be aware of version control systems and display information. 60 | set vcs_aware false 61 | 62 | # State of the four backends git, hg, bzr, svn. The possible states are 63 | # disabled, local (only show local info), enabled (show local and remote 64 | # information). 65 | set vcs_backend_git enabled 66 | set vcs_backend_hg disabled 67 | set vcs_backend_bzr disabled 68 | set vcs_backend_svn disabled 69 | 70 | # Truncate the long commit messages to this length when shown in the statusbar. 71 | set vcs_msg_length 50 72 | 73 | # Use one of the supported image preview protocols 74 | set preview_images false 75 | 76 | # Set the preview image method. Supported methods: 77 | # 78 | # * w3m (default): 79 | # Preview images in full color with the external command "w3mimgpreview"? 80 | # This requires the console web browser "w3m" and a supported terminal. 81 | # It has been successfully tested with "xterm" and "urxvt" without tmux. 82 | # 83 | # * iterm2: 84 | # Preview images in full color using iTerm2 image previews 85 | # (http://iterm2.com/images.html). This requires using iTerm2 compiled 86 | # with image preview support. 87 | # 88 | # This feature relies on the dimensions of the terminal's font. By default, a 89 | # width of 8 and height of 11 are used. To use other values, set the options 90 | # iterm2_font_width and iterm2_font_height to the desired values. 91 | # 92 | # * terminology: 93 | # Previews images in full color in the terminology terminal emulator. 94 | # Supports a wide variety of formats, even vector graphics like svg. 95 | # 96 | # * urxvt: 97 | # Preview images in full color using urxvt image backgrounds. This 98 | # requires using urxvt compiled with pixbuf support. 99 | # 100 | # * urxvt-full: 101 | # The same as urxvt but utilizing not only the preview pane but the 102 | # whole terminal window. 103 | # 104 | # * kitty: 105 | # Preview images in full color using kitty image protocol. 106 | # Requires python PIL or pillow library. 107 | # If ranger does not share the local filesystem with kitty 108 | # the transfer method is changed to encode the whole image; 109 | # while slower, this allows remote previews, 110 | # for example during an ssh session. 111 | # Tmux is unsupported. 112 | # 113 | # * ueberzug: 114 | # Preview images in full color with the external command "ueberzug". 115 | # Images are shown by using a child window. 116 | # Only for users who run X11 in GNU/Linux. 117 | set preview_images_method w3m 118 | 119 | # Delay in seconds before displaying an image with the w3m method. 120 | # Increase it in case of experiencing display corruption. 121 | set w3m_delay 0.02 122 | 123 | # Manually adjust the w3mimg offset when using a terminal which needs this 124 | set w3m_offset 0 125 | 126 | # Default iTerm2 font size (see: preview_images_method: iterm2) 127 | set iterm2_font_width 8 128 | set iterm2_font_height 11 129 | 130 | # Use a unicode "..." character to mark cut-off filenames? 131 | set unicode_ellipsis false 132 | 133 | # BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic). 134 | # Requires the python-bidi pip package 135 | set bidi_support false 136 | 137 | # Show dotfiles in the bookmark preview box? 138 | set show_hidden_bookmarks true 139 | 140 | # Which colorscheme to use? These colorschemes are available by default: 141 | # default, jungle, snow, solarized 142 | set colorscheme default 143 | 144 | # Preview files on the rightmost column? 145 | # And collapse (shrink) the last column if there is nothing to preview? 146 | set preview_files true 147 | set preview_directories true 148 | set collapse_preview true 149 | 150 | # Wrap long lines in plain text previews? 151 | set wrap_plaintext_previews false 152 | 153 | # Save the console history on exit? 154 | set save_console_history true 155 | 156 | # Draw the status bar on top of the browser window (default: bottom) 157 | set status_bar_on_top false 158 | 159 | # Draw a progress bar in the status bar which displays the average state of all 160 | # currently running tasks which support progress bars? 161 | set draw_progress_bar_in_status_bar true 162 | 163 | # Draw borders around columns? (separators, outline, both, or none) 164 | # Separators are vertical lines between columns. 165 | # Outline draws a box around all the columns. 166 | # Both combines the two. 167 | set draw_borders none 168 | 169 | # Display the directory name in tabs? 170 | set dirname_in_tabs false 171 | 172 | # Enable the mouse support? 173 | set mouse_enabled false 174 | 175 | # Display the file size in the main column or status bar? 176 | set display_size_in_main_column true 177 | set display_size_in_status_bar true 178 | 179 | # Display the free disk space in the status bar? 180 | set display_free_space_in_status_bar true 181 | 182 | # Display files tags in all columns or only in main column? 183 | set display_tags_in_all_columns true 184 | 185 | # Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME` 186 | set update_title false 187 | 188 | # Set the tmux/screen window-name to "ranger"? 189 | set update_tmux_title true 190 | 191 | # Shorten the title if it gets long? The number defines how many 192 | # directories are displayed at once, 0 turns off this feature. 193 | set shorten_title 3 194 | 195 | # Show hostname in titlebar? 196 | set hostname_in_titlebar true 197 | 198 | # Abbreviate $HOME with ~ in the titlebar (first line) of ranger? 199 | set tilde_in_titlebar false 200 | 201 | # How many directory-changes or console-commands should be kept in history? 202 | set max_history_size 20 203 | set max_console_history_size 50 204 | 205 | # Try to keep so much space between the top/bottom border when scrolling: 206 | set scroll_offset 8 207 | 208 | # Flush the input after each key hit? (Noticeable when ranger lags) 209 | set flushinput true 210 | 211 | # Padding on the right when there's no preview? 212 | # This allows you to click into the space to run the file. 213 | set padding_right true 214 | 215 | # Save bookmarks (used with mX and `X) instantly? 216 | # This helps to synchronize bookmarks between multiple ranger 217 | # instances but leads to *slight* performance loss. 218 | # When false, bookmarks are saved when ranger is exited. 219 | set autosave_bookmarks true 220 | 221 | # Save the "`" bookmark to disk. This can be used to switch to the last 222 | # directory by typing "``". 223 | set save_backtick_bookmark true 224 | 225 | # You can display the "real" cumulative size of directories by using the 226 | # command :get_cumulative_size or typing "dc". The size is expensive to 227 | # calculate and will not be updated automatically. You can choose 228 | # to update it automatically though by turning on this option: 229 | set autoupdate_cumulative_size false 230 | 231 | # Turning this on makes sense for screen readers: 232 | set show_cursor false 233 | 234 | # One of: size, natural, basename, atime, ctime, mtime, type, random 235 | set sort natural 236 | 237 | # Additional sorting options 238 | set sort_reverse false 239 | set sort_case_insensitive true 240 | set sort_directories_first true 241 | set sort_unicode false 242 | 243 | # Enable this if key combinations with the Alt Key don't work for you. 244 | # (Especially on xterm) 245 | set xterm_alt_key false 246 | 247 | # Whether to include bookmarks in cd command 248 | set cd_bookmarks true 249 | 250 | # Changes case sensitivity for the cd command tab completion 251 | set cd_tab_case sensitive 252 | 253 | # Use fuzzy tab completion with the "cd" command. For example, 254 | # ":cd /u/lo/b" expands to ":cd /usr/local/bin". 255 | set cd_tab_fuzzy false 256 | 257 | # Avoid previewing files larger than this size, in bytes. Use a value of 0 to 258 | # disable this feature. 259 | set preview_max_size 0 260 | 261 | # The key hint lists up to this size have their sublists expanded. 262 | # Otherwise the submaps are replaced with "...". 263 | set hint_collapse_threshold 10 264 | 265 | # Add the highlighted file to the path in the titlebar 266 | set show_selection_in_titlebar true 267 | 268 | # The delay that ranger idly waits for user input, in milliseconds, with a 269 | # resolution of 100ms. Lower delay reduces lag between directory updates but 270 | # increases CPU load. 271 | set idle_delay 2000 272 | 273 | # When the metadata manager module looks for metadata, should it only look for 274 | # a ".metadata.json" file in the current directory, or do a deep search and 275 | # check all directories above the current one as well? 276 | set metadata_deep_search false 277 | 278 | # Clear all existing filters when leaving a directory 279 | set clear_filters_on_dir_change false 280 | 281 | # Disable displaying line numbers in main column. 282 | # Possible values: false, absolute, relative. 283 | set line_numbers false 284 | 285 | # When line_numbers=relative show the absolute line number in the 286 | # current line. 287 | set relative_current_zero false 288 | 289 | # Start line numbers from 1 instead of 0 290 | set one_indexed true 291 | 292 | # Save tabs on exit 293 | set save_tabs_on_exit false 294 | 295 | # Enable scroll wrapping - moving down while on the last item will wrap around to 296 | # the top and vice versa. 297 | set wrap_scroll false 298 | 299 | # Set the global_inode_type_filter to nothing. Possible options: d, f and l for 300 | # directories, files and symlinks respectively. 301 | set global_inode_type_filter 302 | 303 | # This setting allows to freeze the list of files to save I/O bandwidth. It 304 | # should be 'false' during start-up, but you can toggle it by pressing F. 305 | set freeze_files false 306 | 307 | # Print file sizes in bytes instead of the default human-readable format. 308 | set size_in_bytes false 309 | 310 | # Warn at startup if RANGER_LEVEL env var is greater than 0, in other words 311 | # give a warning when you nest ranger in a subshell started by ranger. 312 | # Special value "error" makes the warning more visible. 313 | set nested_ranger_warning true 314 | 315 | # =================================================================== 316 | # == Local Options 317 | # =================================================================== 318 | # You can set local options that only affect a single directory. 319 | 320 | # Examples: 321 | # setlocal path=~/downloads sort mtime 322 | 323 | # =================================================================== 324 | # == Command Aliases in the Console 325 | # =================================================================== 326 | 327 | alias e edit 328 | alias q quit 329 | alias q! quit! 330 | alias qa quitall 331 | alias qa! quitall! 332 | alias qall quitall 333 | alias qall! quitall! 334 | alias setl setlocal 335 | 336 | alias filter scout -prts 337 | alias find scout -aets 338 | alias mark scout -mr 339 | alias unmark scout -Mr 340 | alias search scout -rs 341 | alias search_inc scout -rts 342 | alias travel scout -aefklst 343 | 344 | # =================================================================== 345 | # == Define keys for the browser 346 | # =================================================================== 347 | 348 | # Basic 349 | map Q quitall 350 | map q quit 351 | copymap q ZZ ZQ 352 | 353 | map R reload_cwd 354 | map F set freeze_files! 355 | map reset 356 | map redraw_window 357 | map abort 358 | map change_mode normal 359 | map ~ set viewmode! 360 | 361 | map i display_file 362 | map scroll_preview 1 363 | map scroll_preview -1 364 | map ? help 365 | map W display_log 366 | map w taskview_open 367 | map S shell $SHELL 368 | 369 | map : console 370 | map ; console 371 | map ! console shell%space 372 | map @ console -p6 shell %%s 373 | map # console shell -p%space 374 | map s console shell%space 375 | map r chain draw_possible_programs; console open_with%space 376 | map f console find%space 377 | map cd console cd%space 378 | 379 | map chain console; eval fm.ui.console.history_move(-1) 380 | 381 | # Change the line mode 382 | map Mf linemode filename 383 | map Mi linemode fileinfo 384 | map Mm linemode mtime 385 | map Mh linemode humanreadablemtime 386 | map Mp linemode permissions 387 | map Ms linemode sizemtime 388 | map MH linemode sizehumanreadablemtime 389 | map Mt linemode metatitle 390 | 391 | # Tagging / Marking 392 | map t tag_toggle 393 | map ut tag_remove 394 | map " tag_toggle tag=%any 395 | map mark_files toggle=True 396 | map v mark_files all=True toggle=True 397 | map uv mark_files all=True val=False 398 | map V toggle_visual_mode 399 | map uV toggle_visual_mode reverse=True 400 | 401 | # For the nostalgics: Midnight Commander bindings 402 | map help 403 | map rename_append 404 | map display_file 405 | map edit 406 | map copy 407 | map cut 408 | map console mkdir%space 409 | map console delete 410 | #map console trash 411 | map exit 412 | 413 | # In case you work on a keyboard with dvorak layout 414 | map move up=1 415 | map move down=1 416 | map move left=1 417 | map move right=1 418 | map move to=0 419 | map move to=-1 420 | map move down=1 pages=True 421 | map move up=1 pages=True 422 | map move right=1 423 | #map console delete 424 | map console touch%space 425 | 426 | # VIM-like 427 | copymap k 428 | copymap j 429 | copymap h 430 | copymap l 431 | copymap gg 432 | copymap G 433 | copymap 434 | copymap 435 | 436 | map J move down=0.5 pages=True 437 | map K move up=0.5 pages=True 438 | copymap J 439 | copymap K 440 | 441 | # Jumping around 442 | map H history_go -1 443 | map L history_go 1 444 | map ] move_parent 1 445 | map [ move_parent -1 446 | map } traverse 447 | map { traverse_backwards 448 | map ) jump_non 449 | 450 | map gh cd ~ 451 | map ge cd /etc 452 | map gu cd /usr 453 | map gd cd /dev 454 | map gl cd -r . 455 | map gL cd -r %f 456 | map go cd /opt 457 | map gv cd /var 458 | map gm cd /media 459 | map gi eval fm.cd('/run/media/' + os.getenv('USER')) 460 | map gM cd /mnt 461 | map gs cd /srv 462 | map gp cd /tmp 463 | map gr cd / 464 | map gR eval fm.cd(ranger.RANGERDIR) 465 | map g/ cd / 466 | map g? cd /usr/share/doc/ranger 467 | 468 | # External Programs 469 | map E edit 470 | map du shell -p du --max-depth=1 -h --apparent-size 471 | map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh 472 | map yp yank path 473 | map yd yank dir 474 | map yn yank name 475 | map y. yank name_without_extension 476 | 477 | # Filesystem Operations 478 | map = chmod 479 | 480 | map cw console rename%space 481 | map a rename_append 482 | map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) 483 | map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) 484 | 485 | map pp paste 486 | map po paste overwrite=True 487 | map pP paste append=True 488 | map pO paste overwrite=True append=True 489 | map pl paste_symlink relative=False 490 | map pL paste_symlink relative=True 491 | map phl paste_hardlink 492 | map pht paste_hardlinked_subtree 493 | map pd console paste dest= 494 | map p` paste dest=%any_path 495 | map p' paste dest=%any_path 496 | 497 | map dD console delete 498 | map dT console trash 499 | 500 | map dd cut 501 | map ud uncut 502 | map da cut mode=add 503 | map dr cut mode=remove 504 | map dt cut mode=toggle 505 | 506 | map yy copy 507 | map uy uncut 508 | map ya copy mode=add 509 | map yr copy mode=remove 510 | map yt copy mode=toggle 511 | 512 | # Temporary workarounds 513 | map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) 514 | map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) 515 | map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) 516 | map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) 517 | map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) 518 | map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) 519 | map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) 520 | map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) 521 | 522 | # Searching 523 | map / console search%space 524 | map n search_next 525 | map N search_next forward=False 526 | map ct search_next order=tag 527 | map cs search_next order=size 528 | map ci search_next order=mimetype 529 | map cc search_next order=ctime 530 | map cm search_next order=mtime 531 | map ca search_next order=atime 532 | 533 | # Tabs 534 | map tab_new 535 | map tab_close 536 | map tab_move 1 537 | map tab_move -1 538 | map tab_move 1 539 | map tab_move -1 540 | map gt tab_move 1 541 | map gT tab_move -1 542 | map gn tab_new 543 | map gc tab_close 544 | map uq tab_restore 545 | map tab_open 1 546 | map tab_open 2 547 | map tab_open 3 548 | map tab_open 4 549 | map tab_open 5 550 | map tab_open 6 551 | map tab_open 7 552 | map tab_open 8 553 | map tab_open 9 554 | map tab_shift 1 555 | map tab_shift -1 556 | 557 | # Sorting 558 | map or set sort_reverse! 559 | map oz set sort=random 560 | map os chain set sort=size; set sort_reverse=False 561 | map ob chain set sort=basename; set sort_reverse=False 562 | map on chain set sort=natural; set sort_reverse=False 563 | map om chain set sort=mtime; set sort_reverse=False 564 | map oc chain set sort=ctime; set sort_reverse=False 565 | map oa chain set sort=atime; set sort_reverse=False 566 | map ot chain set sort=type; set sort_reverse=False 567 | map oe chain set sort=extension; set sort_reverse=False 568 | 569 | map oS chain set sort=size; set sort_reverse=True 570 | map oB chain set sort=basename; set sort_reverse=True 571 | map oN chain set sort=natural; set sort_reverse=True 572 | map oM chain set sort=mtime; set sort_reverse=True 573 | map oC chain set sort=ctime; set sort_reverse=True 574 | map oA chain set sort=atime; set sort_reverse=True 575 | map oT chain set sort=type; set sort_reverse=True 576 | map oE chain set sort=extension; set sort_reverse=True 577 | 578 | map dc get_cumulative_size 579 | 580 | # Settings 581 | map zc set collapse_preview! 582 | map zd set sort_directories_first! 583 | map zh set show_hidden! 584 | map set show_hidden! 585 | copymap 586 | copymap 587 | map zI set flushinput! 588 | map zi set preview_images! 589 | map zm set mouse_enabled! 590 | map zp set preview_files! 591 | map zP set preview_directories! 592 | map zs set sort_case_insensitive! 593 | map zu set autoupdate_cumulative_size! 594 | map zv set use_preview_script! 595 | map zf console filter%space 596 | copymap zf zz 597 | 598 | # Filter stack 599 | map .d filter_stack add type d 600 | map .f filter_stack add type f 601 | map .l filter_stack add type l 602 | map .m console filter_stack add mime%space 603 | map .n console filter_stack add name%space 604 | map .# console filter_stack add hash%space 605 | map ." filter_stack add duplicate 606 | map .' filter_stack add unique 607 | map .| filter_stack add or 608 | map .& filter_stack add and 609 | map .! filter_stack add not 610 | map .r filter_stack rotate 611 | map .c filter_stack clear 612 | map .* filter_stack decompose 613 | map .p filter_stack pop 614 | map .. filter_stack show 615 | 616 | # Bookmarks 617 | map ` enter_bookmark %any 618 | map ' enter_bookmark %any 619 | map m set_bookmark %any 620 | map um unset_bookmark %any 621 | 622 | map m draw_bookmarks 623 | copymap m um ` ' 624 | 625 | # Generate all the chmod bindings with some python help: 626 | eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) 627 | eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) 628 | eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) 629 | eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) 630 | eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) 631 | 632 | eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) 633 | eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) 634 | eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) 635 | eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) 636 | eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) 637 | 638 | # =================================================================== 639 | # == Define keys for the console 640 | # =================================================================== 641 | # Note: Unmapped keys are passed directly to the console. 642 | 643 | # Basic 644 | cmap eval fm.ui.console.tab() 645 | cmap eval fm.ui.console.tab(-1) 646 | cmap eval fm.ui.console.close() 647 | cmap eval fm.ui.console.execute() 648 | cmap redraw_window 649 | 650 | copycmap 651 | copycmap 652 | 653 | # Move around 654 | cmap eval fm.ui.console.history_move(-1) 655 | cmap eval fm.ui.console.history_move(1) 656 | cmap eval fm.ui.console.move(left=1) 657 | cmap eval fm.ui.console.move(right=1) 658 | cmap eval fm.ui.console.move(right=0, absolute=True) 659 | cmap eval fm.ui.console.move(right=-1, absolute=True) 660 | cmap eval fm.ui.console.move_word(left=1) 661 | cmap eval fm.ui.console.move_word(right=1) 662 | 663 | copycmap 664 | copycmap 665 | 666 | # Line Editing 667 | cmap eval fm.ui.console.delete(-1) 668 | cmap eval fm.ui.console.delete(0) 669 | cmap eval fm.ui.console.delete_word() 670 | cmap eval fm.ui.console.delete_word(backward=False) 671 | cmap eval fm.ui.console.delete_rest(1) 672 | cmap eval fm.ui.console.delete_rest(-1) 673 | cmap eval fm.ui.console.paste() 674 | 675 | # And of course the emacs way 676 | copycmap 677 | copycmap 678 | copycmap 679 | copycmap 680 | copycmap 681 | copycmap 682 | copycmap 683 | copycmap 684 | copycmap 685 | 686 | # Note: There are multiple ways to express backspaces. (code 263) 687 | # and (code 127). To be sure, use both. 688 | copycmap 689 | 690 | # This special expression allows typing in numerals: 691 | cmap false 692 | 693 | # =================================================================== 694 | # == Pager Keybindings 695 | # =================================================================== 696 | 697 | # Movement 698 | pmap pager_move down=1 699 | pmap pager_move up=1 700 | pmap pager_move left=4 701 | pmap pager_move right=4 702 | pmap pager_move to=0 703 | pmap pager_move to=-1 704 | pmap pager_move down=1.0 pages=True 705 | pmap pager_move up=1.0 pages=True 706 | pmap pager_move down=0.5 pages=True 707 | pmap pager_move up=0.5 pages=True 708 | 709 | copypmap k 710 | copypmap j 711 | copypmap h 712 | copypmap l 713 | copypmap g 714 | copypmap G 715 | copypmap d 716 | copypmap u 717 | copypmap n f 718 | copypmap p b 719 | 720 | # Basic 721 | pmap redraw_window 722 | pmap pager_close 723 | copypmap q Q i 724 | pmap E edit_file 725 | 726 | # =================================================================== 727 | # == Taskview Keybindings 728 | # =================================================================== 729 | 730 | # Movement 731 | tmap taskview_move up=1 732 | tmap taskview_move down=1 733 | tmap taskview_move to=0 734 | tmap taskview_move to=-1 735 | tmap taskview_move down=1.0 pages=True 736 | tmap taskview_move up=1.0 pages=True 737 | tmap taskview_move down=0.5 pages=True 738 | tmap taskview_move up=0.5 pages=True 739 | 740 | copytmap k 741 | copytmap j 742 | copytmap g 743 | copytmap G 744 | copytmap u 745 | copytmap n f 746 | copytmap p b 747 | 748 | # Changing priority and deleting tasks 749 | tmap J eval -q fm.ui.taskview.task_move(-1) 750 | tmap K eval -q fm.ui.taskview.task_move(0) 751 | tmap dd eval -q fm.ui.taskview.task_remove() 752 | tmap eval -q fm.ui.taskview.task_move(-1) 753 | tmap eval -q fm.ui.taskview.task_move(0) 754 | tmap eval -q fm.ui.taskview.task_remove() 755 | 756 | # Basic 757 | tmap redraw_window 758 | tmap taskview_close 759 | copytmap q Q w 760 | -------------------------------------------------------------------------------- /configs/ranger/.config/ranger/rifle.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=cfg 2 | # 3 | # This is the configuration file of "rifle", ranger's file executor/opener. 4 | # Each line consists of conditions and a command. For each line the conditions 5 | # are checked and if they are met, the respective command is run. 6 | # 7 | # Syntax: 8 | # , , ... = command 9 | # 10 | # The command can contain these environment variables: 11 | # $1-$9 | The n-th selected file 12 | # $@ | All selected files 13 | # 14 | # If you use the special command "ask", rifle will ask you what program to run. 15 | # 16 | # Prefixing a condition with "!" will negate its result. 17 | # These conditions are currently supported: 18 | # match | The regexp matches $1 19 | # ext | The regexp matches the extension of $1 20 | # mime | The regexp matches the mime type of $1 21 | # name | The regexp matches the basename of $1 22 | # path | The regexp matches the absolute path of $1 23 | # has | The program is installed (i.e. located in $PATH) 24 | # env | The environment variable "variable" is non-empty 25 | # file | $1 is a file 26 | # directory | $1 is a directory 27 | # number | change the number of this command to n 28 | # terminal | stdin, stderr and stdout are connected to a terminal 29 | # X | A graphical environment is available (darwin, Xorg, or Wayland) 30 | # 31 | # There are also pseudo-conditions which have a "side effect": 32 | # flag | Change how the program is run. See below. 33 | # label