aboutsummaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2021-12-21 20:26:50 +0000
committerLuca Matei Pintilie <lucafulger@gmail.com>2021-12-21 20:26:50 +0000
commitf8acb4edc93d2570856381eb7fb6f75db3955cf6 (patch)
treed8db466f88799f7d796e0b93d6a2ad8394c599c9 /.config/eww
parent2169a4155362a7f1639e4ad78033abb193f2d565 (diff)
downloaddotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.gz
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.bz2
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.lz
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.xz
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.zst
dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.zip
Initial commit2
Diffstat (limited to '.config/eww')
-rw-r--r--.config/eww/eww.scss66
-rw-r--r--.config/eww/eww.yuck61
-rwxr-xr-x.config/eww/scripts/get_brightness2
-rwxr-xr-x.config/eww/scripts/get_headvol2
-rwxr-xr-x.config/eww/scripts/get_mastervol2
-rwxr-xr-x.config/eww/scripts/getram2
6 files changed, 135 insertions, 0 deletions
diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss
new file mode 100644
index 0000000..c517db2
--- /dev/null
+++ b/.config/eww/eww.scss
@@ -0,0 +1,66 @@
+* {
+ all: unset; //Unsets everything so you can style everything from scratch
+}
+
+//Global Styles
+.alsa-gui {
+ background-color: #1e222a;
+ color: #abb2bf;
+ padding: 12px;
+ border-radius: 7px;
+ font-size : 25px;
+}
+
+.metric scale trough {
+ all: unset;
+ border-radius: 50px;
+ min-height: 3px;
+ min-width: 90px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.chad scale trough {
+ all: unset;
+ border-radius: 50px;
+ min-height: 3px;
+ min-width: 90px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.metric scale trough highlight {
+ all: unset;
+ background-color: #668ee3;
+ border-radius: 10px;
+}
+
+.chad scale trough highlight {
+ all: unset;
+ background-color: #e06c75;
+ border-radius: 10px;
+}
+
+.bri {
+ background-color: #d47d85;
+}
+
+.metric scale trough {
+ all: unset;
+ background-color: #282c34;
+ border-radius: 50px;
+ min-height: 6px;
+ min-width: 90px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.chad scale trough {
+ all: unset;
+ background-color: #282c34;
+ border-radius: 50px;
+ min-height: 6px;
+ min-width: 90px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck
new file mode 100644
index 0000000..fb02c29
--- /dev/null
+++ b/.config/eww/eww.yuck
@@ -0,0 +1,61 @@
+(defwidget chad-widgets []
+ (box :orientation "h"
+ (sliders)))
+
+(defwidget sliders []
+ (box :class "master_vol" :orientation "v" :space-evenly false :halign "end"
+ (metric :label ""
+ :value master_vol
+ :onchange "amixer set Master {}%")
+
+ (metric :label ""
+ :value head_vol
+ :onchange "amixer set Headphone {}%")
+
+ (chad :label ""
+ :value brightness
+ :onchange "xbacklight -set {}%")
+ )
+)
+
+(defwidget chad [label value onchange]
+ (box :orientation "h"
+ :class "chad"
+ :space-evenly false
+ (box :class "label" label)
+ (scale :min 0
+ :max 101
+ :active {onchange != ""}
+ :value value
+ :onchange onchange)))
+
+(defwidget metric [label value onchange]
+ (box :orientation "h"
+ :class "metric"
+ :space-evenly false
+ (box :class "label" label)
+ (scale :min 0
+ :max 101
+ :active {onchange != ""}
+ :value value
+ :onchange onchange)))
+
+(defpoll master_vol :interval "1s"
+ "scripts/get_mastervol")
+
+(defpoll head_vol :interval "1s"
+ "scripts/get_headvol")
+
+(defpoll brightness :interval "1s"
+ "scripts/get_brightness")
+
+(defwindow alsa-gui
+ :monitor 0
+ :windowtype "dock"
+ :geometry (geometry :x "-01%"
+ :y "8%"
+ :width "5%"
+ :height "0px"
+ :anchor "top right")
+ ; :reserve (struts :side "right" :distance "0%")
+ (chad-widgets))
diff --git a/.config/eww/scripts/get_brightness b/.config/eww/scripts/get_brightness
new file mode 100755
index 0000000..4f03d54
--- /dev/null
+++ b/.config/eww/scripts/get_brightness
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf "%.0f\n" $(xbacklight -get)
diff --git a/.config/eww/scripts/get_headvol b/.config/eww/scripts/get_headvol
new file mode 100755
index 0000000..5ce9bf5
--- /dev/null
+++ b/.config/eww/scripts/get_headvol
@@ -0,0 +1,2 @@
+#!/bin/sh
+amixer sget Headphone | grep 'Left:' | cut -d\ -f7 | tr -d '[%]'
diff --git a/.config/eww/scripts/get_mastervol b/.config/eww/scripts/get_mastervol
new file mode 100755
index 0000000..e1fd62a
--- /dev/null
+++ b/.config/eww/scripts/get_mastervol
@@ -0,0 +1,2 @@
+#!/bin/sh
+amixer get Master | awk '$0~/%/{print $4}' | tr -d '[%]'
diff --git a/.config/eww/scripts/getram b/.config/eww/scripts/getram
new file mode 100755
index 0000000..791a5a5
--- /dev/null
+++ b/.config/eww/scripts/getram
@@ -0,0 +1,2 @@
+#!/bin/sh
+printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')