Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few small potential aesthetic changes to how it looks in the status #63

Open
Imaproshaman opened this issue Feb 9, 2022 · 5 comments

Comments

@Imaproshaman
Copy link

Imaproshaman commented Feb 9, 2022

The big icon could be changed to be the code type and the small icon could be changed to be the emacs logo if there's a custom code type icon (the small one is hard to see currently).

The text on the code type image could be changed to "editing a code type file".

I was also wondering about making the second line something like the front part of the file path, but I see that's already been mentioned here.

@Zulu-Inuoe
Copy link
Collaborator

With regards to the large/small icon positions - Yes there's actually a configuration option for that - elcord-use-major-mode-as-main-icon
That was added after-the-fact, and so it defaults to nil to preserve backwards behaviour. I'm not against changing it to default to t instead.

I'm open to changing the text, as a config option. Just need to figure out either

  1. A way to extract the file type (and if it's a code file) from the mode
  2. Some heuristic to figure that out.
    Open to PR's

Not entirely clear what you mean by

making the second line something like the front part of the file path

Could you provide an example or two?

@Imaproshaman
Copy link
Author

Imaproshaman commented Feb 11, 2022

Oh okay, the first part is good to know. As for the last part, I meant like the folder for what you're editing. Something like "In FolderThatContainsTheFileYou'reEditing". So not a full file path.

I don't know if that's possible and I also I don't know how it happened for me that one time. I was in the top line of the status before the main name of the file I was editing. It would make sense to not be a default option either.

@Imaproshaman
Copy link
Author

https://imgur.com/a/EXCnXXF Here's a picture where I opened a file by clicking the file tree in the buffer at the bottom and I got this. The file I'm editing is the "skin.ini" whereas the folder the ini file is in is the "[all] KMSkin v1.37.29.0". I'm not sure why the < and > are there, but I assume it's how Elcord interprets the folder and puts those symbols to surround the name of the folder. It would be cool to have an option for that folder to be displayed on the second line instead of the first, but I don't know if Elcord is able to read what folder the file you're editing it in, without you going through the buffer manually like I did. It only shows on the line that I'm in a folder when I do that manually anyways. So it's probably not possible.

@Mstrodl
Copy link
Owner

Mstrodl commented Mar 2, 2022

https://imgur.com/a/EXCnXXF Here's a picture where I opened a file by clicking the file tree in the buffer at the bottom and I got this. The file I'm editing is the "skin.ini" whereas the folder the ini file is in is the "[all] KMSkin v1.37.29.0". I'm not sure why the < and > are there, but I assume it's how Elcord interprets the folder and puts those symbols to surround the name of the folder.

elcord gets buffer names from buffer-name: https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Names.html

elcord/elcord.el

Lines 512 to 514 in ed8de0e

(defun elcord-buffer-details-format ()
"Return the buffer details string shown on discord."
(format "Editing %s" (buffer-name)))

This particular behavior presents itself when you open buffers for two different files with the same name (example: opening a/b/z and d/b/z will likely produce: z <a> and z <d> respectively)

I think this is something you could do yourself with emacs's normal buffer naming stuff, given the default mode-line displays the buffer name

@Imaproshaman
Copy link
Author

https://imgur.com/a/EXCnXXF Here's a picture where I opened a file by clicking the file tree in the buffer at the bottom and I got this. The file I'm editing is the "skin.ini" whereas the folder the ini file is in is the "[all] KMSkin v1.37.29.0". I'm not sure why the < and > are there, but I assume it's how Elcord interprets the folder and puts those symbols to surround the name of the folder.

elcord gets buffer names from buffer-name: https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Names.html

elcord/elcord.el

Lines 512 to 514 in ed8de0e

(defun elcord-buffer-details-format ()
"Return the buffer details string shown on discord."
(format "Editing %s" (buffer-name)))

This particular behavior presents itself when you open buffers for two different files with the same name (example: opening a/b/z and d/b/z will likely produce: z <a> and z <d> respectively)

I think this is something you could do yourself with emacs's normal buffer naming stuff, given the default mode-line displays the buffer name

Oh cool, that's really interesting. Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants