Customize Framework docked bars

This commit is contained in:
Michael Bradley 2025-06-22 13:32:57 -04:00
parent 33bee6e5fb
commit 448bdfc231
Signed by: MichaelBradley
SSH key fingerprint: SHA256:BKO2eI2LPsCbQS3n3i5SdwZTAIV3F1lHezR07qP+Ob0

View file

@ -59,16 +59,10 @@
(tooltip (tooltip
(graph :value {interfaces?.[interface]?.combined_raw ?: 0} :thickness 2 :time-range 60000 :dynamic true :line-style "round" :width 60 :height 20) (graph :value {interfaces?.[interface]?.combined_raw ?: 0} :thickness 2 :time-range 60000 :dynamic true :line-style "round" :width 60 :height 20)
(label_value :text label :value {(interfaces?.[interface]?.up ?: false) ? (combined_interface ? interfaces?.[interface]?.combined : "󰶡${interfaces?.[interface]?.rx} 󰶣${interfaces?.[interface]?.tx}") : "dc"} :value_class {(interfaces?.[interface]?.up ?: false) ? "" : "disabled"})))) (label_value :text label :value {(interfaces?.[interface]?.up ?: false) ? (combined_interface ? interfaces?.[interface]?.combined : "󰶡${interfaces?.[interface]?.rx} 󰶣${interfaces?.[interface]?.tx}") : "dc"} :value_class {(interfaces?.[interface]?.up ?: false) ? "" : "disabled"}))))
(defwidget eth [] (defwidget eth [interface]
(network_speed :label "󰈀" :interface "enp6s0")) (network_speed :label "󰈀" :interface {interface}))
(defwidget wlan [] (defwidget wlan [interface]
(network_speed :label "" (network_speed :label "" :interface {interface}))
{% if host.name == "chonk" %}
:interface "wlo1"
{% else %}
:interface "wlp1s0"
{% endif %}
))
(defwidget date [] (defwidget date []
(tooltip (tooltip
@ -123,6 +117,9 @@
(clicker :text "󰸉" :command "~/.config/eww/scripts/wallpaper-shell")) (clicker :text "󰸉" :command "~/.config/eww/scripts/wallpaper-shell"))
(defwidget sunset [] (defwidget sunset []
(clicker :text "" :command "python -OO ~/scripts/sunset.py")) (clicker :text "" :command "python -OO ~/scripts/sunset.py"))
(defvar docked false)
(defwidget docked []
(clicker :text {docked ? "󰌢" : "󰛧"} :command "${EWW_CMD} update docked=${!docked} ; hyprctl keyword monitor eDP-1,${docked ? "" : "disabled"}"))
(defpoll brightness :interval 60 "~/.config/eww/scripts/backlight get") (defpoll brightness :interval 60 "~/.config/eww/scripts/backlight get")
@ -159,11 +156,13 @@
(box :class "right" :orientation "h" :space-evenly false :halign "end" (box :class "right" :orientation "h" :space-evenly false :halign "end"
(volume)(sep) (volume)(sep)
(audio_source)(space) (audio_source)(space)
(audio_sink)))) (audio_sink)(sep)
(datetime))))
(defwidget right_bar [] (defwidget right_bar []
(centerbox :class "bar" :orientation "h" (centerbox :class "bar" :orientation "h"
(box :class "left" :orientation "h" :space-evenly false :halign "begin" (box :class "left" :orientation "h" :space-evenly false :halign "begin"
(workspaces :monitor "DP-1")) (workspaces :monitor "DP-1")(sep :class "no-left-pad")
(window))
(systray :pack_direction "ltr" :icon-size 20) (systray :pack_direction "ltr" :icon-size 20)
(box :class "right" :orientation "h" :space-evenly false :halign "end" (box :class "right" :orientation "h" :space-evenly false :halign "end"
(gametime)(space) (gametime)(space)
@ -174,29 +173,58 @@
(mountpoint :label "󰋊" :mount "/home/mbradley/hdd")(sep) (mountpoint :label "󰋊" :mount "/home/mbradley/hdd")(sep)
(ram)(space) (ram)(space)
(cpu)(sep) (cpu)(sep)
(eth)(sep) ;(wlan :interface "wlo1")(space)
(eth :interface "enp6s0")(sep)
(datetime)(sep) (datetime)(sep)
(power)))) (power))))
(defwidget laptop_bar [] (defwidget laptop_bar []
(centerbox :class "bar" :orientation "h" (centerbox :class "bar" :orientation "h"
(box :class "left" :orientation "h" :space-evenly false :halign "begin" (box :class "left" :orientation "h" :space-evenly false :halign "begin"
(workspaces :monitor "eDP-1" :all true)(sep) (workspaces :monitor "eDP-1" :all true)(sep :class "no-left-pad")
(window)) (window))
(systray :pack_direction "ltr" :icon-size 20) (systray :pack_direction "ltr" :icon-size 20)
(box :class "right" :orientation "h" :space-evenly false :halign "end" (box :class "right" :orientation "h" :space-evenly false :halign "end"
(weather)(sep) (weather)(sep)
;(colour_selector)(space) ;(colour_selector)(space)
(sunset)(space) (sunset)(space)
(wallpaper)(sep) (wallpaper)(space)
(docked)(sep)
(ram)(space) (ram)(space)
(cpu)(sep) (cpu)(sep)
(wlan)(space) (wlan :interface "wlp1s0")(space)
(battery)(sep) (battery)(sep)
(brightness)(space) (brightness)(space)
(volume)(sep) (volume)(sep)
(datetime)(sep) (datetime)(sep)
(power)))) (power))))
(defwidget laptop_left_bar []
(centerbox :class "bar" :orientation "h"
(box :class "left" :orientation "h" :space-evenly false :halign "begin"
(workspaces :monitor "DP-3" :all true)(sep :class "no-left-pad")
(window))
(box)
(box :class "right" :orientation "h" :space-evenly false :halign "end"
(volume)(sep)
(datetime))))
(defwidget laptop_right_bar []
(centerbox :class "bar" :orientation "h"
(box :class "left" :orientation "h" :space-evenly false :halign "begin"
(workspaces :monitor "DP-2" :all true)(sep :class "no-left-pad")
(window))
(systray :pack_direction "ltr" :icon-size 20)
(box :class "right" :orientation "h" :space-evenly false :halign "end"
(weather)(sep)
(sunset)(space)
(wallpaper)(space)
(docked)(sep)
(ram)(space)
(cpu)(sep)
(eth :interface "enp193s0f3u2")(space)
(battery)(sep)
(volume)(sep)
(datetime)(sep)
(power))))
(defwindow left (defwindow left
@ -224,7 +252,7 @@
(right_bar)) (right_bar))
(defwindow laptop (defwindow laptop
:monitor 0 :monitor "eDP-1"
:geometry (geometry :x "0px" :geometry (geometry :x "0px"
:y "4px" :y "4px"
:width "1912px" :width "1912px"
@ -235,7 +263,7 @@
:focusable false :focusable false
(laptop_bar)) (laptop_bar))
(defwindow laptop_left (defwindow laptop_left
:monitor 1 :monitor "DP-3"
:geometry (geometry :x "0px" :geometry (geometry :x "0px"
:y "4px" :y "4px"
:width "2552px" :width "2552px"
@ -244,9 +272,9 @@
:stacking "fg" :stacking "fg"
:exclusive true :exclusive true
:focusable false :focusable false
(laptop_bar)) (laptop_left_bar))
(defwindow laptop_right (defwindow laptop_right
:monitor 2 :monitor "DP-2"
:geometry (geometry :x "0px" :geometry (geometry :x "0px"
:y "4px" :y "4px"
:width "2552px" :width "2552px"
@ -255,4 +283,4 @@
:stacking "fg" :stacking "fg"
:exclusive true :exclusive true
:focusable false :focusable false
(laptop_bar)) (laptop_right_bar))