@@ -1,4 +1,5 @@
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant = colemak_dh
|
||||
@@ -154,3 +155,5 @@ bind=$mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind=$mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind=$mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind=$mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
|
||||
exec-once=eww open bar
|
||||
|
4
home/natto/eww/README.org
Normal file
4
home/natto/eww/README.org
Normal file
@@ -0,0 +1,4 @@
|
||||
#+OPTIONS: toc:nil
|
||||
Inspired by
|
||||
+ [[https://github.com/saimoomedits/eww-widgets/tree/cfb2523a4e37ed2979e964998d9a4c37232b2975][saimoomedits]]
|
||||
+ [[https://github.com/fufexan/dotfiles/tree/db777ae5a76db34608dd486ed9238e9129252bbc/home/programs/eww][fufexan]]
|
@@ -1,5 +1,5 @@
|
||||
(include "bar/music.yuck")
|
||||
(include "bar/workspaces.yuck")
|
||||
(include "bar/hyprworkspaces.yuck")
|
||||
(include "bar/system.yuck")
|
||||
|
||||
(defwidget bar []
|
||||
|
@@ -18,7 +18,7 @@ workspaces() {
|
||||
|
||||
list_workspaces
|
||||
workspaces
|
||||
hyprctl dispatch workspace $current
|
||||
hyprctl dispatch workspace $current || true
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||
case ${event%>>*} in
|
||||
|
@@ -10,5 +10,4 @@
|
||||
(button
|
||||
:class "${ws == workspace.current ? 'workspace-active' : 'workspace-inactive'}"
|
||||
:onclick "hyprctl dispatch workspace ${ws}"
|
||||
{ws <= 10 ? numerals[ws - 1] : ws }))
|
||||
)))
|
||||
{ws <= 10 ? numerals[ws - 1] : ws })))))
|
@@ -101,9 +101,6 @@
|
||||
(system_bright)
|
||||
(system_temp)))
|
||||
|
||||
(defpoll system_cpu_freq :interval "2s" :initial "0"
|
||||
"cat /proc/cpuinfo | awk '/cpu MHz/ { sum += $4; n++} END { if (n != 0) print sum / n; }'")
|
||||
|
||||
(defwidget system_metric [value class tooltip]
|
||||
(box
|
||||
:orientation "h"
|
||||
@@ -126,8 +123,8 @@
|
||||
:space-evenly false
|
||||
(system_metric
|
||||
:value {EWW_CPU.avg}
|
||||
:tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%${system_cpu_freq == '0' ? '' : '
|
||||
CPU Freq: ${system_cpu_freq} MHz'}"
|
||||
:tooltip "CPU Usage: ${round(EWW_CPU.avg, 2)}%
|
||||
CPU Freq: ${EWW_CPU.cores[0].freq} MHz}"
|
||||
:class "cpu")
|
||||
(system_metric
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
@@ -141,7 +138,7 @@ Free %: ${round(100 - EWW_RAM.used_mem_perc, 2)}%"
|
||||
:class "battery")
|
||||
(system_metric
|
||||
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
||||
:tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024, 2)} GB
|
||||
:tooltip "Free Disk: ${round(EWW_DISK['/'].free / 1024 / 1024 / 1024, 2)} GB
|
||||
Free Disk %: ${round(EWW_DISK['/'].free / EWW_DISK['/'].total * 100, 2)}%"
|
||||
:class "disk"))))
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
systemd.user.services.eww = {
|
||||
Unit = {
|
||||
Description = "EWW Daemon";
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Service =
|
||||
let
|
||||
@@ -25,8 +26,8 @@
|
||||
] ++ (import ./bar pkgs);
|
||||
in
|
||||
{
|
||||
Environment = "PATH=${lib.makeBinPath deps}";
|
||||
Type = "simple";
|
||||
Environment = "PATH=${lib.makeBinPath deps}";
|
||||
Restart = "on-failure";
|
||||
ExecStart = "${config.programs.eww.package}/bin/eww daemon --no-daemonize";
|
||||
};
|
||||
|
Reference in New Issue
Block a user