From e608123faf0f6ca0ca924e3ca4a98fec5817730e Mon Sep 17 00:00:00 2001 From: candifloss Date: Wed, 7 Aug 2024 20:34:26 +0530 Subject: [PATCH] Defined 3 sides of the panel. Added placeholder css. Minor changes to panel definition. --- eww/eww.css | 14 ++++++++++++++ eww/eww.css.map | 2 +- eww/eww.yuck | 3 ++- eww/scss/colors/_glassy.scss | 8 +++++++- eww/scss/eww.scss | 3 ++- eww/scss/panel/_panel.scss | 16 ++++++++++++++++ eww/yuck/README.md | 2 +- eww/yuck/panel/panel_widg.yuck | 10 ++++++---- eww/yuck/panel/panel_widg_cen.yuck | 2 +- eww/yuck/panel/panel_widg_left.yuck | 2 +- eww/yuck/panel/panel_widg_right.yuck | 4 ++-- eww/yuck/panel/panel_window.yuck | 11 ++++++++--- 12 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 eww/scss/panel/_panel.scss diff --git a/eww/eww.css b/eww/eww.css index ed15efb..b399381 100644 --- a/eww/eww.css +++ b/eww/eww.css @@ -111,4 +111,18 @@ tooltip { background-color: rgba(128, 128, 128, 0.5); } +/* Panel */ +.panel_widg { + background-color: rgba(128, 128, 128, 0.5); +} +.panel_widg .panel_left { + background-color: rgba(221, 128, 128, 0.856); +} +.panel_widg .panel_cen { + background-color: rgba(209, 188, 95, 0.849); +} +.panel_widg .panel_right { + background-color: rgba(96, 211, 196, 0.863); +} + /*# sourceMappingURL=eww.css.map */ diff --git a/eww/eww.css.map b/eww/eww.css.map index 83e59c9..3d79254 100644 --- a/eww/eww.css.map +++ b/eww/eww.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["scss/common/_common.scss","scss/tooltip/_tooltip.scss","scss/colors/_glassy.scss","scss/osd/_osd.scss","scss/osd/_bat.scss","scss/osd/_bri.scss","scss/osd/_vol.scss","scss/dock/_dock.scss"],"names":[],"mappings":"AAAA;AACA;EACI;;;ACFJ;AAGA;EACI;EACA,kBCDS;EDET,OCDY;;;ACDhB;AAKI;EACH,eAJI;EAKJ,kBDHY;;ACMT;EAEH;EACA,kBDNc;;ACOd;EAEI,eAdA;;AAgBJ;EAEI;;AClBA;EACH,kBFMyB;;AEJtB;EACH,kBFI6B;;AEF1B;EACH,kBFE0B;;AEAvB;EACH;;AAEG;EACH,kBFF0B;;AEIvB;EACH,kBFJsB;;AEMnB;EACH,kBFNwB;;AEQrB;EACH,kBFRuB;;AEUpB;EACH,kBFVuB;;AGfpB;EACH,kBHyBsB;;AGvBnB;EACH,kBHuBsB;;AGrBnB;EACH,kBHqBuB;;AGnBpB;EACH,kBHmBuB;;AGjBpB;EACH,kBHiBuB;;AI9BpB;EACH,kBJgBsB;;AIdnB;EACH,kBJesB;;AIbnB;EACH,kBJasB;;AIXnB;EACH,kBJWuB;;AITpB;EACH,kBJSuB;;AIPpB;EACH,kBJOuB;;ACErB;EAEH,cA3BI;EA4BJ;EACA;;AAGG;EAEH;EACA;EACA;;;AIzCD;AAEA;EACI;EACA,kBLoCU;;AKnCV;EACI;EACA;EACA;EACA,OLiCc;;AK/Bd;EACI,kBL6BM","file":"eww.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["scss/common/_common.scss","scss/tooltip/_tooltip.scss","scss/colors/_glassy.scss","scss/osd/_osd.scss","scss/osd/_bat.scss","scss/osd/_bri.scss","scss/osd/_vol.scss","scss/dock/_dock.scss","scss/panel/_panel.scss"],"names":[],"mappings":"AAAA;AACA;EACI;;;ACFJ;AAGA;EACI;EACA,kBCDS;EDET,OCDY;;;ACDhB;AAKI;EACH,eAJI;EAKJ,kBDHY;;ACMT;EAEH;EACA,kBDNc;;ACOd;EAEI,eAdA;;AAgBJ;EAEI;;AClBA;EACH,kBFMyB;;AEJtB;EACH,kBFI6B;;AEF1B;EACH,kBFE0B;;AEAvB;EACH;;AAEG;EACH,kBFF0B;;AEIvB;EACH,kBFJsB;;AEMnB;EACH,kBFNwB;;AEQrB;EACH,kBFRuB;;AEUpB;EACH,kBFVuB;;AGfpB;EACH,kBHyBsB;;AGvBnB;EACH,kBHuBsB;;AGrBnB;EACH,kBHqBuB;;AGnBpB;EACH,kBHmBuB;;AGjBpB;EACH,kBHiBuB;;AI9BpB;EACH,kBJgBsB;;AIdnB;EACH,kBJesB;;AIbnB;EACH,kBJasB;;AIXnB;EACH,kBJWuB;;AITpB;EACH,kBJSuB;;AIPpB;EACH,kBJOuB;;ACErB;EAEH,cA3BI;EA4BJ;EACA;;AAGG;EAEH;EACA;EACA;;;AIzCD;AAEA;EACI;EACA,kBLoCU;;AKnCV;EACI;EACA;EACA;EACA,OLiCc;;AK/Bd;EACI,kBL6BM;;;AMzClB;AAEA;EACI,kBN0CW;;AMxCX;EACI,kBNwCa;;AMtCjB;EACI,kBNsCW;;AMpCf;EACI,kBNoCY","file":"eww.css"} \ No newline at end of file diff --git a/eww/eww.yuck b/eww/eww.yuck index 9097709..7dc962d 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -1,4 +1,5 @@ (include "yuck/vars/vars.yuck") (include "yuck/test/test-window.yuck") (include "yuck/osd/osd_window.yuck") -(include "yuck/dock/dock_window.yuck") \ No newline at end of file +(include "yuck/dock/dock_window.yuck") +(include "yuck/panel/panel_window.yuck") \ No newline at end of file diff --git a/eww/scss/colors/_glassy.scss b/eww/scss/colors/_glassy.scss index 9048f9c..b9657b6 100644 --- a/eww/scss/colors/_glassy.scss +++ b/eww/scss/colors/_glassy.scss @@ -41,4 +41,10 @@ $c: rgba(245, 40, 145, 0.8); //Dock $dock_bg_col: rgba(128, 128, 128, 0.5); $dock_ico_bg_col: rgba(128, 128, 128, 0.5); -$dock_ico_fg_def_col: rgba(255, 255, 255, 1); \ No newline at end of file +$dock_ico_fg_def_col: rgba(255, 255, 255, 1); + +//Panel +$panel_bg_col: rgba(128, 128, 128, 0.5); +$panel_right_bg_col: rgba(221, 128, 128, 0.856); +$panel_cen_bg_col: rgba(209, 188, 95, 0.849); +$panel_left_bg_col: rgba(96, 211, 196, 0.863); diff --git a/eww/scss/eww.scss b/eww/scss/eww.scss index ec84d62..539b9ef 100644 --- a/eww/scss/eww.scss +++ b/eww/scss/eww.scss @@ -1,7 +1,8 @@ @use "common/_common.scss"; @use "tooltip/_tooltip.scss"; @use "osd/_osd.scss"; -@use "dock/_dock.scss" +@use "dock/_dock.scss"; +@use "panel/_panel.scss"; //@use "colors/_glassy.scss"; \ No newline at end of file diff --git a/eww/scss/panel/_panel.scss b/eww/scss/panel/_panel.scss new file mode 100644 index 0000000..a122301 --- /dev/null +++ b/eww/scss/panel/_panel.scss @@ -0,0 +1,16 @@ +@use "../colors/_glassy.scss" as *; +/* Panel */ + +.panel_widg { + background-color: $panel_bg_col; + + .panel_left { + background-color: $panel_right_bg_col; + } + .panel_cen { + background-color: $panel_cen_bg_col; + } + .panel_right { + background-color: $panel_left_bg_col; + } +} \ No newline at end of file diff --git a/eww/yuck/README.md b/eww/yuck/README.md index bcd2c3a..fac250c 100644 --- a/eww/yuck/README.md +++ b/eww/yuck/README.md @@ -2,7 +2,7 @@ Yuck is the custom language to config EWW. Refer the [official docs](https://elkowar.github.io/eww/configuration.html) for basic config instructions and syntax. -## Splitting Eww Config +## Note: Splitting Eww Config There are 2 ways to specify path while including other `.yuck` files: ### Absolute path: From `/` diff --git a/eww/yuck/panel/panel_widg.yuck b/eww/yuck/panel/panel_widg.yuck index a2d8ebb..8458141 100644 --- a/eww/yuck/panel/panel_widg.yuck +++ b/eww/yuck/panel/panel_widg.yuck @@ -2,14 +2,16 @@ (include "yuck/panel/panel_widg_cen.yuck") (include "yuck/panel/panel_widg_left.yuck") -(defwidget panel_widg [] +(defwidget panel_widg [h] (centerbox :class "panel_widg" :halign "fill" - :height 28 - :width 1376 + :height "${h}" + :width 1366 :active true - (children) + (panel_left) + (panel_cen) + (panel_right) ) ) \ No newline at end of file diff --git a/eww/yuck/panel/panel_widg_cen.yuck b/eww/yuck/panel/panel_widg_cen.yuck index 777736a..7709228 100644 --- a/eww/yuck/panel/panel_widg_cen.yuck +++ b/eww/yuck/panel/panel_widg_cen.yuck @@ -6,6 +6,6 @@ :width 300 :active true - (children) + "--panel_cen--" ) ) \ No newline at end of file diff --git a/eww/yuck/panel/panel_widg_left.yuck b/eww/yuck/panel/panel_widg_left.yuck index d7e93ef..3a0a7c6 100644 --- a/eww/yuck/panel/panel_widg_left.yuck +++ b/eww/yuck/panel/panel_widg_left.yuck @@ -6,6 +6,6 @@ :width 300 :active true - (children) + "--panel_left--" ) ) \ No newline at end of file diff --git a/eww/yuck/panel/panel_widg_right.yuck b/eww/yuck/panel/panel_widg_right.yuck index d04b6ea..501403c 100644 --- a/eww/yuck/panel/panel_widg_right.yuck +++ b/eww/yuck/panel/panel_widg_right.yuck @@ -5,7 +5,7 @@ :height 28 :width 300 :active true - - (children) + + "--panel_right--" ) ) \ No newline at end of file diff --git a/eww/yuck/panel/panel_window.yuck b/eww/yuck/panel/panel_window.yuck index d36018c..acd5bfc 100644 --- a/eww/yuck/panel/panel_window.yuck +++ b/eww/yuck/panel/panel_window.yuck @@ -1,6 +1,6 @@ (include "yuck/panel/panel_widg.yuck") -(defwindow panel +(defwindow panel [h] :monitor 0 :windowtype "dock" :wm-ignore true @@ -12,8 +12,13 @@ :anchor "top center" :x "0%" :y "0%" - :height "2.5%" + :height "${h}px" :width "100%" ) - (panel_widg) + :reserve + (struts + :distance "${h}px" + :side "top" + ) + (panel_widg :h "${h}") ) \ No newline at end of file