From 9a0d7cb7d661a4c11c827bcc2cc9573e29ede99a Mon Sep 17 00:00:00 2001 From: primardj Date: Sat, 20 Jul 2024 22:04:00 +0200 Subject: [PATCH] update all eww widgets --- dotconfig/eww/analog_clock/clock.scss | 6 + dotconfig/eww/analog_clock/clock.yuck | 49 ++++- dotconfig/eww/analog_clock/clock_big_tic.svg | 57 ++++++ .../eww/analog_clock/clock_little_tic.svg | 57 ++++++ dotconfig/eww/analog_clock/clock_socle.svg | 172 ++++++++++++++++++ dotconfig/eww/eww.scss | 1 + dotconfig/eww/eww.yuck | 1 + dotconfig/eww/system_widget/system.yuck | 88 +++++---- dotconfig/eww/virKeyb/keyb.scss | 0 dotconfig/eww/virKeyb/keyb.yuck | 122 +++++++++++++ 10 files changed, 505 insertions(+), 48 deletions(-) create mode 100644 dotconfig/eww/analog_clock/clock_big_tic.svg create mode 100644 dotconfig/eww/analog_clock/clock_little_tic.svg create mode 100644 dotconfig/eww/analog_clock/clock_socle.svg create mode 100644 dotconfig/eww/virKeyb/keyb.scss create mode 100644 dotconfig/eww/virKeyb/keyb.yuck diff --git a/dotconfig/eww/analog_clock/clock.scss b/dotconfig/eww/analog_clock/clock.scss index 8714808..08c8dc0 100644 --- a/dotconfig/eww/analog_clock/clock.scss +++ b/dotconfig/eww/analog_clock/clock.scss @@ -43,5 +43,11 @@ color: #FFA500; } +.analog-minutes { + color: #FFA500; +} +.analog-hours { + color: #FFA500; +} diff --git a/dotconfig/eww/analog_clock/clock.yuck b/dotconfig/eww/analog_clock/clock.yuck index cb391bb..daccb68 100644 --- a/dotconfig/eww/analog_clock/clock.yuck +++ b/dotconfig/eww/analog_clock/clock.yuck @@ -12,6 +12,10 @@ :initial "00" `date +%M`) +(defpoll seconds + :interval "1s" + :initial "00" + `date +%S`) (defpoll ampm :interval "1s" @@ -29,7 +33,46 @@ :width 180 :height 180 :space-evenly false - (box :width 180 :height 180 :class "analog-clock") + (overlay + (box :width 180 :height 180 :class "analog-clock") + (box + (image :path "/home/primardj/.config/eww/analog_clock/clock_socle.svg" :image-width 170 :image-height 170) + ) + ;(transform + ; :rotate "${4*100/60}" ;"${minutes*100/60}" + ; :translate-x "0%" + ; :translate-y "0%" + ; (image :path "/home/primardj/.config/eww/analog_clock/clock_big_tic.svg" :image-width 170 :image-height 170) + ;) + ;(transform + ; :rotate "${(1+4/60)*100/12}" ; "${(hours+minutes/60)*100/12}" + ; (image :path "/home/primardj/.config/eww/analog_clock/clock_little_tic.svg" :image-width 170 :image-height 170) + ;) + (transform + :translate-x "22%" + :translate-y "22%" + :scale-x "70%" + :scale-y "70%" + (circular-progress + :class "analog-minutes" + :thickness 10 + :start-at 75 + :value "${minutes*100/60}" + ) + ) + (transform + :translate-x "34%" + :translate-y "34%" + :scale-x "60%" + :scale-y "60%" + (circular-progress + :class "analog-hours" + :thickness 10 + :start-at 75 + :value "${(hours+minutes/60)*100/12}" + ) + ) + ) (box :height 180 :width 180 @@ -64,8 +107,8 @@ (defwindow clock :monitor 0 :geometry (geometry - :x "5%" - :y "35%" + :x "8.5%" + :y "58%" :height "200px" :anchor "top right") :stacking "bg" diff --git a/dotconfig/eww/analog_clock/clock_big_tic.svg b/dotconfig/eww/analog_clock/clock_big_tic.svg new file mode 100644 index 0000000..2195cb0 --- /dev/null +++ b/dotconfig/eww/analog_clock/clock_big_tic.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + diff --git a/dotconfig/eww/analog_clock/clock_little_tic.svg b/dotconfig/eww/analog_clock/clock_little_tic.svg new file mode 100644 index 0000000..9722d24 --- /dev/null +++ b/dotconfig/eww/analog_clock/clock_little_tic.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + diff --git a/dotconfig/eww/analog_clock/clock_socle.svg b/dotconfig/eww/analog_clock/clock_socle.svg new file mode 100644 index 0000000..011f5aa --- /dev/null +++ b/dotconfig/eww/analog_clock/clock_socle.svg @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dotconfig/eww/eww.scss b/dotconfig/eww/eww.scss index 59b2b0b..72f8243 100644 --- a/dotconfig/eww/eww.scss +++ b/dotconfig/eww/eww.scss @@ -5,3 +5,4 @@ @import "analog_clock/clock.scss"; @import "system_widget/system.scss"; @import "perf_widget/perf.scss"; +@import "virKeyb/keyb.scss"; diff --git a/dotconfig/eww/eww.yuck b/dotconfig/eww/eww.yuck index 4d61cd5..36e5b17 100644 --- a/dotconfig/eww/eww.yuck +++ b/dotconfig/eww/eww.yuck @@ -1,3 +1,4 @@ (include "./analog_clock/clock.yuck") (include "./system_widget/system.yuck") (include "./perf_widget/perf.yuck") +(include "./virKeyb/keyb.yuck") diff --git a/dotconfig/eww/system_widget/system.yuck b/dotconfig/eww/system_widget/system.yuck index ee7c57b..50ef530 100644 --- a/dotconfig/eww/system_widget/system.yuck +++ b/dotconfig/eww/system_widget/system.yuck @@ -36,57 +36,55 @@ (box :space-evenly false :orientation "v" - :class "information" + :class "information-box" (box :class "boxtextcyan" + ;:width 223 :halign "fill" (label :text "${username}@${hostname}") ) (box :space-evenly false :orientation "h" - (box :class "boxtextcyan" - :halign "fill" - :hexpand true - (label :class "cyan" :text "OS:") + :class "information" + (box :class "inf-title" + :orientation "v" + :width 76 + (box :class "boxtextcyan" + :halign "fill" + :hexpand true + (label :class "cyan" :text "OS:") + ) + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "Kernel:") + ) + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "Uptime:") + ) + (box :class "boxtextcyan" + :hexpand true + :halign "fill" + (label :class "cyan" :text "${temperature_name}:") + ) ) - (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") + (box :class "inf-data" + :orientation "v" + :width 150 + (box :class "boxtextcyan" + (label :class "white" :text "${systemRunning} ${architechture}") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${kernel}") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${uptime}") + ) + (box :class "boxtextcyan" + (label :class "white" :text "${temperature_val}°C") + ) ) ) ) @@ -98,8 +96,8 @@ (defwindow system :monitor 0 :geometry (geometry - :x "5%" - :y "8%" + :x "8.5%" + :y "10%" :height "200px" :anchor "top right") :stacking "bg" diff --git a/dotconfig/eww/virKeyb/keyb.scss b/dotconfig/eww/virKeyb/keyb.scss new file mode 100644 index 0000000..e69de29 diff --git a/dotconfig/eww/virKeyb/keyb.yuck b/dotconfig/eww/virKeyb/keyb.yuck new file mode 100644 index 0000000..e3e2bcc --- /dev/null +++ b/dotconfig/eww/virKeyb/keyb.yuck @@ -0,0 +1,122 @@ +(defvar width_button_highline 50) + + +(defwidget keyboard_main [] + (box :orientation "v" + (centerbox + (box :space-evenly false + (button :onclick "$(wtype -k Escape)" :width "${width_button_highline}" + (label :text "Échap")) + (button :onclick "$(pactl set-sink-mute $(pactl get-default-sink) toggle)" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(pactl set-sink-volume $(pactl get-default-sink) -5%)" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(pactl set-sink-volume $(pactl get-default-sink) +5%)" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(pactl set-source-mute alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source toggle)" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(light -U 5)" :width "${width_button_highline}" + (label :text "Light -")) + (button :onclick "$(light -A 5)" :width "${width_button_highline}" + (label :text "Light +")) + (button :onclick "$()" :width "${width_button_highline}" + (label :text ""))) + (box) + (box :space-evenly false :halign "end" + (button :onclick "$()" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(eww close keyb)" :width "${width_button_highline}" + (label :text "VirtKey")) + (button :onclick "$()" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$()" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(galculator)" :width "${width_button_highline}" + (label :text "Calc")) + (button :onclick "$()" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$()" :width "${width_button_highline}" + (label :text "")) + (button :onclick "$(wtype -k Delete)" :width "${width_button_highline}" + (label :text "Suppr")))) + (centerbox + (box + (button :onclick "$(wtype ²)" :width 62 + (label :text "²")) + (button :onclick "$(wtype -k ampersand)" + (label :text "&")) + (button :onclick "$(wtype é)" + (label :text "é")) + (button :onclick "$(wtype -k quotedbl)" + (label :text "\"")) + (button :onclick "$(wtype -k apostrophe)" + (label :text "'")) + (button :onclick "$(wtype -k parenleft)" + (label :text "(")) + (button :onclick "$(wtype -k minus)" + (label :text "-")) + (button :onclick "$(wtype è)" + (label :text "è")) + (button :onclick "$(wtype _)" + (label :text "_")) + (button :onclick "$(wtype ç)" + (label :text "ç")) + (button :onclick "$(wtype à)" + (label :text "à")) + (button :onclick "$(wtype -k parenright)" + (label :text ")")) + (button :onclick "$(wtype -k equal)" + (label :text "="))) + (box) + (box :space-evenly false :halign "end" + (button :onclick "$(wtype -k Return)" :width 95 + (label :text "<_ |")) + )) + (centerbox + (box) + (box) + (box)) + (centerbox + (box) + (box) + (box)) + (centerbox + (box) + (box) + (box)) + (centerbox + (box) + (box) + (box)))) + + + + + + + + + + + + + +(defwindow keyb + :monitor 0 + :geometry (geometry + :x "0%" + :y "0%" + :width "100%" + :height "30%" + :anchor "center bottom") + :stacking "fg" + :focusable false + :exclusive true + (keyboard_main) + ) + + + + + +