Difference between pages "Package:Feh" and "Emerge/pt-br"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
{{Ebuild
== Principiando com o emerge ==
|Summary=A fast, lightweight imageviewer using imlib2
Emerge é o front-end para o gerenciador de Portage do funtoo. Com o emerge é fácil instalar, atualizar ou remover pacotes.
|CatPkg=media-gfx/feh
|Maintainer=
|Homepage=http://feh.finalrewind.org/
}}
=== What is feh? ===


<blockquote>
=== Atualizar a Base de Dados de Pacote ===
feh is an X11 image viewer aimed mostly at console users. Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions.[http://feh.finalrewind.org/ Feh homepage]
'''Sincronize base de dados de pacote local. Isso atualizará sua arvore Portage local com a ultima versão do Funtoo ebuilds.'''
</blockquote>
<console>
###i## emerge --sync
</console>


== USE-Flags ==
=== Buscar pacotes ===
'''Busca pacotes por nome.'''
<console>
###i## emerge -s firefox
###i## emerge --search firefox
</console>


;<code>curl</code>: Add support for the Client-Side URL transfer library.
'''Busca pacotes pode descrição.'''
;<code>debug</code>: Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces, see http://www.gentoo.org/proj/en/qa/backtraces.xml.
<console>
;<code>exif</code>: Add support for reading EXIF headers from JPEG and TIFF images.
###i## emerge -S web browser
;<code>xinerama</code>: Add support for the xinerama X11 extension, which is mandator if you work in a multiple monitor setup.
###i## emerge --searchdesc web browser
</console>
 
=== Install packages ===
'''Instalar pacote.'''
<console>
###i## emerge firefox
</console>
 
'''Instalar múltiplos pacotes.'''
<console>
###i## emerge firefox thunderbird
</console>


== Installing feh ==
'''Instalar pacotes. Pedir por confirmação antes de realizar quaisquer alterações. Exibe saída em verbose.'''
After adding your USE flags (or not) to <tt>/etc/portage/package.use/feh</tt>, you can emerge feh:
<console>
<console>
###i## emerge feh
###i## emerge -av firefox
###i## emerge --ask firefox
</console>
</console>


== Using feh ==
=== Remove packages ===
=== Set desktop background ===
'''Remove package.'''
<tt>feh</tt> has several options for setting your desktop background:
<console>
* <tt>--bg-center</tt>: Center the image file on the background. If the image file is smaller in resolution than the screen resolution, it will have black borders around it.
###i## emerge -C firefox
* <tt>--bg-scale</tt>: Fit the image to the background without repeating it, cutting parts of the image off, or using black borders. Because of these changes, the aspect ratio is not preserved.
###i## emerge --unmerge firefox
* <tt>--bg-fill</tt>: Similar to <tt>--bg-scale</tt> except that it tries to fill the image to the screen while maintaining its aspect ratio. This may result in parts of the image being cut off.
</console>
* <tt>--bg-max</tt>: Similar to <tt>--bg-fill</tt>, except that scales the image to the maximum size that fits the screen. This leads to black borders on one side.
* <tt>--bg-tile</tt>: Tile the image across the screen.


Here is an example:
'''Remove package. Ask for confirmation before performing any changes.'''
<console>
<console>
###i## feh --bg-scale ~/path/to/picture.jpg
###i## emerge -aC firefox
</console>
</console>


=== Source fehbg to set your wallpaper in Openbox ===
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
After you have run <tt>feh</tt> one time, the directory of the image file is stored in <tt>~/.fehbg</tt>. This file can be sourced in your <tt>.config/openbox/autostart</tt> to load the picture instead of typing out <tt>feh --bg-scale /picture/location.jpg</tt>:
<console>
###i## emerge -a --depclean
</console>


{{file|name=~/.config/openbox/autostart|desc= |body=
=== Update packages ===
...
'''Update all packages.'''
~/.fehbg &
<console>
...
###i## emerge -uDN @world
}}
</console>


=== Change wallpaper automatically ===
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
With the help of a simple bash script, feh can be configured to automatically change the desktop background. To accomplish this task, we have to create the bash script. Open up your favorite editor and create a script that looks something like the following, where <code>sleep 1m</code> can be configured to any time interval that you want. Name the script whatever you want. Something like <code>WallpaperShuffle</code> will work just fine:
<console>
###i## emerge -uavDN @world
</console>


{{file|name=WallpaperShuffle|lang=bash|desc= |body=
'''When upgrading to a new version of perl, it is necessary to also run <code>perl-cleaner</code> afterwards:'''
#!/bin/bash
<console>
while true; do
###i## emerge -auvDN @world
    feh --bg-scale "$(find ~/Pictures/Wallpapers/ -type f {{!}} sort -R {{!}} tail 1)" &
###i## perl-cleaner --all
    sleep 1m &
</console>
done
}}
{{Fancynote| <code>~/Pictures/Wallpapers/</code> can be replaced by any directory that you have a hoard of image files in.}}


After creating this script, we have to source it in our window manager's startup file. For example, if you are using Openbox, source it in <code>.config/openbox/autostart</code>:
{{Note|This requirement of running <code>perl-cleaner</code> will eventually go away, once all perl-related ebuilds are updated to EAPI 5. EAPI 5 is a version of the Ebuild specification that supports smart updating of perl-related bits.}}
{{file|name=.config/openbox/autostart|desc= |body=
...
WallpaperShuffle &
...
}}
{{PageNeedsUpdates}}
{{EbuildFooter}}

Revision as of 16:52, February 7, 2015

Principiando com o emerge

Emerge é o front-end para o gerenciador de Portage do funtoo. Com o emerge é fácil instalar, atualizar ou remover pacotes.

Atualizar a Base de Dados de Pacote

Sincronize base de dados de pacote local. Isso atualizará sua arvore Portage local com a ultima versão do Funtoo ebuilds.

root # emerge --sync

Buscar pacotes

Busca pacotes por nome.

root # emerge -s firefox
root # emerge --search firefox

Busca pacotes pode descrição.

root # emerge -S web browser
root # emerge --searchdesc web browser

Install packages

Instalar pacote.

root # emerge firefox

Instalar múltiplos pacotes.

root # emerge firefox thunderbird

Instalar pacotes. Pedir por confirmação antes de realizar quaisquer alterações. Exibe saída em verbose.

root # emerge -av firefox
root # emerge --ask firefox

Remove packages

Remove package.

root # emerge -C firefox
root # emerge --unmerge firefox

Remove package. Ask for confirmation before performing any changes.

root # emerge -aC firefox

Remove orphaned packages. Ask for confirmation before performing any changes.

root # emerge -a --depclean

Update packages

Update all packages.

root # emerge -uDN @world

Update all packages. Ask for confirmation before performing any changes. Show verbose output.

root # emerge -uavDN @world

When upgrading to a new version of perl, it is necessary to also run perl-cleaner afterwards:

root # emerge -auvDN @world
root # perl-cleaner --all
   Note

This requirement of running perl-cleaner will eventually go away, once all perl-related ebuilds are updated to EAPI 5. EAPI 5 is a version of the Ebuild specification that supports smart updating of perl-related bits.