如何在 17.10 和 18.04 中启用/添加窗口边框?

Gle*_*son 22 gnome-terminal window borders gnome-shell 18.04

我打开了多个带有黑色背景的终端窗口,当它们重叠时,黑色背景上的黑色阴影完全丢失。对于任何具有黑色背景的窗口来说,这都是一个问题。我曾经修改过 unity.css 来添加窗口边框,但是 17.10 是 Gnome 并且不再起作用了!我也没有在设置 UI 中看到任何 Gnome 主题控件。

适用于 Ubuntu 17.04,但不适用于 17.10

编辑/usr/share/themes/Ambiance/gtk-3.20/apps/unity.css和更改

-UnityDecoration-extents: 28px 0 0 0;
Run Code Online (Sandbox Code Playgroud)

-UnityDecoration-extents: 28px 2 2 2;
Run Code Online (Sandbox Code Playgroud)

不起作用:gnome-terminal.css

编辑 /usr/share/themes/Ambiance/gtk-3.20/apps/gnome-terminal.css

@define-color terminal_border #ff0000;

vte-terminal.terminal-screen {
    -TerminalScreen-background-darkness: 0.95;
    background-color: @terminal_bg;
    color: #fff;
    border-width: 1px 1px 0px 1px;
    border-color: @terminal_border;
}
Run Code Online (Sandbox Code Playgroud)

不起作用:gnome-applications.css

编辑/usr/share/themes/Ambiance/gtk-3.20/apps/gnome-applications.css

TerminalScreen {
    background-color: @theme_base_color;
    color: @theme_fg_color;
    -TerminalScreen-background-darkness: 0.95;
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-left-width: 2px;
}

TerminalWindow GtkNotebook.notebook {
    border-bottom-width: 2px;
    border-right-width: 2px;
    border-left-width: 2px;
}
Run Code Online (Sandbox Code Playgroud)

可能的提示:

也许我应该编辑一些东西/usr/share/gnome-shell/theme

alternatives.log:update-alternatives 2017-11-12 10:59:31:
run with --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css
    /usr/share/gnome-shell/theme/ubuntu.css 10
    alternatives.log:update-alternatives 2017-11-12 10:59:31:
    link group gdm3.css updated to point to
    /usr/share/gnome-shell/theme/ubuntu.css
Run Code Online (Sandbox Code Playgroud)

Gle*_*son 31

我在这里找到了答案。

  1. 制作文件 ~/.config/gtk-3.0/gtk.css

  2. 添加以下行:

    decoration {
      border: 1px solid gray;
      background: gray;
    }
    
    Run Code Online (Sandbox Code Playgroud)
  3. 重新启动或注销+登录

  • 也适用于 18.04 (9认同)
  • 新边框看起来棒极了!顺便说一句,可以使用 [ALT]+F2 应用更改,然后输入“r”以重新加载并按 [enter]。 (8认同)

小智 7

以下仅将边框添加到 gnome-terminal 窗口;在 GNOME 3.22(在 Debian 9 中)上测试。

  1. 制作/编辑文件 ~/.config/gtk-3.0/gtk.css
  2. 添加以下内容:

    terminal-window notebook {
      border-width: 0px 1px 1px 1px;
      border-style: solid;
      border-color: grey;
    }
    
      terminal-window.maximized notebook,
      terminal-window.fullscreen notebook {
      border-style: none;
    }
    
    Run Code Online (Sandbox Code Playgroud)
  3. 注销/登录