This commit is contained in:
Stephan Raabe
2024-04-16 21:46:53 +02:00
parent 55f7feea4f
commit 1b36fb7b1b
47 changed files with 829 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
/** Global *******************************************/
*{
all: unset;
font-family: feather;
font-family: "JetBrains Mono";
color: #151515;
}
/** Boxes ***********************************/
.winbox {
background-color: #F5EEE6;
border: 1px solid #161616;
border-radius: 12px;
}
/** Resources ***********************************/
.res_box {
background-color: #F0E9E1;
border: 1px solid #E6DFD7;
border-radius: 12px;
padding: 14px 18px 14px 18px;
}
.res_circle {
background-color: #E1DCD2;
border: 0px solid #161616;
border-radius: 100%;
padding: 0px;
}
.res_circle_small {
background-color: #F5EEE6;
border: 0px solid #161616;
border-radius: 100%;
padding: 40px;
}
.res_text {
background-color: #E6E1D7;
border: 1px solid #161616;
border-radius: 16px;
font-size : 14px;
padding: 0px 8px 0px 8px;
margin: 0px 0px 0px 0px;
font-weight : bold;
}
.res_cpu {
color: #FD6B85;
}
.res_mem {
color: #B1A6EE;
}
.res_disk {
color: #67D4F1;
}
/** Power Buttons ***********************************/
.powericons {
background-repeat: no-repeat;
background-size: 48px;
min-height: 48px;
min-width: 48px;
}
/** Quotes ***********************************/
.quote_box {
margin: 20px;
}
.quote_text {
font-size : 14px;
font-style: italic;
font-weight : bold;
}
/** EOF *************************************************/
+145
View File
@@ -0,0 +1,145 @@
;; **
;; ** Widgets config for EWW
;; ** Created by : @adi1090x
;; **
;; ** Variables ***********************************************************************
;; System vars
(defpoll HOST :interval "5s" `hostname`)
(defpoll CPU_USAGE :interval "1s" `../scripts/sys_info --cpu`)
(defpoll MEM_USAGE :interval "1s" `../scripts/sys_info --mem`)
(defpoll DISK_USAGE :interval "1s" `../scripts/sys_info --disk`)
(defpoll BLIGHT :interval "1s" `../scripts/sys_info --blight`)
(defpoll BATTERY :interval "5s" `../scripts/sys_info --bat`)
(defpoll QUOTE :interval "5m" `../scripts/quotes`)
;; ** Widgets *************************************************************************
;; resources
(defwidget resources []
(box :class "winbox"
(centerbox :orientation "h"
(box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
(box :class "res_circle" :orientation "v" :valign "center" :halign "center"
(circular-progress :class "res_cpu" :value CPU_USAGE :thickness 15
(label :class "res_circle_small" :text "CPU")))
(label :class "res_text" :valign "end" :halign "center" :text "${CPU_USAGE}%"))
(box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
(box :class "res_circle" :orientation "v" :valign "center" :halign "center"
(circular-progress :class "res_mem" :value MEM_USAGE :thickness 15
(label :class "res_circle_small" :text "MEMORY")))
(label :class "res_text" :valign "end" :halign "center" :text "${MEM_USAGE}%"))
(box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
(box :class "res_circle" :orientation "v" :valign "center" :halign "center"
(circular-progress :class "res_disk" :value DISK_USAGE :thickness 15
(label :class "res_circle_small" :text "DISK")))
(label :class "res_text" :valign "end" :halign "center" :text "${DISK_USAGE}%")))))
;; powermenus
(defwidget logout []
(box :class "winbox"
(button :style "background-image: url('../images/icons/system/sys-exit.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --logout")))
(defwidget suspend []
(box :class "winbox"
(button :style "background-image: url('../images/icons/system/sys-sleep.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --suspend")))
(defwidget lock []
(box :class "winbox"
(button :style "background-image: url('../images/icons/system/sys-lock.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --suspend")))
(defwidget reboot []
(box :class "winbox"
(button :style "background-image: url('../images/icons/system/sys-reboot.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --reboot")))
(defwidget shutdown []
(box :class "winbox"
(button :style "background-image: url('../images/icons/system/poweroff.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --shutdown")))
;; quotes
(defwidget quotes []
(box :class "winbox"
(box :class "quote_box" :orientation "h" :valign "center" :halign "center" :spacing 10 :space-evenly "false"
(box :class "powericons" :style "background-image: url('../images/icons/quotes.png');")
(box :class "powericons" :style "background-image: url('../images/icons/quotes.png');")
(box :class "powericons" :style "background-image: url('../images/icons/quotes.png');")
(label :class "quote_text" :valign "center" :halign "center" :text QUOTE :wrap true :limit-width 90 ))))
;; ** Windows *************************************************************************
;; resources
(defwindow resources
:monitor 0
:geometry (geometry :x "15px"
:y "15px"
:width "480px"
:height "200px"
:anchor "top right")
:stacking "fg"
:wm-ignore false
(resources))
;; powermenu
(defwindow logout
:monitor 0
:geometry (geometry :x "1420px"
:y "320px"
:width "80px"
:height "80px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(logout))
(defwindow suspend
:monitor 0
:geometry (geometry :x "1520px"
:y "320px"
:width "80px"
:height "80px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(suspend))
(defwindow lock
:monitor 0
:geometry (geometry :x "1620px"
:y "320px"
:width "80px"
:height "80px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(lock))
(defwindow reboot
:monitor 0
:geometry (geometry :x "1720px"
:y "320px"
:width "80px"
:height "80px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(reboot))
(defwindow shutdown
:monitor 0
:geometry (geometry :x "1820px"
:y "320px"
:width "80px"
:height "80px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(shutdown))
;; quotes
(defwindow quotes
:monitor 0
:geometry (geometry :x "1420px"
:y "420px"
:width "480px"
:height "100px"
:anchor "top left")
:stacking "fg"
:wm-ignore false
(quotes))
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
## Files and CMD
FILE="$HOME/.cache/eww_launch.sidebar"
CFG="$HOME/dotfiles/eww/ml4w-dashboard"
EWW=`which eww`
## Run eww daemon if not running already
if [[ ! `pidof eww` ]]; then
${EWW} daemon
sleep 1
fi
## Open widgets
run_eww() {
${EWW} --config "$CFG" open-many \
resources \
logout \
suspend \
lock \
reboot \
shutdown \
quotes
}
## Launch or close widgets accordingly
if [[ ! -f "$FILE" ]]; then
touch "$FILE"
run_eww
else
${EWW} --config "$CFG" close resources logout suspend lock reboot shutdown quotes
rm "$FILE"
fi