Difference between pages "Package:Java SE Development Kit (JDK)" and "Package:Compton"

(Difference between pages)
(Updated the install information. Will add information on how to use the jdk later....)
 
(Information as to how a user can more easily test the configuration settings for the blur kernel.)
 
Line 1: Line 1:
 
{{Ebuild
 
{{Ebuild
|Summary=Oracle's Java SE Development Kit -- Java runtime, compiler, etc.
+
|Summary=A compositor for X.
|CatPkg=dev-java/oracle-jdk-bin
+
|CatPkg=x11-misc
 
|Maintainer=
 
|Maintainer=
|Homepage=http://www.oracle.com/technetwork/java/javase/overview/index.html
+
|Homepage=https://www.github.com/chjj/compton/
 
}}
 
}}
You can install the free icedtea jdk or Oracle's version.
+
== History and background ==
Therefore we have a virtual package called ''virtual/jdk''. By default it will install the Oracle version.
+
Compton was originally created as a fork of Dana Jansen's fork of Xcompmgr. It was refactored and bugs were fixed as it grew into a standalone project. Today it has many improvements and unique features when compared with other lightweight compositors such as Xcompmgr. Here are some of them:
 +
* OpenGL backend
 +
* Inactive window transparency
 +
* Create your own blur kernel and use it to blur unopaque window backgrounds
 +
* Custom-colored window drop shadows
  
 
== Installation ==
 
== Installation ==
 +
To install compton, just emerge it:
 
<console>
 
<console>
###i## emerge -a virtual/jdk
+
###i## emerge -av compton
 
</console>
 
</console>
  
If you receive a message similar to the following, you will have to accept the Oracle java license to emerge the <code>oracle-jdk-bin</code>:
+
== Configuration ==
<console>
+
=== Creating a custom blur kernel ===
###i## emerge virtual/jdk
+
The version of compton in the Funtoo repositories comes with another application called <code>compton-convgen</code>. <code>compton-convgen</code> allows you to generate custom blurs for the backgrounds of transparent window borders, menus, etc.  
Calculating dependencies... done!
+
<code>compton-convgen</code> takes the following switches:
[##g##ebuild  N    ##!g##] ##g##dev-java/java-config-wrapper-0.16 ##!g##
+
* <code>-f</code>: This option allows you to changes factors such as the sigma (standard deviation) of the blur kernel. A sigma of three to five looks nice and generates blurs similar to those seen in Windows 7 Aero and in the Ubuntu Unity launcher. To set the sigma value, enter something like: <code>-f sigma=3</code>
[##g##ebuild  N    ##!g##] ##g##sys-apps/baselayout-java-0.1.0 ##!g##
+
* <code>--dump-compton</code>: If you add this switch, <code>compton-convgen</code> will format the output in a way that can be used with compton. This is recommended.
[##g##ebuild  N    ##!g##] ##g##app-admin/eselect-java-0.1.0 ##!g##
+
* <code>type</code>: The type of blur kernel to use. Options include box and gaussian.
[##g##ebuild  N    ##!g##] ##g##dev-java/java-config-2.2.0-r1000  ##!g## PYTHON_ABIS="##r##2.7 3.3##!r## ##bl##-2.6 -3.1 -3.2 -3.4 (-3.5)##!bl##"
+
* <code>width</code>: The width of the blur kernel. As mentioned earlier, if you want an appearance like that of Windows Aero or Ubuntu Unity, a sigma of three to five accompanied by a gaussian with a width and height of 13 does the trick.
[##g##ebuild  N    ##!g##] ##g##dev-java/oracle-jdk-bin-1.8.0.11 ##!g## USE="##r##X alsa fontconfig nsplugin##!r## ##bl##(-aqua) -derby -doc -examples -jce -pax_kernel (-selinux) -source##!bl##"
+
* <code>height</code>: Not required if you enter height (so long as you want width and height to be equivalent).
 
+
{{fancynote|The <code>height</code> and <code>width</code> parameters must be odd-numbered.}}
The following ##r##license changes##!r## are necessary to proceed:
+
(see "package.license" in the portage(5) man page for more details)
+
# required by oracle-jdk-bin (argument)
+
##g##>=dev-java/oracle-jdk-bin-1.8.0.11 Oracle-BCLA-JavaS##!g##
+
</console>
+
  
To accept the required license, create the directory <code>/etc/portage/package.license</code> if it does not already exist.
+
To build a blur (convolution) kernel of type gaussian with a sigma of three and a height of 13, run the following:
 
<console>
 
<console>
###i## mkdir /etc/portage/package.license
+
$##i## compton-convgen -f sigma=3 --dump-compton gaussian 13
 
</console>
 
</console>
  
After we create this directory, portage will read files that we create inside of it to see that we have accepted licenses required to install certain packages. To accept the license for <code>oracle-jdk-bin</code>, create a file called something like <code>/etc/portage/package.license/oracle-jdk-bin</code> and add the line <code>dev-java/oracle-jdk-bin Oracle-BCLA-JavaS</code> to it:
+
This should output some long string of values that begins with:
 
<console>
 
<console>
###i## tee /etc/portage/package.license/oracle-jdk-bin <<< "dev-java/oracle-jdk-bin Oracle-BCLA-JavaS"
+
13,13,0.018316,0.033746,0.055638,0.082085,0.108368,0.128022,0.135335,0.128022,0.108368,0.082085,0.055638,0.033746,0.018316,0.033746,0.062177,0.102512,0.151240,0.199666,0.235877,0.249352,0.235877,0.199666,0.151240,0.102512,0.062177,
 
</console>
 
</console>
 
+
==== Testing different blur kernels ====
Now you can emerge <code>oracle-jdk-bin</code>
+
Instead of somewhat tediously copying the output of <code>compton-convgen</code> into the <code>.config/compton.conf</code> (see below for more info), you can easily test the blur kernel you have generated by running the following:
 
<console>
 
<console>
###i## emerge virtual/jdk
+
$##i## compton --backend=glx --blur-background-frame --frame-opacity=0.5 --blur-kern=`compton-convgen -f sigma=<your sigma preference> --dump-compton gaussian <kernel size>`
 
</console>
 
</console>
 +
{{note|The <code>`</code> is not the apostrophe (<code>'</code>) rather, it is found in the upper left of your keyboard on the <code>~</code> key (assuming that you have an english layout on your keyboard).}}
 +
==== Applying the custom blur kernel to compton ====
 +
Now that we have generated our own custom blur kernel, we can add it to our <code>.config/compton.conf</code> so that our transparent windows have blurred backgrounds. To do this, create a line of text in your compton.conf that says:
 +
{{file|name=~/.config/compton.conf|desc=|body=
 +
blur-kern = "
 +
}}
 +
Then, copy the output of <code>compton-convgen</code> (minus the trailing comma at the end) to the right side of this line in your <code>.config/compton.conf</code>. After you have copied it over, go back into your <code>compton.conf</code> and add a quote and semicolon to the end of the <code>blur-kern</code> entry. For example:
 +
{{file|name=~/.config/compton.conf|desc=|body=
 +
blur-kern = "a bunch of numbers and commas that you have pasted in.........";
 +
}}
 +
Now that the blur-kern is in our <code>compton.conf</code>, we can test it out. Go into your <code>compton.conf</code> again and add the following lines to make window borders transparent:
 +
{{file|name=~/.config/compton.conf|desc=|body=
 +
blur-kern = "a bunch of numbers and commas that you have pasted in.........";
 +
frame-opacity = 0.50;
 +
blur-background = true;
 +
}}
 +
After adding these lines, try launching compton. If you see that the borders of windows are now transparent and blurred, congratulations! If the borders are transparent, but not blurred, check that you entered the lines correctly and then relaunch compton. If that does not work, try adding the line <code>backend = "glx";</code> to your <code>compton.conf</code>. If, after relaunching compton, this does not fix the issue, you may need to look into if your graphics drivers support such actions.
  
After the installation finishes, you may want to check and see if you can use the jdk. You can do so by issuing the following command:
+
=== Drawing custom shadows ===
<console>
+
Compton supports casting drop shadows on windows. To enable the default shadows on compton, you can either run it with the <code>-C</code> flag, or you can add the following to your <code>compton.conf</code>:
$##i## java
+
{{file|name=~/.config/compton.conf|desc=|body=
</console>
+
enable-shadows = true;
{{PageNeedsUpdates}}
+
}}
 +
Some of compton's other settings related to shadows include:
 +
* <code>--no-dnd-shadow</code>: When set to true, Compton will not draw shadows on drag and drop windows.
 +
* <code>--no-dock-shadow</code>: When true, compton will not draw shadows on toolbars and docks.
 +
* <code>--shadow-radius</code>: Takes an integer value. This option, coupled with the <code>--shadow-{x,y}-offset</code> options allows you to change how your shadows are centered / sized around windows.
 +
* <code>--shadow-x-offset</code>: This setting allows you to configure how much the shadow will be shifted to the left or the right. If the value is negative, the shadow will be on the left, if the value is positive, the shadow will be shifted to the right.
 +
* <code>--shadow-y-offset</code>: Similar in function to the <code>--shadow-x-offset</code> switch, except that it controls the vertical shifting of the shadow. Negative values lead to a shadow cast below a window, while positive values lead to a shadow cast above a window.
 +
* <code>--shadow-opacity</code>: A value between 0 and 1 that controls how easy it is to "see through" shadows cast by compton.
 +
* <code>--clear-shadow</code>: If you were interested in the transparent and blurred windows above, this option is very useful for you. If this option is set to true, compton will try to remove shadows behind transparent windows.
 +
As always, choose the options that you are interested in, add them to your <code>compton.conf</code>, relaunch compton, and see how things look.
 +
[[Category:Desktop]]
 
{{EbuildFooter}}
 
{{EbuildFooter}}

Revision as of 19:23, November 2, 2014

x11-misc


Source Repository:Gentoo Portage Tree
Homepage

Summary: A compositor for X. No contents found at URL http://127.0.0.1:8888/portage/meta/x11-misc.

Compton

History and background

Compton was originally created as a fork of Dana Jansen's fork of Xcompmgr. It was refactored and bugs were fixed as it grew into a standalone project. Today it has many improvements and unique features when compared with other lightweight compositors such as Xcompmgr. Here are some of them:

  • OpenGL backend
  • Inactive window transparency
  • Create your own blur kernel and use it to blur unopaque window backgrounds
  • Custom-colored window drop shadows

Installation

To install compton, just emerge it:

# emerge -av compton

Configuration

Creating a custom blur kernel

The version of compton in the Funtoo repositories comes with another application called compton-convgen. compton-convgen allows you to generate custom blurs for the backgrounds of transparent window borders, menus, etc. compton-convgen takes the following switches:

  • -f: This option allows you to changes factors such as the sigma (standard deviation) of the blur kernel. A sigma of three to five looks nice and generates blurs similar to those seen in Windows 7 Aero and in the Ubuntu Unity launcher. To set the sigma value, enter something like: -f sigma=3
  • --dump-compton: If you add this switch, compton-convgen will format the output in a way that can be used with compton. This is recommended.
  • type: The type of blur kernel to use. Options include box and gaussian.
  • width: The width of the blur kernel. As mentioned earlier, if you want an appearance like that of Windows Aero or Ubuntu Unity, a sigma of three to five accompanied by a gaussian with a width and height of 13 does the trick.
  • height: Not required if you enter height (so long as you want width and height to be equivalent).

Note

The height and width parameters must be odd-numbered.

To build a blur (convolution) kernel of type gaussian with a sigma of three and a height of 13, run the following:

$ compton-convgen -f sigma=3 --dump-compton gaussian 13

This should output some long string of values that begins with:

13,13,0.018316,0.033746,0.055638,0.082085,0.108368,0.128022,0.135335,0.128022,0.108368,0.082085,0.055638,0.033746,0.018316,0.033746,0.062177,0.102512,0.151240,0.199666,0.235877,0.249352,0.235877,0.199666,0.151240,0.102512,0.062177,

Testing different blur kernels

Instead of somewhat tediously copying the output of compton-convgen into the .config/compton.conf (see below for more info), you can easily test the blur kernel you have generated by running the following:

$ compton --backend=glx --blur-background-frame --frame-opacity=0.5 --blur-kern=`compton-convgen -f sigma=<your sigma preference> --dump-compton gaussian <kernel size>`

Note

The ` is not the apostrophe (') rather, it is found in the upper left of your keyboard on the ~ key (assuming that you have an english layout on your keyboard).

Applying the custom blur kernel to compton

Now that we have generated our own custom blur kernel, we can add it to our .config/compton.conf so that our transparent windows have blurred backgrounds. To do this, create a line of text in your compton.conf that says:

~/.config/compton.conf
blur-kern = "

Then, copy the output of compton-convgen (minus the trailing comma at the end) to the right side of this line in your .config/compton.conf. After you have copied it over, go back into your compton.conf and add a quote and semicolon to the end of the blur-kern entry. For example:

~/.config/compton.conf
blur-kern = "a bunch of numbers and commas that you have pasted in.........";

Now that the blur-kern is in our compton.conf, we can test it out. Go into your compton.conf again and add the following lines to make window borders transparent:

~/.config/compton.conf
blur-kern = "a bunch of numbers and commas that you have pasted in.........";
frame-opacity = 0.50;
blur-background = true;

After adding these lines, try launching compton. If you see that the borders of windows are now transparent and blurred, congratulations! If the borders are transparent, but not blurred, check that you entered the lines correctly and then relaunch compton. If that does not work, try adding the line backend = "glx"; to your compton.conf. If, after relaunching compton, this does not fix the issue, you may need to look into if your graphics drivers support such actions.

Drawing custom shadows

Compton supports casting drop shadows on windows. To enable the default shadows on compton, you can either run it with the -C flag, or you can add the following to your compton.conf:

~/.config/compton.conf
enable-shadows = true;

Some of compton's other settings related to shadows include:

  • --no-dnd-shadow: When set to true, Compton will not draw shadows on drag and drop windows.
  • --no-dock-shadow: When true, compton will not draw shadows on toolbars and docks.
  • --shadow-radius: Takes an integer value. This option, coupled with the --shadow-{x,y}-offset options allows you to change how your shadows are centered / sized around windows.
  • --shadow-x-offset: This setting allows you to configure how much the shadow will be shifted to the left or the right. If the value is negative, the shadow will be on the left, if the value is positive, the shadow will be shifted to the right.
  • --shadow-y-offset: Similar in function to the --shadow-x-offset switch, except that it controls the vertical shifting of the shadow. Negative values lead to a shadow cast below a window, while positive values lead to a shadow cast above a window.
  • --shadow-opacity: A value between 0 and 1 that controls how easy it is to "see through" shadows cast by compton.
  • --clear-shadow: If you were interested in the transparent and blurred windows above, this option is very useful for you. If this option is set to true, compton will try to remove shadows behind transparent windows.

As always, choose the options that you are interested in, add them to your compton.conf, relaunch compton, and see how things look.