From 1c277c82d4fd24baa5274a92ae1f2ee91bfe3156 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Mon, 3 Mar 2025 23:15:01 -0800 Subject: [PATCH] New backup 2025-03-03 23:15:01 --- de/home/.config/eww/eww.scss | 37 +++++---------------------- de/home/.config/eww/eww.yuck | 10 +++++--- de/home/.config/eww/scripts/nmcli-vpn | 9 +++++++ 3 files changed, 22 insertions(+), 34 deletions(-) create mode 100755 de/home/.config/eww/scripts/nmcli-vpn diff --git a/de/home/.config/eww/eww.scss b/de/home/.config/eww/eww.scss index c2866b8..3a78946 100644 --- a/de/home/.config/eww/eww.scss +++ b/de/home/.config/eww/eww.scss @@ -10,34 +10,6 @@ // color: #b0b4bc; padding: 5px 0px; } - -// Styles on classes (see eww.yuck for more information) - -.sidestuff slider { - all: unset; - color: #ffd5cd; -} - -.metric scale trough highlight { - all: unset; - background-color: #D35D6E; - color: #000000; - border-radius: 10px; -} - -.metric scale trough { - all: unset; - background-color: #4e4e4e; - border-radius: 50px; - min-height: 3px; - min-width: 50px; - margin-left: 10px; - margin-right: 20px; -} - -.label-ram { - font-size: large; -} circular-progress { color: $color1; background-color: $color2; @@ -49,6 +21,9 @@ circular-progress { border-radius: 8px; margin: 0px 2px; } +.revealer-on-hover>widget>box>box>* { + padding: 5px; +} .reveal_children>box, .reveal_children>button { border-left: 2px solid $color1; @@ -62,9 +37,11 @@ circular-progress { padding: 2px; border-radius: 8px; margin: 0px 2px; + padding: 5px; } label { margin-top: 2px; +// background-color: blue; } .workspaces { background-color: #B87A7A; @@ -76,7 +53,7 @@ label { border: 2px solid $color1; color: $color0; margin: 0px 0px; - padding: 2px; + padding: 5px; } .workspaces button:hover { background-color: $color1; @@ -91,12 +68,10 @@ label { border-radius:8px 0px 0px 8px; } .workspaces button:last-child, -.revealer-on-hover>widget>box>box:last-child, .reveal_children>box:last-child { border-radius:0px 8px 8px 0px; } .workspaces button:only-child, -.revealer-on-hover>widget>box>box:only-child, .reveal_children>box:only-child { border-radius:8px; } diff --git a/de/home/.config/eww/eww.yuck b/de/home/.config/eww/eww.yuck index 6707e16..b02b45b 100644 --- a/de/home/.config/eww/eww.yuck +++ b/de/home/.config/eww/eww.yuck @@ -12,7 +12,7 @@ (bluetooth) (sysdisk) (sysmem) - {formattime(EWW_TIME,"%b %d, %Y %H:%M")} + (clock) (systemtray))) (deflisten workspacesArray :initial "${[1]}" @@ -29,6 +29,10 @@ :class {entry.focused ? "focused" : ""} `${replace(entry.name,".*:","")}`)))) +(defwidget clock [] + (button :onclick 'notify-send "test"' + {formattime(EWW_TIME,"%b %d, %Y | %H:%M")})) + (defwidget network [] (button :onclick 'nm-connection-editor' "🖧")) @@ -95,10 +99,10 @@ :orientation "h" :space-evenly false :halign "center" - (button :onclick 'notify-send "test home"' + (button :onclick 'scripts/nmcli-vpn "HomeVPN"' :class {home_vpn_active ? "active" : ""} {home_vpn_active ? "" : ""}) - (button :onclick 'notify-send "test proton"' + (button :onclick 'scripts/nmcli-vpn "Proton SE-NL"' :class {proton_vpn_active ? "active" : ""} {proton_vpn_active ? "" : ""}))) diff --git a/de/home/.config/eww/scripts/nmcli-vpn b/de/home/.config/eww/scripts/nmcli-vpn new file mode 100755 index 0000000..199d8fc --- /dev/null +++ b/de/home/.config/eww/scripts/nmcli-vpn @@ -0,0 +1,9 @@ +#!/bin/bash + +if $(nmcli -g GENERAL.STATE c s "${1}"|grep -q '\bactiv'); then + echo "going down" + nmcli connection down "${1}" +else + echo "going up" + nmcli connection up "${1}" +fi