conf-gnusocial.el 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ;;; Code:
  2. (require 'gnu-social-mode)
  3. ;; User config
  4. (setq gnu-social-username "distopico"
  5. gnu-social-server "quitter.se"
  6. gnu-social-port 443
  7. ;;gnu-social-display-max-dents 20
  8. gnu-social-new-dents-count 1
  9. gnu-social-enable-highlighting t
  10. gnu-social-enable-striping t
  11. ;; gnu-social-image-stack t
  12. gnu-social-scroll-mode t
  13. gnu-social-icon-mode t
  14. gnu-social-soft-wrap-status t
  15. gnu-social-status-format "\t %i %s: %h%t \n\t - %@ | from %f%L%r \n"
  16. gnu-social-stripe-bg-color "#001214"
  17. gnu-social-reply-bg-color "#002125"
  18. gnu-social-highlight-bg-color "cyan")
  19. ;; Custom keys
  20. (define-key gnu-social-mode-map (kbd "C-q") 'distopico:gnusocial-close)
  21. (define-key gnu-social-mode-map (kbd "M-q") 'kill-this-buffer)
  22. (define-key gnu-social-mode-map (kbd "S") 'gnu-social-update-status-interactive)
  23. (define-key gnu-social-mode-map (kbd "D") 'gnu-social-direct-message-interactive)
  24. ;; Functions
  25. (defun distopico:gnusocial-open (&optional open-same-window)
  26. "Open gnusocial in fullscreen and delete other windows"
  27. (interactive)
  28. (open-buffer-delete-others "*gnu-social*" :gnusocial-fullscreen 'gnu-social))
  29. (defun distopico:gnusocial-close ()
  30. "Restores the previous window configuration and burry gnusocial buffer"
  31. (interactive)
  32. (bury-buffer-restore-prev :gnusocial-fullscreen))
  33. (defun distopico:gnusocial-new-dents-hook ()
  34. (gnu-social-icon-mode t)
  35. (gnu-social-scroll-mode t))
  36. (defun distopico:gnusocial-init-load-hook ()
  37. (gnu-social)
  38. (when (eq major-mode 'gnu-social-mode)
  39. (switch-to-previous-buffer)))
  40. (add-hook 'gnu-social-new-dents-hook 'distopico:gnusocial-new-dents-hook)
  41. (add-hook 'distopico:after-init-load-hook 'distopico:gnusocial-init-load-hook)
  42. (provide 'conf-gnusocial)