From a08cf5323e72d24c4826b9fb2ef4042211af5b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ruiz=20de=20Alegr=C3=ADa?= Date: Sat, 4 Jan 2020 11:44:01 +0100 Subject: [PATCH] Add nautilus custom styles Fixes #9 --- .../gtk-3.0/applications/nautilus/Adwaita.css | 219 ++++++++++++++++++ share/themes/Kali-Dark/gtk-3.0/gtk.css | 1 + .../gtk-3.0/applications/nautilus/Adwaita.css | 219 ++++++++++++++++++ share/themes/Kali-Light/gtk-3.0/gtk-dark.css | 1 + share/themes/Kali-Light/gtk-3.0/gtk.css | 1 + src/themes/Kali/sass/Makefile | 11 + src/themes/Kali/sass/_applications.scss | 2 + .../sass/applications/nautilus/Adwaita.css | 219 ++++++++++++++++++ .../Kali/sass/applications/nautilus/sync.sh | 4 + 9 files changed, 677 insertions(+) create mode 100644 share/themes/Kali-Dark/gtk-3.0/applications/nautilus/Adwaita.css create mode 100644 share/themes/Kali-Light/gtk-3.0/applications/nautilus/Adwaita.css create mode 100644 src/themes/Kali/sass/applications/nautilus/Adwaita.css create mode 100755 src/themes/Kali/sass/applications/nautilus/sync.sh diff --git a/share/themes/Kali-Dark/gtk-3.0/applications/nautilus/Adwaita.css b/share/themes/Kali-Dark/gtk-3.0/applications/nautilus/Adwaita.css new file mode 100644 index 00000000..e4126a1d --- /dev/null +++ b/share/themes/Kali-Dark/gtk-3.0/applications/nautilus/Adwaita.css @@ -0,0 +1,219 @@ +.nautilus-window, +.nautilus-window notebook, +.nautilus-window notebook > stack { + background: @theme_base_color; +} + +.nautilus-canvas-item { + border-radius: 5px; +} + +.nautilus-canvas-item.dim-label, +.nautilus-list-dim-label { + color: mix (@theme_fg_color, @theme_bg_color, 0.50); +} + +.nautilus-canvas-item.dim-label:selected, +.nautilus-list-dim-label:selected { + color: mix (@theme_selected_fg_color, @theme_selected_bg_color, 0.20); +} + +/* Toolbar */ + +/* Here we use the .button background-image colors from Adwaita, but ligthen them, + * since is not possible to use lighten () in common css. */ +@keyframes needs_attention_keyframes { + 0% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } + /* can't do animation-direction, so holding the color on two keyframes */ + 30% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 90% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 100% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } +} + +.nautilus-operations-button-needs-attention { + animation: needs_attention_keyframes 2s ease-in-out; +} +.nautilus-operations-button-needs-attention-multiple { + animation: needs_attention_keyframes 3s ease-in-out; + animation-iteration-count: 3; +} + +.disclosure-button { + padding-left: 4px; + padding-right: 4px; +} + +/* Path bar */ + +.nautilus-path-bar button { /* undecorate the buttons */ + margin: 0px; +} + +.nautilus-path-bar button:not(:checked) image { opacity: 0.8; } /* dim the icon when not checked */ + +.path-bar-box { + transition: border 200ms; + transition: background-color 200ms; + border-radius: 5px; +} + +.path-bar-box.width-maximized { + border: 1px @borders solid; + background-color: @theme_bg_color; +} + +.path-bar-box.width-maximized button:first-child { + border-radius: 5px 0px 0px 5px; + border-width: 0px 1px 0px 0px; +} + +.path-bar-box.width-maximized button:not(:first-child) { + border-width: 0px 1px 0px 1px; + border-radius: 0px 0px 0px 0px; +} + +/* Make the tags fit into the box */ +entry.search > * { + margin: 5px; +} + +/* Sidebar */ + +.nautilus-window .sidebar-row:selected { + background: mix(@theme_bg_color, @theme_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected, +.nautilus-window .sidebar-row:selected image, +.nautilus-window .sidebar-row:selected label { + color: mix(@theme_fg_color, @theme_text_color, 0.5); +} + +.nautilus-window .sidebar-row:selected:backdrop { + background: mix(@theme_unfocused_bg_color, @theme_unfocused_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected:backdrop, +.nautilus-window .sidebar-row:selected:backdrop label { + color: mix(@theme_unfocused_fg_color, @theme_unfocused_text_color, 0.15); +} + +/* Floating status bar */ +.floating-bar { + padding: 1px; + background-color: @theme_base_color; + border-width: 1px; + border-style: solid solid none; + border-color: @borders; + border-radius: 3px 3px 0 0; +} + +.floating-bar.bottom.left { /* axes left border and border radius */ + border-left-style: none; + border-top-left-radius: 0; +} +.floating-bar.bottom.right { /* axes right border and border radius */ + border-right-style: none; + border-top-right-radius: 0; +} + +.floating-bar:backdrop { + background-color: @theme_unfocused_base_color; + border-color: @unfocused_borders; +} + +.floating-bar button { + padding: 0px; +} + +@define-color disk_space_unknown #888a85; +@define-color disk_space_used #729fcf; +@define-color disk_space_free #eeeeec; + +.disk-space-display { + border-style: solid; + border-width: 2px; +} + +.disk-space-display.unknown { + background-color: @disk_space_unknown; + border-color: shade(@disk_space_unknown, 0.7); + color: @disk_space_unknown; +} +.disk-space-display.unknown.border { + color: shade(@disk_space_unknown, 0.7); +} + +.disk-space-display.used { + background-color: @disk_space_used; + border-color: shade(@disk_space_used, 0.7); + color: @disk_space_used; +} +.disk-space-display.used.border { + color: shade(@disk_space_used, 0.7); +} + +.disk-space-display.free { + background-color: @disk_space_free; + border-color: shade(@disk_space_free, 0.7); + color: @disk_space_free; +} +.disk-space-display.free.border { + color: shade(@disk_space_free, 0.7); +} + +/* View */ +.nautilus-list-view .view { + border-bottom: 1px solid @theme_bg_color; +} + +.search-information { + background-color: @theme_selected_bg_color; + color:white; + padding:2px; +} + +/* Hide superfluous treeview drop target indication */ +.nautilus-list-view .view.dnd { + border-style: none; +} + +@define-color conflict_bg #fef6b6; + +.conflict-row { + background: @conflict_bg; + color: black; +} + +.conflict-row:hover { + background-color: shade(@conflict_bg, 0.9); +} + +.conflict-row:selected { + background: @theme_selected_bg_color; + color: @theme_selected_fg_color; +} + +/* Icon view */ +flowboxchild:selected { + background-color:transparent; +} + +.icon-background { + background-color:black; + border-color:#4a90d9; + border-style:solid; + border-width:0px; +} + +flowboxchild > .icon-item-background { + padding:4px; +} +flowboxchild:selected > .icon-item-background { + padding:4px; + background-color:#4a90d9; + border-color:#4a90d9; + border-style:solid; + border-width:0px; + border-radius:4px 4px 4px 4px; +} diff --git a/share/themes/Kali-Dark/gtk-3.0/gtk.css b/share/themes/Kali-Dark/gtk-3.0/gtk.css index f38ea68d..796288e4 100644 --- a/share/themes/Kali-Dark/gtk-3.0/gtk.css +++ b/share/themes/Kali-Dark/gtk-3.0/gtk.css @@ -1,3 +1,4 @@ +@import url("applications/nautilus/Adwaita.css"); * { padding: 0; -GtkToolButton-icon-spacing: 4; diff --git a/share/themes/Kali-Light/gtk-3.0/applications/nautilus/Adwaita.css b/share/themes/Kali-Light/gtk-3.0/applications/nautilus/Adwaita.css new file mode 100644 index 00000000..e4126a1d --- /dev/null +++ b/share/themes/Kali-Light/gtk-3.0/applications/nautilus/Adwaita.css @@ -0,0 +1,219 @@ +.nautilus-window, +.nautilus-window notebook, +.nautilus-window notebook > stack { + background: @theme_base_color; +} + +.nautilus-canvas-item { + border-radius: 5px; +} + +.nautilus-canvas-item.dim-label, +.nautilus-list-dim-label { + color: mix (@theme_fg_color, @theme_bg_color, 0.50); +} + +.nautilus-canvas-item.dim-label:selected, +.nautilus-list-dim-label:selected { + color: mix (@theme_selected_fg_color, @theme_selected_bg_color, 0.20); +} + +/* Toolbar */ + +/* Here we use the .button background-image colors from Adwaita, but ligthen them, + * since is not possible to use lighten () in common css. */ +@keyframes needs_attention_keyframes { + 0% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } + /* can't do animation-direction, so holding the color on two keyframes */ + 30% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 90% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 100% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } +} + +.nautilus-operations-button-needs-attention { + animation: needs_attention_keyframes 2s ease-in-out; +} +.nautilus-operations-button-needs-attention-multiple { + animation: needs_attention_keyframes 3s ease-in-out; + animation-iteration-count: 3; +} + +.disclosure-button { + padding-left: 4px; + padding-right: 4px; +} + +/* Path bar */ + +.nautilus-path-bar button { /* undecorate the buttons */ + margin: 0px; +} + +.nautilus-path-bar button:not(:checked) image { opacity: 0.8; } /* dim the icon when not checked */ + +.path-bar-box { + transition: border 200ms; + transition: background-color 200ms; + border-radius: 5px; +} + +.path-bar-box.width-maximized { + border: 1px @borders solid; + background-color: @theme_bg_color; +} + +.path-bar-box.width-maximized button:first-child { + border-radius: 5px 0px 0px 5px; + border-width: 0px 1px 0px 0px; +} + +.path-bar-box.width-maximized button:not(:first-child) { + border-width: 0px 1px 0px 1px; + border-radius: 0px 0px 0px 0px; +} + +/* Make the tags fit into the box */ +entry.search > * { + margin: 5px; +} + +/* Sidebar */ + +.nautilus-window .sidebar-row:selected { + background: mix(@theme_bg_color, @theme_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected, +.nautilus-window .sidebar-row:selected image, +.nautilus-window .sidebar-row:selected label { + color: mix(@theme_fg_color, @theme_text_color, 0.5); +} + +.nautilus-window .sidebar-row:selected:backdrop { + background: mix(@theme_unfocused_bg_color, @theme_unfocused_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected:backdrop, +.nautilus-window .sidebar-row:selected:backdrop label { + color: mix(@theme_unfocused_fg_color, @theme_unfocused_text_color, 0.15); +} + +/* Floating status bar */ +.floating-bar { + padding: 1px; + background-color: @theme_base_color; + border-width: 1px; + border-style: solid solid none; + border-color: @borders; + border-radius: 3px 3px 0 0; +} + +.floating-bar.bottom.left { /* axes left border and border radius */ + border-left-style: none; + border-top-left-radius: 0; +} +.floating-bar.bottom.right { /* axes right border and border radius */ + border-right-style: none; + border-top-right-radius: 0; +} + +.floating-bar:backdrop { + background-color: @theme_unfocused_base_color; + border-color: @unfocused_borders; +} + +.floating-bar button { + padding: 0px; +} + +@define-color disk_space_unknown #888a85; +@define-color disk_space_used #729fcf; +@define-color disk_space_free #eeeeec; + +.disk-space-display { + border-style: solid; + border-width: 2px; +} + +.disk-space-display.unknown { + background-color: @disk_space_unknown; + border-color: shade(@disk_space_unknown, 0.7); + color: @disk_space_unknown; +} +.disk-space-display.unknown.border { + color: shade(@disk_space_unknown, 0.7); +} + +.disk-space-display.used { + background-color: @disk_space_used; + border-color: shade(@disk_space_used, 0.7); + color: @disk_space_used; +} +.disk-space-display.used.border { + color: shade(@disk_space_used, 0.7); +} + +.disk-space-display.free { + background-color: @disk_space_free; + border-color: shade(@disk_space_free, 0.7); + color: @disk_space_free; +} +.disk-space-display.free.border { + color: shade(@disk_space_free, 0.7); +} + +/* View */ +.nautilus-list-view .view { + border-bottom: 1px solid @theme_bg_color; +} + +.search-information { + background-color: @theme_selected_bg_color; + color:white; + padding:2px; +} + +/* Hide superfluous treeview drop target indication */ +.nautilus-list-view .view.dnd { + border-style: none; +} + +@define-color conflict_bg #fef6b6; + +.conflict-row { + background: @conflict_bg; + color: black; +} + +.conflict-row:hover { + background-color: shade(@conflict_bg, 0.9); +} + +.conflict-row:selected { + background: @theme_selected_bg_color; + color: @theme_selected_fg_color; +} + +/* Icon view */ +flowboxchild:selected { + background-color:transparent; +} + +.icon-background { + background-color:black; + border-color:#4a90d9; + border-style:solid; + border-width:0px; +} + +flowboxchild > .icon-item-background { + padding:4px; +} +flowboxchild:selected > .icon-item-background { + padding:4px; + background-color:#4a90d9; + border-color:#4a90d9; + border-style:solid; + border-width:0px; + border-radius:4px 4px 4px 4px; +} diff --git a/share/themes/Kali-Light/gtk-3.0/gtk-dark.css b/share/themes/Kali-Light/gtk-3.0/gtk-dark.css index f38ea68d..796288e4 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk-dark.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk-dark.css @@ -1,3 +1,4 @@ +@import url("applications/nautilus/Adwaita.css"); * { padding: 0; -GtkToolButton-icon-spacing: 4; diff --git a/share/themes/Kali-Light/gtk-3.0/gtk.css b/share/themes/Kali-Light/gtk-3.0/gtk.css index be3160ec..f9ff586e 100644 --- a/share/themes/Kali-Light/gtk-3.0/gtk.css +++ b/share/themes/Kali-Light/gtk-3.0/gtk.css @@ -1,3 +1,4 @@ +@import url("applications/nautilus/Adwaita.css"); * { padding: 0; -GtkToolButton-icon-spacing: 4; diff --git a/src/themes/Kali/sass/Makefile b/src/themes/Kali/sass/Makefile index 8e85c411..269f8b98 100644 --- a/src/themes/Kali/sass/Makefile +++ b/src/themes/Kali/sass/Makefile @@ -10,6 +10,17 @@ build: echo Generating $${scss%.scss}.css ; \ $(SCSS) $$scss > $${scss%.scss}.css ; \ done + + mkdir -p $(THEMES_DIR)/Kali-Light/gtk-3.0/applications + mkdir -p $(THEMES_DIR)/Kali-Dark/gtk-3.0/applications + + cp -r applications/* $(THEMES_DIR)/Kali-Light/gtk-3.0/applications + cp -r applications/* $(THEMES_DIR)/Kali-Dark/gtk-3.0/applications + + find $(THEMES_DIR)/Kali-*/gtk-3.0/applications \ + ! \( -type d -or -name "*.css" -or -name "*.scss" \) \ + -exec rm {} \; + cp gtk.css $(THEMES_DIR)/Kali-Light/gtk-3.0/gtk.css cp gtk-dark.css $(THEMES_DIR)/Kali-Light/gtk-3.0/gtk-dark.css cp gtk-dark.css $(THEMES_DIR)/Kali-Dark/gtk-3.0/gtk.css diff --git a/src/themes/Kali/sass/_applications.scss b/src/themes/Kali/sass/_applications.scss index d4308371..ac0ee225 100644 --- a/src/themes/Kali/sass/_applications.scss +++ b/src/themes/Kali/sass/_applications.scss @@ -1,3 +1,5 @@ +@import url('applications/nautilus/Adwaita.css'); + /* XFCE4 PANEL */ .xfce4-panel { &.background { diff --git a/src/themes/Kali/sass/applications/nautilus/Adwaita.css b/src/themes/Kali/sass/applications/nautilus/Adwaita.css new file mode 100644 index 00000000..e4126a1d --- /dev/null +++ b/src/themes/Kali/sass/applications/nautilus/Adwaita.css @@ -0,0 +1,219 @@ +.nautilus-window, +.nautilus-window notebook, +.nautilus-window notebook > stack { + background: @theme_base_color; +} + +.nautilus-canvas-item { + border-radius: 5px; +} + +.nautilus-canvas-item.dim-label, +.nautilus-list-dim-label { + color: mix (@theme_fg_color, @theme_bg_color, 0.50); +} + +.nautilus-canvas-item.dim-label:selected, +.nautilus-list-dim-label:selected { + color: mix (@theme_selected_fg_color, @theme_selected_bg_color, 0.20); +} + +/* Toolbar */ + +/* Here we use the .button background-image colors from Adwaita, but ligthen them, + * since is not possible to use lighten () in common css. */ +@keyframes needs_attention_keyframes { + 0% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } + /* can't do animation-direction, so holding the color on two keyframes */ + 30% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 90% {background-image: linear-gradient(to bottom, @theme_base_color, @theme_base_color, @theme_base_color); border-color: @theme_fg_color; } + 100% {background-image: linear-gradient(to bottom, #fafafa, #ededed 40%, #e0e0e0); border-color: @borders; } +} + +.nautilus-operations-button-needs-attention { + animation: needs_attention_keyframes 2s ease-in-out; +} +.nautilus-operations-button-needs-attention-multiple { + animation: needs_attention_keyframes 3s ease-in-out; + animation-iteration-count: 3; +} + +.disclosure-button { + padding-left: 4px; + padding-right: 4px; +} + +/* Path bar */ + +.nautilus-path-bar button { /* undecorate the buttons */ + margin: 0px; +} + +.nautilus-path-bar button:not(:checked) image { opacity: 0.8; } /* dim the icon when not checked */ + +.path-bar-box { + transition: border 200ms; + transition: background-color 200ms; + border-radius: 5px; +} + +.path-bar-box.width-maximized { + border: 1px @borders solid; + background-color: @theme_bg_color; +} + +.path-bar-box.width-maximized button:first-child { + border-radius: 5px 0px 0px 5px; + border-width: 0px 1px 0px 0px; +} + +.path-bar-box.width-maximized button:not(:first-child) { + border-width: 0px 1px 0px 1px; + border-radius: 0px 0px 0px 0px; +} + +/* Make the tags fit into the box */ +entry.search > * { + margin: 5px; +} + +/* Sidebar */ + +.nautilus-window .sidebar-row:selected { + background: mix(@theme_bg_color, @theme_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected, +.nautilus-window .sidebar-row:selected image, +.nautilus-window .sidebar-row:selected label { + color: mix(@theme_fg_color, @theme_text_color, 0.5); +} + +.nautilus-window .sidebar-row:selected:backdrop { + background: mix(@theme_unfocused_bg_color, @theme_unfocused_fg_color, 0.07); +} + +.nautilus-window .sidebar-row:selected:backdrop, +.nautilus-window .sidebar-row:selected:backdrop label { + color: mix(@theme_unfocused_fg_color, @theme_unfocused_text_color, 0.15); +} + +/* Floating status bar */ +.floating-bar { + padding: 1px; + background-color: @theme_base_color; + border-width: 1px; + border-style: solid solid none; + border-color: @borders; + border-radius: 3px 3px 0 0; +} + +.floating-bar.bottom.left { /* axes left border and border radius */ + border-left-style: none; + border-top-left-radius: 0; +} +.floating-bar.bottom.right { /* axes right border and border radius */ + border-right-style: none; + border-top-right-radius: 0; +} + +.floating-bar:backdrop { + background-color: @theme_unfocused_base_color; + border-color: @unfocused_borders; +} + +.floating-bar button { + padding: 0px; +} + +@define-color disk_space_unknown #888a85; +@define-color disk_space_used #729fcf; +@define-color disk_space_free #eeeeec; + +.disk-space-display { + border-style: solid; + border-width: 2px; +} + +.disk-space-display.unknown { + background-color: @disk_space_unknown; + border-color: shade(@disk_space_unknown, 0.7); + color: @disk_space_unknown; +} +.disk-space-display.unknown.border { + color: shade(@disk_space_unknown, 0.7); +} + +.disk-space-display.used { + background-color: @disk_space_used; + border-color: shade(@disk_space_used, 0.7); + color: @disk_space_used; +} +.disk-space-display.used.border { + color: shade(@disk_space_used, 0.7); +} + +.disk-space-display.free { + background-color: @disk_space_free; + border-color: shade(@disk_space_free, 0.7); + color: @disk_space_free; +} +.disk-space-display.free.border { + color: shade(@disk_space_free, 0.7); +} + +/* View */ +.nautilus-list-view .view { + border-bottom: 1px solid @theme_bg_color; +} + +.search-information { + background-color: @theme_selected_bg_color; + color:white; + padding:2px; +} + +/* Hide superfluous treeview drop target indication */ +.nautilus-list-view .view.dnd { + border-style: none; +} + +@define-color conflict_bg #fef6b6; + +.conflict-row { + background: @conflict_bg; + color: black; +} + +.conflict-row:hover { + background-color: shade(@conflict_bg, 0.9); +} + +.conflict-row:selected { + background: @theme_selected_bg_color; + color: @theme_selected_fg_color; +} + +/* Icon view */ +flowboxchild:selected { + background-color:transparent; +} + +.icon-background { + background-color:black; + border-color:#4a90d9; + border-style:solid; + border-width:0px; +} + +flowboxchild > .icon-item-background { + padding:4px; +} +flowboxchild:selected > .icon-item-background { + padding:4px; + background-color:#4a90d9; + border-color:#4a90d9; + border-style:solid; + border-width:0px; + border-radius:4px 4px 4px 4px; +} diff --git a/src/themes/Kali/sass/applications/nautilus/sync.sh b/src/themes/Kali/sass/applications/nautilus/sync.sh new file mode 100755 index 00000000..1046a52e --- /dev/null +++ b/src/themes/Kali/sass/applications/nautilus/sync.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +wget https://gitlab.gnome.org/GNOME/nautilus/raw/master/src/resources/css/Adwaita.css --timestamping +