eww: updates

This commit is contained in:
Simon Gardling 2025-02-04 23:51:05 -05:00
parent 5fb62e7dcc
commit 8035c74d44
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
7 changed files with 143 additions and 134 deletions

View File

@ -48,9 +48,8 @@
# kernel options # kernel options
boot = { boot = {
#cachyos-lto currently broken kernelPackages = pkgs.linuxPackages_cachyos-lto;
# kernelPackages = pkgs.linuxPackages_cachyos-lto; # kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_latest;
kernel.sysctl = { kernel.sysctl = {
# dmesg shushhhhh # dmesg shushhhhh

12
etcnixos/flake.lock generated
View File

@ -34,11 +34,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738675414, "lastModified": 1738707394,
"narHash": "sha256-DwKipTgF2DEyNm6+Rj6FXg0DbNNNbt+h4fj9aTO4Q68=", "narHash": "sha256-XXrOqNs9a4L6p6/KXxIGotHOxzjPxva1queN3JK0E4c=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "59029b0faeee6d2d5284af29830d85fb2caa30ee", "rev": "236da2b18bfbddf782f85ee664fdfb9d50606229",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -310,11 +310,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1738546358, "lastModified": 1738680400,
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=", "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914", "rev": "799ba5bffed04ced7067a91798353d360788b30d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -54,11 +54,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738667255, "lastModified": 1738709900,
"narHash": "sha256-sMMQb9NydZqQ/MvvtPp+Ny0W9P0Jk0moU7SrTBlO5Vo=", "narHash": "sha256-8Bo5xFlCH5q72ExvAnH7TzStMlLZldKOSLMClRSfmTc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7abcf59a365430b36f84eaa452a466b11e469e33", "rev": "f2d32e46fac9d51da6912948ae1156044c71774b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1738659223, "lastModified": 1738707843,
"narHash": "sha256-fr3uPkLEDdmyD3CQwFBcRDl96VmkK0Lgr21BIxqk+gY=", "narHash": "sha256-0DMn9YbqU7ODIOBzu15vcrBnSKe72HUDkOtxHcpjK4A=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "297a7208e396ab6e9de88363c538baec8d75ccbb", "rev": "a81adb09eb7eb2ffad1ac3b91d1e59083c8e5918",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -127,11 +127,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1738546358, "lastModified": 1738680400,
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=", "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914", "rev": "799ba5bffed04ced7067a91798353d360788b30d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,11 +174,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738635966, "lastModified": 1738722444,
"narHash": "sha256-5MbJhh6nz7tx8FYVOJ0+ixMaEn0ibGzV/hScPMmqVTE=", "narHash": "sha256-DHVyKCiIQVDqjYoVU2j7UaLNIlOnpB9sP1cPRNRpqvY=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "1ff8663cd75a11e61f8046c62f4dbb05d1907b44", "rev": "347fb01821c3cd8d54e563d244a599c1e27a393d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -242,11 +242,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738682295, "lastModified": 1738710976,
"narHash": "sha256-Jx0SfHYrCFWztBYV6ySVBCcYlEA90NVNOUZLEm9DSu4=", "narHash": "sha256-/Zyfku2FxQKMs3LHI90Hy61o8VuXtI16RfvK/d849B0=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "c49f8dcb66ff8cb75fd8de4ca40ea953a97a140a", "rev": "0622c0eb2ab953e40e3d167eebe885a1f3bbe8f9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -18,12 +18,29 @@ $surface: #585b70;
padding: 0 1px; padding: 0 1px;
} }
.red { color: $red; } .red {
.maroon { color: $maroon; } color: $red;
.peach { color: $peach; } }
.yellow { color: $yellow; }
.green { color: $green; } .maroon {
.lavendar { color: $lavendar; } color: $maroon;
}
.peach {
color: $peach;
}
.yellow {
color: $yellow;
}
.green {
color: $green;
}
.lavendar {
color: $lavendar;
}
.symbol { .symbol {
color: $lavendar; color: $lavendar;
@ -34,9 +51,10 @@ $surface: #585b70;
* { * {
all: unset; all: unset;
margin: 0 5px; margin: 0 5px;
font-size:14pt; font-size: 14pt;
transition: color 0.2s ease-in-out; transition: color 0.2s ease-in-out;
} }
&:hover * { &:hover * {
color: $pink; color: $pink;
} }
@ -47,7 +65,7 @@ $surface: #585b70;
padding: 0 0.3em; padding: 0 0.3em;
} }
.padded > *:not(:last-child) { .padded>*:not(:last-child) {
padding: 0 10px; padding: 0 10px;
border-right: 1px solid $surface; border-right: 1px solid $surface;
} }
@ -82,23 +100,6 @@ scale trough {
} }
} }
.workspaces * {
padding: 0 8px;
font-size: 14pt;
transition: color 0.2s ease-in-out;
&:hover * {
color: $pink;
}
.empty * {
color: $subtext;
}
.current * {
color: $green;
}
}
.clipboard { .clipboard {
color: $subtext; color: $subtext;
} }

View File

@ -11,18 +11,18 @@
(defwidget statusbar [] (defwidget statusbar []
(centerbox (centerbox
(brightness-ctl) (box :space-evenly false :halign 'start' :class 'padded'
; (window-title) (window-title))
(time) (time)
(box :space-evenly false :halign 'end' :class 'padded' (box :space-evenly false :halign 'end' :class 'padded'
(clipboard) (brightness-ctl)
(brightness-ctl-opener)
; (clipboard)
(battery) (battery)
(bluetooth) (bluetooth)
(wifi)) (wifi))))
)
)
(defwidget cmd-slider [?symbol value command max colour] (defwidget cmd-slider [?symbol value command max color]
(box :space-evenly false (box :space-evenly false
(label :text symbol :class "symbol") (label :text symbol :class "symbol")
(scale (scale
@ -31,7 +31,7 @@
:round-digits 0 :round-digits 0
:timeout "200ms" :timeout "200ms"
:onchange command) :onchange command)
(label :text "${value}%" :class colour))) (label :text "${value}%" :class color)))
(defwidget window-title [] (defwidget window-title []
(label (label
@ -41,15 +41,26 @@
(defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`) (defpoll currentworkspace :interval "1s" `scripts/currentWorkspace.fish`)
(defwidget brightness-ctl [] (defwidget brightness-ctl []
(box :visible brightnessctl-open
(cmd-slider :symbol "󰃠" :value brightness (cmd-slider :symbol "󰃠" :value brightness
:command `brightnessctl set {}%` :command `brightnessctl set {}%`
:max 101 :colour "${ :max 101 :color "${
brightness >= 80 ? "green" : brightness >= 80 ? "green" :
brightness >= 50 ? "yellow" : brightness >= 50 ? "yellow" :
brightness >= 30 ? "peach" : brightness >= 30 ? "peach" :
brightness >= 10 ? "maroon" : "red" brightness >= 10 ? "maroon" : "red"
}")) }")))
(defpoll brightness :interval "1s" `brightnessctl -m | awk -F, '{print $4+0}'`)
(defpoll brightness :interval "1s" :run-while brightnessctl-open `brightnessctl -m | awk -F, '{print $4+0}'`)
(defvar brightnessctl-open false)
(defwidget brightness-ctl-opener []
(eventbox :class "button"
(button
:onclick `${EWW_CMD} update brightnessctl-open=${!brightnessctl-open}`
"󰃠")))
(defwidget clipboard [] (defwidget clipboard []
(label :text clipboard-short :tooltip clipboard :class "clipboard")) (label :text clipboard-short :tooltip clipboard :class "clipboard"))
@ -84,7 +95,7 @@
(label :text ":") (label :text ":")
(label :class "yellow" :text {time.minute}))) (label :class "yellow" :text {time.minute})))
(defpoll time :interval "1s" `scripts/dateInfo.fish`) (defpoll time :interval "1s" `date +'{"long":"%a %b %e %H:%M:%S %Z %Y","hour":"%H","minute":"%M"}'`)
; TODO: make this a package or something, not using rust-script ; TODO: make this a package or something, not using rust-script
(defpoll powerstats :interval "2s" `~/Documents/power_bat.rs`) (defpoll powerstats :interval "2s" `~/Documents/power_bat.rs`)

View File

@ -1,2 +1,2 @@
#!/usr/bin/env fish #!/usr/bin/env fish
niri msg focused-window | rg Title | sed -E "s/[[:space:]]+Title\: //g" | sed "s/\"//g" niri msg focused-window | rg Title | sed -E "s/[[:space:]]+Title\: //g" | sed "s/\"//g" | head -c 55

View File

@ -1,2 +0,0 @@
#!/usr/bin/env fish
date +'{"long":"%a %b %e %H:%M:%S %Z %Y","hour":"%H","minute":"%M"}'