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.elv 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. use epm
  2. use str
  3. use util
  4. use config
  5. fn xqt [a]{ e $E:XBPS_DISTDIR/srcpkgs/$a/template }
  6. fn r [@a]{
  7. f = (mktemp)
  8. if ?(ranger --choosedir=$f $@a) { cd (e:cat $f) }
  9. rm -f $f
  10. }
  11. fn edit-current-command {
  12. print $edit:current-command > /tmp/elvish-edit-command-$pid.elv
  13. e /tmp/elvish-edit-command-$pid.elv </dev/tty >/dev/tty 2>&1
  14. edit:current-command = (slurp </tmp/elvish-edit-command-$pid.elv)[0..-1]
  15. }
  16. fn alias [cmd @a]{ put [@b]{ (external $cmd) $@a $@b } }
  17. ls~ = (alias lc)
  18. cat~ = (alias bat --paging=never)
  19. xr~ = (alias sudo xbps-remove -R)
  20. o~ = (alias gio open)
  21. g~ = (alias kitty +kitten hyperlinked_grep)
  22. edit:insert:binding[Ctrl-X] = { edit:-instant:start }
  23. edit:insert:binding[Alt-E] = { edit-current-command }
  24. edit:abbr = [
  25. &'.etc'='.local/etc/'
  26. ]
  27. {
  28. use github.com/xiaq/edit.elv/smart-matcher
  29. use theme
  30. use completers
  31. use autopairs
  32. smart-matcher:apply
  33. autopairs:enable
  34. util:add-before-readline {
  35. util:set-title (tilde-abbr $pwd)
  36. }
  37. util:add-after-readline [a]{
  38. if (eq $a '') { ls }
  39. util:set-title (str:split ' ' $a | take 1)' '(tilde-abbr $pwd)
  40. }
  41. }
  42. -override-wcwidth 🦀 2
  43. E:GPG_TTY = (tty)
  44. E:NIMPH_TOKEN = (cat ~/sns/github.key)