added eww config
This commit is contained in:
30
.config/eww/eww.scss
Normal file
30
.config/eww/eww.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
@import 'widgets';
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
window {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
|
||||
* {
|
||||
font-family: 'Ubuntu Nerd Font Regular';
|
||||
font-size: 0.9rem;
|
||||
border-radius: 1.5rem 1rem;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
/* Modules */
|
||||
.left {
|
||||
//background: orange;
|
||||
}
|
||||
|
||||
.center {
|
||||
//background: blue;
|
||||
}
|
||||
|
||||
.right {
|
||||
//background: yellow;
|
||||
}
|
||||
}
|
52
.config/eww/eww.yuck
Normal file
52
.config/eww/eww.yuck
Normal file
@@ -0,0 +1,52 @@
|
||||
(include "./widgets.yuck")
|
||||
|
||||
(defwindow top :monitor 1
|
||||
:geometry (geometry :x 0
|
||||
:y 0
|
||||
:width "100%"
|
||||
:height "20px"
|
||||
:anchor "top center")
|
||||
:stacking "bg"
|
||||
:exclusive true
|
||||
:focusable "ondemand"
|
||||
:namespace "example"
|
||||
(bar0)
|
||||
)
|
||||
|
||||
(defwidget bar0 []
|
||||
(centerbox :orientation "h"
|
||||
(left)
|
||||
(center)
|
||||
(right)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget left []
|
||||
(box :orientation 'h'
|
||||
:class 'left'
|
||||
:space-evenly true
|
||||
:spacing 5
|
||||
:halign 'start'
|
||||
(loremText :text "Workspaces")
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget center []
|
||||
(box :orientation 'h'
|
||||
:class 'center'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
(music)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget right []
|
||||
(box :orientation 'h'
|
||||
:class 'right'
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:halign 'end'
|
||||
(loremText :text "Bar stuff")
|
||||
)
|
||||
)
|
||||
|
30
.config/eww/widgets.scss
Normal file
30
.config/eww/widgets.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Widgets */
|
||||
.music {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
|
||||
&--off {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
&--on {
|
||||
background: #8ce513;
|
||||
color: #010101;
|
||||
}
|
||||
|
||||
&--spotify {
|
||||
background: #17d860;
|
||||
color: #282828;
|
||||
}
|
||||
|
||||
&--firefox {
|
||||
background: #ff6327;
|
||||
color: #010101;
|
||||
}
|
||||
|
||||
&--mpv {
|
||||
background: #420042;
|
||||
color: white;
|
||||
}
|
||||
}
|
34
.config/eww/widgets.yuck
Normal file
34
.config/eww/widgets.yuck
Normal file
@@ -0,0 +1,34 @@
|
||||
(defwidget loremText [text]
|
||||
(label :text text
|
||||
:style "color: black;"
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget music []
|
||||
(box :class "music"
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class {music == ''
|
||||
? 'music--off'
|
||||
: arraylength(search(music, 'spotify')) >= 1
|
||||
? 'music--spotify'
|
||||
: arraylength(search(music, 'firefox')) >= 1
|
||||
? 'music--firefox'
|
||||
: arraylength(search(music, 'mpv')) >= 1
|
||||
? 'music--mpv'
|
||||
: 'music--on'
|
||||
}
|
||||
{arraylength(search(music, 'spotify')) >= 1
|
||||
? replace(music, 'spotify', ' ')
|
||||
: arraylength(search(music, 'firefox')) >= 1
|
||||
? replace(music, 'firefox', ' ')
|
||||
: arraylength(search(music, 'mpv')) >= 1
|
||||
? replace(music, 'mpv', ' ')
|
||||
: music
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
(deflisten music :initial ""
|
||||
"playerctl --follow metadata --format '{{ playerName }} {{ trunc(artist,15) }} - {{ trunc(title,25) }}' || true"
|
||||
)
|
Reference in New Issue
Block a user