My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rc.conf 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. set viewmode miller
  2. set column_ratios 1,3,4
  3. #set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
  4. set hidden_filter ^\.|\.(?:pyc|vrb|pyo|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
  5. set show_hidden false
  6. set confirm_on_delete multiple
  7. set preview_script ~/.config/ranger/scope.sh
  8. set use_preview_script true
  9. set automatically_count_files true
  10. set open_all_images true
  11. set vcs_aware false
  12. set vcs_backend_git enabled
  13. set vcs_backend_hg disabled
  14. set vcs_backend_bzr disabled
  15. set preview_images true
  16. set preview_images_method w3m
  17. set unicode_ellipsis false
  18. set show_hidden_bookmarks true
  19. set colorscheme default
  20. set preview_files true
  21. set preview_directories true
  22. set collapse_preview true
  23. set save_console_history true
  24. set status_bar_on_top false
  25. set draw_progress_bar_in_status_bar true
  26. set draw_borders true
  27. set dirname_in_tabs false
  28. set mouse_enabled true
  29. set display_size_in_main_column true
  30. set display_size_in_status_bar true
  31. set display_tags_in_all_columns true
  32. set update_title false
  33. set update_tmux_title true
  34. set shorten_title 3
  35. set tilde_in_titlebar true
  36. set max_history_size 20
  37. set max_console_history_size 50
  38. set scroll_offset 8
  39. set flushinput true
  40. set padding_right true
  41. set autosave_bookmarks false
  42. set autoupdate_cumulative_size false
  43. set show_cursor false
  44. set sort natural
  45. set sort_reverse false
  46. set sort_case_insensitive true
  47. set sort_directories_first true
  48. set sort_unicode false
  49. set xterm_alt_key false
  50. set cd_bookmarks false
  51. set preview_max_size 0
  52. set show_selection_in_titlebar true
  53. set idle_delay 2000
  54. set metadata_deep_search false
  55. set clear_filters_on_dir_change false
  56. set line_numbers false
  57. # Aliases
  58. alias e edit
  59. alias q quit
  60. alias q! quitall
  61. alias qa quitall
  62. alias qall quitall
  63. alias setl setlocal
  64. alias filter scout -prt
  65. alias find scout -aeit
  66. alias mark scout -mr
  67. alias unmark scout -Mr
  68. alias search scout -rs
  69. alias search_inc scout -rts
  70. alias travel scout -aefiklst
  71. ## Basic Keys
  72. # Basic
  73. map Q quit!
  74. map q quit
  75. copymap q ZZ ZQ
  76. map R reload_cwd
  77. map <C-r> reset
  78. map <C-l> redraw_window
  79. map <C-c> abort
  80. map <esc> change_mode normal
  81. map ~ set viewmode!
  82. map i display_file
  83. map ? help
  84. map W display_log
  85. map w taskview_open
  86. map S shell $SHELL
  87. map : console
  88. map ; console
  89. map ! console shell%space
  90. map @ console -p6 shell %%s
  91. map # console shell -p%space
  92. #map s console shell%space
  93. map r chain draw_possible_programs; console open_with%%space
  94. map f console find%space
  95. map cd console cd%space
  96. # Change the line mode
  97. map Mf linemode filename
  98. map Mi linemode fileinfo
  99. map Mm linemode mtime
  100. map Mp linemode permissions
  101. map Ms linemode sizemtime
  102. map Mt linemode metatitle
  103. # Tagging / Marking
  104. map at tag_toggle
  105. map ut tag_remove
  106. map "<any> tag_toggle tag=%any
  107. map <Space> mark_files toggle=True
  108. map va mark_files all=True toggle=True
  109. map uv mark_files all=True val=False
  110. map vs toggle_visual_mode
  111. map uV toggle_visual_mode reverse=True
  112. # For the nostalgics: Midnight Commander bindings
  113. map <F1> help
  114. map <F3> display_file
  115. map <F4> edit
  116. map <F5> copy
  117. map <F6> cut
  118. map <F7> console mkdir%space
  119. map <F8> console delete
  120. map <F10> exit
  121. # In case you work on a keyboard with dvorak layout
  122. map <UP> move up=1
  123. map <DOWN> move down=1
  124. map <LEFT> move left=1
  125. map <RIGHT> move right=1
  126. map <HOME> move to=0
  127. map <END> move to=-1
  128. map <PAGEDOWN> move down=1 pages=True
  129. map <PAGEUP> move up=1 pages=True
  130. map <CR> move right=1
  131. #map <DELETE> console delete
  132. map <INSERT> console touch%space
  133. # VIM-like
  134. copymap <UP> k
  135. copymap <DOWN> j
  136. copymap <LEFT> h
  137. copymap <RIGHT> l
  138. copymap <HOME> gg
  139. copymap <END> G
  140. copymap <PAGEDOWN> <C-F>
  141. copymap <PAGEUP> <C-B>
  142. map J move down=0.5 pages=True
  143. map K move up=0.5 pages=True
  144. copymap J <C-D>
  145. copymap K <C-U>
  146. # Jumping around
  147. map H history_go -1
  148. map L history_go 1
  149. map ] move_parent 1
  150. map [ move_parent -1
  151. map } traverse
  152. map gh cd ~
  153. map ge cd /etc
  154. map gu cd /usr
  155. map gd cd /dev
  156. map gl cd -r .
  157. map gL cd -r %f
  158. map go cd /opt
  159. map gv cd /var
  160. map gm cd /media
  161. map gM cd /mnt
  162. map gs cd /srv
  163. map gr cd /
  164. map gR eval fm.cd(ranger.RANGERDIR)
  165. map g/ cd /
  166. map g? cd /usr/share/doc/ranger
  167. # External Programs
  168. map E edit
  169. map du shell -p du --max-depth=1 -h --apparent-size
  170. map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
  171. map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
  172. map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
  173. map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
  174. # Filesystem Operations
  175. map = chmod
  176. map cw console rename%space
  177. map aa rename_append
  178. map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
  179. map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
  180. map pp paste
  181. map po paste overwrite=True
  182. map pP paste append=True
  183. map pO paste overwrite=True append=True
  184. map pl paste_symlink relative=False
  185. map pL paste_symlink relative=True
  186. map phl paste_hardlink
  187. map pht paste_hardlinked_subtree
  188. map dD console delete
  189. map dd cut
  190. map ud uncut
  191. map da cut mode=add
  192. map dr cut mode=remove
  193. map dt cut mode=toggle
  194. map yy copy
  195. map uy uncut
  196. map ya copy mode=add
  197. map yr copy mode=remove
  198. map yt copy mode=toggle
  199. # Temporary workarounds
  200. map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
  201. map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
  202. map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
  203. map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
  204. map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
  205. map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
  206. map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
  207. map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
  208. # Searching
  209. map / console search%space
  210. map n search_next
  211. map N search_next forward=False
  212. map ct search_next order=tag
  213. map cs search_next order=size
  214. map ci search_next order=mimetype
  215. map cc search_next order=ctime
  216. map cm search_next order=mtime
  217. map ca search_next order=atime
  218. # Tabs
  219. map <C-n> tab_new ~
  220. map <C-w> tab_close
  221. map <TAB> tab_move 1
  222. map <S-TAB> tab_move -1
  223. map <A-Right> tab_move 1
  224. map <A-Left> tab_move -1
  225. map gt tab_move 1
  226. map gT tab_move -1
  227. map gn tab_new ~
  228. map gc tab_close
  229. map uq tab_restore
  230. map <a-1> tab_open 1
  231. map <a-2> tab_open 2
  232. map <a-3> tab_open 3
  233. map <a-4> tab_open 4
  234. map <a-5> tab_open 5
  235. map <a-6> tab_open 6
  236. map <a-7> tab_open 7
  237. map <a-8> tab_open 8
  238. map <a-9> tab_open 9
  239. # Sorting
  240. map or set sort_reverse!
  241. map oz set sort=random
  242. map os chain set sort=size; set sort_reverse=False
  243. map ob chain set sort=basename; set sort_reverse=False
  244. map on chain set sort=natural; set sort_reverse=False
  245. map om chain set sort=mtime; set sort_reverse=False
  246. map oc chain set sort=ctime; set sort_reverse=False
  247. map oa chain set sort=atime; set sort_reverse=False
  248. map ot chain set sort=type; set sort_reverse=False
  249. map oe chain set sort=extension; set sort_reverse=False
  250. map oS chain set sort=size; set sort_reverse=True
  251. map oB chain set sort=basename; set sort_reverse=True
  252. map oN chain set sort=natural; set sort_reverse=True
  253. map oM chain set sort=mtime; set sort_reverse=True
  254. map oC chain set sort=ctime; set sort_reverse=True
  255. map oA chain set sort=atime; set sort_reverse=True
  256. map oT chain set sort=type; set sort_reverse=True
  257. map oE chain set sort=extension; set sort_reverse=True
  258. map dc get_cumulative_size
  259. # Settings
  260. map zc set collapse_preview!
  261. map zd set sort_directories_first!
  262. map zh set show_hidden!
  263. map <C-h> set show_hidden!
  264. map zI set flushinput!
  265. map zi set preview_images!
  266. map zm set mouse_enabled!
  267. map zp set preview_files!
  268. map zP set preview_directories!
  269. map zs set sort_case_insensitive!
  270. map zu set autoupdate_cumulative_size!
  271. map zv set use_preview_script!
  272. map zf console filter%space
  273. # Bookmarks
  274. #map `<any> enter_bookmark %any
  275. #map '<any> enter_bookmark %any
  276. #map m<any> set_bookmark %any
  277. #map um<any> unset_bookmark %any
  278. #
  279. #map m<bg> draw_bookmarks
  280. #copymap m<bg> um<bg> `<bg> '<bg>
  281. # Generate all the chmod bindings with some python help:
  282. eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
  283. eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
  284. eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
  285. eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
  286. eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
  287. eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
  288. eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
  289. eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
  290. eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
  291. eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
  292. ## Console Keys
  293. # Basic
  294. cmap <tab> eval fm.ui.console.tab()
  295. cmap <s-tab> eval fm.ui.console.tab(-1)
  296. cmap <ESC> eval fm.ui.console.close()
  297. cmap <CR> eval fm.ui.console.execute()
  298. cmap <C-l> redraw_window
  299. copycmap <ESC> <C-c>
  300. copycmap <CR> <C-j>
  301. # Move around
  302. cmap <up> eval fm.ui.console.history_move(-1)
  303. cmap <down> eval fm.ui.console.history_move(1)
  304. cmap <left> eval fm.ui.console.move(left=1)
  305. cmap <right> eval fm.ui.console.move(right=1)
  306. cmap <home> eval fm.ui.console.move(right=0, absolute=True)
  307. cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
  308. # Line Editing
  309. cmap <backspace> eval fm.ui.console.delete(-1)
  310. cmap <delete> eval fm.ui.console.delete(0)
  311. cmap <C-w> eval fm.ui.console.delete_word()
  312. cmap <A-d> eval fm.ui.console.delete_word(backward=False)
  313. cmap <C-k> eval fm.ui.console.delete_rest(1)
  314. cmap <C-u> eval fm.ui.console.delete_rest(-1)
  315. cmap <C-y> eval fm.ui.console.paste()
  316. # And of course the emacs way
  317. #copycmap <up> <C-p>
  318. #copycmap <down> <C-n>
  319. #copycmap <left> <C-b>
  320. #copycmap <right> <C-f>
  321. #copycmap <home> <C-a>
  322. #copycmap <end> <C-e>
  323. #copycmap <delete> <C-d>
  324. #copycmap <backspace> <C-h>
  325. # Note: There are multiple ways to express backspaces. <backspace> (code 263)
  326. # and <backspace2> (code 127). To be sure, use both.
  327. copycmap <backspace> <backspace2>
  328. # This special expression allows typing in numerals:
  329. cmap <allow_quantifiers> false
  330. ## Pager Keys
  331. # Movement
  332. pmap <down> pager_move down=1
  333. pmap <up> pager_move up=1
  334. pmap <left> pager_move left=4
  335. pmap <right> pager_move right=4
  336. pmap <home> pager_move to=0
  337. pmap <end> pager_move to=-1
  338. pmap <pagedown> pager_move down=1.0 pages=True
  339. pmap <pageup> pager_move up=1.0 pages=True
  340. pmap <C-d> pager_move down=0.5 pages=True
  341. pmap <C-u> pager_move up=0.5 pages=True
  342. copypmap <UP> k <C-p>
  343. copypmap <DOWN> j <C-n> <CR>
  344. copypmap <LEFT> h
  345. copypmap <RIGHT> l
  346. copypmap <HOME> g
  347. copypmap <END> G
  348. copypmap <C-d> d
  349. copypmap <C-u> u
  350. copypmap <PAGEDOWN> n f <C-F> <Space>
  351. copypmap <PAGEUP> p b <C-B>
  352. # Basic
  353. #pmap <C-l> redraw_window
  354. pmap <ESC> pager_close
  355. copypmap <ESC> q Q i <F3>
  356. pmap E edit_file
  357. ## Taskview Keys
  358. # Movement
  359. tmap <up> taskview_move up=1
  360. tmap <down> taskview_move down=1
  361. tmap <home> taskview_move to=0
  362. tmap <end> taskview_move to=-1
  363. tmap <pagedown> taskview_move down=1.0 pages=True
  364. tmap <pageup> taskview_move up=1.0 pages=True
  365. tmap <C-d> taskview_move down=0.5 pages=True
  366. tmap <C-u> taskview_move up=0.5 pages=True
  367. copytmap <UP> k <C-p>
  368. copytmap <DOWN> j <C-n> <CR>
  369. copytmap <HOME> g
  370. copytmap <END> G
  371. copytmap <C-u> u
  372. copytmap <PAGEDOWN> n f <C-F> <Space>
  373. copytmap <PAGEUP> p b <C-B>
  374. # Changing priority and deleting tasks
  375. tmap J eval -q fm.ui.taskview.task_move(-1)
  376. tmap K eval -q fm.ui.taskview.task_move(0)
  377. tmap dd eval -q fm.ui.taskview.task_remove()
  378. tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
  379. tmap <pageup> eval -q fm.ui.taskview.task_move(0)
  380. tmap <delete> eval -q fm.ui.taskview.task_remove()
  381. # Basic
  382. #tmap <C-l> redraw_window
  383. tmap <ESC> taskview_close
  384. copytmap <ESC> q Q w <C-c>
  385. # ===================================================================
  386. # == Custom Keybindings
  387. # ===================================================================
  388. # General
  389. map vi console shell vim%space
  390. map mkd console mkdir%space
  391. map x shell ~/.config/Scripts/extract %f
  392. map Z shell tar -cvzf %f.tar.gz %f
  393. # Document
  394. map MP shell pandoc %f --latex-engine=xelatex -o %f.pdf
  395. map ML shell rubber -m xelatex %f
  396. map Txa console shell cp ~/data/Documents/LaTeX/templates/article.tex%space
  397. map Txb console shell cp ~/data/Documents/LaTeX/templates/beamer.tex%space
  398. # Image
  399. map bg shell \cp -f %f ~/.config/wall && \cp -f %f /usr/share/wallpaper/wall && feh --bg-scale %f
  400. map bw shell wal -c -i %f -o /home/micah/.config/Scripts/wal-set && \cp -f %f ~/.config/wall && \cp -f %f /usr/share/wallpaper/wall
  401. map C shell convert -rotate 90 %s %s
  402. map F shell convert -flop %s %s
  403. # Download
  404. map ytv console shell youtube-dl -ic%space
  405. map yta console shell youtube-dl -xic%space
  406. map arc console shell aria2c%space
  407. # Folders
  408. # DO NOT DELETE LMAO
  409. map gb cd -
  410. map tb tab_new -
  411. map mb shell mv %s -
  412. map Yb shell cp -r %s -
  413. map gcf cd ~/.config
  414. map tcf tab_new ~/.config
  415. map mcf shell mv %s ~/.config
  416. map Ycf shell cp -r %s ~/.config
  417. map gcv cd ~/git/mehalter.github.io/resume
  418. map tcv tab_new ~/git/mehalter.github.io/resume
  419. map mcv shell mv %s ~/git/mehalter.github.io/resume
  420. map Ycv shell cp -r %s ~/git/mehalter.github.io/resume
  421. map gd cd ~/Documents
  422. map td tab_new ~/Documents
  423. map md shell mv %s ~/Documents
  424. map Yd shell cp -r %s ~/Documents
  425. map gD cd ~/Downloads
  426. map tD tab_new ~/Downloads
  427. map mD shell mv %s ~/Downloads
  428. map YD shell cp -r %s ~/Downloads
  429. map ge cd /etc
  430. map te tab_new /etc
  431. map me shell mv %s /etc
  432. map Ye shell cp -r %s /etc
  433. map gh cd ~
  434. map th tab_new ~
  435. map mh shell mv %s ~
  436. map Yh shell cp -r %s ~
  437. map gm cd ~/Music
  438. map tm tab_new ~/Music
  439. map mm shell mv %s ~/Music
  440. map Ym shell cp -r %s ~/Music
  441. map go cd /opt
  442. map to tab_new /opt
  443. map mo shell mv %s /opt
  444. map Yo shell cp -r %s /opt
  445. map gp cd ~/Pictures
  446. map tp tab_new ~/Pictures
  447. map mp shell mv %s ~/Pictures
  448. map Yp shell cp -r %s ~/Pictures
  449. map gr cd /
  450. map tr tab_new /
  451. map mr shell mv %s /
  452. map Yr shell cp -r %s /
  453. map gs cd ~/git/School-Work
  454. map ts tab_new ~/git/School-Work
  455. map ms shell mv %s ~/git/School-Work
  456. map Ys shell cp -r %s ~/git/School-Work
  457. map gS cd ~/.config/Scripts
  458. map tS tab_new ~/.config/Scripts
  459. map mS shell mv %s ~/.config/Scripts
  460. map YS shell cp -r %s ~/.config/Scripts
  461. map gu cd /usr
  462. map tu tab_new /usr
  463. map mu shell mv %s /usr
  464. map Yu shell cp -r %s /usr
  465. map gv cd ~/Videos
  466. map tv tab_new ~/Videos
  467. map mv shell mv %s ~/Videos
  468. map Yv shell cp -r %s ~/Videos
  469. map gws cd ~/git/mehalter.github.io
  470. map tws tab_new ~/git/mehalter.github.io
  471. map mws shell mv %s ~/git/mehalter.github.io
  472. map Yws shell cp -r %s ~/git/mehalter.github.io
  473. map gwp cd ~/Pictures/wallpapers
  474. map twp tab_new ~/Pictures/wallpapers
  475. map mwp shell mv %s ~/Pictures/wallpapers
  476. map Ywp shell cp -r %s ~/Pictures/wallpapers
  477. map g.f cd ~/dotfiles
  478. map t.f tab_new ~/dotfiles
  479. map m.f shell mv %s ~/dotfiles
  480. map Y.f shell cp -r %s ~/dotfiles
  481. map cfa shell vim ~/.zsh_aliases
  482. map cfb shell vim ~/.bashrc
  483. map cfcf shell vim ~/.config/Scripts/configs
  484. map cfcv shell vim ~/git/mehalter.github.io/resume/resume.tex
  485. map cfd shell vim ~/.Xresources
  486. map cff shell vim ~/.config/Scripts/folders
  487. map cfi shell vim ~/.config/i3/config
  488. map cfm shell vim ~/.config/mutt/muttrc
  489. map cfp shell vim ~/.config/polybar/config
  490. map cfq shell vim ~/.config/qutebrowser/config.py
  491. map cfr shell vim ~/.config/ranger/rc.conf
  492. map cft shell vim ~/.tmux.conf
  493. map cfv shell vim ~/.vimrc
  494. map cfx shell vim ~/.Xdefaults
  495. map cfz shell vim ~/.zshrc
  496. # DO NOT DELETE LMAO