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

Feature request: to be able to theme the general interface page (index) and other suggestions #25

Closed
sdothum opened this issue Dec 8, 2015 · 10 comments

Comments

@sdothum
Copy link

sdothum commented Dec 8, 2015

It would be nice to be able to theme the index page -- especially the column colors (and widths). The defaults are nicely muted but perhaps a bit too much so for my vision!

I found the "issue" regarding being able to modify the CSS for the thread view and now astroid is very usable for me. With regards to that, allowing an override style sheet to reside in the .config/astroid directory would be nice and prevent changes from being overwritten by updates.

Once a sup user, I have for sometime now been using alot/notmuch. Being able to bind search filter actions (eg tags) to keys is a very nice feature of alot which I would love to see available with astroid.

Keep up the good work.
Regards,
Steven

@gauteh
Copy link
Member

gauteh commented Dec 9, 2015

Hi, thanks for testing out!

I just pushed two changes:

sdothum writes on December 8, 2015 23:24:

It would be nice to be able to theme the index page -- especially the column colors. The defaults are nicely muted but perhaps a bit too much so for my vision!

  • Make a bunch of the parameters for the thread index cells
    configurable, if you update and run astroid these entries will be
    added to the config file with their default values. Perhaps the
    font_description (which is currently fetched from the system monospace
    setting) is interesting. Also, you can set colors for tags, and number
    of chars to use for the different fields.

    Please let me know if you are missing an option.

I found the "issue" regarding being able to modify the CSS for the thread view and now astroid is very usable for me. With regards to that, allowing an override style sheet to reside in the .config/astroid directory would be nice and prevent changes from being overwritten by updates.

  • Look in the config directory for the html and css file first, I put in
    a version number on top so that I can check if the user-modified file
    gets outdated (in case we make changes to the original)

Once a sup user, I have for sometime now been using alot/notmuch. Being able to bind search filters to keys is a very nice feature of alot which I would love to see available with astroid.

Yes, this would definetely be a nice feature. This is not difficult, but
require a bit of effort. Related to #21.

Keep up the good work.
Regards,
Steven

Thanks!

@sdothum
Copy link
Author

sdothum commented Dec 9, 2015

Thanks for the quick response and the patches! I was able to configure the available thread index cell attributes. The ability to specify the font specifically for astroid vs needing to set a system wide global default is very nice. If there is anything I would do in future, it would be to allow theming of all the columns (cells) on the index page: date, count, flags, to fields, etc. and background color. But I am sure you have a list of more pertinent features.

I tried copying the thread-view.html and css files to .config/astroid and altering the css file specifically. The changes did not appear so the /usr/share configs were still in effect.

Not sure if you have implemented handling of attachments yet. Attachments such as jpg images show up beautifully as thumbnails. But cannot be opened. open-xdg doesn't seem to work in my configuration at least. I see it listed in the astroid stdout but it appears to terminate immediately without launching what should be the associated application. (I do not have this mime problem with the alot mua).

With other types of attachments such as video, open-xdg doesn't even seem to get invoked.

Off topic: you are one of the maintainers of sup? We probably corresponded on the mailing lists way way back when it was revived. sup's ruby xapian eventually became problematic for me which led me to notmuch. Configuration of alot with notmuch I found much more flexible than sup's sources.yaml -- largely due to my use of imapfilter tag application. I wish sup could plug into notmuch, it's a great mua. Maintaining 2 mua's seems like a lot of work! Kudos to you.

@gauteh
Copy link
Member

gauteh commented Dec 10, 2015

sdothum writes on December 9, 2015 19:42:

I tried copying the thread-view.html and css files to .config/astroid and altering the css file specifically. The changes did not appear so the /usr/share configs were still in effect.

They should be put in .config/astroid/ui/, my bad. I started on a wiki
here: https://github.com/gauteh/astroid/wiki/Customizing-the-user-interface

Please feel free to edit. I'll respond to the rest later... 🍻

@gauteh
Copy link
Member

gauteh commented Dec 11, 2015

sdothum writes on December 9, 2015 19:42:

Thanks for the quick response and the patches! I was able to configure the available thread index cell attributes. The ability to specify the font specifically for astroid vs needing to set a system wide global default is very nice. If there is anything I would do in future, it would be to allow theming of all the columns (cells) on the index page: date, count, flags, to fields, etc. and background color. But I am sure you have a list of more pertinent features.

At the moment I got one whole cell in the GtkTreeView and then I
calculate the columns manually to get more flexibility, I might actually
be able to achieve everything with standard TreeView columns - in which
things would get easier..

Anyway, the columns can be themed with pango markup (html like), and
even CSS. The markup is easy to expose to the configuration file (I'm
just putting the color value in there now).

Eventually I want to set up Python plugins, then it should be possible
to make user-defined widgets with Python. This is a bit more work
though. Is there anything specific you have in mind? It might be better
defaults than the ones I choose initially.

Not sure if you have implemented handling of attachments yet. Attachments such as jpg images show up beautifully as thumbnails. But cannot be opened. open-xdg doesn't seem to work in my configuration at least. I see it listed in the astroid stdout but it appears to terminate immediately without launching what should be the associated application. (I do not have this mime problem with the alot mua).

With other types of attachments such as video, open-xdg doesn't even seem to get invoked.

I am using a combination of Openbox and XFCE and I have set the
external_open_cmd command to "exo-open", this works pretty well for me.
Since you are seeing it in the output it seems like you are doing it
correctly, focusing the attachment with j/k and then pressing Enter or
'o'? I guess saving works fine? What exactly is the output?

Also; if for instance you are using Eye of Gnome for images and you
already have an instance of eog open, it will just fork which means that
the xdg-open process will exit - and astroid thinks you closed the
viewer and deletes the temporary attachment file. I solved this in Sup
by just keeping all attachments around untill it was closed.. Another
option is to delete them when the thread-view is closed? But then again,
what if it is a document and you made changes to it..

Off topic: you are one of the maintainers of sup? We probably corresponded on the mailing lists way way back when it was revived. xapian eventually became problematic for me even which led me to notmuch. Configuration of alot with notmuch I found much more flexible than sup's sources.yaml -- largely due to my use of imapfilter tag application. I wish sup could plug into notmuch, it's a great mua. Maintaining 2 mua's seems like a lot of work! Cudos to you.

That is true. I remember corresponding with you way way back! I
eventually realized that notmuch was the way to go for a Sup backend,
and secondly that Sup would have to be completely rewritten in something
more modern to resolve the issues that kept coming back. I also missed
viewing html mail, having multiple windows, previewing attachments and
stuff like that. The conclusion, after being unsatisfied with the
notmuch-clients available, was 'astroid'!

At the moment, I am not actively developing or using sup, but rather I
have been using astroid full-time for a year now. Sup is great, and I
did not want to just leave it hanging for now. Anyway; thanks! I hope
astroid will be useful!

@sdothum
Copy link
Author

sdothum commented Dec 11, 2015

It sounds like astroid is moving towards a very user configurable state! One thing you might want to consider is uploading an additional package to the Arch AUR "astroid-git" that builds from the latest source -- it would be much easier for Arch users such as myself to test your latest builds.

I use a tiling wm and did not think to try exo-open. It references different applications than my mime configuration so I will have to align that -- but it seems to work.

Looking forward to tracking your latest builds and feature extensions.

Steven

@gauteh
Copy link
Member

gauteh commented Dec 13, 2015

sdothum writes on December 11, 2015 19:39:

It sounds like astroid is moving towards a very user configurable state! One thing you might want to consider is uploading an additional package to the Arch AUR "astroid-git" that builds from the latest source -- it would be much easier for Arch users such as myself to test your latest builds.

I use a tiling wm and did not think to try exo-open. It references different applications than my mime configuration so I will have to align that -- but it seems to work.

Looking forward to tracking your latest builds and feature extensions.

Steven

Thanks!

I thought the package I made was a git package.. are you sure it doesn't
build the latest version?

  • gaute

@sdothum
Copy link
Author

sdothum commented Dec 16, 2015

I reverted back to your AUR package.. the feature set appears to work. (I misread your PKGBUILD).

@gauteh
Copy link
Member

gauteh commented Dec 16, 2015

sdothum writes on December 11, 2015 19:39:

I use a tiling wm and did not think to try exo-open. It references different applications than my mime configuration so I will have to align that -- but it seems to work.

One option that might work is to set up inotifywait to track the file
and not exit before the file has been closed as well. Perhaps with a
script like this:

requires inotify-tools (on arch linux).

my-xdg-open.sh

#! /usr/bin/bash
#
# wait for file to be closed and for xdg-open to finish

inotifywait -e close $1 &
ip=$!

xdg-open $1

wait $ip

otherwise, somehow check if the file is still open by any process and
not delete / return from this script before that.

@gauteh
Copy link
Member

gauteh commented Dec 31, 2015

Keybindings are now configurable, check out #21.

@gauteh
Copy link
Member

gauteh commented Dec 31, 2015

I am closing this, please re-open specific issues if there is something you are missing.

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

No branches or pull requests

2 participants