update all eww widgets

This commit is contained in:
primardj 2024-07-20 22:04:00 +02:00
parent 590a1c9ade
commit 9a0d7cb7d6
10 changed files with 505 additions and 48 deletions

View file

@ -43,5 +43,11 @@
color: #FFA500; color: #FFA500;
} }
.analog-minutes {
color: #FFA500;
}
.analog-hours {
color: #FFA500;
}

View file

@ -12,6 +12,10 @@
:initial "00" :initial "00"
`date +%M`) `date +%M`)
(defpoll seconds
:interval "1s"
:initial "00"
`date +%S`)
(defpoll ampm (defpoll ampm
:interval "1s" :interval "1s"
@ -29,7 +33,46 @@
:width 180 :width 180
:height 180 :height 180
:space-evenly false :space-evenly false
(overlay
(box :width 180 :height 180 :class "analog-clock") (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 (box
:height 180 :height 180
:width 180 :width 180
@ -64,8 +107,8 @@
(defwindow clock (defwindow clock
:monitor 0 :monitor 0
:geometry (geometry :geometry (geometry
:x "5%" :x "8.5%"
:y "35%" :y "58%"
:height "200px" :height "200px"
:anchor "top right") :anchor "top right")
:stacking "bg" :stacking "bg"

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="180mm"
height="180mm"
viewBox="0 0 180 180"
version="1.1"
id="svg1"
sodipodi:docname="clock_big_tic.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.47893561"
inkscape:cx="63.682882"
inkscape:cy="158.68521"
inkscape:window-width="1600"
inkscape:window-height="900"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2"
transform="matrix(0.67781303,0,0,1,25.774958,0)">
<g
id="g3">
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:27.6483"
id="rect1"
width="10.01772"
height="70"
x="89.744469"
y="20"
ry="5.3941569" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="180mm"
height="180mm"
viewBox="0 0 180 180"
version="1.1"
id="svg1"
sodipodi:docname="clock_little_tic.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="1.7532472"
inkscape:cx="280.90734"
inkscape:cy="232.14068"
inkscape:window-width="1600"
inkscape:window-height="870"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2"
transform="matrix(0.67781303,0,0,1,25.774958,0)">
<g
id="g3">
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:20.9002"
id="rect1"
width="10.01772"
height="40"
x="89.744469"
y="50"
ry="5.0088601" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="180mm"
height="180mm"
viewBox="0 0 180 180"
version="1.1"
id="svg1"
sodipodi:docname="clock_socle.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.73458537"
inkscape:cx="-6.1259048"
inkscape:cy="258.64931"
inkscape:window-width="1600"
inkscape:window-height="870"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g2"
transform="matrix(0.67781303,0,0,1,25.774958,0)">
<g
id="g3">
<g
id="g5"
transform="matrix(0.93750006,0,0,0.9375,14.744466,5.625)">
<g
id="g4">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
<g
id="g4-9"
transform="matrix(2.9226934e-4,0.677813,-1.475333,2.9226934e-4,218.09781,32.127247)">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-4"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9-9"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
<g
id="g4-4"
transform="matrix(0.85964891,0.34628469,-0.75372594,0.85964891,79.813288,-16.921302)">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-95"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9-0"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
<g
id="g4-1"
transform="matrix(0.51587842,0.58065653,-1.2638616,0.51587842,155.06382,-5.9839024)">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-7"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9-2"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
<g
id="g4-7"
transform="matrix(-0.50365135,0.58556742,-1.2745506,-0.50365135,243.03535,85.354668)">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-71"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9-1"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
<g
id="g4-76"
transform="matrix(-0.86523255,0.33983563,-0.73968887,-0.86523255,225.75614,138.86841)">
<rect
style="opacity:1;mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-73"
width="10.685568"
height="15"
x="80"
y="10"
ry="6.5" />
<rect
style="mix-blend-mode:normal;fill:#ffa500;fill-opacity:1;stroke-width:13.2185"
id="rect1-9-6"
width="10.685568"
height="15"
x="80"
y="155"
ry="6.5" />
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -5,3 +5,4 @@
@import "analog_clock/clock.scss"; @import "analog_clock/clock.scss";
@import "system_widget/system.scss"; @import "system_widget/system.scss";
@import "perf_widget/perf.scss"; @import "perf_widget/perf.scss";
@import "virKeyb/keyb.scss";

View file

@ -1,3 +1,4 @@
(include "./analog_clock/clock.yuck") (include "./analog_clock/clock.yuck")
(include "./system_widget/system.yuck") (include "./system_widget/system.yuck")
(include "./perf_widget/perf.yuck") (include "./perf_widget/perf.yuck")
(include "./virKeyb/keyb.yuck")

View file

@ -36,61 +36,59 @@
(box (box
:space-evenly false :space-evenly false
:orientation "v" :orientation "v"
:class "information" :class "information-box"
(box :class "boxtextcyan" (box :class "boxtextcyan"
;:width 223
:halign "fill" :halign "fill"
(label :text "${username}@${hostname}") (label :text "${username}@${hostname}")
) )
(box (box
:space-evenly false :space-evenly false
:orientation "h" :orientation "h"
:class "information"
(box :class "inf-title"
:orientation "v"
:width 76
(box :class "boxtextcyan" (box :class "boxtextcyan"
:halign "fill" :halign "fill"
:hexpand true :hexpand true
(label :class "cyan" :text "OS:") (label :class "cyan" :text "OS:")
) )
(box :class "boxtextcyan"
(label :class "white" :text "${systemRunning} ${architechture}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan" (box :class "boxtextcyan"
:hexpand true :hexpand true
:halign "fill" :halign "fill"
(label :class "cyan" :text "Kernel:") (label :class "cyan" :text "Kernel:")
) )
(box :class "boxtextcyan"
(label :class "white" :text "${kernel}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan" (box :class "boxtextcyan"
:hexpand true :hexpand true
:halign "fill" :halign "fill"
(label :class "cyan" :text "Uptime:") (label :class "cyan" :text "Uptime:")
) )
(box :class "boxtextcyan"
(label :class "white" :text "${uptime}")
)
)
(box
:space-evenly false
:orientation "h"
(box :class "boxtextcyan" (box :class "boxtextcyan"
:hexpand true :hexpand true
:halign "fill" :halign "fill"
(label :class "cyan" :text "${temperature_name}:") (label :class "cyan" :text "${temperature_name}:")
) )
)
(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" (box :class "boxtextcyan"
(label :class "white" :text "${temperature_val}°C") (label :class "white" :text "${temperature_val}°C")
) )
) )
) )
) )
)
) )
@ -98,8 +96,8 @@
(defwindow system (defwindow system
:monitor 0 :monitor 0
:geometry (geometry :geometry (geometry
:x "5%" :x "8.5%"
:y "8%" :y "10%"
:height "200px" :height "200px"
:anchor "top right") :anchor "top right")
:stacking "bg" :stacking "bg"

View file

View file

@ -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)
)