Skip to content

Instantly share code, notes, and snippets.

@waimus
Last active April 4, 2021 12:06
Show Gist options
  • Save waimus/4572954403addfe66d7c375ec73e2a1f to your computer and use it in GitHub Desktop.
Save waimus/4572954403addfe66d7c375ec73e2a1f to your computer and use it in GitHub Desktop.
Dash-to-Dock custom stylesheet. Featuring grey inner line and black outer line, like MacOS window edge style. And round every corner.
/* Shrink the dash by reducing padding */
#dashtodockContainer.shrink #dash,
#dashtodockContainer.dashtodock #dash {
border:1px;
padding:1px 0px 1px 0px;
}
#dashtodockContainer.shrink.left #dash,
#dashtodockContainer.dashtodock.left #dash {
border-left: 0px;
}
#dashtodockContainer.shrink.right #dash,
#dashtodockContainer.dashtodock.right #dash {
border-right: 0px;
}
#dashtodockContainer.shrink.top #dash,
#dashtodockContainer.dashtodock.top #dash {
border-top: 0px;
}
#dashtodockContainer.shrink.bottom #dash,
#dashtodockContainer.dashtodock.bottom #dash {
border-bottom: 0px;
}
#dashtodockContainer.straight-corner #dash,
#dashtodockContainer.shrink.straight-corner #dash {
border-radius: 0px;
}
/* for the built-in theme only, we control border radius directly for each
position. In the other cases the border are taken dynamically from the theme */
#dashtodockContainer.dashtodock.top #dash {
border-radius: 14px 14px 14px 14px;
}
#dashtodockContainer.dashtodock.bottom #dash {
border-radius: 14px 14px 14px 14px;
margin-bottom: 0px;
}
#dashtodockContainer.dashtodock.left #dash {
border-radius: 14px 14px 14px 14px;
margin-left: 0px;
}
#dashtodockContainer.dashtodock.right #dash {
border-radius: 14px 14px 14px 14px;
}
/* Scrollview style */
.bottom #dashtodockDashScrollview,
.top #dashtodockDashScrollview {
-st-hfade-offset: 24px;
}
.left #dashtodockDashScrollview,
.right #dashtodockDashScrollview {
-st-vfade-offset: 24px;
}
#dashtodockContainer.running-dots .dash-item-container > StButton,
#dashtodockContainer.dashtodock .dash-item-container > StButton {
transition-duration: 250;
background-size: contain;
}
#dashtodockContainer.shrink .dash-item-container > StButton,
#dashtodockContainer.dashtodock .dash-item-container > StButton {
padding: 1px 2px;
}
/* Dash height extended to the whole available vertical space */
#dashtodockContainer.extended.top #dash,
#dashtodockContainer.extended.right #dash,
#dashtodockContainer.extended.bottom #dash,
#dashtodockContainer.extended.left #dash {
border-radius: 0;
}
#dashtodockContainer.extended.top #dash,
#dashtodockContainer.extended.bottom #dash {
border-left: 0px;
border-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
#dashtodockContainer.extended.right #dash {
border-top: 0px;
border-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
#dashtodockContainer.extended.left #dash {
box-shadow: inset -1px 0px 0px 0px rgba(255, 255, 255, 0.125); /* inner line colour*/
border: 0px solid black; /* outline colour */
border-right-width: 1px;
}
/* Running and focused application style */
#dashtodockContainer.running-dots .app-well-app.running > .overview-icon,
#dashtodockContainer.dashtodock .app-well-app.running > .overview-icon {
background-image:none;
}
#dashtodockContainer.running-dots .app-well-app.focused .overview-icon,
#dashtodockContainer.dashtodock .app-well-app.focused .overview-icon {
background-color: rgba(238, 238, 236, 0.2);
}
/* Normal dash customization */
#dashtodockContainer.dashtodock #dash {
background: rgba(0, 0, 0, 0.75);
box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.125); /* inner line colour*/
border: 1px solid black; /* outline colour */
}
#dashtodockContainer.dashtodock .progress-bar {
/* Customization of the progress bar style, e.g.:
-progress-bar-background: rgba(0.8, 0.8, 0.8, 1);
-progress-bar-border: rgba(0.9, 0.9, 0.9, 1);
*/
}
#dashtodockContainer.top #dash .placeholder,
#dashtodockContainer.bottom #dash .placeholder {
width: 32px;
height: 1px;
}
/*
* This is applied to a dummy actor. Only the alpha value for the background and border color
* and the transition-duration are used
*/
#dashtodockContainer.dummy-opaque {
background-color: rgba(0, 0, 0, 0.8);
border-color: rgba(0, 0, 0, 0.4);
transition-duration: 300ms;
}
/*
* This is applied to a dummy actor. Only the alpha value for the background and border color
* and the transition-duration are used
*/
#dashtodockContainer.dummy-transparent {
background-color: rgba(0, 0, 0, 0.2);
border-color: rgba(0, 0, 0, 0.1);
transition-duration: 500ms;
}
#dashtodockContainer.opaque {
}
#dashtodockContainer.transparent {
}
#dashtodockContainer .number-overlay {
color: rgba(255,255,255,1);
background-color: rgba(0,0,0,0.8);
text-align: center;
}
#dashtodockContainer .notification-badge {
color: rgba(255,255,255,1);
background-color: rgba(255,0,0,1.0);
padding: 0.2em 0.5em;
border-radius: 1em;
font-weight: bold;
text-align: center;
margin: 2px;
}
#dashtodockPreviewSeparator.popup-separator-menu-item-horizontal {
width: 1px;
height: auto;
border-right-width: 1px;
margin: 32px 0px;
}
.dashtodock-app-well-preview-menu-item {
padding: 1em 1em 0.5em 1em;
}
#dashtodockContainer .metro .overview-icon{
border-radius: 0px;
}
#dashtodockContainer.bottom .metro.running2.focused,
#dashtodockContainer.bottom .metro.running3.focused,
#dashtodockContainer.bottom .metro.running4.focused,
#dashtodockContainer.top .metro.running2.focused,
#dashtodockContainer.top .metro.running3.focused,
#dashtodockContainer.top .metro.running4.focused {
background-image: url('./media/highlight_stacked_bg.svg');
background-position: 0px 0px;
background-size: contain;
}
#dashtodockContainer.left .metro.running2.focused,
#dashtodockContainer.left .metro.running3.focused,
#dashtodockContainer.left .metro.running4.focused,
#dashtodockContainer.right .metro.running2.focused,
#dashtodockContainer.right .metro.running3.focused,
#dashtodockContainer.right .metro.running4.focused {
background-image: url('./media/highlight_stacked_bg_h.svg');
background-position: 0px 0px;
background-size: contain;
}
@waimus
Copy link
Author

waimus commented Apr 3, 2021

Known issue: the outer outline which defined in line 118, doesn't add outline to the side of the dock which touches the edge of the screen. i.e. If the dock is in the left, it has no outer line on its left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment