Open milkypostman opened 11 years ago
You're welcome Donald, I think you may want to add Jonathan Chu to your authors list (depending on which version you are forking from.)
You can give me commit access if possible, I'd be glad to help author powerline going forward.
I didn't look closely as a storm has knocked out my primary net connection today, so most Internet related activities are a chore for me for a couple of days. (Perils of living right next to an ocean)
Did you absorb the color interpolation stuff I added too?
Anyway, thanks for pinging me, I'll take a better look when my service is restored.
Cheers
On Wednesday, 3 April 2013, Donald Ephraim Curtis wrote:
@jasonm23 https://github.com/jasonm23 I've stolen all your separators, and I've made the mode-line height customizable (except in some cases where a separator has to be a certain height to look decent).
Would you want to checkout my project and see if maybe I could just give you commit access and we could work from there. I think the codebase is a bit cleaner and a little more flexible.
powerline https://github.com/milkypostman/powerline
— Reply to this email directly or view it on GitHubhttps://github.com/jasonm23/emacs-mainline/issues/1 .
jasonm23@gmail.com skype: jasonm23 m: (aus) : +61 (0)409 307 977
twitter/instagram: @ocodo soundcloud: http://soundcloud.com/ocodo mixcloud: http://mixcloud.com/ocodo
Ah! Great! Quick reply.
Yes, I did add the interpolation stuff, very cool. It was actually really easy to add all of your separators. The only difference between your separators and mine are that I pass the face directly to the separator and let is pull out the colors itself. I did this because it allowed me to fix a problem when the mode-line
face was defined with a box that has a border of -1
. Before you would get some border artifacts but actually setting the :face
when rendering the images seemed to fix this and to do so each separator needs to specify which face it wants to be rendered on. That is, separators can add a :face
property to their actual image
object and I have a function that pulls it out when actually propertize
ing that part of the mode-line.
Mainly I took each of your themes and---except for wave and brace---I made it so the separators can be generated for any mode-line height.
I'll go ahead and try to explain what I did so you have something to read since your internet is crappy.
Then I added two customization variables powerline-default-separator
and powerline-default-separator-dir
. The former specifies the type of separator (arrow, brace, butt, etc.) and the latter is a cons
that defines the orientation of the separator on the left hand side and right and side, respectively. Thus setting powerline-default-separator
to slant
and setting powerline-default-separator-dir
to (left . left)
would be the same as setting your main-line-separator-style
to slant-left
. But it means that you don't have to actually pre-define any set of customizations in the code. And adding a new separator is as easy as adding a function for the left and right orientations.
Where possible I actually use a singe macro to generate both the left and the right separators. For example, my arrow function does this. I'm not sure how much I like it or if there is a way to simplify it but it's just the way I did it and if you think there is a better way I'm open to it.
The mode-line-format
that I generate is a bit different that the one included in the original powerline because I want the center fill to be exact down to the pixel, thus the "right aligned" components are truly right aligned. In order to do this I have to calculate the width of the right-hand items manually, and pass that to the fill function.
Best
Thanks for the write up Donald,
I still don't have Internet (proper) but I have a repair (supposedly) happening in the next 24 hours, so I'm on mobile tethering so I can get some work done.
Glad you got a fix for box face in there, I'll give it the current version (on melpa) a try and see how I go.
Expect some follow up later today (or perhaps tomorrow for you.)
Cheers, Jason.
On 3 April 2013 16:09, Donald Ephraim Curtis notifications@github.com wrote:
Ah! Great! Quick reply.
Yes, I did add the interpolation stuff, very cool. It was actually really easy to add all of your separators. The only difference between your separators and mine are that I pass the face directly to the separator and let is pull out the colors itself. I did this because it allowed me to fix a problem when the mode-line face was defined with a box that has a border of -1. Before you would get some border artifacts but actually setting the :face when rendering the images seemed to fix this and to do so each separator needs to specify which face it wants to be rendered on. That is, separators can add a :face property to their actual image object and I have a function that pulls it out when actually propertizeing that part of the mode-line.
Mainly I took each of your themes and---except for wave and brace---I made it so the separators can be generated for any mode-line height.
I'll go ahead and try to explain what I did so you have something to read since your internet is crappy.
Then I added two customization variables powerline-default-separator and powerline-default-separator-dir. The former specifies the type of separator (arrow, brace, butt, etc.) and the latter is a cons that defines the orientation of the separator on the left hand side and right and side, respectively. Thus setting powerline-default-separator to slant and setting powerline-default-separator-dir to (left . left) would be the same as setting your main-line-separator-style to slant-left. But it means that you don't have to actually pre-define any set of customizations in the code. And adding a new separator is as easy as adding a function for the left and right orientations.
Where possible I actually use a singe macro to generate both the left and the right separators. For example, my arrow function does this. I'm not sure how much I like it or if there is a way to simplify it but it's just the way I did it and if you think there is a better way I'm open to it.
The mode-line-format that I generate is a bit different that the one included in the original powerline because I want the center fill to be exact down to the pixel, thus the "right aligned" components are truly right aligned. In order to do this I have to calculate the width of the right-hand items manually, and pass that to the fill function.
Best
— Reply to this email directly or view it on GitHub.
Just been checking out powerline and I wasn't able to use the default theme, it seems to be broken, I tested with Emacs 24.3 on OS X and on Debian/X (under XFCE) - I can use the powerline-center-theme (and powerline-center-default ?) - powerline-nano-theme works too, however there's no separators.
I also seemed to have trouble changing the powerline separator, but I didn't look into it.
(meanwhile I noticed that main-line is badly broken on X / Xfce, the percent xpm seems to be broken.)
On 4 April 2013 10:30, Jason M jasonm23@gmail.com wrote:
Thanks for the write up Donald,
I still don't have Internet (proper) but I have a repair (supposedly) happening in the next 24 hours, so I'm on mobile tethering so I can get some work done.
Glad you got a fix for box face in there, I'll give it the current version (on melpa) a try and see how I go.
Expect some follow up later today (or perhaps tomorrow for you.)
Cheers, Jason.
On 3 April 2013 16:09, Donald Ephraim Curtis notifications@github.com wrote:
Ah! Great! Quick reply.
Yes, I did add the interpolation stuff, very cool. It was actually really easy to add all of your separators. The only difference between your separators and mine are that I pass the face directly to the separator and let is pull out the colors itself. I did this because it allowed me to fix a problem when the mode-line face was defined with a box that has a border of -1. Before you would get some border artifacts but actually setting the :face when rendering the images seemed to fix this and to do so each separator needs to specify which face it wants to be rendered on. That is, separators can add a :face property to their actual image object and I have a function that pulls it out when actually propertizeing that part of the mode-line.
Mainly I took each of your themes and---except for wave and brace---I made it so the separators can be generated for any mode-line height.
I'll go ahead and try to explain what I did so you have something to read since your internet is crappy.
Then I added two customization variables powerline-default-separator and powerline-default-separator-dir. The former specifies the type of separator (arrow, brace, butt, etc.) and the latter is a cons that defines the orientation of the separator on the left hand side and right and side, respectively. Thus setting powerline-default-separator to slant and setting powerline-default-separator-dir to (left . left) would be the same as setting your main-line-separator-style to slant-left. But it means that you don't have to actually pre-define any set of customizations in the code. And adding a new separator is as easy as adding a function for the left and right orientations.
Where possible I actually use a singe macro to generate both the left and the right separators. For example, my arrow function does this. I'm not sure how much I like it or if there is a way to simplify it but it's just the way I did it and if you think there is a better way I'm open to it.
The mode-line-format that I generate is a bit different that the one included in the original powerline because I want the center fill to be exact down to the pixel, thus the "right aligned" components are truly right aligned. In order to do this I have to calculate the width of the right-hand items manually, and pass that to the fill function.
Best
— Reply to this email directly or view it on GitHub.
Seems the default-theme issue was the one reported already, which-func-mode
Just calling (which-func-mode)
made it work, odd.
i created a fix for the which-function-mode
problem last night but, ironically or coincidentally, my internet was down.
I just got around to adding you to the repo as a contributor and I pushed a fix for the which-func-mode
error.
how are you trying to change the separator?
there is also a little bit of a known problem when doing certain things, like if you manually set the powerline height, you need to call (powerline-reset)
but this can easily be fixed by adding a call to that function in the defcustom
variable and also by wrapping the variable powerline-height
with something like powerline-set-height
which should probably be an interactive function. I just haven't gotten around to doing it and I hate to add too many functions. powerline-height
is more of an advanced user feature.
I also added a simple tweak so that if you use a theme which has a smaller font that your default-face
then you can let powerline know using powerline-text-scale-factor
which allows you to get something like this:
This is with the soothe-theme
available in MELPA, powerline-text-scale-factor = .75
and powerline-height = 10
Seems to be working ok now, not sure why but the separator variable wasn't showing in set-variable TAB completion or in customize.
We should probably introduce a change log in the elpa format
;;; Change Log:
;;; 2.1.0 : blah blah blah, blah blah, blah.
I'll let you know if I'm about to do a push, so we don't keep jumping on the file at the same time, it'll be easier (perhaps) if you just ping my email at jasonm23@gmail.com / or IM etc. Let me know what works best for you. Btw are you on EST / PST or some other time zone? (I'm in Sydney.)
Seeing the following error on the chamfer separator, have yet to check the rest...
Getting a few sizing errors on the others, but chamfer is the only one rendering the wrong color.
I'll document & look into the other sizing issues, and open a new issue for chamfer. (will do tomorrow, about to turn in now)
Note that some separatists require a minimum height and brace doesn't currently do dynamic sizing.
On Apr 4, 2013, at 7:25, JasonM23 notifications@github.com wrote:
Getting a few sizing errors on the others, but chamfer is the only one rendering the wrong color.
I'll document & look into the other sizing issues, and open a new issue for chamfer. (will do tomorrow, about to turn in now)
— Reply to this email directly or view it on GitHub.
@jasonm23 that is weird about the chamfer. I'm not sure why it would be any different than any other theme.
you may want to try powerline-reset
and/or you possibly reset the memoize cache by doing (pl/reset-cache)
Yes, (powerline-reset)
fixes all the issues I was having. it's looking
good.
jasonm23@gmail.com skype: jasonm23 m: (aus) : +61 (0)409 307 977
twitter/instagram: @ocodo soundcloud: http://soundcloud.com/ocodo mixcloud: http://mixcloud.com/ocodo
On 5 April 2013 12:12, Donald Ephraim Curtis notifications@github.comwrote:
@jasonm23 https://github.com/jasonm23 that is weird about the chamfer. I'm not sure why it would be any different than any other theme.
you may want to try powerline-reset and/or you possibly reset the memoize cache by doing (pl/reset-cache)
— Reply to this email directly or view it on GitHubhttps://github.com/jasonm23/emacs-mainline/issues/1#issuecomment-15934047 .
Yeah this is why we need a better mechanism for switching settings.
There is also a know problem when you change from a separator requiring many a large height to one that is shorter. To make the HUD dynamically size I have to calculate the modeline height but when you size back down, the HUD retains the old large height.
I don't know how to fix this problem elegantly. Except to temporarily remove the HUD so that it shrinks back down. An allows the modeline to shrink.
Glad to hear things are working.
On Apr 4, 2013, at 21:01, JasonM23 notifications@github.com wrote:
Yes,
(powerline-reset)
fixes all the issues I was having. it's looking good.jasonm23@gmail.com skype: jasonm23 m: (aus) : +61 (0)409 307 977
twitter/instagram: @ocodo soundcloud: http://soundcloud.com/ocodo mixcloud: http://mixcloud.com/ocodo
On 5 April 2013 12:12, Donald Ephraim Curtis notifications@github.comwrote:
@jasonm23 https://github.com/jasonm23 that is weird about the chamfer. I'm not sure why it would be any different than any other theme.
you may want to try powerline-reset and/or you possibly reset the memoize cache by doing (pl/reset-cache)
— Reply to this email directly or view it on GitHubhttps://github.com/jasonm23/emacs-mainline/issues/1#issuecomment-15934047 .
— Reply to this email directly or view it on GitHub.
@jasonm23 I've stolen all your separators, and I've made the mode-line height customizable (except in some cases where a separator has to be a certain height to look decent).
Would you want to checkout my project and see if maybe I could just give you commit access and we could work from there. I think the codebase is a bit cleaner and a little more flexible.
powerline