updated eww configs to yuck format

This commit is contained in:
Valerie Wolfe 2021-08-25 01:45:11 -04:00
parent a95764cb56
commit 1ccfe8a2f9
10 changed files with 567 additions and 119 deletions

90
eww/clock.yuck Normal file
View file

@ -0,0 +1,90 @@
;; ________ __
;; / ____/ /___ _____/ /__
;; / / / / __ \/ ___/ //_/
;;/ /___/ / /_/ / /__/ ,<
;;\____/_/\____/\___/_/|_|
;;
;; Variables
(defpoll
HOUR
:interval "1m"
"date +\"%I\""
)
(defpoll
MINUTE
:interval "1s"
"date +\"%M\""
)
(defpoll
MERIDIEM
:interval "1m"
"date +\"%p\""
)
(defpoll
DAY
:interval "2m"
"date +\"%a\""
)
;; Widgets
(defwidget
clock []
(box
:class "genwin"
:orientation "h"
:space-evenly false
:vexpand false
:hexpand false
:cursor "default"
(label
:class "time_hour"
:valign "start"
:wrap true
:limit-width 25
:text "${HOUR}"
)
(label
:class "time_min"
:valign "end"
:wrap true
:limit-width 25
:text "${MINUTE}"
)
(box
:orientation "v"
:spacing 25
:space-evenly false
:vexpand false
:hexpand false
(label
:class "time_meridiem"
:halign "end"
:wrap true
:limit-width 25
:text "${MERIDIEM}"
)
(label
:class "time_day"
:halign "end"
:wrap true
:limit-width 25
:text "${DAY}"
)
)
)
)
;; Windows
(defwindow
clock
:stacking "fg"
:focusable false
:geometry (geometry
:x 515
:y 150
:width 350
:height 155
)
(clock)
)

119
eww/cluster.yuck Normal file
View file

@ -0,0 +1,119 @@
;; ________ __
;; / ____/ /_ _______/ /____ _____
;; / / / / / / / ___/ __/ _ \/ ___/
;;/ /___/ / /_/ (__ ) /_/ __/ /
;;\____/_/\__,_/____/\__/\___/_/
;; The collection of action buttons
;; on the right side of the screen.
;; Widgets
(defwidget
logout []
(box
:class "genwin"
:vexpand false
:hexpand false
(button
:class "icon"
:onclick "i3-msg exit"
:cursor "pointer"
:tooltip "logout"
"﫼"
)
)
)
(defwidget
power []
(box
:class "genwin"
:vexpand false
:hexpand false
(button
:class "icon"
:onclick "poweroff"
:cursor "pointer"
:tooltip "shutdown"
"⏼"
)
)
)
(defwidget
reboot []
(box
:class "genwin"
:vexpand false
:hexpand false
(button
:class "icon"
:onclick "reboot"
:cursor "pointer"
:tooltip "shutdown"
""
)
)
)
(defwidget
terminal []
(box
:class "genwin"
:vexpand false
:hexpand false
(button
:class "icon"
:onclick "i3-msg scratchpad show & /home/val/.config/eww/launch_eww"
:cursor "pointer"
:tooltip "terminal"
""
)
)
)
;; Windows
(defwindow
logout
:stacking "fg"
:focusable false
:geometry (geometry
:x 1445
:y 150
:width 155
:height 155
)
(logout)
)
(defwindow
power
:stacking "fg"
:focusable false
:geometry (geometry
:x 1615
:y 150
:width 155
:height 155
)
(power)
)
(defwindow
reboot
:stacking "fg"
:focusable false
:geometry (geometry
:x 1445
:y 320
:width 155
:height 155
)
(reboot)
)
(defwindow
terminal
:stacking "fg"
:focusable false
:geometry (geometry
:x 1615
:y 320
:width 155
:height 155
)
(terminal)
)

View file

@ -6,6 +6,12 @@
opacity: 1;
}
.icon {
font-family: monospace;
font-family: FiraCode Nerd Font;
font-weight: normal;
font-size: 90px;
}
.bg {
//background-image: url("~/.background/Mojave-Night.jpg");
@ -13,6 +19,11 @@
opacity: 0;
}
.x {
font-size: 48px;
color: #fff;
}
.genwin {
border-radius: 16px;
background-color: #161d2f;
@ -27,6 +38,7 @@
margin: 65px 0px 0px 0px;
border-radius: 100%;
border: 5px solid #fff;
background-image: url("file:////home/val/.face.icon");
}
//.face:hover {
@ -35,7 +47,7 @@
.login {
font-family: monospace;
font-family: Fira Code;
font-family: FiraCode Nerd Font;
font-weight: bold;
font-size: 30px;
color: #fff;
@ -54,9 +66,12 @@
min-width: 240px;
}
.cpu_bar label, .ram_bar label, .disk_bar label{
.cpu_bar label, .ram_bar label, .disk_bar label {
font-family: monospace;
}
.cpu_bar .icon, .ram_bar .icon, .disk_bar .icon {
font-size: 40px;
}
.cpu_bar, .ram_bar, .disk_bar, scale trough highlight {
all: unset;
@ -86,7 +101,7 @@
margin: 0px 0px 10px 0px;
}
.time_ampm {
.time_meridiem {
color: #ffffff;
font-size: 40px;
font-weight: bold;
@ -99,3 +114,17 @@
font-weight: normal;
margin: 0px 0px 0px 25px;
}
/* Spotify Settings */
.album_art {
background-size: 240px;
min-height: 240px;
min-height: 240px;
margin: 20px;
border-radius: 14px;
}
.wmbar {
background-color: rgba(0, 0, 0, 0.53);
border-radius: 16px;
}

View file

@ -1,115 +0,0 @@
<eww>
<variables>
<!-- System Variables -->
<script-var name="HOSTNAME" interval="24h">hostname</script-var>
<script-var name="USERNAME" interval="24h">whoami</script-var>
<script-var name="CPU_USAGE" interval="1s">~/.config/eww/scripts/cpu</script-var>
<script-var name="RAM_USAGE" interval="1s">~/.config/eww/scripts/ram</script-var>
<script-var name="SSD_USAGE" interval="1m">df -h / | awk '{print substr($3, 1, length($3)-1) "/" $2}' | tail -n 1 | sed 's/G/GB/'</script-var>
<var name="IMAGE">/home/val/.face.icon</var>
<!-- Time Variables -->
<script-var name="HOUR" interval="1m">date +"%I"</script-var>
<script-var name="MINUTE" interval="1s">date +"%M"</script-var>
<script-var name="AMPM" interval="1m">date +"%p"</script-var>
<script-var name="DAY" interval="2m">date +"%a"</script-var>
</variables>
<definitions>
<def name="bg">
<box class="bg"/>
</def>
<def name="user">
<box class="genwin" orientation="v" spacing="35" space-evenly="false" vexpand="false" hexpand="false">
<box style="background-image: url('{{IMAGE}}');" class="face" halign="center"/>
<label class="login" halign="center" wrap="true" limit-width="25" text="{{USERNAME}}@{{HOSTNAME}}"/>
</box>
</def>
<def name="system">
<box class="genwin" vexpand="false" hexpand="false">
<box orientation="v" spacing="35" halign="center" valign="center" space-evenly="false" vexpand="false" hexpand="false">
<box class="cpu_bar" orientation="h" spacing="20" space-evenly="true" vexpand="false" hexpand="false">
<label text="CPU"/>
<label text="|"/>
<label text="{{CPU_USAGE}}%" active="false"/>
<!--scale min="0" max="100" value="{{CPU_USAGE}}" active="false"/-->
</box>
<box class="ram_bar" orientation="h" spacing="20" space-evenly="true" vexpand="false" hexpand="false">
<label text="RAM"/>
<label text="|"/>
<label text="{{RAM_USAGE}}"/>
<!--scale min="0" max="100" value="{{RAM_USAGE}}" active="false"/-->
</box>
<box class="disk_bar" orientation="h" spacing="20" space-evenly="true" vexpand="false" hexpand="false">
<label text="SSD"/>
<label text="|"/>
<label text="{{SSD_USAGE}}"/>
</box>
</box>
</box>
</def>
<def name="clock">
<box class="genwin" orientation="h" space-evenly="false" vexpand="false" hexpand="false">
<label class="time_hour" valign="start" wrap="true" limit-width="25" text="{{HOUR}}"/>
<label class="time_min" valign="end" wrap="true" limit-width="25" text="{{MINUTE}}"/>
<box orientation="v" spacing="25" space-evenly="false" vexpand="false" hexpand="false">
<label class="time_ampm" halign="end" wrap="true" limit-width="25" text="{{AMPM}}"/>
<label class="time_day" halign="end" wrap="true" limit-width="25" text="{{DAY}}"/>
</box>
</box>
</def>
<!-- Buttons -->
<def name="logout">
<box class="genwin" vexpand="false" hexpand="false">
<button class="btn_logout" onclick="i3-msg exit">logout</button>
</box>
</def>
</definitions>
<windows>
<window name="background" stacking="fg" focusable="true">
<geometry x="0" y="0" width="1920px" height="1080px"/>
<widget>
<bg/>
</widget>
</window>
<window name="profile" stacking="fg" focusable="false">
<geometry x="150" y="150" width="350" height="440"/>
<widget>
<user/>
</widget>
</window>
<window name="system" stacking="fg" focusable="false">
<geometry x="150" y="605" width="350" height="325"/>
<widget>
<system/>
</widget>
</window>
<window name="clock" stacking="fg" focusable="false">
<geometry x="515" y="150" width="350" height="155"/>
<widget>
<clock/>
</widget>
</window>
<!-- Buttons -->
<window name="logout" stacking="fg" focusable="false">
<geometry x="1445" y="150" width="155" height="155"/>
<widget>
<logout/>
</widget>
</window>
</windows>
</eww>

60
eww/eww.yuck Normal file
View file

@ -0,0 +1,60 @@
;; ______Valerie's Super ______ Amazing _____
;; / ____/ ___ __ / ____/___ ____ / __(_)___ _
;; / __/ | | /| / / | /| / / / / / __ \/ __ \/ /_/ / __ `/
;; / /___ | |/ |/ /| |/ |/ / / /___/ /_/ / / / / __/ / /_/ /
;;/_____/ |__/|__/ |__/|__/ \____/\____/_/ /_/_/ /_/\__, /
;; /____/
;; Includes
(include "./clock.yuck")
(include "./cluster.yuck")
(include "./profile.yuck")
(include "./system.yuck")
(include "./wm.yuck")
;; Widgets
(defwidget
bg []
(box
:class "bg"
:cursor "default"
:onclick "~/.config/eww/launch_eww"
)
)
(defwidget
x []
(button
:class "x"
:cursor "pointer"
:onclick "~/.config/eww/launch_eww"
:tooltip "close"
:text ""
)
)
;; Windows
(defwindow
background
:stacking "fg"
:focusable true
:wm-ignore true
:geometry (geometry
:x 0
:y 0
;; 24
:width "1920px"
:height "1080px"
;; 1056px
)
(bg)
)
(defwindow
x
:stacking "fg"
:focusable false
:geometry (geometry
:x 12
:y 12
)
(x)
)

View file

@ -4,5 +4,5 @@ if eww state | grep -q "USERNAME: val"
then
eww close-all
else
eww open-many background profile system clock
eww open-many background profile system clock logout power reboot terminal
fi

59
eww/profile.yuck Normal file
View file

@ -0,0 +1,59 @@
;; ____ _____ __
;; / __ \_________ / __(_) /__
;; / /_/ / ___/ __ \/ /_/ / / _ \
;; / ____/ / / /_/ / __/ / / __/
;;/_/ /_/ \____/_/ /_/_/\___/
;;
;; Variables
(defpoll
HOSTNAME
:interval "24h"
"hostname"
)
(defpoll
USERNAME
:interval "24h"
"whoami"
)
;; Widget
(defwidget
user []
(box
:class "genwin"
:orientation "v"
:spacing 35
:space-evenly false
:vexpand false
:hexpand false
(box
:class "face"
:halign "center"
)
(label
:class "login"
:halign "center"
:wrap true
:limit-width 15
:text "${USERNAME}@${HOSTNAME}"
)
)
)
;; Window
(defwindow
profile
:stacking "fg"
:focusable false
:geometry (geometry
:x 150
:y 150
:width 350
:height 440
)
(user)
)

3
eww/scripts/ssd Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/bash
df -h / | awk '{print substr($3, 1, length($3)-1) "/" $2}' | tail -n 1 | sed 's/G/GB/'

102
eww/system.yuck Normal file
View file

@ -0,0 +1,102 @@
;; _____ __
;; / ___/__ _______/ /____ ____ ___
;; \__ \/ / / / ___/ __/ _ \/ __ `__ \
;; ___/ / /_/ (__ ) /_/ __/ / / / / /
;;/____/\__, /____/\__/\___/_/ /_/ /_/
;; /____/
;; Variables
(defpoll
CPU_USAGE
:interval "1s"
"~/.config/eww/scripts/cpu"
)
(defpoll
RAM_USAGE
:interval "1s"
"~/.config/eww/scripts/ram"
)
(defpoll
SSD_USAGE
:interval "1m"
"~/.config/eww/scripts/ssd"
)
;; Widgets
(defwidget
system []
(box
:class "genwin"
:vexpand false
:hexpand false
:cursor "default"
(box
:orientation "v"
:spacing 35
:halign "center"
:valign "center"
:space-evenly false
:vexpand false
:hexpand false
(box
:class "cpu_bar"
:orientation "h"
:spacing 20
:space-evenly true
:vexpand false
:hexpand false
(label
:text "CPU"
;;:text ""
)
(label :text "|")
(label :text "${CPU_USAGE}%")
)
(box
:class "ram_bar"
:orientation "h"
:spacing 20
:space-evenly true
:vexpand false
:hexpand false
(label
:text "RAM"
;;:text ""
)
(label :text "|")
(label :text "${RAM_USAGE}")
)
(box
:class "disk_bar"
:orientation "h"
:spacing 20
:space-evenly true
:vexpand false
:hexpand false
(label
:text "SSD"
;;:text ""
)
(label :text "|")
(label :text "${SSD_USAGE}")
)
)
)
)
;; Windows
(defwindow
system
:stacking "fg"
:focusable false
:geometry (geometry
:x 150
:y 605
:width 350
:height 325
)
(system)
)

101
eww/wm.yuck Normal file
View file

@ -0,0 +1,101 @@
;; _ ____ ___
;;| | / / |/ /
;;| | /| / / /|_/ /
;;| |/ |/ / / / /
;;|__/|__/_/ /_/
;;
;; Widgets
(defwidget
wmbar []
(box
:class "wmbar"
:orientation "h"
:halign "start"
:space-evenly true
:hexpand false
:vexpand false
:spacing 5
(label
:class "icon"
:text ""
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 1"
"1"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 2"
"2"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 3"
"3"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 4"
"4"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 5"
"5"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 6"
"6"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 7"
"7"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 8"
"8"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 9"
"9"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace 10"
"10"
)
(button
:class "icon"
:cursor "pointer"
:onclick "i3-msg workspace back_and_forth"
:tooltip "back-and-forth"
""
)
)
)
;; Windows
(defwindow
wmbar
:geometry (geometry
:x 8
:y 8
)
(wmbar)
)