From bdcbc5e482dc4453489cda865d04d3ae52de706e Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Tue, 31 Jul 2018 23:55:20 +0200 Subject: [PATCH] Add ubuntu-inspired theming for dock and WM --- config/openbox/rc.xml | 4 +- config/plank/dconf-file | 20 ++++++ .../themes/Code-Clopper-Ubuntu/dock.theme | 64 +++++++++++++++++++ setup.bash | 13 ++++ themes/code-clopper/openbox-3/themerc | 32 +++++----- 5 files changed, 116 insertions(+), 17 deletions(-) create mode 100644 config/plank/dconf-file create mode 100644 config/plank/themes/Code-Clopper-Ubuntu/dock.theme diff --git a/config/openbox/rc.xml b/config/openbox/rc.xml index 23f394b..e33e551 100644 --- a/config/openbox/rc.xml +++ b/config/openbox/rc.xml @@ -65,7 +65,7 @@ yes sans - 8 + 10 bold @@ -74,7 +74,7 @@ sans - 8 + 10 bold diff --git a/config/plank/dconf-file b/config/plank/dconf-file new file mode 100644 index 0000000..3d024a0 --- /dev/null +++ b/config/plank/dconf-file @@ -0,0 +1,20 @@ +[/] +icon-size=60 +show-dock-item=false +position='left' +unhide-delay=0 +items-alignment='start' +theme='Code-Clopper-Ubuntu' +hide-mode='none' +pinned-only=false +auto-pinning=true +alignment='fill' +zoom-percent=150 +hide-delay=0 +zoom-enabled=false +monitor='' +lock-items=false +tooltips-enabled=true +pressure-reveal=false +offset=0 +current-workspace-only=false diff --git a/config/plank/themes/Code-Clopper-Ubuntu/dock.theme b/config/plank/themes/Code-Clopper-Ubuntu/dock.theme new file mode 100644 index 0000000..ae5ac74 --- /dev/null +++ b/config/plank/themes/Code-Clopper-Ubuntu/dock.theme @@ -0,0 +1,64 @@ +#This file auto-generated by Plank. +#2018-07-31T21:18:06+0000 + +[PlankTheme] +#The roundness of the top corners. +TopRoundness=4 +#The roundness of the bottom corners. +BottomRoundness=0 +#The thickness (in pixels) of lines drawn. +LineWidth=1 +#The color (RGBA) of the outer stroke. +OuterStrokeColor=41;;41;;41;;255 +#The starting color (RGBA) of the fill gradient. +FillStartColor=44;;0;;30;;255 +#The ending color (RGBA) of the fill gradient. +FillEndColor=44;;0;;30;;255 +#The color (RGBA) of the inner stroke. +InnerStrokeColor=255;;255;;255;;255 + +[PlankDockTheme] +#The padding on the left/right dock edges, in tenths of a percent of IconSize. +HorizPadding=1 +#The padding on the top dock edge, in tenths of a percent of IconSize. +TopPadding=1.5 +#The padding on the bottom dock edge, in tenths of a percent of IconSize. +BottomPadding=2 +#The padding between items on the dock, in tenths of a percent of IconSize. +ItemPadding=2.5 +#The size of item indicators, in tenths of a percent of IconSize. +IndicatorSize=5 +#The size of the icon-shadow behind every item, in tenths of a percent of IconSize. +IconShadowSize=0 +#The height (in percent of IconSize) to bounce an icon when the application sets urgent. +UrgentBounceHeight=1.6666666666666667 +#The height (in percent of IconSize) to bounce an icon when launching an application. +LaunchBounceHeight=0.625 +#The opacity value (0 to 1) to fade the dock to when hiding it. +FadeOpacity=1 +#The amount of time (in ms) for click animations. +ClickTime=300 +#The amount of time (in ms) to bounce an urgent icon. +UrgentBounceTime=600 +#The amount of time (in ms) to bounce an icon when launching an application. +LaunchBounceTime=600 +#The amount of time (in ms) for active window indicator animations. +ActiveTime=300 +#The amount of time (in ms) to slide icons into/out of the dock. +SlideTime=300 +#The time (in ms) to fade the dock in/out on a hide (if FadeOpacity is < 1). +FadeTime=250 +#The time (in ms) to slide the dock in/out on a hide (if FadeOpacity is 1). +HideTime=250 +#The size of the urgent glow (shown when dock is hidden), in tenths of a percent of IconSize. +GlowSize=30 +#The total time (in ms) to show the hidden-dock urgent glow. +GlowTime=10000 +#The time (in ms) of each pulse of the hidden-dock urgent glow. +GlowPulseTime=2000 +#The hue-shift (-180 to 180) of the urgent indicator color. +UrgentHueShift=150 +#The time (in ms) to move an item to its new position or its addition/removal to/from the dock. +ItemMoveTime=450 +#Whether background and icons will unhide/hide with different speeds. The top-border of both will leave/hit the screen-edge at the same time. +CascadeHide=false diff --git a/setup.bash b/setup.bash index 40bd5d0..ea5ec96 100755 --- a/setup.bash +++ b/setup.bash @@ -212,6 +212,18 @@ check-config() { fi } +configure-dock() { + declare dock_items='' + [[ -d ~/.local/share/plank ]] || mkdir -p ~/.local/share/plank + cp -r "$(here)/config/plank/themes" ~/.local/share/plank + + + { + cat "$(here)/config/plank/dconf-file" + dconf dump /net/launchpad/plank/docks/dock1/ | grep ^dock-items + } | dconf load /net/launchpad/plank/docks/dock1/ +} + add-custom-background() { if [[ $(config-get background) != 'none' ]]; then printf 'nitrogen --set-auto %s\n' "$(config-get background)" >> "$(config-dir openbox)/autostart.sh" @@ -228,6 +240,7 @@ setup-openbox-for-user() { copy-bins-to-local-dir copy-libs-to-local-dir copy-themes-to-theme-dir + configure-dock create-user-config-if-not-created check-config add-custom-startup diff --git a/themes/code-clopper/openbox-3/themerc b/themes/code-clopper/openbox-3/themerc index b0db53e..17f958b 100644 --- a/themes/code-clopper/openbox-3/themerc +++ b/themes/code-clopper/openbox-3/themerc @@ -31,34 +31,36 @@ menu.title.bg.border.color: #729fcf menu.title.text.color: #ffffff menu.items.bg: flat border solid -menu.items.bg.color: #eeeeec +menu.items.bg.color: #2C001E menu.items.bg.border.color: #EFEBE7 -menu.items.text.color: #444444 +menu.items.text.color: #f6f8fb menu.items.disabled.text.color: #babdb6 menu.items.active.bg: flat solid -menu.items.active.bg.color: #4481c0 -menu.items.active.bg.colorTo: #4175aa +menu.items.active.bg.color: #E95420 +menu.items.active.bg.colorTo: #E95420 menu.items.active.text.color: #f6f8fb menu.items.active.bg.border.color: #416c98 !!Active window.active.title.bg: flat border gradient osx -window.active.title.bg.color: #3465A4 -window.active.title.bg.colorTo: #407CCA -window.active.title.bg.border.color: #699acd +window.active.title.bg.color: #2C001E +window.active.title.bg.colorTo: #2C001E +window.active.title.bg.border.color: #2C001E window.active.label.bg: parentrelative window.active.label.text.color: #ffffff -window.active.button.*.bg: parentrelative -window.active.button.*.image.color: #efefef -window.active.button.hover.bg.color: #729fcf -window.active.button.hover.image.color: #ffffff +!!window.active.button.*.bg: parentrelative +!!window.active.button.*.image.color: #efefef +window.active.button.unpressed.image.color: white +window.active.button.hover.bg.color: #E95420 +window.active.button.hover.image.color: #E95420 +window.active.button.toggled.hover.image.color: #E95420 window.active.button.pressed.bg.color: #a7cef2 -window.active.button.disabled.image.color: #6d8fbc +window.active.button.disabled.image.color: #333333 window.active.handle.bg: raised solid window.active.handle.bg.color: #E7e7e7 @@ -67,9 +69,9 @@ window.*.grip.bg: parentrelative !!Inactive window.inactive.title.bg: flat border gradient osx -window.inactive.title.bg.color: #dcdcdc -window.inactive.title.bg.colorTo: #eeeeec -window.inactive.title.bg.border.color: #efefef +window.inactive.title.bg.color: #411934 +window.inactive.title.bg.colorTo: #411934 +!!window.inactive.title.bg.border.color: #efefef window.inactive.label.bg: parentrelative window.inactive.label.text.color: #888a85