[eww] Creates vertical status bar for vega
This commit is contained in:
@@ -4,3 +4,4 @@
|
|||||||
(include "./secondary-statusbar.yuck")
|
(include "./secondary-statusbar.yuck")
|
||||||
(include "./system-monitor.yuck")
|
(include "./system-monitor.yuck")
|
||||||
(include "./launcher.yuck")
|
(include "./launcher.yuck")
|
||||||
|
(include "./vertical-statusbar.yuck")
|
||||||
|
|||||||
@@ -61,52 +61,60 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(defwidget system-monitor-perf-cpu []
|
||||||
|
(box
|
||||||
|
:orientation "v"
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "CPU"
|
||||||
|
:class "system-monitor-sparkgraph-cpu"
|
||||||
|
:value {EWW_CPU.avg}
|
||||||
|
:units "%"
|
||||||
|
)
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "Mem"
|
||||||
|
:class "system-monitor-sparkgraph-mem"
|
||||||
|
:value {EWW_RAM.used_mem_perc}
|
||||||
|
:units "%"
|
||||||
|
)
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "Temp"
|
||||||
|
:class "system-monitor-sparkgraph-temp"
|
||||||
|
:value {EWW_TEMPS["CORETEMP_PACKAGE_ID_0"]}
|
||||||
|
:units "°"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget system-monitor-perf-gpu []
|
||||||
|
(box
|
||||||
|
:orientation "v"
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "GPU"
|
||||||
|
:class "system-monitor-sparkgraph-cpu"
|
||||||
|
:value {gpu-stats.gpu}
|
||||||
|
:units "%"
|
||||||
|
)
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "VRAM"
|
||||||
|
:class "system-monitor-sparkgraph-mem"
|
||||||
|
:value {gpu-stats.memory}
|
||||||
|
:units "%"
|
||||||
|
)
|
||||||
|
(system-monitor-sparkgraph
|
||||||
|
:name "Temp"
|
||||||
|
:class "system-monitor-sparkgraph-temp"
|
||||||
|
:value {gpu-stats.temp}
|
||||||
|
:units "°"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(defwidget system-monitor-perf []
|
(defwidget system-monitor-perf []
|
||||||
(system-monitor-group
|
(system-monitor-group
|
||||||
:name "Performance"
|
:name "Performance"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
(box
|
(system-monitor-perf-cpu)
|
||||||
:orientation "v"
|
(system-monitor-perf-gpu)
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "CPU"
|
|
||||||
:class "system-monitor-sparkgraph-cpu"
|
|
||||||
:value {EWW_CPU.avg}
|
|
||||||
:units "%"
|
|
||||||
)
|
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "Mem"
|
|
||||||
:class "system-monitor-sparkgraph-mem"
|
|
||||||
:value {EWW_RAM.used_mem_perc}
|
|
||||||
:units "%"
|
|
||||||
)
|
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "Temp"
|
|
||||||
:class "system-monitor-sparkgraph-temp"
|
|
||||||
:value {EWW_TEMPS["CORETEMP_PACKAGE_ID_0"]}
|
|
||||||
:units "°"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(box
|
|
||||||
:orientation "v"
|
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "GPU"
|
|
||||||
:class "system-monitor-sparkgraph-cpu"
|
|
||||||
:value {gpu-stats.gpu}
|
|
||||||
:units "%"
|
|
||||||
)
|
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "VRAM"
|
|
||||||
:class "system-monitor-sparkgraph-mem"
|
|
||||||
:value {gpu-stats.memory}
|
|
||||||
:units "%"
|
|
||||||
)
|
|
||||||
(system-monitor-sparkgraph
|
|
||||||
:name "Temp"
|
|
||||||
:class "system-monitor-sparkgraph-temp"
|
|
||||||
:value {gpu-stats.temp}
|
|
||||||
:units "°"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -239,7 +247,7 @@
|
|||||||
:orientation "h"
|
:orientation "h"
|
||||||
:class "system-monitor-audio-name"
|
:class "system-monitor-audio-name"
|
||||||
(label
|
(label
|
||||||
:text name
|
:text {substring(name, 0, 20)}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(box
|
(box
|
||||||
|
|||||||
44
home-manager/features/eww/config/vertical-statusbar.yuck
Normal file
44
home-manager/features/eww/config/vertical-statusbar.yuck
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
(defwidget vertical-statusbar-systray []
|
||||||
|
(systray
|
||||||
|
:class "systray"
|
||||||
|
:spacing 3
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly true
|
||||||
|
:icon-size 16
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget vertical-statusbar []
|
||||||
|
(box
|
||||||
|
:class "statusbar"
|
||||||
|
:orientation "v"
|
||||||
|
:spacing 8
|
||||||
|
:space-evenly false
|
||||||
|
(clock-large)
|
||||||
|
(vertical-statusbar-systray)
|
||||||
|
(system-monitor-group
|
||||||
|
:name "Performance"
|
||||||
|
:orientation "v"
|
||||||
|
(system-monitor-perf-cpu)
|
||||||
|
(system-monitor-perf-gpu)
|
||||||
|
)
|
||||||
|
(system-monitor-disks)
|
||||||
|
(system-monitor-net)
|
||||||
|
(system-monitor-audio)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwindow vertical-statusbar
|
||||||
|
:monitor '[ "<primary>", "LG ULTRAWIDE", "HDMI-A-1" ]'
|
||||||
|
:geometry (geometry
|
||||||
|
:x "0px"
|
||||||
|
:y "0px"
|
||||||
|
:width "60px"
|
||||||
|
:height "1440px"
|
||||||
|
:anchor "top left"
|
||||||
|
)
|
||||||
|
:stacking "fg"
|
||||||
|
:exclusive true
|
||||||
|
:focusable false
|
||||||
|
(vertical-statusbar)
|
||||||
|
)
|
||||||
@@ -8,5 +8,5 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font: "Iosevka Nerd Font 10";
|
font: "JetBrainsMono NF 10";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,5 +8,5 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font: "JetBrains Mono Nerd Font 10";
|
font: "JetBrainsMono Nerd Font 10";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,10 @@
|
|||||||
obsidian
|
obsidian
|
||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set up eww here because it's based on the monitor configuration
|
||||||
|
# Eww is idempotent, so it's fine to just run it on every reload to make sure things are open
|
||||||
|
wayland.windowManager.hyprland.settings.execr-once = [
|
||||||
|
"eww open-many primary-statusbar secondary-statusbar launcher"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"/features/development/haskell.nix"
|
"/features/development/haskell.nix"
|
||||||
"/features/linux-desktop.nix"
|
"/features/linux-desktop.nix"
|
||||||
"/features/notes.nix"
|
"/features/notes.nix"
|
||||||
|
"/features/eww"
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
@@ -24,4 +25,10 @@
|
|||||||
obsidian
|
obsidian
|
||||||
firefox
|
firefox
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set up eww here because it's based on the monitor configuration
|
||||||
|
# Eww is idempotent, so it's fine to just run it on every reload to make sure things are open
|
||||||
|
wayland.windowManager.hyprland.settings.execr-once = [
|
||||||
|
"eww daemon && eww open-many vertical-statusbar"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user