add my eww widgets
This commit is contained in:
parent
ac22f7a0cb
commit
c7fb9247e7
9 changed files with 1241 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
(include "./analog_clock/clock.yuck")
|
||||
(include "./system_widget/system.yuck")
|
||||
(include "./perf_widget/perf.yuck")
|
||||
|
|
52
dotconfig/eww/perf_widget/perf.scss
Normal file
52
dotconfig/eww/perf_widget/perf.scss
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
269
dotconfig/eww/perf_widget/perf.yuck
Normal file
269
dotconfig/eww/perf_widget/perf.yuck
Normal file
|
@ -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))
|
||||
|
||||
|
750
dotconfig/eww/profile.svg
Normal file
750
dotconfig/eww/profile.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 552 KiB |
37
dotconfig/eww/system_widget/system.scss
Normal file
37
dotconfig/eww/system_widget/system.scss
Normal file
|
@ -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;
|
||||
}
|
||||
|
111
dotconfig/eww/system_widget/system.yuck
Normal file
111
dotconfig/eww/system_widget/system.yuck
Normal file
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in a new issue