From 1ccfe8a2f982257a63c9a603b6a4716f36709cb7 Mon Sep 17 00:00:00 2001 From: Valerie Date: Wed, 25 Aug 2021 01:45:11 -0400 Subject: [PATCH] updated eww configs to yuck format --- eww/clock.yuck | 90 +++++++++++++++++++++++++++++++++++ eww/cluster.yuck | 119 +++++++++++++++++++++++++++++++++++++++++++++++ eww/eww.scss | 35 ++++++++++++-- eww/eww.xml | 115 --------------------------------------------- eww/eww.yuck | 60 ++++++++++++++++++++++++ eww/launch_eww | 2 +- eww/profile.yuck | 59 +++++++++++++++++++++++ eww/scripts/ssd | 3 ++ eww/system.yuck | 102 ++++++++++++++++++++++++++++++++++++++++ eww/wm.yuck | 101 ++++++++++++++++++++++++++++++++++++++++ 10 files changed, 567 insertions(+), 119 deletions(-) create mode 100644 eww/clock.yuck create mode 100644 eww/cluster.yuck delete mode 100644 eww/eww.xml create mode 100644 eww/eww.yuck create mode 100644 eww/profile.yuck create mode 100755 eww/scripts/ssd create mode 100644 eww/system.yuck create mode 100644 eww/wm.yuck diff --git a/eww/clock.yuck b/eww/clock.yuck new file mode 100644 index 0000000..ee715dd --- /dev/null +++ b/eww/clock.yuck @@ -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) +) diff --git a/eww/cluster.yuck b/eww/cluster.yuck new file mode 100644 index 0000000..a0377ef --- /dev/null +++ b/eww/cluster.yuck @@ -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) +) diff --git a/eww/eww.scss b/eww/eww.scss index 0b7312d..d218c2e 100644 --- a/eww/eww.scss +++ b/eww/eww.scss @@ -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; +} diff --git a/eww/eww.xml b/eww/eww.xml deleted file mode 100644 index aa4369e..0000000 --- a/eww/eww.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - hostname - whoami - ~/.config/eww/scripts/cpu - ~/.config/eww/scripts/ram - df -h / | awk '{print substr($3, 1, length($3)-1) "/" $2}' | tail -n 1 | sed 's/G/GB/' - - /home/val/.face.icon - - - date +"%I" - date +"%M" - date +"%p" - date +"%a" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eww/eww.yuck b/eww/eww.yuck new file mode 100644 index 0000000..17660a6 --- /dev/null +++ b/eww/eww.yuck @@ -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) +) diff --git a/eww/launch_eww b/eww/launch_eww index 9f2265e..8b052b5 100755 --- a/eww/launch_eww +++ b/eww/launch_eww @@ -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 diff --git a/eww/profile.yuck b/eww/profile.yuck new file mode 100644 index 0000000..b8009e0 --- /dev/null +++ b/eww/profile.yuck @@ -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) +) diff --git a/eww/scripts/ssd b/eww/scripts/ssd new file mode 100755 index 0000000..50dcaf7 --- /dev/null +++ b/eww/scripts/ssd @@ -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/' diff --git a/eww/system.yuck b/eww/system.yuck new file mode 100644 index 0000000..9224847 --- /dev/null +++ b/eww/system.yuck @@ -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) +) diff --git a/eww/wm.yuck b/eww/wm.yuck new file mode 100644 index 0000000..5694484 --- /dev/null +++ b/eww/wm.yuck @@ -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) +)