From 27b6d336ee7e890929486ed4a7db7facf6c9f1db Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 27 Feb 2023 05:44:07 -0600 Subject: [PATCH] eww is now purdier --- eww/eww.scss | 13 ++++++- eww/eww.yuck | 83 ++++++++++++++++----------------------------- eww/scripts/appname | 1 + 3 files changed, 42 insertions(+), 55 deletions(-) diff --git a/eww/eww.scss b/eww/eww.scss index 8fab581..a4b2dab 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -45,7 +45,7 @@ $darktransparent: rgba(40, 42, 54, 0.97); background-color: $backtransparent; border-radius: 20px 20px 20px 20px; box-shadow: 5px 5px 4px 4px #202020; - margin: 8px 18px 13px 18px; + margin: 6px 18px 13px 18px; } .module { margin: 0px 0px 0px 0px; @@ -101,6 +101,15 @@ tooltip label { color: $base05; } +.right_modules { + padding-bottom: 2px; + padding-right: 5px; +} + +.separ { + padding-bottom: 3px; +} + .membar { color: $base0A; background-color: $base01; @@ -196,9 +205,11 @@ tooltip label { margin: 8px 11px 8px 8px; } .iconvol { + color: $base08; margin: 10px 11px 8px 8px; } .iconbright { + color: $base09; margin: 10px 14px 10px 8px; } .iconbat, .iconmem, .iconcpu .iconvol .iconbright { diff --git a/eww/eww.yuck b/eww/eww.yuck index 4af8de6..465a4dc 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -164,17 +164,13 @@ :class "bat_module" :vexpand "false" :hexpand "false" - :spacing 5 + :spacing 0 :visible {HOST == "kaladin" ? "false" : "true"} - (circular-progress - :value {EWW_BATTERY["BAT1"].capacity} - :class "batbar" - :thickness 3 - (button - :onclick "scripts/pop system" - :class "iconbat" - :tooltip "${EWW_BATTERY["BAT1"].capacity}% battery left" - "")) + (button + :onclick "scripts/pop system" + :class "iconbat" + :tooltip "${EWW_BATTERY["BAT1"].capacity}% battery left" + "") (label :text "${round(EWW_BATTERY['BAT1'].capacity, 0)}%" :class "bat_label"))) @@ -184,37 +180,26 @@ :class "bright_module" :vexpand "false" :hexpand "false" - :spacing 5 - (circular-progress - :class "brightbar" - :value brightness_percent - :thickness 3 - (button - :class "iconbright" - ;; :onclick "scripts/pop audio" - :tooltip "${brightness_percent}%" - "")) + (button + :class "iconbright" + ;; :onclick "scripts/pop audio" + :tooltip "${brightness_percent}%" + "") (label :text brightness_percent - :class "bright_label"))) + :class "bright_label")) + ) (defwidget volume [] (box :class "vol_module" :vexpand "false" :hexpand "false" - :spacing 5 - (circular-progress - :class "volbar" - :value volume_percent - :thickness 3 - :max 150 - :min 0 - (button - :class "iconvol" - :onclick "scripts/pop audio" - :tooltip "${volume_percent}%" - "墳")) + (button + :class "iconvol" + :onclick "scripts/pop audio" + :tooltip "${volume_percent}%" + "墳") (label :text volume_percent :class "vol_label"))) @@ -224,16 +209,11 @@ :class "cpu_module" :vexpand "false" :hexpand "false" - :spacing 5 - (circular-progress - :value {EWW_CPU.avg} - :class "cpubar" - :thickness 3 - (button - :onclick "scripts/pop system" - :class "iconcpu" - :tooltip "using ${EWW_CPU.avg}% of cpu" - "")) + (button + :onclick "scripts/pop system" + :class "iconcpu" + :tooltip "using ${EWW_CPU.avg}% of cpu" + "") (label :text "${round(EWW_CPU.avg, 0)}%" :class "cpu_label"))) @@ -243,16 +223,11 @@ :class "mem_module" :vexpand "false" :hexpand "false" - :spacing 5 - (circular-progress - :value {EWW_RAM.used_mem_perc} - :class "membar" - :thickness 3 - (button - :onclick "scripts/pop system" - :class "iconmem" - :tooltip "using ${EWW_RAM.used_mem_perc}% ram" - "")) + (button + :onclick "scripts/pop system" + :class "iconmem" + :tooltip "using ${EWW_RAM.used_mem_perc}% ram" + "") (label :text "${round(EWW_RAM.used_mem_perc, 0)}%" :class "mem_label"))) @@ -298,7 +273,7 @@ (defwidget sep [] (box - :class "module-2" + :class "separator" :vexpand "false" :hexpand "false" (label diff --git a/eww/scripts/appname b/eww/scripts/appname index 7b3c0c4..b185878 100755 --- a/eww/scripts/appname +++ b/eww/scripts/appname @@ -7,6 +7,7 @@ icontheme=$(grep "gtk-icon-theme-name" "$HOME"/.config/gtk-3.0/settings.ini | cu workspaces() { if [[ ${1:0:12} == "activewindow" ]]; then #set focused workspace string=${1:14} + echo $string export title=$(echo $string | sed 's/.*,//') class="${string/,*/}" # export title=${string/,/, }