init-defuns.el 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ;; -*- lexical-binding: t; -*-
  2. (defun my/gtd ()
  3. "This command opens ~/things_to_do.org"
  4. (interactive)
  5. (find-file "~/prog/org/gtd.org"))
  6. (defun my/init.el ()
  7. "init-file opens ~/.emacs"
  8. (interactive)
  9. (find-file "~/.config/emacs/init.el"))
  10. (defun my/init-evil ()
  11. "loads my viper initialization file"
  12. (interactive)
  13. (load "~/.config/emacs/lisp/init-evil.el")
  14. (find-file "~/.config/emacs/lisp/init-evil.el"))
  15. (defun rc.lua ()
  16. "This command opens ~/.config/awesome/rc.lua"
  17. (interactive)
  18. (find-file "~/.config/awesome/rc.lua"))
  19. (defun emacs.texi ()
  20. "This command opens ~/manuals/cheatsheats/emacs.texi"
  21. (interactive)
  22. (find-file "~/manuals/cheatsheats/emacs.texi"))
  23. (defun gawk.texi ()
  24. "This command opens ~/manuals/cheatsheats/gawk.texi"
  25. (interactive)
  26. (find-file "~/manuals/cheatsheats/gawk.texi"))
  27. (defun systemd.texi ()
  28. "This command opens ~/manuals/systemd.texi"
  29. (interactive)
  30. (find-file "~/manuals/systemd.texi"))
  31. (defun test-awesome ()
  32. "this run /home/joshua/programming/bash/test-awesome.bash"
  33. (interactive)
  34. (start-process "testing-awesome" "test-of-awesome" "test-awesome.bash"))
  35. (defun sudo-find-file ()
  36. "Like find file, but opens the file as root."
  37. (interactive)
  38. (interactive "FSudo Find File: ")
  39. (let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name))))
  40. (find-file tramp-file-name)))
  41. (defun find-file-sudo (file-name)
  42. "Like find file, but opens the file as root."
  43. (interactive)
  44. (sudo-file-file))
  45. (defun view-hurd-file-in-browser ()
  46. "View this file in the browser"
  47. (interactive)
  48. (let [file (buffer-file-name)]))
  49. (provide 'init-defuns)