Discussion:
[xmonad] New hook to set a distinct wallpaper per workspace, please add to xmonad-contrib
Anton Pirogov
2015-02-28 16:34:01 UTC
Permalink
Hi,

I am new on the list so I hope I do this correctly...

I have written a log hook to set wallpapers. The special thing here is,
that you can assign a wallpaper (or a set to be chosen randomly from) to
each workspace, so when you have workspace A on screen 1 and B on screen 2,
you see the according images on these screens and if you swap the
workspaces, the wallpapers get swapped too. Wallpapers are always applied
scaled and it detects vertical screens and rotates images accordingly (so
any wallpaper will be rendered on any screen in a sane way).

This hook has been tested by me for over a year already and has not failed
me, so I decided to show it to the public, I hope this is worth being
integrated into xmonad-contrib.

Best regards,
Anton Pirogov
Ondřej Súkup
2015-02-28 17:05:34 UTC
Permalink
great, very thx
Post by Anton Pirogov
Hi,
I am new on the list so I hope I do this correctly...
I have written a log hook to set wallpapers. The special thing here is,
that you can assign a wallpaper (or a set to be chosen randomly from) to
each workspace, so when you have workspace A on screen 1 and B on screen 2,
you see the according images on these screens and if you swap the
workspaces, the wallpapers get swapped too. Wallpapers are always applied
scaled and it detects vertical screens and rotates images accordingly (so
any wallpaper will be rendered on any screen in a sane way).
This hook has been tested by me for over a year already and has not failed
me, so I decided to show it to the public, I hope this is worth being
integrated into xmonad-contrib.
Best regards,
Anton Pirogov
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Brandon Allbery
2015-02-28 17:09:36 UTC
Permalink
Post by Anton Pirogov
I have written a log hook to set wallpapers. The special thing here is,
that you can assign a wallpaper (or a set to be chosen randomly from) to
each workspace, so when you have workspace A on screen 1 and B on screen 2,
you see the according images on these screens and if you swap the
workspaces, the wallpapers get swapped too. Wallpapers are always applied
scaled and it detects vertical screens and rotates images accordingly (so
any wallpaper will be rendered on any screen in a sane way).
The main reason this hasn't been done already is that it tends to "lag"
workspace switching. On a fast enough machine, it can work; on slower ones,
the trick used by most desktop environments is preferred (a window per
workspace that sits under all other windows). Not saying this is a bad
idea, just mentioning.
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Anton Pirogov
2015-02-28 17:13:00 UTC
Permalink
Well, there is indeed a small delay in the rendering, but not the workspace
switching itself, because I spawn a process in the background using
imagemagick and feh doing the heavy lifting. It is not the most beautiful
thing but it works quite well!
Post by Brandon Allbery
Post by Anton Pirogov
I have written a log hook to set wallpapers. The special thing here is,
that you can assign a wallpaper (or a set to be chosen randomly from) to
each workspace, so when you have workspace A on screen 1 and B on screen 2,
you see the according images on these screens and if you swap the
workspaces, the wallpapers get swapped too. Wallpapers are always applied
scaled and it detects vertical screens and rotates images accordingly (so
any wallpaper will be rendered on any screen in a sane way).
The main reason this hasn't been done already is that it tends to "lag"
workspace switching. On a fast enough machine, it can work; on slower ones,
the trick used by most desktop environments is preferred (a window per
workspace that sits under all other windows). Not saying this is a bad
idea, just mentioning.
--
brandon s allbery kf8nh sine nomine associates
unix, openafs, kerberos, infrastructure, xmonad
http://sinenomine.net
Brandon Allbery
2015-02-28 17:14:34 UTC
Permalink
Post by Anton Pirogov
Well, there is indeed a small delay in the rendering, but not the
workspace switching itself, because I spawn a process in the background
using imagemagick and feh doing the heavy lifting. It is not the most
beautiful thing but it works quite well!
One thing that occurs to me is what happens when you switch between
multiple workspaces very quickly. Also, how does this work in multihead
setups?
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Anton Pirogov
2015-02-28 17:19:33 UTC
Permalink
That is the most ugly part about it - I take the pictures, get the screen
rectangles, transform the pictures accordingly and stitch them together to
a huge picure of the virtual xinerama screen size. Then it is rendered onto
the root window and each monitor (as a view onto the virtual huge screen
size) shows the wallpaper I put into its rectangle.
Post by Brandon Allbery
Post by Anton Pirogov
Well, there is indeed a small delay in the rendering, but not the
workspace switching itself, because I spawn a process in the background
using imagemagick and feh doing the heavy lifting. It is not the most
beautiful thing but it works quite well!
One thing that occurs to me is what happens when you switch between
multiple workspaces very quickly. Also, how does this work in multihead
setups?
--
brandon s allbery kf8nh sine nomine associates
unix, openafs, kerberos, infrastructure, xmonad
http://sinenomine.net
Loading...