Initial commit

This commit is contained in:
imarkoff
2023-01-25 22:58:20 +02:00
commit 4a2f054a3e
12 changed files with 1495 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
__pycache__

245
colors.json Normal file
View File

@@ -0,0 +1,245 @@
{
"dark" : {
"accent": {
"replace" : "ACCENT-COLOR",
"s" : 42,
"l" : 26,
"a" : 1
},
"accent_hover" : {
"replace" : "ACCENT_HOVER",
"s" : 66,
"l" : 22,
"a" : 1
},
"accent-disabled" : {
"replace" : "ACCENT-DISABLED",
"s" : 6,
"l" : 15,
"a" : 1
},
"accent-disabled_hover" : {
"replace" : "ACCENT-DIS_HOVER",
"s" : 7,
"l" : 21,
"a" : 1
},
"background" : {
"replace" : "BACKGROUND-COLOR",
"s" : 7,
"l" : 8,
"a" : 1
},
"accent-opacity-color" : {
"replace": "ACCENT-OPACITY-COLOR",
"s" : 42,
"l" : 26,
"a" : 0.2
},
"quick-toggle-menu-background" : {
"replace" : "QUICK-TOGGLE-MENU-BACKGROUND",
"s" : 6,
"l" : 10,
"a" : 1
},
"accent-secondary-color" : {
"replace" : "ACCENT-SECONDARY-COLOR",
"s" : 20,
"l" : 75,
"a" : 1
},
"accent-secondary_hover" : {
"replace" : "ACCENT-SECONDARY_HOVER",
"s" : 20,
"l" : 75,
"a" : 1
},
"well-app-selected" : {
"replace" : "WELL-APP-SELECTED",
"s" : 20,
"l" : 75,
"a" : 0.4
},
"text-primary-color" : {
"replace" : "TEXT-PRIMARY-COLOR",
"s" : 65,
"l" : 95,
"a" : 1
},
"text-secondary-color" : {
"replace" : "TEXT-SECONDARY-COLOR",
"s" : 65,
"l" : 95,
"a" : 0.67
},
"text-disabled-color" : {
"replace" : "TEXT-DISABLED-COLOR",
"s" : 65,
"l" : 95,
"a" : 0.38
},
"border-shadow" : {
"replace" : "BORDER-SHADOW",
"s" : 0,
"l" : 0,
"a" : 0.03
},
"separator-color" : {
"replace" : "SEPARATOR-COLOR",
"s" : 255,
"l" : 255,
"a" : 0.1
},
"show-apps-icon-color" : {
"replace" : "SHOW-APPS-ICON-COLOR",
"s" : 65,
"l" : 95,
"a" : 1
}
},
"light" : {
"accent-color" : {
"replace" : "ACCENT-COLOR",
"s" : 75,
"l" : 75,
"a" : 1
},
"accent_hover" : {
"replace" : "ACCENT_HOVER",
"s" : 79,
"l" : 78,
"a" : 1
},
"accent-disabled" : {
"replace" : "ACCENT-DISABLED",
"s" : 35,
"l" : 90,
"a" : 1
},
"accent-disabled_hover" : {
"replace" : "ACCENT-DIS_HOVER",
"s" : 35,
"l" : 85,
"a" : 1
},
"background-color" : {
"replace" : "BACKGROUND-COLOR",
"s" : 40,
"l" : 98,
"a" : 1
},
"accent-opacity-color" : {
"replace": "ACCENT-OPACITY-COLOR",
"s" : 78,
"l" : 84,
"a" : 0.5
},
"accent-secondary-color" : {
"replace" : "ACCENT-SECONDARY-COLOR",
"s" : 20,
"l" : 50,
"a" : 1
},
"accent-secondary_hover" : {
"replace" : "ACCENT-SECONDARY_HOVER",
"s" : 20,
"l" : 40,
"a" : 1
},
"well-app-selected" : {
"replace" : "WELL-APP-SELECTED",
"s" : 20,
"l" : 50,
"a" : 0.4
},
"text-primary-color": {
"replace" : "TEXT-PRIMARY-COLOR",
"s" : 71,
"l" : 10,
"a" : 0.87
},
"text-secondary-color" : {
"replace" : "TEXT-SECONDARY-COLOR",
"s" : 71,
"l" : 10,
"a" : 0.6
},
"text-disabled-color" : {
"replace" : "TEXT-DISABLED-COLOR",
"s" : 71,
"l" : 10,
"a" : 0.38
},
"border-shadow" : {
"replace" : "BORDER-SHADOW",
"s" : 0,
"l" : 0,
"a" : 0.03
},
"separator-color" : {
"replace" : "SEPARATOR-COLOR",
"s" : 0,
"l" : 0,
"a" : 0.1
},
"show-apps-icon-color" : {
"replace" : "SHOW-APPS-ICON-COLOR",
"s" : 4,
"l" : 30,
"a" : 1
}
},
"colors" : {
"red" : {
"h" : 0
},
"yellow" : {
"h" : 40
},
"green" : {
"h" : 135
},
"blue" : {
"h" : 210
},
"purple" : {
"h" : 275
},
"pink" : {
"h" : 295
}
},
"apply-theme-files" : ["gnome-shell.css", "checkbox.svg", "checkbox-focused.svg", "checkbox-off.svg", "checkbox-off-focused.svg", "workspace-placeholder.svg", "toggle-off.svg", "toggle-on.svg", "calendar-today.svg"]
}

View File

@@ -0,0 +1 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg"><circle style="fill:TEXT-SECONDARY-COLOR;fill-rule:evenodd;stroke-width:2;stroke-linecap:round;stroke-linejoin:round" cx="16" cy="28" r="2"/></svg>

After

Width:  |  Height:  |  Size: 210 B

View File

@@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="b"><stop offset="0" style="stop-color:#515151;stop-opacity:1"/><stop offset="1" style="stop-color:#292929;stop-opacity:1"/></linearGradient><linearGradient id="a"><stop style="stop-color:#0b2e52;stop-opacity:1" offset="0"/><stop style="stop-color:#1862af;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="c"><stop style="stop-color:#333;stop-opacity:1" offset="0"/><stop style="stop-color:#292929;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="d"><stop style="stop-color:#16191a;stop-opacity:1" offset="0"/><stop style="stop-color:#2b3133;stop-opacity:1" offset="1"/></linearGradient></defs><g transform="translate(-342.5 -521.362)"><rect rx="3" y="524.362" x="345.5" height="18" width="18" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;stroke:ACCENT_HOVER;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:.34999999;marker:none;enable-background:accumulate" ry="3"/><rect rx="3" y="524.362" x="345.5" height="18" width="18" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:ACCENT_HOVER;fill-opacity:1;stroke:ACCENT_HOVER;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" ry="3"/><path style="color:#000;fill:TEXT-PRIMARY-COLOR;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none" d="M361.998 527.733a1.5 1.5 0 0 0-2.117.127l-6.928 7.824-2.928-2.882a1.5 1.5 0 0 0-2.12.015 1.5 1.5 0 0 0 .015 2.121l4.055 3.993a1.5 1.5 0 0 0 2.175-.075l7.975-9.006a1.5 1.5 0 0 0-.127-2.117z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="b"><stop offset="0" style="stop-color:#515151;stop-opacity:1"/><stop offset="1" style="stop-color:#292929;stop-opacity:1"/></linearGradient><linearGradient id="a"><stop style="stop-color:#0b2e52;stop-opacity:1" offset="0"/><stop style="stop-color:#1862af;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="c"><stop style="stop-color:#333;stop-opacity:1" offset="0"/><stop style="stop-color:#292929;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="d"><stop style="stop-color:#16191a;stop-opacity:1" offset="0"/><stop style="stop-color:#2b3133;stop-opacity:1" offset="1"/></linearGradient></defs><g transform="translate(-342.5 -521.362)"><rect rx="3" y="524.362" x="345.5" height="18" width="18" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;stroke:TEXT-DISABLED-COLOR;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;marker:none;enable-background:accumulate" ry="3"/><rect rx="5" y="522.362" x="343.5" height="22" width="22" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;stroke:ACCENT-COLOR;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:.35;marker:none;enable-background:accumulate" ry="5"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="b"><stop offset="0" style="stop-color:#515151;stop-opacity:1"/><stop offset="1" style="stop-color:#292929;stop-opacity:1"/></linearGradient><linearGradient id="a"><stop style="stop-color:#0b2e52;stop-opacity:1" offset="0"/><stop style="stop-color:#1862af;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="c"><stop style="stop-color:#333;stop-opacity:1" offset="0"/><stop style="stop-color:#292929;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="d"><stop style="stop-color:#16191a;stop-opacity:1" offset="0"/><stop style="stop-color:#2b3133;stop-opacity:1" offset="1"/></linearGradient></defs><rect rx="3" y="524.362" x="345.5" height="18" width="18" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;stroke:TEXT-DISABLED-COLOR;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;marker:none;enable-background:accumulate" ry="3" transform="translate(-342.5 -521.362)"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

1
gnome-shell/checkbox.svg Normal file
View File

@@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="b"><stop offset="0" style="stop-color:#515151;stop-opacity:1"/><stop offset="1" style="stop-color:#292929;stop-opacity:1"/></linearGradient><linearGradient id="a"><stop style="stop-color:#0b2e52;stop-opacity:1" offset="0"/><stop style="stop-color:#1862af;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="c"><stop style="stop-color:#333;stop-opacity:1" offset="0"/><stop style="stop-color:#292929;stop-opacity:1" offset="1"/></linearGradient><linearGradient id="d"><stop style="stop-color:#16191a;stop-opacity:1" offset="0"/><stop style="stop-color:#2b3133;stop-opacity:1" offset="1"/></linearGradient></defs><g transform="translate(-342.5 -521.362)"><rect rx="3" y="524.362" x="345.5" height="18" width="18" style="color:#000;display:inline;overflow:visible;visibility:visible;fill:ACCENT-COLOR;fill-opacity:1;stroke:ACCENT-COLOR;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" ry="3"/><path style="color:#000;fill:TEXT-PRIMARY-COLOR;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none" d="M361.998 527.733a1.5 1.5 0 0 0-2.117.127l-6.928 7.824-2.928-2.882a1.5 1.5 0 0 0-2.12.015 1.5 1.5 0 0 0 .015 2.121l4.055 3.993a1.5 1.5 0 0 0 2.175-.075l7.975-9.006a1.5 1.5 0 0 0-.127-2.117z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

909
gnome-shell/gnome-shell.css Normal file
View File

@@ -0,0 +1,909 @@
/* colors */
/* accent: ACCENT-COLOR */
/* accent_hover: ACCENT_HOVER */
/* accent-fg: BACKGROUND-COLOR */
/* sections, accent-disabled, slider-background: ACCENT-DISABLED */
/* accent-disabled_hover, workspace-thumbnails: ACCENT-DIS_HOVER */
/* background: BACKGROUND-COLOR */
/* screenshot-ui-window-selector-window-border, ripple-box: background-color: ACCENT-OPACITY-COLOR (ACCENT-COLOR5) */
/* well-app-running-dot: ACCENT-SECONDARY-COLOR */
.workspace-background{
border: 1px solid BORDER-SHADOW;
}
#panel{
background-color: BACKGROUND-COLOR;
height: 38px;
font-size: 14px;
}
#panel .screencast-indicator,
#panel .remote-access-indicator {
color: #cd9309; }
#panel .panel-button.screen-recording-indicator {
background:#c01c28;
}
#panel .panel-button.screen-sharing-indicator {
background: #cd9309;
}
#panel .panel-button.screen-recording-indicator:hover {
background: rgba(192, 28, 40, 0.9);
}
#panel .panel-button.screen-sharing-indicator:hover {
background: rgba(205, 147, 9, 0.9);
}
.panel-button,
.clock,
.clock-display StIcon{
color: TEXT-PRIMARY-COLOR;
border-radius: 14px;
border: 4px solid transparent;
background-color: ACCENT-DISABLED;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.clock-display StIcon{
padding: 8px;
margin: 0;
}
.panel-button:hover,
.panel-button:hover .clock,
.panel-button:active,
.panel-button:overview, /* activites */
.panel-button:active .clock{
background-color: ACCENT-DIS_HOVER;
}
/* clock fix */
.clock-display{
background-color: transparent !important;
box-shadow: none !important;
border: none !important;
}
.clock{
margin: 0 !important;
}
/* Activities Ripple */
.ripple-box {
background-color: ACCENT-OPACITY-COLOR;
box-shadow: 0 0 2px 2px ACCENT-OPACITY-COLOR;
}
/* POPOVERS */
.popup-menu-content {
padding: 16px;
border-radius: 24px;
border: 1px solid BORDER-SHADOW;
}
.popup-menu-item {
margin: 2.5px 0 2.5px 0;
}
.popup-menu-item:focus, .popup-menu-item:hover, .popup-menu-item:checked {
background-color: ACCENT-DISABLED !important;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.popup-menu-item:checked {
border-radius: 12px 12px 0 0;
}
.popup-menu-item:active {
background-color: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
}
.popup-separator-menu-item .popup-separator-menu-item-separator {
height: 1px;
background-color: SEPARATOR-COLOR;
}
.popup-sub-menu {
background-color: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
border-radius: 0 0 12px 12px;
margin: 0 0 2.5px 0;
}
.popup-sub-menu .popup-menu-item {
background-color: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
box-shadow: none;
}
.popup-menu-item:insensitive { color: TEXT-DISABLED-COLOR; margin: 0; }
.popup-inactive-menu-item { color: TEXT-PRIMARY-COLOR; }
.popup-inactive-menu-item:insensitive { color: TEXT-SECONDARY-COLOR !important; }
.calendar .calendar-nonwork-day { color: TEXT-PRIMARY-COLOR; }
/* calendar */
#calendarArea{ padding: 0; }
.datemenu-calendar-column{ margin: 0px; }
.pager-button:hover,
.pager-button:focus{
background-color: #595959;
border-radius: 10px;
}
/* calendar-days */
.calendar-day-base{
color: TEXT-PRIMARY-COLOR;
border-radius: 10px;
}
.datemenu-today-button:hover {
transition-duration: 150ms;
background-color: ACCENT-DISABLED; }
.calendar-month-label{
color: TEXT-PRIMARY-COLOR;
}
.date-label,
.day-label {
color: TEXT-SECONDARY-COLOR;
font-weight: 700;
}
.calendar-day-base, .calendar .calendar-month-header .pager-button { transition-duration: 100ms; }
.calendar-day-base:hover,
.calendar-day-base:focus,
.calendar-day-base:active:hover,
.calendar-day-base:selected:hover,
.calendar .calendar-month-header .pager-button:hover,
.calendar .calendar-month-header .pager-button:focus {
background-color: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.calendar-day-base:active,
.calendar-day-base:selected {
background: ACCENT-DIS_HOVER;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.calendar-today,
.calendar-today:selected {
background-color: ACCENT-COLOR;
color: TEXT-PRIMARY-COLOR !important;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.calendar-today:hover,
.calendar-today:selected:hover {
background-color: ACCENT_HOVER;
}
.calendar .calendar-day-with-events {
background-image: url("calendar-today.svg");
background-size: contain;
font-weight: 700;
}
/* events */
.calendar{
border-radius: 11px;
background-color: ACCENT-DISABLED;
box-shadow: inset 0 0 0 1px BORDER-SHADOW !important;
padding: 5px;
}
.events-button,
.world-clocks-button,
.weather-button{
background-color: ACCENT-DISABLED;
color: TEXT-SECONDARY-COLOR;
border-radius: 11px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.weather-button .weather-header,
.events-button .events-title,
.world-clocks-button .world-clocks-header { color: TEXT-PRIMARY-COLOR; }
.events-button .event-time { color: TEXT-SECONDARY-COLOR; }
.events-button:active,
.world-clock-button:active,
.weather-button:active { background-color: ACCENT-DIS_HOVER; }
.world-clocks-button .world-clocks-time,
.world-clocks-button .world-clocks-city,
.world-clocks-button .world-clocks-timezone { color: TEXT-SECONDARY-COLOR; }
.weather-button .weather-forecast-time { color: TEXT-SECONDARY-COLOR; }
/* message-list */
.message-list{
border: none;
padding: 5px 0 0 5px;
}
.message{
background: BACKGROUND-COLOR;
color: TEXT-PRIMARY-COLOR;
border-radius: 12px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.message-list .message {
background: ACCENT-DISABLED;
}
.message .message-body, .message-title {
color: TEXT-PRIMARY-COLOR;
}
.message-dialog-content .message-dialog-title {
font-weight: 700;
}
.message .message-secondary-bin > .event-time {
color: TEXT-SECONDARY-COLOR;
}
.message-close-button{
border-radius: 10px;
color: TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.message-media-control:active{
background-color: ACCENT-COLOR;
color: #0000;
}
/* Media Controls */
.message-media-control {
border-radius: 9px;
padding: 0 18px;
margin: 16px 1px;
color: TEXT-PRIMARY-COLOR;
transition-duration: 100ms;}
.message-media-control:hover {
background-color: ACCENT-DIS_HOVER;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
color: TEXT-PRIMARY-COLOR; }
.message-media-control:insensitive {
color: TEXT-DISABLED-COLOR }
.message-media-control:last-child:ltr {
margin-right: 20px; }
.message-media-control:last-child:rtl {
margin-left: 12px; }
.message-media-control StIcon {
icon-size: 1.09em; }
/* Check Boxes */
.check-box StBoxLayout {
spacing: .8em; }
.check-box StBin {
width: 24px;
height: 24px;
background-image: url("checkbox-off.svg");
}
.check-box:focus StBin {
background-image: url("checkbox-off-focused.svg");
}
.check-box:checked StBin {
background-image: url("checkbox.svg");
}
.check-box:focus:checked StBin {
background-image: url("checkbox-focused.svg");
}
.toggle-switch{
background-image: url("./toggle-off.svg");
background-color: ACCENT-DIS_HOVER;
border-radius: 10px;
}
.toggle-switch:checked{
background-image: url("./toggle-on.svg");
background-color: ACCENT-COLOR;
}
.dnd-button:hover{
background-color: ACCENT-DIS_HOVER !important;
border: 1px solid transparent !important;
}
.dnd-button:hover .toggle-switch:checked {
background-color: ACCENT_HOVER;
}
.dnd-button{
width: 48px;
border-radius: 10px;
border: 1px solid BORDER-SHADOW;
background-color: ACCENT-DISABLED;
/* box-shadow: 0 2px 5px -4px black !important; */
box-shadow: none !important;
}
.button{
color: TEXT-PRIMARY-COLOR;
background-color: ACCENT-DISABLED;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.button:insensitive{
box-shadow: none;
}
.button:hover, .button:active {
background-color: ACCENT-DIS_HOVER;
}
.message-list-clear-button{
border-radius: 10px;
color: TEXT-PRIMARY-COLOR;
}
/* quick-settings */
.icon-button{ box-shadow: inset 0 0 0 1px BORDER-SHADOW; }
.quick-settings{
padding: 20px;
border-radius: 24px;
}
.quick-toggle {
color: TEXT-PRIMARY-COLOR;
border-radius: 12px;
background: ACCENT-DISABLED;
transition-duration: 200ms;
}
.quick-toggle .quick-toggle-label {
font-weight: 600;
}
.quick-toggle-arrow { border-radius: 0 12px 12px 0; }
.quick-slider .icon-button{ box-shadow: none; }
.quick-slider .icon-button:hover{
background-color: #474747;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.quick-slider .icon-button:active{
background-color: ACCENT-COLOR;
color: TEXT-PRIMARY-COLOR;
}
.quick-toggle-menu{
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
/* Notifications */
.notification-banner{
background-color: BACKGROUND-COLOR;
color: TEXT-PRIMARY-COLOR;
}
.notification-button:active{
background-color: ACCENT-COLOR;
color: TEXT-PRIMARY-COLOR;
}
.slider,
.level {
height: 16px;
-barlevel-height: 16px;
-barlevel-background-color: ACCENT-DISABLED;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
/* fill */
-barlevel-active-background-color: ACCENT-COLOR;
/* overfill */
-barlevel-overdrive-color: #c01c28;
-barlevel-overdrive-separator-width: 2px;
-slider-handle-radius: 7px;
}
/* overview-ws-thumbnail */
.workspace-thumbnail {
border: none;
/* border-radius: 9px; */
background-color: ACCENT-DISABLED;
border: 1px solid BORDER-SHADOW;
}
.workspace-thumbnails .placeholder {
background-image: url("workspace-placeholder.svg");
background-size: contain;
width: 18px;
}
.workspace-thumbnail-indicator {
border: none;
background-color: ACCENT-OPACITY-COLOR;
/* border-color: ACCENT-COLOR;
border-width: 2px; */
/* border-radius: 9px; */
border-radius: 0px;
}
/* overview */
.controls-manager, .workspace-animation {
background-color: BACKGROUND-COLOR;
}
.workspace-background {
border-radius: 10px;
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.2);
}
.window-close {
background-color: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
border-radius: 21px;
padding: 3px;
height: 28px;
width: 28px;
transition-duration: 300ms;
}
.window-close:hover {
background-color: ACCENT-DIS_HOVER;
}
.window-caption {
spacing: 20px;
border-radius: 10px;
color: TEXT-PRIMARY-COLOR;
background-color: BACKGROUND-COLOR;
border: 1px solid BORDER-SHADOW;
padding: 4px 8px;
}
/* APP-GRID */
.app-well-app .overview-icon {
box-shadow: inset 0 0 0 0px rgba(255, 255, 255, 0); /* fix default dash focused box-shadow*/
transition-duration: 100ms;
}
.app-well-app:hover .overview-icon,
.app-well-app:focus .overview-icon,
.app-well-app:selected .overview-icon,
.show-apps:hover .overview-icon,
.show-apps:focus .overview-icon,
.app-well-app.app-folder .overview-icon {
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background-color: ACCENT-DISABLED;
}
/* folder dialog */
.app-folder-dialog {
background-color: BACKGROUND-COLOR;
border: none;
}
.app-folder-dialog .app-well-app:hover .overview-icon,
.app-folder-dialog .app-well-app:focus .overview-icon {
background-color: ACCENT-DISABLED;
box-shadow: inset 1px solid BORDER-SHADOW;
}
.app-folder-dialog .folder-name-container { color: TEXT-PRIMARY-COLOR; }
.app-folder-dialog .folder-name-container .folder-name-label {
padding: 5px 7px;
color: TEXT-PRIMARY-COLOR;
font-weight: 700;
transition-duration: 100ms;
}
.app-folder-dialog .folder-name-container .folder-name-entry {
font-weight: 700;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background-color: ACCENT-DISABLED;
}
.app-folder-dialog .folder-name-container .edit-folder-button {
border-radius: 12px;
background-color: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.app-folder-dialog .folder-name-container .edit-folder-button:hover {
background-color: ACCENT-DIS_HOVER;
}
.page-indicator .page-indicator-icon { background-color: TEXT-PRIMARY-COLOR; }
.page-navigation-arrow:hover > StIcon {
transition-duration: 100ms;
background-color: ACCENT-DISABLED;
color:TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.page-navigation-arrow:active > StIcon {
transition-duration: 100ms;
background-color: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
/* Dash */
#dash .dash-background {
background-color: BACKGROUND-COLOR;
border: none;
box-shadow: inset 0 0 15px -10px ACCENT-SECONDARY-COLOR;
}
.dash-label {
background-color: BACKGROUND-COLOR;
color: TEXT-PRIMARY-COLOR;
border-radius: 11px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.app-well-app-running-dot{
width: 10px;
height: 5px;
border-radius: 5px;
background: ACCENT-SECONDARY-COLOR;
transition-duration: 200ms;
}
#dash .app-well-app:hover .overview-icon,
#dash .app-well-app:focus .overview-icon,
#dash .app-well-app:selected .overview-icon,
#dash .show-apps:hover .overview-icon,
#dash .show-apps:focus .overview-icon {
box-shadow: inset 0 0 4px 1px WELL-APP-SELECTED;
background-color: rgba(255, 255, 255, 0.1);
}
#dashtodockContainer .app-well-app.focused .overview-icon,
.show-apps:selected .overview-icon,
.show-apps:selected:hover .overview-icon,
.show-apps:active .overview-icon,
.show-apps:checked .overview-icon {
box-shadow: inset 0 0 4px 1px WELL-APP-SELECTED;
}
#dash .app-well-app:hover .app-well-app-running-dot { width: 15px; }
#dashtodockContainer .app-well-app.focused .app-well-app-running-dot { width: 20px; }
.show-apps .overview-icon {
color: SHOW-APPS-ICON-COLOR;
}
/* Search */
StEntry{
border-radius: 12px;
transition-duration: 100ms;
border: 1px solid BORDER-SHADOW;
background-color: ACCENT-DISABLED;
color: TEXT-SECONDARY-COLOR;
}
StEntry StLabel {
color: TEXT-PRIMARY-COLOR;
}
StEntry StLabel:insensitive {
color: TEXT-SECONDARY-COLOR;
}
StEntry:hover, StEntry:focus, StEntry:active {
border: 1px solid ACCENT-COLOR;
}
StEntry:focus {
color: TEXT-PRIMARY-COLOR;
}
.search-section-content{
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
border-radius: 17px;
background-color: ACCENT-DISABLED;
color:TEXT-PRIMARY-COLOR
}
.list-search-result .list-search-result-description { color: TEXT-SECONDARY-COLOR; }
.search-provider-icon .list-search-provider-content .list-search-provider-details {
width: 120px;
color: TEXT-PRIMARY-COLOR; }
.list-search-result:focus, .search-provider-icon:focus,
.list-search-result:hover, .search-provider-icon:hover,
.list-search-result:selected, .search-provider-icon:selected {
background-color: ACCENT-DIS_HOVER;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.list-search-result:active, .search-provider-icon:active{
background-color: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
}
/* OSD */
.modal-dialog{
border-radius: 16px;
background-color: BACKGROUND-COLOR;
border: 1px solid BORDER-SHADOW;
color: TEXT-PRIMARY-COLOR;
}
.switcher-list,
.resize-popup,
.workspace-switcher,
.osd-window{
border-radius: 22px;
background: BACKGROUND-COLOR;
color: TEXT-PRIMARY-COLOR;
box-shadow: 0 0px 8px 0 rgba(0, 0, 0, 0.05);
border: 1px solid BORDER-SHADOW;
}
.ws-switcher-indicator{ background-color: TEXT-SECONDARY-COLOR; }
.switcher-list .item-box:hover,
.switcher-list .item-box:focus,
.switcher-list .item-box:selected{
background-color: ACCENT-DISABLED;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.modal-dialog-linked-button, .notification-button, .hotplug-notification-item {
padding: 10px 0 !important;
border-radius: 10px !important;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background-color: ACCENT-DISABLED;
color:TEXT-PRIMARY-COLOR;
animation-duration: 200ms;
}
.modal-dialog-linked-button:first-child, .notification-button:first-child, .hotplug-notification-item:first-child {
margin: 0 12px 12px 12px !important;
}
.modal-dialog-linked-button:last-child, .notification-button:last-child, .hotplug-notification-item:last-child {
margin: 0 12px 12px 0 !important;
}
.modal-dialog-linked-button:first-child:last-child, .notification-button:first-child:last-child, .hotplug-notification-item:first-child:last-child {
margin: 0 12px 12px 12px !important;
}
.modal-dialog-linked-button, .notification-button, .hotplug-notification-item {
margin: 0 0 12px 12 !important;
}
.modal-dialog-linked-button:hover,
.modal-dialog-linked-button:focus,
.notification-button:hover,
.notification-button:focus {
background: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
}
.modal-dialog-linked-button:last-child {
background-color: ACCENT-COLOR;
}
.modal-dialog-linked-button:last-child:hover,
.modal-dialog-linked-button:last-child:focus {
background-color: ACCENT_HOVER;
}
.modal-dialog .modal-dialog-linked-button:focus, .hotplug-notification-item:focus, .notification-banner .notification-button:focus {
animation-duration: 100ms;
box-shadow: inset 0 0 0 1px BORDER-SHADOW !important; }
.modal-dialog .modal-dialog-linked-button:focus:hover, .hotplug-notification-item:focus:hover, .notification-banner .notification-button:focus:hover, .modal-dialog .modal-dialog-linked-button:focus:active, .hotplug-notification-item:focus:active, .notification-banner .notification-button:focus:active {
box-shadow: inset 0 0 0 1px BORDER-SHADOW !important; }
.prompt-dialog-password-entry {
background-color: ACCENT-DISABLED;
}
.nm-dialog-scroll-view{
border: 1px solid BORDER-SHADOW;
}
.nm-dialog-item:selected{
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.popup-menu-content {
color: TEXT-PRIMARY-COLOR;
background: BACKGROUND-COLOR;
border-radius: 20px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.system-menu-action {
border-radius: 32px;
/* wish we could do 50% */
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background: BACKGROUND-COLOR;
padding: 13px; }
.quick-toggle:checked {
color: TEXT-PRIMARY-COLOR;
background-color: ACCENT-COLOR;
}
.icon-button {
background-color: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
transition-duration: 100ms;
}
.icon-button:hover,
.quick-toggle:hover {
background-color: ACCENT-DIS_HOVER;
}
.quick-toggle:checked:hover {
background: ACCENT_HOVER;
}
.quick-toggle-menu{
background-color: BACKGROUND-COLOR;
border-radius: 20px;
color: TEXT-PRIMARY-COLOR;
}
.quick-slider .icon-button:hover{
background-color: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
}
.quick-toggle-menu .header .icon {
background-color: ACCENT-COLOR;
border-radius: 15px;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.level-bar { background-color: #595959; }
stage {
/* font-family: Roboto Reguler;*/
/* font-size: 14px; */
color: TEXT-PRIMARY-COLOR;
}
/* screenshot ui */
.screenshot-ui-panel {
border-radius: 22px;
background: BACKGROUND-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
color: TEXT-PRIMARY-COLOR;
}
.screenshot-ui-show-pointer-button, .screenshot-ui-type-button {
border-radius: 15px;
transition-duration: 200ms;
}
.screenshot-ui-show-pointer-button:checked, .screenshot-ui-type-button:checked,
.screenshot-ui-show-pointer-button:checked:hover, .screenshot-ui-type-button:checked:hover,
.screenshot-ui-show-pointer-button:checked:focus, .screenshot-ui-type-button:checked:focus {
background: ACCENT-DIS_HOVER;
color: TEXT-PRIMARY-COLOR;
}
.screenshot-ui-show-pointer-button:hover, .screenshot-ui-type-button:hover,
.screenshot-ui-show-pointer-button:focus, .screenshot-ui-type-button:focus {
background: ACCENT-DISABLED;
color: TEXT-PRIMARY-COLOR;
}
.screenshot-ui-show-pointer-button:insensitive, .screenshot-ui-type-button:insensitive {
color: TEXT-DISABLED-COLOR;
}
.screenshot-ui-show-pointer-button:hover, .screenshot-ui-type-button:hover
.screenshot-ui-show-pointer-button:active, .screenshot-ui-type-button:active {
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
}
.screenshot-ui-window-selector {
background-color: ACCENT-DISABLED;
}
.screenshot-ui-window-selector-window:hover .screenshot-ui-window-selector-window-border {
border-color: ACCENT-COLOR;
}
.screenshot-ui-window-selector-window:checked .screenshot-ui-window-selector-window-border {
border-color: ACCENT-COLOR;
background-color: ACCENT-OPACITY-COLOR;
}
.screenshot-ui-window-selector-window:checked .screenshot-ui-window-selector-check {
color: TEXT-PRIMARY-COLOR;
background-color: ACCENT-COLOR;
}
.screenshot-ui-capture-button {
width: 36px;
height: 36px;
border-radius: 99px;
border: 4px ACCENT-SECONDARY-COLOR;
padding: 4px; }
.screenshot-ui-capture-button .screenshot-ui-capture-button-circle {
background-color: ACCENT-SECONDARY-COLOR;
transition-duration: 200ms;
border-radius: 99px; }
.screenshot-ui-capture-button .screenshot-ui-capture-button-circle:hover, .screenshot-ui-capture-button .screenshot-ui-capture-button-circle:focus {
background-color: ACCENT-DARK_HOVER; }
.screenshot-ui-capture-button:hover .screenshot-ui-capture-button-circle, .screenshot-ui-capture-button:focus .screenshot-ui-capture-button-circle {
background-color: ACCENT-DARK_HOVER; }
.screenshot-ui-capture-button:cast .screenshot-ui-capture-button-circle {
background-color: #c01c28; }
.screenshot-ui-capture-button:cast:hover .screenshot-ui-capture-button-circle, .screenshot-ui-capture-button:cast:focus .screenshot-ui-capture-button-circle {
background-color: #d61f2d; }
.screenshot-ui-capture-button:cast:active .screenshot-ui-capture-button-circle { background-color: #a11722;}
.screenshot-ui-shot-cast-container {
background-color: ACCENT-DISABLED;
}
.screenshot-ui-shot-cast-button {
background-color: transparent;
transition-duration: 150ms;
}
.screenshot-ui-shot-cast-button:hover, .screenshot-ui-shot-cast-button:focus, .screenshot-ui-shot-cast-button:active {
background-color: ACCENT-DIS_HOVER;
}
.screenshot-ui-shot-cast-button:checked {
background-color: ACCENT-COLOR;
color: TEXT-PRIMARY-COLOR;
}
.screenshot-ui-tooltip {
color: TEXT-PRIMARY-COLOR;
background-color: BACKGROUND-COLOR;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
border-radius: 10px;
padding: 6px 12px;
text-align: center;
-y-offset: 24px;
}
/* Tiled window previews */
.tile-preview {
background-color: ACCENT-OPACITY-COLOR;
border: 1px solid ACCENT-COLOR;
}
.window-close, .screenshot-ui-close-button {
background-color: ACCENT-DISABLED;
color:TEXT-PRIMARY-COLOR;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
transition-duration: 150ms;
}
.window-close:hover, .screenshot-ui-close-button:hover {
background-color: ACCENT-DIS_HOVER;
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="48" height="26" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(-1 0 0 1 0 -291.18)">
<rect style="stroke: none; stroke-width: 1; marker: none; fill: rgb(255, 0, 0); fill-opacity: 0;" x="-48" y="291.18" width="48" height="26" rx="4" ry="4"/>
<rect style="stroke:none;stroke-width:.999999;marker:none;fill: TEXT-SECONDARY-COLOR;fill-opacity:1" fill="#f8f7f7" x="-24" y="293.18" width="22" height="22" rx="9" ry="9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 499 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="48" height="26" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(-1 0 0 1 0 -291.18)">
<rect style="stroke: none; stroke-width: 1; marker: none; fill: rgb(255, 0, 0); fill-opacity: 0;" x="-48" y="291.18" width="48" height="26" rx="4" ry="4"/>
<rect style="stroke:none;stroke-width:.999999;marker:none;fill: TEXT-PRIMARY-COLOR;fill-opacity:1" fill="#f8f7f7" x="-46" y="293.18" width="22" height="22" rx="9" ry="9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 497 B

View File

@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="27"
height="76"
id="svg11252"
version="1.1"
sodipodi:docname="dash-placeholder-horizontal.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)">
<metadata
id="metadata19">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="ACCENT-SECONDARY-COLOR"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview17"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="12.473684"
inkscape:cx="38"
inkscape:cy="26.327004"
inkscape:current-layer="g99967"
inkscape:document-rotation="0" />
<defs
id="defs11254">
<radialGradient
xlink:href="#linearGradient39563-4-2"
id="radialGradient68155-2-3"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.3486842,24.5,341.84211)"
cx="49"
cy="488"
fx="49"
fy="488"
r="38" />
<linearGradient
id="linearGradient39563-4-2">
<stop
style="stop-color:ACCENT-SECONDARY-COLOR;stop-opacity:1;"
offset="0"
id="stop39565-1-4" />
<stop
style="stop-color:ACCENT-SECONDARY-COLOR;stop-opacity:0;"
offset="1"
id="stop39567-7-9" />
</linearGradient>
<radialGradient
xlink:href="#linearGradient39573-6-1"
id="radialGradient68157-0-8"
gradientUnits="userSpaceOnUse"
cx="50.5"
cy="487.5"
fx="50.5"
fy="487.5"
r="10.5"
gradientTransform="matrix(1.2857143,0,0,1.2857143,8.571428,-114.78571)" />
<linearGradient
id="linearGradient39573-6-1">
<stop
style="stop-color:ACCENT-SECONDARY-COLOR;stop-opacity:1;"
offset="0"
id="stop39575-5-6" />
<stop
style="stop-color:ACCENT-SECONDARY-COLOR;stop-opacity:0;"
offset="1"
id="stop39577-1-2" />
</linearGradient>
</defs>
<g
id="layer1"
transform="rotate(90,465.93109,104.43109)">
<g
id="g99967"
style="display:inline"
transform="translate(326,44.862171)">
<rect
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.49375;fill:url(#radialGradient68155-2-3);fill-opacity:1;stroke:none;stroke-width:1;marker:none;enable-background:accumulate"
id="rect99969"
width="76"
height="2"
x="35.5"
y="511"
rx="0"
ry="0" />
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.43125;fill:url(#radialGradient68157-0-8);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.28571;marker:none;enable-background:accumulate"
id="path99971"
d="m 87,512.00001 c 0,7.45584 -6.044155,13.5 -13.5,13.5 -7.455844,0 -13.5,-6.04416 -13.5,-13.5 0,-7.45585 6.044156,-13.5 13.5,-13.5 7.455845,0 13.5,6.04415 13.5,13.5 z" />
<path
d="m 78.076923,512.00001 c 0,2.52776 -2.049159,4.57692 -4.576923,4.57692 -2.527766,0 -4.576923,-2.04916 -4.576923,-4.57692 0,-2.52777 2.049157,-4.57692 4.576923,-4.57692 2.527765,0 4.576923,2.04915 4.576923,4.57692 z"
id="path99973"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:ACCENT-SECONDARY-COLOR;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.435897;marker:none;enable-background:accumulate" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

202
install.py Normal file
View File

@@ -0,0 +1,202 @@
import colorsys
import os
import json
def print_help():
""" Print usage documentation """
print("Default colors\n"
"-A, --all\tInstall all available accent colors. Light & dark mode.\n"
"--red\t\tred theme only\n"
"--pink\t\tpink theme only\n"
"--purple\tpurple theme only\n"
"--blue\t\tblue theme only\n"
"--green\t\tgreen theme only\n"
"--yellow\tpink theme only\n"
"--gray\t\tgray theme only")
print("\nCustom Hue colors:\n"
"--hue\tHUE_DEGREE\tTHEME_NAME[optional]\tTHEME_MODE[optional]\nGenerate theme from Hue prompt [0 - 360]")
print("\nTheme mode:\n"
"\t--light light theme only\n"
"\t--dark dark theme only")
print("\nExample:\n"
"-A\t\t\tInstall all accent colors with light & dark mode\n"
"--all --dark\t\tInstall all accent colors with dark mode only\n"
"--purple --light\tInstall purple accent color with light mode only\n"
"--hue 180\t\tInstall hue=180 accent color with light & dark mode\n"
"--hue 140 coldgreen --dark\tInstall hue=140 coldgreen accent color with dark mode only")
def destination_return(path_name, theme_mode):
"""
Copied/modified gnome-shell theme location
:param path_name: color name
:param theme_mode: theme name (light or dark)
:return: copied files' folder location
"""
return f"~/.local/share/themes/Orchis-Shell-MOD-{theme_mode}-{path_name}/gnome-shell"
def source_return():
"""
Unmodified gnome-shell theme location
:return: location from where files will be taken
"""
return f"./gnome-shell/"
def copy_files(source, destination):
"""
Copy files from the source to another directory
:param source: where files will be copied
:param destination: where files will be pasted
"""
destinationDirs = destination.split("/")
loopCreateDirs = f"{destinationDirs[0]}/"
for i in range(1, len(destinationDirs)):
loopCreateDirs += f"{destinationDirs[i]}/"
os.system(f"mkdir -p {loopCreateDirs}")
os.system(f"cp -aT {source} {destination}")
def apply_theme_to_file(hue, destination, theme_mode, apply_file, sat=None):
"""
Install accent colors from colors.json to different file
:param hue
:param destination: file directory
:param theme_mode: theme name (light or dark)
:param apply_file: file name
:param sat: color saturation (optional)
"""
with open(os.path.expanduser(f"{destination}/{apply_file}"), "r") as file:
edit_file = file.read()
h = hue / 360
for i in colors[f"{theme_mode}"]:
lightness = int(colors[f"{theme_mode}"][i]["l"]) / 100
saturation = int(colors[f"{theme_mode}"][i]["s"]) / 100 if sat is None else sat
hls_to_rgb = colorsys.hls_to_rgb(h, lightness, saturation)
edit_file = edit_file.replace(colors[f"{theme_mode}"][i]["replace"],
f"rgba({int(hls_to_rgb[0] * 256)},"
f"{int(hls_to_rgb[1] * 256)},"
f"{int(hls_to_rgb[2] * 256)},"
f"{colors[f'{theme_mode}'][i]['a']})")
with open(os.path.expanduser(f"{destination}/{apply_file}"), "w") as file:
file.write(edit_file)
colorsOpen.close()
def apply_theme(hue, destination, theme_mode, sat=None):
"""
Apply theme to all files listed in "apply-theme-files" (colors.json)
:param hue
:param destination: file directory
:param theme_mode: theme name (light or dark)
:param sat: color saturation (optional)
"""
for applyFile in colors["apply-theme-files"]:
apply_theme_to_file(hue, destination, theme_mode, applyFile, sat=sat)
def install_color(hue, path_name, theme_mode, sat=None):
"""
Copy files and generate theme with different accent color
:param hue
:param path_name: color name
:param theme_mode: theme name (light or dark)
:param sat: color saturation (optional)
"""
print(f"Creating {path_name} {theme_mode} theme...", end=" ")
copy_files(source_return(), destination_return(path_name, theme_mode))
apply_theme(hue, destination_return(path_name, theme_mode), theme_mode, sat=sat)
print("Done.")
def install_all(theme_mode):
"""
Install all accent colors listed in "colors", colors.json
:param theme_mode: theme name (light or dark)
"""
for color in colors["colors"]:
install_color(colors["colors"][color]["h"], color, theme_mode)
install_color(0, "gray", theme_mode, sat=0)
def main():
user_input = input("\n>>> ").split()
userInputLength = len(user_input)
match user_input[0]:
case "-A" | "--all":
if userInputLength == 1 or user_input[1] != "--light" and user_input[1] != "--dark":
install_all("light")
install_all("dark")
else:
install_all(user_input[1][2:len(user_input[1])])
case "--red" | "--pink" | "--purple" | "--blue" | "--green" | "--yellow":
path_name = user_input[0][2:len(user_input[0])]
hue = colors["colors"][path_name]["h"]
if userInputLength == 1 or user_input[1] != "--light" and user_input[1] != "--dark":
install_color(hue, path_name, "light")
install_color(hue, path_name, "dark")
else:
install_color(hue, path_name, user_input[1][2:len(user_input[1])])
case "--gray" | "--grey":
if userInputLength == 1 or user_input[1] != "--light" and user_input[1] != "--dark":
install_color(0, "gray", "light", sat=0)
install_color(0, "gray", "dark", sat=0)
else:
install_color(0, "gray", user_input[1][2:len(user_input[1])], sat=0)
case "--hue":
if not user_input[1].isdigit():
print("Incorrect hue degree. It must be integer, not string.", end="")
main()
elif int(user_input[1]) not in range(0, 360):
print("Incorrect hue degree. The integer must be from 0 to 360.", end="")
main()
elif userInputLength == 2 and user_input[2] != "--light" and user_input[2] != "--dark":
install_color(int(user_input[1]), user_input[1], "light")
install_color(int(user_input[1]), user_input[1], "dark")
elif userInputLength == 2 and user_input[2] == "--light" or \
userInputLength == 2 and user_input[2] == "--dark":
install_color(int(user_input[1]), user_input[1], user_input[2][2:len(user_input[2])])
elif userInputLength == 3 or user_input[3] != "--light" and user_input[3] != "--dark":
install_color(int(user_input[1]), user_input[2], "light")
install_color(int(user_input[1]), user_input[2], "dark")
elif user_input[3] == "--light" or user_input[3] == "--dark":
install_color(int(user_input[1]), user_input[2], user_input[3][2:len(user_input[3])])
print_help()
colorsOpen = open("colors.json")
colors = json.loads(colorsOpen.read()) # used as database for replacing colors, files which must be generated
main()