included vikingowl's stuff

This commit is contained in:
mpuchstein
2025-03-06 22:35:34 +01:00
parent 324f6685be
commit 7a19bd41f4
14 changed files with 180 additions and 63 deletions

View File

@@ -0,0 +1,4 @@
.datetime {
background: #2E3440;
color: #E5E6E7;
}

19
eww/widgets/datetime.yuck Normal file
View File

@@ -0,0 +1,19 @@
(defwidget datetime []
(box
:class "datetime"
:halign "center"
:valign "center"
{ time == ''
? ''
: time
}
)
)
(defvar time-visible false)
(defpoll time
:interval "1s"
:initial "initial-value" ; optional, defaults to poll at startup
:run-while time-visible ; optional, defaults to 'true'
`date +"%H:%M - %a, %d %b"` ; https://www.man7.org/linux/man-pages/man1/date.1.html
)

View File

@@ -0,0 +1,4 @@
.hypr-sunset {
background: #003366;
color: #e5e6e7;
}

View File

@@ -0,0 +1,16 @@
(defvar temperature "4500k")
(defvar display-fix "off")
(defwidget hyprsunset []
(box
:class "hypr-sunset"
:halign "center"
:valign "center"
(eventbox
:cursor "pointer"
:onclick `${display-fix == "off"
? "eww update display-fix=on && nohup hyprsunset -t ${temperature} > /dev/null 2>&1 &"
: "eww update display-fix=off && pkill hyprsunset"}`
`${display-fix == "off" ? "󰛨 Off" : "󱩌 On"}`
)
)
)

View File

@@ -0,0 +1,4 @@
.lorem-text {
background: darkgrey;
color: black;
}

View File

@@ -0,0 +1,6 @@
(defwidget loremText [text]
(label
:text text
:class 'lorem-text'
)
)

34
eww/widgets/media.scss Normal file
View File

@@ -0,0 +1,34 @@
.music {
background: transparent;
color: transparent;
&--off {
background: transparent;
color: transparent;
}
&--on {
background: #8ce513;
color: #010101;
}
&--spotify {
background: #17d860;
color: #282828;
}
&--firefox {
background: #fd8728;
color: #010101;
}
&--mpv {
background: #420042;
color: white;
}
&--chromium {
background: #1a73e8;
color: white;
}
}

View File

@@ -11,14 +11,15 @@
(defvar ellipsisArtist 20) ; set length for ellipsis on artist
(defvar ellipsisTitle 25) ; set length for ellipsis on title
(defwidget media []
(box :class "media"
:halign "center"
:valign "center"
:class { playerctl == '' || objectlength(playerctl) == 0
? 'music--off'
: matches(playerctl.player, playerRegex)
? 'music--' + playerctl.player
: 'music--on' }
(box
:class "media"
:halign "center"
:valign "center"
:class { playerctl == '' || objectlength(playerctl) == 0
? 'music--off'
: matches(playerctl.player, playerRegex)
? 'music--' + playerctl.player
: 'music--on' }
{ playerctl == '' || objectlength(playerctl) == 0
? ''
: matches(playerctl.player, playerRegex)
@@ -28,6 +29,7 @@
)
)
(deflisten playerctl :initial ""
(deflisten playerctl
:initial ""
`playerctl --follow metadata --format '{"player": "{{ playerName }}", "trackid": "{{ mpris:trackid }}", "length": "{{ duration(mpris:length) }}", "artUrl": "{{ mrpis:artUrl }}", "album": "{{ album }}", "albumArtist": "{{ xesam:albumArtist }}", "artist": "{{ artist }}", "autoRating": "{{ xesam:autoRating }}", "discNumber": "{{ xesam:discNumber }}", "title": "{{ title }}", "trackNumber": "{{ xesam:trackNumber }}", "url": "{{ xesam:url }}", "position": "{{ position }}"}'`
)

5
eww/widgets/systray.scss Normal file
View File

@@ -0,0 +1,5 @@
.systray {
background: #2E3440;
color: #E5E6E7;
}

10
eww/widgets/systray.yuck Normal file
View File

@@ -0,0 +1,10 @@
(defwidget stray []
(systray
:class "systray"
:halign "center"
:valign "center"
:active true
:icon-size 16
:spacing -5
)
)