Discussion:
[xmonad] [xmonad-contrib] Patch to add messages IncSpacing/SetSpacing to the Spacing modifier for dynamic adjustment
Anton Pirogov
2015-03-03 21:09:15 UTC
Permalink
This is such a small change that I think that it makes more sense to patch
it, instead of rolling my own. It just adds the message, nothing more, so
it does not break anything.

Thanks!

Best regards,
Anton Pirogov
adam vogt
2015-03-04 00:03:05 UTC
Permalink
Hi Anton,

Do you actually need the Read/Show instances? I think it's better to
put a function in the message:

data ModifySpacing = ModifySpacing (Int -> Int)

And possibly export these convenience functions:

setSpacing n = sendMessage (ModifySpacing (\_ -> n))
incSpacing n = sendMessage (ModifySpacing (+n))

Regards,
Adam
Post by Anton Pirogov
This is such a small change that I think that it makes more sense to patch
it, instead of rolling my own. It just adds the message, nothing more, so it
does not break anything.
Thanks!
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Anton Pirogov
2015-03-04 08:36:28 UTC
Permalink
Hi Adam,

thank you for your suggestions! Indeed I didn't need those instances and I
changed the message to your more flexible idea!

I don't know what is the right way to do it here and with darcs in general,
I used "darcs obliterate --last 1" and recorded a new patch. Here is the
updated patch, I hope it is ok now.

Regards,
Anton
Post by adam vogt
Hi Anton,
Do you actually need the Read/Show instances? I think it's better to
data ModifySpacing = ModifySpacing (Int -> Int)
setSpacing n = sendMessage (ModifySpacing (\_ -> n))
incSpacing n = sendMessage (ModifySpacing (+n))
Regards,
Adam
Post by Anton Pirogov
This is such a small change that I think that it makes more sense to
patch
Post by Anton Pirogov
it, instead of rolling my own. It just adds the message, nothing more,
so it
Post by Anton Pirogov
does not break anything.
Thanks!
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-03-10 18:28:15 UTC
Permalink
Thanks Anton,

I've pushed the patch.

Unfortunately I've made a bit of a mess of the history by including both
patches, and then needing to address the conflicts with another patch.

Regards,
Adam
Post by Anton Pirogov
Hi Adam,
thank you for your suggestions! Indeed I didn't need those instances and I
changed the message to your more flexible idea!
I don't know what is the right way to do it here and with darcs in
general, I used "darcs obliterate --last 1" and recorded a new patch. Here
is the updated patch, I hope it is ok now.
Regards,
Anton
Post by adam vogt
Hi Anton,
Do you actually need the Read/Show instances? I think it's better to
data ModifySpacing = ModifySpacing (Int -> Int)
setSpacing n = sendMessage (ModifySpacing (\_ -> n))
incSpacing n = sendMessage (ModifySpacing (+n))
Regards,
Adam
Post by Anton Pirogov
This is such a small change that I think that it makes more sense to
patch
Post by Anton Pirogov
it, instead of rolling my own. It just adds the message, nothing more,
so it
Post by Anton Pirogov
does not break anything.
Thanks!
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Anton Pirogov
2015-03-10 20:25:40 UTC
Permalink
Thanks!

As you seem to be someone who can include patches.. Could you tell me, what
is about my WallpaperSetter Hook? It it rejected? If yes, for which reason
exactly? Is it because it relies on external tools? (but so does also for
example Util.Dmenu and imagemagick is a quite "standard" tool in my
opinion). I think it is a generally useful addition and there is some
concrete fixable problem with it I am not aware of I could work on it.

Regards,
Anton
Post by adam vogt
Thanks Anton,
I've pushed the patch.
Unfortunately I've made a bit of a mess of the history by including both
patches, and then needing to address the conflicts with another patch.
Regards,
Adam
Post by Anton Pirogov
Hi Adam,
thank you for your suggestions! Indeed I didn't need those instances and
I changed the message to your more flexible idea!
I don't know what is the right way to do it here and with darcs in
general, I used "darcs obliterate --last 1" and recorded a new patch. Here
is the updated patch, I hope it is ok now.
Regards,
Anton
Post by adam vogt
Hi Anton,
Do you actually need the Read/Show instances? I think it's better to
data ModifySpacing = ModifySpacing (Int -> Int)
setSpacing n = sendMessage (ModifySpacing (\_ -> n))
incSpacing n = sendMessage (ModifySpacing (+n))
Regards,
Adam
Post by Anton Pirogov
This is such a small change that I think that it makes more sense to
patch
Post by Anton Pirogov
it, instead of rolling my own. It just adds the message, nothing more,
so it
Post by Anton Pirogov
does not break anything.
Thanks!
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
adam vogt
2015-03-10 20:58:51 UTC
Permalink
Hi Anton

Don't worry, the plan is to include it. I have made some changes to it
(such as passing -format "%w %h" to identify, so we don't need splitOn and
the text package to parse the output). I'll push it once I've checked that
I haven't broken wallpaper setter.

Thanks
Adam
Post by Anton Pirogov
Thanks!
As you seem to be someone who can include patches.. Could you tell me,
what is about my WallpaperSetter Hook? It it rejected? If yes, for which
reason exactly? Is it because it relies on external tools? (but so does
also for example Util.Dmenu and imagemagick is a quite "standard" tool in
my opinion). I think it is a generally useful addition and there is some
concrete fixable problem with it I am not aware of I could work on it.
Regards,
Anton
Post by adam vogt
Thanks Anton,
I've pushed the patch.
Unfortunately I've made a bit of a mess of the history by including both
patches, and then needing to address the conflicts with another patch.
Regards,
Adam
Post by Anton Pirogov
Hi Adam,
thank you for your suggestions! Indeed I didn't need those instances and
I changed the message to your more flexible idea!
I don't know what is the right way to do it here and with darcs in
general, I used "darcs obliterate --last 1" and recorded a new patch. Here
is the updated patch, I hope it is ok now.
Regards,
Anton
Post by adam vogt
Hi Anton,
Do you actually need the Read/Show instances? I think it's better to
data ModifySpacing = ModifySpacing (Int -> Int)
setSpacing n = sendMessage (ModifySpacing (\_ -> n))
incSpacing n = sendMessage (ModifySpacing (+n))
Regards,
Adam
Post by Anton Pirogov
This is such a small change that I think that it makes more sense to
patch
Post by Anton Pirogov
it, instead of rolling my own. It just adds the message, nothing
more, so it
Post by Anton Pirogov
does not break anything.
Thanks!
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Loading...