Hooks: random wallpaper, panel on largest display
Bug #469114 reported by
Toon Verwaest
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
disper |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Since gnome doesn't support wallpapers on multiple monitors it might be nice to let disper automatically generate and use multi-monitor wallpapers, for example from a randomly selected set of wallpapers from a directory with images. With imagemagick this is very easy to do in a few lines of code. I have my own ruby extension script over disper; but it might be useful for everybody using disper + gnome. Just an idea.
Changed in disper: | |
importance: | Undecided → Wishlist |
summary: |
- Hooks on display switch (gnome wallpaper) + Hooks: random wallpaper, panel on largest display |
Changed in disper: | |
milestone: | 0.3.0 → none |
Changed in disper: | |
status: | In Progress → Triaged |
assignee: | wvengen (wvengen) → nobody |
To post a comment you must log in.
Btw, this is what I do on my machine to fix my display. I set the gnome-bar on the largest display of the two and build a wallpaper which assumes the positions that disper -e gives them to be left/right with the external one on the right; and that there are only two monitors.
I guess for disper you will have to do a bit more magic but well... at least this works for me and my dualscreen doesn't look so gHorrible. Requires ruby and librmagick-ruby.
cheers,
require "RMagick"
# activate monitor
`disper -e`
DIR="#{ ENV['HOME' ]}/.wallpaper" open(DIR) .to_a.reject {|f| /^\./.match(f)} /.wallpaper. jpg"
WALLS=Dir.
OUTFILE = "#{DIR}
INFO = `disper -l`
LINES = INFO.to_a
SCREENS = LINES.count / 2
def getimage /#{WALLS[ rand(WALLS. size)]} "
return "#{DIR}
end
def resolution(id)
line = LINES[id * 2 + 1]
line =~ /.* ([0-9]+)x([0-9]+)/
return $1.to_i, $2.to_i
end
def toolbarscreen(id) toplevels/ top_panel_ screen0/ monitor #{id}`
`gconftool-2 -t int --set /apps/panel/
end
if (SCREENS > 1) en(r1[0] < r2[0] ? 1:0) :ImageList. new(getimage, getimage) 0].crop_ resized! (*r1) 1].crop_ resized! (*r2) append( false). write(OUTFILE)
r1 = resolution(0)
r2 = resolution(1)
toolbarscre
images = Magick:
images[
images[
images.
else
`cp #{getimage} #{OUTFILE}`
end
`gconftool-2 -t str --set /desktop/ gnome/backgroun d/picture_ filename #{OUTFILE}`