Difference between revisions of "Terminal as a transparent wallpaper"

From ArchWiki
Jump to: navigation, search
m (Openbox, Compiz and alike: no contractions please)
(Gnome: very quick cleanup but much more to do, sub-par)
Line 31: Line 31:
  
 
=== Gnome ===
 
=== Gnome ===
With the use of devilspie we will have more control over the placement and the behavior over the terminal window. What is Devilspie? ''Devil's Pie can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window. For example, I can make all windows created by X-Chat appear on all workspaces, and the main Gkrellm1 window does not appear in the pager or task list.''
+
It is proposed here to install the {{pkg|devilspie}} package which provides control over the placement and the behavior of the terminal window. It can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window.
  
==== Step 1 ====
+
Follow the steps below to configure ''devilspie'' to catch the terminal emulator on the fly and setup its style as desired:
  
Install the {{Pkg|devilspie}} package.
+
:1. Create a ''devilspie'' configuration file: it has the extension ''.ds'' and is within the {{ic|~/.devilspie}} folder. This is the default location for configuration.
 +
{{hc|~/.devilspie/DesktopConsole.ds|(if
 +
(matches (window_name) "DesktopConsole_1")
 +
(begin
 +
(stick)
 +
(below)
 +
(undecorate)
 +
(skip_pager)
 +
(skip_tasklist)
 +
(wintype "dock")
 +
(geometry "+240+250")
 +
(geometry "954×680")
 +
)
 +
)
 +
}}
 +
For a complete list of options check the [http://foosel.org/linux/devilspie list of options].
 +
:2. Open a gnome-terminal window go to ''Edit'' > ''Profile'' > ''New''. Name it DesktopConsole_1.
  
==== Step 2 ====
+
Edit the Profile, to achieve our desired look we will need to edit the default configurations:
 
 
Make a hidden directory on your home folder:
 
 
 
$ mkdir ~/.devilspie
 
 
 
Make a configuration file with the extension ''.ds'', inside devilspie folder. This is where devilspie looks for config file by default when it starts up. Edit the config file with your favorite editor, to dress up the terminal window the way you want it to look like.
 
 
 
$ nano ~/.devilspie/DesktopConsole.ds
 
 
 
My config file looks like this:
 
 
 
(if
 
(matches (window_name) "DesktopConsole_1")
 
(begin
 
(stick)
 
(below)
 
(undecorate)
 
(skip_pager)
 
(skip_tasklist)
 
(wintype "dock")
 
(geometry "+240+250")
 
(geometry "954×680")
 
)
 
)
 
  
For a complete list of options with devilspie configuration options check out, the comprehensive [http://foosel.org/linux/devilspie list of options]
+
Under ''General'' tab, '''uncheck''' "Show menubar by default in new terminals".
  
==== Step 3 ====
+
Under ''Colors'' tab, '''choose''' "Green on Black" (choose whatever you like, i like this).
  
Open a gnome-terminal window go to ''Edit'' > ''Profile'' > ''New''. Name it DesktopConsole_1.
+
Under ''Effects'' tab, '''choose''' "Transparent background". Make sure the scroll is set to "None".
  
Edit the Profile, to achieve our desired look we will need to edit the default configurations:
+
Under ''Scrolling'' tab, '''select''' "Disabled".
 
 
Under ''General'' tab, '''uncheck''' "Show menubar by default in new terminals".
 
 
Under ''Colors'' tab, '''choose''' "Green on Black" (choose whatever you like, i like this).
 
 
Under ''Effects'' tab, '''choose''' "Transparent background". Make sure the scroll is set to "None".
 
 
Under ''Scrolling'' tab, '''select''' "Disabled".
 
 
 
==== Step 4 ====
 
 
 
In this step we will setup devilspie and our custom terminal profile to load on bootup.
 
  
 +
:3. In this step we will setup devilspie and our custom terminal profile to load on bootup.
 
Go to ''Systems > Preferences > Sessions''.
 
Go to ''Systems > Preferences > Sessions''.
 
 
Add a new session by using the <code>+</code> sign. The first one we will put, "devilspie", in both name and command.
 
Add a new session by using the <code>+</code> sign. The first one we will put, "devilspie", in both name and command.
 
 
The second session we will put "gnome-terminal", under name and "gnome-terminal --window-with-profile=DesktopConsole_1 --title=DesktopConsole_1", under command. Here we are basically calling gnome-terminal with the custom profile we created earlier.
 
The second session we will put "gnome-terminal", under name and "gnome-terminal --window-with-profile=DesktopConsole_1 --title=DesktopConsole_1", under command. Here we are basically calling gnome-terminal with the custom profile we created earlier.
  
 
{{Note|if you have trouble with the window position you can specify the geometry in the command options here.}}
 
{{Note|if you have trouble with the window position you can specify the geometry in the command options here.}}
  
==== Step 5 ====
+
:4. Logout/login and you should have your desired look.
 
 
Logout/login and you should have your desired look.
 
 
 
 
You can customize more to fit your needs and style, have more than one terminal; I will leave it to your imagination.
 
You can customize more to fit your needs and style, have more than one terminal; I will leave it to your imagination.
  

Revision as of 20:37, 14 July 2018

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Poorly named sections, misuse of subsections, lack of intrawiki links (Discuss in Talk:Terminal as a transparent wallpaper#)

There are two popular ways of configuring a Linux terminal to work transparently over a wallpaper, without any borders, menu bars or toolbars. This is very popular among developers because of its practical and coolness factor. Example: using it to view source-code or to get an interactive process status of the system with htop. Something like conky, but not quite.

Using Tilda

Tilda is a highly customizable gtk based drop-down terminal emulator. The author has been inspired by terminals featured in shooter games: Quake, Doom and Half-Life to name a few, where the terminal has no border and is hidden from the desktop till a key or keys are pressed. To achieve the desired look, edit the configuration as follows:

  1. Under General tab, uncheck "Always on Top".
  2. Under Appearance you can edit the height and width to your liking, but make sure you check "Enable Transparency" and make the "Level of Transparency" 100%.
  3. Under Colors tab, chose "Green on Black" or "Personalize".
  4. Under Scrolling you must select "Disabled".

Setup by desktop environment

Openbox, Compiz and alike

With versatile window managers like Openbox it is easy to create a terminal on the desktop. Tilda is highly configurable and might be your terminal of choice. Right-click on Tilda and configure the size to your needs, then set transparency to 100%, uncheck the option to start Tilda hidden.

Now you only have to set Tilda as "below" according to your window manager. For Compiz, this is done with the "Rules for Windows"-plugin, for Openbox, add to the "applications"-section of rc.xml the following lines:

<application name="tilda">
<layer>below</layer>
</application>

Et voila, you have a transparent terminal the size of your choice on your desktop, that will not appear in the tasklist and is permanently below.

Gnome

It is proposed here to install the devilspie package which provides control over the placement and the behavior of the terminal window. It can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window.

Follow the steps below to configure devilspie to catch the terminal emulator on the fly and setup its style as desired:

1. Create a devilspie configuration file: it has the extension .ds and is within the ~/.devilspie folder. This is the default location for configuration.
~/.devilspie/DesktopConsole.ds
(if
(matches (window_name) "DesktopConsole_1")
(begin
(stick)
(below)
(undecorate)
(skip_pager)
(skip_tasklist)
(wintype "dock")
(geometry "+240+250")
(geometry "954×680")
)
)

For a complete list of options check the list of options.

2. Open a gnome-terminal window go to Edit > Profile > New. Name it DesktopConsole_1.

Edit the Profile, to achieve our desired look we will need to edit the default configurations:

Under General tab, uncheck "Show menubar by default in new terminals".

Under Colors tab, choose "Green on Black" (choose whatever you like, i like this).

Under Effects tab, choose "Transparent background". Make sure the scroll is set to "None".

Under Scrolling tab, select "Disabled".

3. In this step we will setup devilspie and our custom terminal profile to load on bootup.

Go to Systems > Preferences > Sessions. Add a new session by using the + sign. The first one we will put, "devilspie", in both name and command. The second session we will put "gnome-terminal", under name and "gnome-terminal --window-with-profile=DesktopConsole_1 --title=DesktopConsole_1", under command. Here we are basically calling gnome-terminal with the custom profile we created earlier.

Note: if you have trouble with the window position you can specify the geometry in the command options here.
4. Logout/login and you should have your desired look.

You can customize more to fit your needs and style, have more than one terminal; I will leave it to your imagination.

Xfce4

Using wmctrl this can be achieved with the default xfce4-terminal's command line options. The sample script below is rather self-explanatory...

#!/bin/bash
xfce4-terminal --hide-borders --hide-toolbar --hide-menubar --title=desktopconsole --geometry=130x44+0+0 &
sleep 5
wmctrl -r desktopconsole -b add,below,sticky
wmctrl -r desktopconsole -b add,skip_taskbar,skip_pager

Note: A more revised version of this script can be found here https://bbs.archlinux.org/viewtopic.php?id=154094

By naming the the terminal with --title one can easily identify it's window and add/remove properties through wmctrl accordingly. Setting the size and possition with the --geometry option follows this rule: (Width-in-characters)x(height-in-charactors)+x+y where x and y are the position in pixels offset from the upper-left corner of the display (which starts at +0+0). transparency and disabling the scrollbar can be set through the terminal's preferences menu under the appearance and general tabs. Once the user has the script customized to their needs or wants they can simply mark it as executable (or chmod a+x /path/to/script.sh) then add it to their startup under Applications Menu > Settings > Session and Startup > Applications Autostart.

Note: The previous was tested only on Xfce4 with Xfwm4 but a similar approach may work with other window managers. For a list on environments which wmctrl may work with visit w:wmctrl