Detailed information on program-specific resources is usually provided in the man page for the program. Question mark? Using the previous example, if you want to apply the same font to all programs not just XScreenSaver that contain the class name Dialog which contains the resource name headingFont , you could write:. If you want to apply this same rule to all programs that contain the resource headingFont , regardless of its class, you could write:.
To use different files for each application, use include in the main file. For example:. If files fail to load, specify the directory to xrdb with the -I parameter.
If you want to get the value of a resource for example if you want to use it in a bash script you can use xgetres AUR :. The following samples should provide a good understanding of how application settings can be modified using an Xresources file.
See this gist for more examples. It's much more common is to load values from a resource file, as in the next example. Load the file. Xresources in your home directory and write the values contained in it to the database. This command is often performed automatically when you start an X session, but this command will force a re-load of the resource values contained in the file, overwriting any other values stored in the database.
Query the resource database to see what variables and values are currently set. Output resembles the following sample contents of an X resources file:. Merge the values listed in the file my-xr-values with any resource values currently stored in the database. This command is an alternative to overwriting all values with -load , for instance.
You could also use the -merge option without a file name, in which case you could manually enter a value or values and your entry would be merged with values already in the database. For instance, if you run. Any subsequent xterm sessions would use this value, and display bold font faces if called for. X — Executable of the X Window System. Home Help Linux.
Was this page useful? Specifies the X server to be used see X for more information about multiple X displays. This option also specifies the screen to use for the -screen option. For example, when used in conjunction with -query , the contents of all properties are output.
For -load , -override and -merge , the input file is processed once for each screen. The resources which occur in common in the output for every screen are collected, and these are applied as the screen-independent resources. The remaining resources are applied for each per-screen property.
This the default mode of operation. For -load , -override and -merge , the input file is processed for each screen. Show changes, but do not write them to the database. When specified, -n indicates changes to the specified properties when used with -load , -override or -merge or the resource file when used with -edit should be shown on the standard output, but not performed.
The xrdb client takes several options, all of which are documented on its manual page. We'll discuss the most useful options. The optional filename argument specifies the name of a file from which the values of client variables resources will be read.
If no filename is specified, xrdb will expect to read its data from standard input. Note that whatever you type will override the previous contents, so if you inadvertently type xrdb without a filename argument and then quit with CTRL-d, you will delete any previous values. You can append new settings to current ones using the -merge option discussed later in this article.
The resource filename can be anything you want. Two commonly used names are. Xresources and. You should load a resource file with the xrdb - load option. For example, to load the contents of your. For example, let's say you wanted to add new resources listed in the file new.
0コメント