Version 0.1.0
This commit is contained in:
472
home-manager/20_eww/01_windows.nix
Normal file
472
home-manager/20_eww/01_windows.nix
Normal file
@@ -0,0 +1,472 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.file.".config/eww/windows/ascii/audio_status.yuck".text = ''
|
||||
;; ── audio_status ───────────────────────────────────────────────────────────
|
||||
;; Text displaying audio status.
|
||||
;; Anchored top outside visualizer
|
||||
(defwindow audio_status
|
||||
:visible show_eww
|
||||
:anchor "top right"
|
||||
:geometry (geometry :x "79px" :y "288px" :width "300px" :height "40px")
|
||||
:stacking "bg"
|
||||
:monitor 0
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box :orientation "vertical" :halign "end"
|
||||
(label :text ascii_audio_status :class "ascii-core-status")
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/ascii/visualizer_window.yuck".text = ''
|
||||
;; ── visualizer window ───────────────────────────────────────────────────
|
||||
;; Displays ASCII visual for audio activity.
|
||||
;; Anchored very top
|
||||
(defwindow audio_status
|
||||
:visible show_eww
|
||||
:anchor "top right"
|
||||
:geometry (geometry :x "79px" :y "288px" :width "300px" :height "40px")
|
||||
:stacking "bg"
|
||||
:monitor 0
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box :orientation "vertical" :halign "end"
|
||||
(label :text ascii_audio_status :class "ascii-core-status")
|
||||
)
|
||||
)
|
||||
(defwindow visualizer_window
|
||||
:visible show_eww
|
||||
:monitor 0
|
||||
:geometry (geometry :x 38 :y 143 :width 340 :height 150)
|
||||
:layer "bottom"
|
||||
:stacking "bg"
|
||||
:focusable false
|
||||
:window-type "wayland"
|
||||
:anchor [ "top center" ]
|
||||
(audio-visualizer))
|
||||
(defwidget audio-visualizer []
|
||||
(box
|
||||
:class "visualizer-outer-frame"
|
||||
:padding 6
|
||||
(box
|
||||
:class "visualizer-inner-frame"
|
||||
:padding 10
|
||||
(label
|
||||
:text visualizer_content
|
||||
:markup true
|
||||
:class "visualizer-text"))))
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/bar/cpu_ram_storage_bars.yuck".text = ''
|
||||
;; ── CPU RAM Storage ───────────────────────────────────────────────────
|
||||
;; Text displaying cpu load, ram usage, storage
|
||||
;; Anchored middle left
|
||||
|
||||
(defwindow cpu_ram_storage_bars
|
||||
:visible show_eww
|
||||
:anchor "top right"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "33px" :y "482px" :width "450px" :height "140px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box :orientation "vertical" :halign "start" :space "10px"
|
||||
;; ==== CPU LOAD ====
|
||||
(label :text " [ CPU LOAD ]" :class "stats-label" :halign "start")
|
||||
(box :orientation "horizontal" :halign "start" :space "4px"
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "margin-top: -8px;"
|
||||
(label :text cpu_bar :class "ram-bar")
|
||||
)
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "min-width: 40px; padding: 0px;"
|
||||
(label :text cpu_usage :class "ram-bar2" :halign "center"))
|
||||
)
|
||||
;; ==== RAM USAGE ====
|
||||
(label :text " [ RAM USAGE ]" :class "stats-label" :halign "start")
|
||||
(box :orientation "horizontal" :halign "center" :space "4px"
|
||||
;; LEFT: ASCII RAM BAR
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "margin-top: -8px;"
|
||||
(label :text ram_bar :class "ram-bar"))
|
||||
;; RIGHT: RAM PERCENT
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "padding: 0px; ; min-width: 40px"
|
||||
(label :text ram_percent :class "ram-bar2" :halign "center"))
|
||||
)
|
||||
;; ==== CPU LOAD ====
|
||||
;; ==== STORAGE REMAINING ====
|
||||
(label :text " [ STORAGE ]" :class "stats-label" :halign "start")
|
||||
(box :orientation "horizontal" :halign "center" :space "4px"
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "margin-top: -8px;"
|
||||
(label :text storage_bar :class "ram-bar"))
|
||||
(box :class "module-frame" :orientation "vertical" :halign "start" :style "min-width: 35px; padding: 2px;"
|
||||
(label :text storage_percent :class "ram-bar2" :halign "center"))
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/misc/welcome_text.yuck".text = ''
|
||||
;; ── welcome text───────────────────────────────────────────────────
|
||||
;; Text displaying date and weather in cyrilic
|
||||
;; Anchored right screen
|
||||
(defwindow welcome_text
|
||||
:visible show_eww
|
||||
:anchor "top"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "1740px" :y "152px" :width "100px" :height "90px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box :orientation "vertical" :halign "end" :class "stats-box" :space "1px"
|
||||
;; Welcome Line
|
||||
(label :text "> Добро пожаловать, ${USER}" :class "label-primary" :halign "end" :style "margin-top: -20px;")
|
||||
;; Date Line
|
||||
(label :text "Текущая дата: ${welcome_date}" :class "label-primary" :halign "end" :style "margin-top: -10px;")
|
||||
;; Weather Line
|
||||
(label :text "Погода: ${weather_forecast}" :class "label-primary" :halign "end" :style "margin-top: -10px;")
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/net/ascii_decor_frame.yuck".text = ''
|
||||
;; ── ascii decor frame ───────────────────────────────────────────────────
|
||||
;; Text displaying audio status.
|
||||
;; Anchored top inside visualizer
|
||||
(defwindow ascii_decor_frame
|
||||
:visible show_eww
|
||||
:anchor "bottom right"
|
||||
:geometry (geometry :x "30px" :y "808px" :width "220px" :height "100px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
:monitor 0
|
||||
(box :orientation "vertical" :halign "center" :valign "center"
|
||||
(label :text ascii_decor1 :class "ascii-decor1")
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/net/net_bars.yuck".text = ''
|
||||
;; ── net bars ───────────────────────────────────────────────────
|
||||
;; Text header and vectors showing network info
|
||||
;; Anchored bottom
|
||||
|
||||
(defwindow net_bars
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:geometry (geometry :x "9px" :y "638px" :width "420px" :height "120px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
:monitor 0
|
||||
|
||||
;; Horizontal layout for side-by-side bars
|
||||
(box :orientation "horizontal" :halign "center" :space "10px"
|
||||
|
||||
;; DOWNLOAD BAR
|
||||
(box :orientation "vertical" :halign "center"
|
||||
(label :text "[ DOWNLOAD ]" :style "margin-top: 160px;" :class "stats-label")
|
||||
(box :class "module-frame2"
|
||||
(label :text download_bar :class "ram-bar"))
|
||||
)
|
||||
|
||||
;; UPLOAD BAR
|
||||
(box :orientation "vertical" :halign "center" :style "min-width: 81px;"
|
||||
(label :text "[ UPLOAD ]" :style "margin-top: 160px;" :class "stats-label")
|
||||
(box :class "module-frame2"
|
||||
(label :text upload_bar :class "ram-bar"))
|
||||
)
|
||||
|
||||
;; LATENCY BAR
|
||||
(box :orientation "vertical" :halign "center"
|
||||
(label :text "[ LATENCY ]" :style "margin-top: 160px;" :class "stats-label")
|
||||
(box :class "module-frame2"
|
||||
(label :text ping_bar :class "ram-bar"))
|
||||
)
|
||||
|
||||
;; VPN BAR
|
||||
(box :orientation "vertical" :halign "center" :style "min-width: 81px;"
|
||||
(label :text "[ VPN ]" :style "margin-top: 160px;" :class "stats-label")
|
||||
(box :class "module-frame2"
|
||||
(label
|
||||
:text vpn_bar
|
||||
:markup true ;; allow ASCII multi-line
|
||||
:class "ram-bar"))
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/net/right_internet_text.yuck".text = ''
|
||||
;; ── right internet text ───────────────────────────────────────────────────
|
||||
;; Text displaying ping and vpn status
|
||||
;; Anchored top very bottom right
|
||||
|
||||
(defwindow right_internet_text
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "42px" :y "976px" :width "320px" :height "80px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
|
||||
(box :class "internet-clean-box" :orientation "vertical" :halign "center" :space "8px"
|
||||
(box :orientation "horizontal" :halign "center" :space "6px"
|
||||
(label :text download_speed :class "label-primary2")
|
||||
(label :text upload_speed :class "label-primary2")
|
||||
(label :text ping_ms :class "label-primary2")
|
||||
(label :text vpn_status_text :class "label-primary2")
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/active_workspace.yuck".text = ''
|
||||
;; ── active workspace ───────────────────────────────────────────────────
|
||||
;; Text displaying active/inactive workspaces
|
||||
;; Anchored middle right
|
||||
|
||||
(defwindow active_workspace
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:geometry (geometry :x "267px" :y "502px" :width "100px" :height "200px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:monitor 0
|
||||
:focusable false
|
||||
|
||||
(box :orientation "vertical" :space "10px" :valign "center"
|
||||
|
||||
;; === Workspace 1 ===
|
||||
(box :class "info-left" :orientation "vertical" :space "2px" :style "margin-bottom: 15px;"
|
||||
|
||||
(label :text ws1 :class "ascii-core-status2"))
|
||||
|
||||
;; === Workspace 2 ===
|
||||
(box :class "info-left" :orientation "vertical" :space "2px" :style "margin-bottom: 15px;"
|
||||
|
||||
(label :text ws2 :class "ascii-core-status2"))
|
||||
|
||||
|
||||
;; === Workspace 3 ===
|
||||
(box :class "info-left" :orientation "vertical" :space "2px" :style "margin-bottom: 15px;"
|
||||
|
||||
(label :text ws3 :class "ascii-core-status2"))
|
||||
|
||||
;; === Workspace 4 ===
|
||||
(box :class "info-left" :orientation "vertical" :space "2px" :style "margin-bottom: 15px;"
|
||||
|
||||
(label :text ws4 :class "ascii-core-status2"))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
;;box :orientation "vertical" :space "10px" :valign "center"
|
||||
;; (label :text "Workspace 1" :class "label-primary")
|
||||
;;(label :text "Workspace 2" :class "label-primary")
|
||||
;;(label :text "" :class "label-primary")
|
||||
;;
|
||||
|
||||
;; (label :text "Workspace 3" :class "label-primary")
|
||||
;; (label :text "Workspace 4" :class "label-primary")))
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/four_boxes.yuck".text = ''
|
||||
;; ── four boxes ───────────────────────────────────────────────────
|
||||
;; four boxes showing uptime, battery life, cpu temp, gpu temp
|
||||
;; Anchored top
|
||||
(defwindow four_boxes
|
||||
:visible show_eww
|
||||
:anchor "right"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "4" :y "340px" :width "430px" :height "140")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
(box :orientation "horizontal" :space-evenly true
|
||||
;; LEFT COLUMN
|
||||
(box :orientation "vertical" :halign "center" :space "10px"
|
||||
;; REACTOR UPTIME
|
||||
(box :class "module-frame" :orientation "vertical" :halign "center"
|
||||
(label :text "[ REACTOR UPTIME ]" :class "stats-label")
|
||||
(box :width "140px"
|
||||
(label :text uptime_full :class "label-primary" :halign "center"))
|
||||
)
|
||||
;; CPU TEMP
|
||||
(box :class "module-frame" :orientation "vertical" :halign "center"
|
||||
(label :text "[ CPU TEMP ]" :class "stats-label")
|
||||
(box :width "140px"
|
||||
(label :text "${cpu_temp}" :class "label-primary" :halign "center"))
|
||||
)
|
||||
)
|
||||
;; RIGHT COLUMN
|
||||
(box :orientation "vertical" :halign "center" :space "10px"
|
||||
;; MELTDOWN CLOCK
|
||||
(box :class "module-frame" :orientation "vertical" :halign "center"
|
||||
(label :text "[ MELTDOWN CLOCK ]" :class "stats-label")
|
||||
(box :width "140px"
|
||||
(label :text battery_time :class "label-primary" :halign "center"))
|
||||
)
|
||||
;; GPU TEMP
|
||||
(box :class "module-frame" :orientation "vertical" :halign "center"
|
||||
(label :text "[ GPU TEMP ]" :class "stats-label")
|
||||
(box :width "140px"
|
||||
(label :text "+${gpu_temp}°C" :class "label-primary" :halign "center"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/orange_workspace.yuck".text = ''
|
||||
;; ── orange workspace ───────────────────────────────────────────────────
|
||||
;; Vectors displaying reactor number in cyrilic text
|
||||
;; Anchored middle right
|
||||
(defwindow orange_workspace
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:geometry (geometry :x "371px" :y "509px" :width "60px" :height "100px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
:monitor 0
|
||||
(box :orientation "vertical" :space "10px"
|
||||
(box :class "info-right-box" :valign "end" :halign "start" (label :text "А1" :class "info-right-text" ))
|
||||
(box :class "info-right-box" :valign "end" :halign "start" (label :text "Б2" :class "info-right-text" ))
|
||||
(box :class "info-right-box" :valign "end" :halign "start" (label :text "В3" :class "info-right-text" ))
|
||||
(box :class "info-right-box" :valign "end" :halign "start" (label :text "Г4" :class "info-right-text" ))))
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/power_cooling_header_text.yuck".text = ''
|
||||
;; ── power cooling header ───────────────────────────────────────────────────
|
||||
;; Text displaying header for cooling and power
|
||||
;; Anchored bottom
|
||||
|
||||
(defwindow power-cooling_header_text
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "-52px" :y "700px" :width "100px" :height "8px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
|
||||
;; Switch to horizontal to place boxes side by side
|
||||
(box :orientation "horizontal" :halign "center" :space "12px"
|
||||
;; First box: POWER GRID
|
||||
(label :text "[ POWER GRID ]" :class "stats-label3")
|
||||
|
||||
;; Second box: another label, e.g. MODE STATUS
|
||||
(label :text "[ COOLING ]" :class "stats-label3" :halign "center")
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/power_mode_text.yuck".text = ''
|
||||
;; ── power mode text ───────────────────────────────────────────────────
|
||||
;; Text displaying power in cyrilic text
|
||||
;; Anchored bottom left
|
||||
|
||||
(defwindow power_mode_text
|
||||
:anchor "top left"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "-31px" :y "724px" :width "80px" :height "62px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
|
||||
(box :orientation "vertical" :halign "start" :space "4px"
|
||||
;; Power Draw
|
||||
(box :orientation "horizontal" :halign "end" :space "4px" :style "margin-top:-10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "нагрузка: " :class "power-label")
|
||||
(label :text power_draw :class "power-value" :halign "end" )
|
||||
)
|
||||
|
||||
;; CPU Voltage
|
||||
(box :orientation "horizontal" :halign "start" :space "4px" :style "margin-top: -10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "цпу: " :class "power-label")
|
||||
(label :text cpu_voltage :class "power-value" :halign "end" )
|
||||
)
|
||||
|
||||
;; GPU Voltage
|
||||
(box :orientation "horizontal" :halign "start" :space "4px" :style "margin-top: -10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "гпу: " :class "power-label")
|
||||
|
||||
(label :text gpu_voltage :class "power-value" :halign "end" )
|
||||
)
|
||||
|
||||
;; GPU Voltage
|
||||
(box :orientation "horizontal" :halign "start" :space "4px" :style "margin-top: -10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "питание: " :class "power-label")
|
||||
(label :text dc_voltage :class "power-value" :halign "end" )
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/right_fan-data.yuck".text = ''
|
||||
;; ── right fan data───────────────────────────────────────────────────
|
||||
;; Text displaying cooling and fan RPM
|
||||
;; Anchored bottom right
|
||||
(defwindow right_fan_data
|
||||
:visible show_eww
|
||||
:anchor "top left"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "171px" :y "724px" :width "200px" :height "64px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
(box :orientation "vertical" :halign "start" :space "4px"
|
||||
;; FAN
|
||||
(box :orientation "horizontal" :halign "end" :space "4px" :style "margin-top:-10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "цпу вент: " :class "power-label3")
|
||||
(label :text cpu_fan_rpm :class "power-value" :halign "end" )
|
||||
)
|
||||
;; FAN
|
||||
(box :orientation "horizontal" :halign "start" :space "4px" :style "margin-top: -10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "оперконтроль: " :class "power-label3")
|
||||
(label :text gpu_fan_ascii :class "power-value" :halign "end" )
|
||||
)
|
||||
;; fan
|
||||
(box :orientation "horizontal" :halign "end" :space "4px" :style "margin-top:-10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "гпу вент: " :class "power-label3")
|
||||
(label :text gpu_fan_rpm :class "power-value" :halign "end" )
|
||||
)
|
||||
;;fan
|
||||
(box :orientation "horizontal" :halign "start" :space "4px" :style "margin-top: -10px;"
|
||||
(label :text "> " :class "power-label2" :halign "end" )
|
||||
(label :text "оперконтроль: " :class "power-label3")
|
||||
(label :text gpu_fan_ascii :class "power-value" :halign "end" )
|
||||
)
|
||||
)
|
||||
)
|
||||
'';
|
||||
|
||||
home.file.".config/eww/windows/sys/workspace_window_text.yuck".text = ''
|
||||
;; ── workspace window text ───────────────────────────────────────────────────
|
||||
;; Text and ascii showing active workspace number
|
||||
;; Anchored top middle
|
||||
|
||||
(defwindow workspace_window_text
|
||||
:anchor "center"
|
||||
:monitor 0
|
||||
:geometry (geometry :x "9px" :y "300px" :width "420px" :height "220px")
|
||||
:stacking "bg"
|
||||
:exclusive false
|
||||
:focusable false
|
||||
|
||||
(box :orientation "vertical" :halign "center"
|
||||
(label :text reactor_core_layout :class "ascii-core-status2")
|
||||
)
|
||||
)
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user