15

On a new 14.04 plain vanilla Ubuntu install, with the default theme, nothing special. Bring up a gnome-terminal window (Ctrl + Alt + t) The terminal window has no border (nor does it have a resize handle btw) it's a black rectangle.

How can I add a 1px white border (which I find useful when dealing with multiple overlapping gnome-terminal windows)?

αғsнιη
  • 35,660
frankie
  • 153
  • 1
  • 1
  • 6
  • I just switched to Ubuntu 14.04 and the absence of borders around the terminal window annoys me a lot. – gb. Sep 17 '14 at 03:45
  • 2
    Isnt this a duplicate of this? http://askubuntu.com/questions/448204/how-do-i-add-a-border-around-windows-but-keep-the-current-theme – fossfreedom Sep 20 '14 at 12:46
  • 1
    Yep it is, but note that I edited gnome-terminal.css instead of unity.css and only the terminal windows have the border. – frankie Sep 21 '14 at 14:52

2 Answers2

6

Copy your favorite theme from /usr/share/theme to ~/.theme. Name the theme folder something different from what it was named in the /usr/share/theme. This way when you select your chosen them you'll find it by the name you called the folder.

Example:

cp -R /usr/share/themes/Radiance/ ~/.themes/MyRadiance

Edit the gtk-3 folder of that new directory to make your borders any way you want them. You can also customize other components of the theme. It can be done by editing the UnityDecoration features of the unity.css file located in the apps folder:

~/.themes/MyRadiance/gtk-3.0/apps/unity.css

To change the borders change the 0's to a different number of the parameter:

-UnityDecoration-extents: 28px 0 0 0;

You can see all the possible editings here. Also, to use the new theme you have to install the Unity Tweak Tool.

sudo apt-get install unity-tweak-tool

To apply this for terminal add the following to gnome-terminal.css: UnityDecoration { -UnityDecoration-extents: 28px 1px 1px 1px; }

muru
  • 197,895
  • 55
  • 485
  • 740
Anandu M Das
  • 2,233
  • 1
    Will this allow me to add borders only on gnome-terminal windows? I would prefer to limit the effect of my fiddling to only what is needed. – gb. Sep 17 '14 at 07:07
  • As shown in the directory path, it applies to gtk. You can surely give a try. – Anandu M Das Sep 17 '14 at 07:37
  • 3
    I followed these instructions and instead of modifying unity.css, I added the following to gnome-terminal.css:

    UnityDecoration { -UnityDecoration-extents: 28px 1px 1px 1px; }

    – frankie Sep 18 '14 at 23:25
  • @gb. I think what you need is explained by frankie now. Cheers – Anandu M Das Sep 19 '14 at 04:38
  • @AnanduMDas Better to edit your question and add frankie's comment also. – Radu Rădeanu Sep 21 '14 at 12:46
  • @AnanduMDas I think the default theme I got is Ambiance, not Radiance, so I applied your patch to a MyAmbiance instead. Moreover, it seems that this patch to gnome-terminal.css applies a thin border to all applications. You could also explain a bit how to use unity-tweak-tool. But still, this works, thanks for your time. – gb. Sep 24 '14 at 02:34
1

You can come close to the effect you're looking for if you use compizconfig-settings-manager.

Navigate to the 'Unity' plugin and select 'Decorations'. Check the box 'Override Theme Settings' and you can give windows a 'window shadow radius' and a color and opacity. But, you can also set X and Y shadow offsets. Set those offsets to 0, set the shadows to white or whatever you want for active/inactive windows, turn the opacity up, and then you'll have borders (should be close enough anyway).

Hopefully it's good enough to get on with, best of luck!

Hawk
  • 191
  • Thanks, I tried it. It is kind of hackish, and it will apply on all applications, while I need a "normal" border on my terminal (the same that I get when opening multiple tabs). – gb. Sep 17 '14 at 04:35
  • Apparently you can get what you're looking for by customizing your theme CSS locally in ~/.themes, or by downgrading the package 'light-themes' to the one that came with 13.xx -- both options are detailed in this post on getting back window borders. – Hawk Sep 17 '14 at 04:52