You are not logged in.
Hi,
I want to install a gnome theme with different background images for wide screens/normal screens. Both images are installed but the default configuration file should point to the right image (wide or normal). Then i need to find the user's screen resolution.
Would including these lines in the PKGBUILD be a correct solution? Or is it bad policy?
build() {
...
# find if we have a wide screen
local _WIDE_SCR=(1024x600,1280x800,1366x768,1440x900,1680x1050,1920x1200,1920x1080,2560x1600)
local _res="ZZ"
[ -f /usr/bin/xdpyinfo ] && _res=`xdpyinfo | awk '/dimensions/ {print $2}'`
if [[ $_WIDE_SCR =~ $_res ]] ; then
echo "BackgroundImage=/usr/share/pixmaps/backgrounds/gnome/other/AquaDreams-wide.jpg" >>index.theme
else
echo "BackgroundImage=/usr/share/pixmaps/backgrounds/gnome/other/AquaDreams.jpg" >>index.theme
fi
...
}
Thanks for your help.
Offline
Just use an install message imo. Users should carry out their own package configuration after install.
Offline
Just use an install message imo. Users should carry out their own package configuration after install.
Quoted for truth. It IS possible using xrandr and grep though. If you're really interested, go try it out. You really should leave it to the user though.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Thanks for your answers.
I agree users should take care of package configuration.
But in this case, it's not about the user's choice: some background images really don't fit a wide screen; and the author specifically included one background for regular screens and another for wide screens.
So my question is: would it be bad|dangerous|ugly|forbidden..., according to Arch rules?
@ngoonee: is using xrandr better than xdpyinfo?
Offline
Just issue a warning during package install, it's not like Arch is meant to pacman -Syu (or pacman -U or makepkg -i) and ignore everything else.
Besides using xrandr is not completely foolproof, the user may usually use something else than the resolution used during install or dual screen setups or something exotic.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
It's not possible to do cleanly. There is no guarantee that a package is built on the system that will install it. Just put an install message. Arch is DIY anyway, don't mess with autoconfiguration stuff.
[git] | [AURpkgs] | [arch-games]
Offline
OK. Thanks for your advice.
Offline