LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Feh Options (http://www.linuxquestions.org/questions/linux-general-1/feh-options-925332/)

lonesoac0 01-23-2012 05:13 PM

Feh Options
 
Hello all,

I am interested in making an options file for the application of Feh. The options that I would like to include are at: http://linux.die.net/man/1/feh I got this idea from the adduser command the adduser command uses the file /etc/adduser.conf. All I needed to do was simply adjust the contents of the adduser.conf file and the adduser command acts like I want now. That is what I want to do with the feh application.

Didier Spaier 01-23-2012 05:44 PM

Not sure I understand you question.

If I understand well all these otions are readily available as soon as feh is installed. Or not ???

Dark_Helmet 01-23-2012 07:53 PM

Generally speaking, a command will support reading configuration information from a file only if the developer(s) included code to support it. The developers for feh did that in a manner of speaking--see next paragraph. If the developers did not include that support, you would need to write a wrapper around the command to automate the process (e.g. read the contents of the config file, translate the settings to command line options, and then launch the command with the appropriate command line options). In essence, you would be adding the config file support yourself.

For feh, the man page says:
Code:

CONFIG FILE SYNTAX
    The config file allows the naming of option groups, called themes.  If ~/.fehrc or /etc/fehrc
    exist, feh will look in them for name/options pairs.  If neither of them exist, feh will create
    a default one in ~/.fehrc.

    It takes entries of the form "theme options ...", where theme is the name of the entry and
    options are the options which will be applied when the theme is used.

    An example entry would be "imagemap -rVq --thumb-width 40 --thumb-height 30".

    You cane use this theme in two ways.  Either call "feh -Timagemap *.jpg" or create a symbolic
    link to feh with the name of the theme you want it to use.  So from the example above: "ln -s
    `which feh ` ~/bin/imagemap".  Now just run "imagemap *.jpg" to use these options.

    Note that you can split a theme over several lines by placing a backslash at the end of a line,
    like in the shell.

    You can combine these themes with commandline options.  An example .fehrc is provided with a
    couple of cool example themes.

So, if I am reading that correctly, you will need to pick a name--a theme name--to represent a specific combination of options you want feh to use. Place the appropriate theme-name-plus-options entries in ~/.fehrc. Then launch feh with the theme name appropriate for the group of options you wish to use.

lonesoac0 01-23-2012 09:44 PM

I feel kind of silly for NOT checking the man pages first. I guess I underestimated them this time. I will have to definitely give this a try!


All times are GMT -5. The time now is 12:19 AM.