diff --git a/dotconfig/eww/analog_clock/clock.scss b/dotconfig/eww/analog_clock/clock.scss index 468c6ca..8714808 100644 --- a/dotconfig/eww/analog_clock/clock.scss +++ b/dotconfig/eww/analog_clock/clock.scss @@ -2,18 +2,17 @@ .clock { border-radius: 20px; padding: 10px; - background: rgba(30, 31, 40, 0.8) + background: rgba(40, 31, 30, 0.5) } .analog-clock { - padding: 2rem; margin: 10px; - background: #282a36; + background: #362a28; border-radius: 100%; - border: 7px solid #282a36; + border: 7px solid #362a28; box-shadow: inset 4px 4px 10px rgba(0,0,0,0.5), - inset -4px -4px 10px rgba(40,42,54,0.5), + inset -4px -4px 10px rgba(54,42,40,0.5), 4px 4px 10px rgba(0,0,0,0.3); border-radius: 50%; } @@ -30,18 +29,18 @@ padding: 10px; margin-left: 0px; margin-right: 5px; - background: rgba(40,42,54,1.0); + background: rgba(54,42,40,1.0); border-radius: 10px; - color: #00FFFF; + color: #FFA500; } .date { padding: 10px; margin: 5px 20px 0px 10px; - background: rgba(40,42,54,1.0); + background: rgba(54,42,40,1.0); border-radius: 10px; - color: #00FFFF; + color: #FFA500; } diff --git a/dotconfig/eww/analog_clock/clock.yuck b/dotconfig/eww/analog_clock/clock.yuck index 487e033..cb391bb 100644 --- a/dotconfig/eww/analog_clock/clock.yuck +++ b/dotconfig/eww/analog_clock/clock.yuck @@ -1,5 +1,6 @@ + (defpoll hours :interval "1s" :initial "00" @@ -31,7 +32,7 @@ (box :width 180 :height 180 :class "analog-clock") (box :height 180 - :width 175 + :width 180 :class "numerical-clock" :orientation "v" :space-evenly false @@ -64,9 +65,9 @@ :monitor 0 :geometry (geometry :x "5%" - :y "10%" - :height "180px" - :anchor "bottom left") + :y "35%" + :height "200px" + :anchor "top right") :stacking "bg" :exclusive true :focusable false diff --git a/dotconfig/eww/eww.scss b/dotconfig/eww/eww.scss index 0b93a3a..59b2b0b 100644 --- a/dotconfig/eww/eww.scss +++ b/dotconfig/eww/eww.scss @@ -1 +1,7 @@ -@import "analog_clock/clock.scss" +* { + all: unset; +} + +@import "analog_clock/clock.scss"; +@import "system_widget/system.scss"; +@import "perf_widget/perf.scss"; diff --git a/dotconfig/eww/eww.yuck b/dotconfig/eww/eww.yuck index 4b89622..4d61cd5 100644 --- a/dotconfig/eww/eww.yuck +++ b/dotconfig/eww/eww.yuck @@ -1 +1,3 @@ (include "./analog_clock/clock.yuck") +(include "./system_widget/system.yuck") +(include "./perf_widget/perf.yuck") diff --git a/dotconfig/eww/perf_widget/perf.scss b/dotconfig/eww/perf_widget/perf.scss new file mode 100644 index 0000000..836d95a --- /dev/null +++ b/dotconfig/eww/perf_widget/perf.scss @@ -0,0 +1,52 @@ + + +.perf { + border-radius: 20px; + padding: 10px 20px; + background: rgba(40, 31, 30, 0.5); +} + + +.perf_box { + margin-left: 7px; +} + + +.perf_bar { + /*color: #FFFFFF;*/ + /*background: #1d2021;*/ + margin: 5px; + + progress { + min-width: 17px; + background: #ff5d00; + } +} + +.bat_bar { + margin: 3px; + + progress { + min-width: 13px; + background: #ff9900; + } +} + + +.ram_bar { + margin: 3px; + + progress { + min-width: 13px; + background: #ff8866; + } +} + +.swap_bar { + margin: 3px; + + progress { + min-width: 13px; + background: #444444; + } +} diff --git a/dotconfig/eww/perf_widget/perf.yuck b/dotconfig/eww/perf_widget/perf.yuck new file mode 100644 index 0000000..3323b0d --- /dev/null +++ b/dotconfig/eww/perf_widget/perf.yuck @@ -0,0 +1,269 @@ + +(defpoll cpu_avg :interval "0.5s" + :initial "0" + `cpu_calcul`) + +(defpoll bat_avg :interval "0.5s" + :initial "0" + `cat /sys/class/power_supply/BAT1/capacity`) + +(defpoll ram_avg :interval "0.5s" + :initial "0" + `echo $(free | grep Mem | awk '{print $7/$2 * 100.0}') | cut -d '.' -f 1 `) + +(defpoll swap_avg :interval "0.5s" + :initial "0" + `echo $(free | grep Swap | awk '{print $4/$2 * 100.0}') | cut -d '.' -f 1 `) + + +(defwidget perf [] + (box + :space-evenly false + :orientation "h" + :class "perf_bars" + (box + :space-evenly false + :orientation "v" + (box + :space-evenly false + :height 500 + :orientation "h" + :class "proc_box" + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 25}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 50}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 75}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 100}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 125}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 150}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 175}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 200}" + :orientation "v" + :class "perf_bar") + (progress + :flipped true + :value "${(100 - cpu_avg) * 3.25 - 225}" + :orientation "v" + :class "perf_bar")) + (label + :class "val_label" + :text "${cpu_avg} %") + ) + (box + :space-evenly true + :height 500 + :orientation "v" + (box + :space-evenly false + :orientation "v" + (box + :space-evenly false + :orientation "h" + :height 152 + :class "perf_box" + (progress + :flipped true + :value "${bat_avg * 2.75}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 25}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 50}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 75}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 100}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 125}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 150}" + :orientation "v" + :class "bat_bar") + (progress + :flipped true + :value "${bat_avg * 2.75 - 175}" + :orientation "v" + :class "bat_bar") + ) + (label + :class "val_label" + :text "${bat_avg} %") + ) + (box + :space-evenly false + :orientation "v" + (box + :space-evenly false + :orientation "h" + :height 152 + :class "perf_box" + (progress + :flipped true + :value "${ram_avg * 2.75}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 25}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 50}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 75}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 100}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 125}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 150}" + :orientation "v" + :class "ram_bar") + (progress + :flipped true + :value "${ram_avg * 2.75 - 175}" + :orientation "v" + :class "ram_bar") + ) + (label + :class "val_label" + :text "${100 - ram_avg} %") + ) + (box + :space-evenly false + :orientation "v" + (box + :space-evenly false + :orientation "h" + :height 152 + :class "perf_box" + (progress + :flipped true + :value "${swap_avg * 2.75}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 25}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 50}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 75}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 100}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 125}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 150}" + :orientation "v" + :class "swap_bar") + (progress + :flipped true + :value "${swap_avg * 2.75 - 175}" + :orientation "v" + :class "swap_bar") + ) + (label + :class "val_label" + :text "${100 - swap_avg} %") + ) + + ) + ) +) + + + +(defwindow perf + :monitor 0 + :geometry (geometry + :x "5%" + :y "8%" + :height "500px" + :anchor "top left") + :stacking "bg" + :exclusive true + :focusable false + :namespaces "perf_widget" + (perf)) + + diff --git a/dotconfig/eww/profile.svg b/dotconfig/eww/profile.svg new file mode 100644 index 0000000..56224e3 --- /dev/null +++ b/dotconfig/eww/profile.svg @@ -0,0 +1,750 @@ + + + + diff --git a/dotconfig/eww/system_widget/system.scss b/dotconfig/eww/system_widget/system.scss new file mode 100644 index 0000000..b858d79 --- /dev/null +++ b/dotconfig/eww/system_widget/system.scss @@ -0,0 +1,37 @@ + + + +.system { + border-radius: 20px; + padding: 10px 20px; + background: rgba(40, 31, 30, 0.5); +} + +.profilepicture { + margin: 10px; + background: #362a28; + border-radius: 100%; + border: 7px solid #362a28; + box-shadow: inset 4px 4px 10px rgba(0,0,0,0.5), + inset -4px -4px 10px rgba(54,42,40,0.5), + 4px 4px 10px rgba(0,0,0,0.3); + border-radius: 50%; + margin-right: 20px; +} + +.boxtextcyan { + color: #FFA500; + margin: 2px 2px; + padding: 5px 10px 7px 10px; + background: rgba(54,42,40,1.0); + border-radius: 10px; +} + +.cyan { + color: #FFA500; +} + +.white { + color: #FFFFFF; +} + diff --git a/dotconfig/eww/system_widget/system.yuck b/dotconfig/eww/system_widget/system.yuck new file mode 100644 index 0000000..ee7c57b --- /dev/null +++ b/dotconfig/eww/system_widget/system.yuck @@ -0,0 +1,111 @@ + + + +(defpoll hostname :interval "1s" + `hostname`) + +(defpoll username :interval "1s" + `whoami`) + +(defpoll systemRunning :interval "1s" + `uname -o`) +(defpoll architechture :interval "1s" + `uname -m`) + +(defpoll kernel :interval "1s" + `uname -r`) + +(defpoll uptime :interval "1s" + `newuptime`) + + +(defpoll temperature_name :interval "1s" + `echo $(cat /sys/class/thermal/thermal_zone0/type)`) +(defpoll temperature_val :interval "1s" + `echo "scale=1;$(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc`) + +(defwidget system [] + (box + :space-evenly false + :orientation "h" + :class "system" + (box + :class "profilepicture" + (image :path "/home/primardj/.config/eww/profile.svg" :image-width 145 :image-height 145) + ) + (box + :space-evenly false + :orientation "v" + :class "information" + (box :class "boxtextcyan" + :halign "fill" + (label :text "${username}@${hostname}") + ) + (box + :space-evenly false + :orientation "h" + (box :class "boxtextcyan" + :halign "fill" + :hexpand true + (label :class "cyan" :text "OS:") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${systemRunning} ${architechture}") + ) + ) + (box + :space-evenly false + :orientation "h" + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "Kernel:") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${kernel}") + ) + ) + (box + :space-evenly false + :orientation "h" + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "Uptime:") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${uptime}") + ) + ) + (box + :space-evenly false + :orientation "h" + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "${temperature_name}:") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${temperature_val}°C") + ) + ) + ) + ) +) + + + +(defwindow system + :monitor 0 + :geometry (geometry + :x "5%" + :y "8%" + :height "200px" + :anchor "top right") + :stacking "bg" + :exclusive true + :focusable false + :namespaces "system_widget" + (system)) + +