i3-workspace-names-daemon
i3-workspace-names-daemon copied to clipboard
Dynamic Titles, Pango Markup, Ignore Unknown
First of all, thank you for this great script, I use it as a daily driver and it is essential to me. These are some customizations I made for myself. Maybe you find some of the useful and consider integrating them. A lot of changes for one PR, I am sorry in advance (i used the 'black' code formatter, so the diff is not necessarily that large).
I mainly made these changes for differentiating multiple instances of the same applications (like an IDE). The idea is to show the "project name" or an equivalent besides the app icon. I hope the description in the README gives you an idea what it is supposed to do.
I don't know if you agree with changing the flag --no-unknown-name
instead of --no-match-not-show-name
, which is very confusing to me. But I can revert it again if you don't agree.
As pango markup is supported natively, users should have the possibility to use arbitrary icons on their system. (See README).
Also I added some tests to verify everything is working as before. You can run them with python -m unittest discover .
.
This is just a suggestion, feel free to deny it. I understand that those are not minor changes. Thank you for your work
Hi, thanks a lot for this - it looks really good. I've got very limited bandwidth right now - @CastixGitHub is this something you would be able to review in depth? If so I'll defer to your judgement and cut a new release after.
I'm fine with the linter and if we could wire up the tests to Github CI that would be great. The only thing I object to is changing/removing an existing flag since it might trip some people up. Perhaps we could make the help text clearer?
@cboddy Thank you for taking the time to look over this.
Yes, changing the existing flag is probably a bad idea. I'll try to extend the documentation to make it more understandable instead. Also I will try to enable the GitHub Actions CI.
@cboddy @CastixGitHub I made the suggested changes
- Add GitHub Actions / Workflow CI with pytest
- Revert the flag name to the original name
As arbitrary icons can be specified now, shall we also close issue #10 with this?
hi there, I didn't check github notifications for a while... so I just made a PR to @bastidest https://github.com/bastidest/i3-workspace-names-daemon/pull/2 with some other small modifications based on his fork :+1: I agree that #10 can be closed too
I'm thinking that another improvement could be to have some sort of list of regex for window title, so you can have a different icon for each window of you browser (if you match your browser with window_class, then you can set the best icon based on window_title)
This PR can be merged anyway, it looks really good.
Breaking changes such as --no-match-not-show-name are well accepted by me until a first stable release, and Development Status :: 3 - Alpha
classifier can be added to make it a little bit more clear
Great, I merged your PR!
So shall we change --no-match-not-show-name
to --no-unknown-name
? What do you prefer?
Looks very merge-able to me. I would move the --no-match-not-show-name
to another issue, if needed.
Anything missing?
Thanks @bastidest for your patience :)
I will finish checking this over tonight. One thing so far - my system (ubuntu 18.04 LTS) doesn't have the pango font AFAICT. Could you add a section for installing it to the README?
To my knowledge, pango is not a font itself, but a font rendering system. It is responsible for interpreting the HTML-like Tags and replacing them with the rendered icon/text. As i3status supports pango, I believe it has libpango as a dependency, so pango should work out of the box.
The pango-view
utility probably is not installed on your system, you can get it by installing pango1.0-tools.
I will add that as a note to the readme.
yes, the readme shows a pango rendered icon (emacs icon) and links to two fonts that provide that icon with the same code. the readme also shows an example of a blue text, so you can try pango support even without installing any font at all (or you could use fontawesome getting the icon code directely from fa_icons.py)
I added the hint regarding the pango tools in the README (and only had two typos on the way :1st_place_medal: ). Let me know if you need any help getting it working.
Any updates? :smile: