fix(eww-touch): restore layout with all session styling applied
Restores the screenrotate centre widget (OSK, prev/next workspace, rotate CW/CCW, close) that was lost to an external edit, and re-applies all session changes on top: - Circular (round) class on OSK, drawer, and all five screenrotate buttons - Close button uses hyprctl dispatch killactive - Workspace buttons use focusleft/focusright scripts - winsworks hexpand + metric/scale hexpand for responsive volume slider - Clock widget split into icon label + time label with a space between Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
9d7c7a5932
commit
a54e0749ad
|
|
@ -6,46 +6,82 @@
|
|||
:geometry (geometry :x "0%"
|
||||
:y "1%"
|
||||
:width "99%"
|
||||
:height "20px"
|
||||
:height "5%"
|
||||
:anchor "top center")
|
||||
:exclusive true
|
||||
(bar :monitor_ monitor))
|
||||
|
||||
(defpoll battery :interval "2s"
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc")
|
||||
"~/.config/scripts/batteryperc")
|
||||
|
||||
|
||||
|
||||
(defwidget bar [monitor_]
|
||||
(centerbox :orientation "h"
|
||||
(winsworks :monitor monitor_)
|
||||
(music)
|
||||
(winsworks :monitor monitor_)
|
||||
(screenrotate )
|
||||
(sidestuff)))
|
||||
|
||||
(defwidget winsworks [monitor]
|
||||
(box :orientation "h" :space-evenly false :halign "start"
|
||||
(box :orientation "h" :space-evenly false :hexpand true
|
||||
(osk)
|
||||
(box :class "music" {"${battery}"})
|
||||
(workspaceWidget :monitor monitor)
|
||||
(button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music" {" ${activewindow}"})
|
||||
(button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music round" {""})
|
||||
(metric :label " "
|
||||
:value volume
|
||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
:onclick "killall pavucontrol || hyprctl eval 'hl.dsp.exec_cmd(\"[tag +mixer] pavucontrol\")'")
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget sidestuff []
|
||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||
(box :class "music" {" ${IP}"})
|
||||
(metric :label ""
|
||||
:value volume
|
||||
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
|
||||
:onclick "killall pavucontrol || hyprctl dispatch exec \[tag +mixer\] pavucontrol")
|
||||
(box
|
||||
:tooltip {disks}
|
||||
(metric :label ""
|
||||
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
||||
:onchange ""
|
||||
:onclick ""))
|
||||
|
||||
(clock)
|
||||
(systray :class "music" :orientation "h" :spacing 2 :space-evenly true)
|
||||
))
|
||||
|
||||
|
||||
(defwidget screenrotate []
|
||||
(box :orientation "h" :space-evenly false :halign "center"
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/.config/scripts/workspacefocus/focusleft.sh"
|
||||
{""}
|
||||
)
|
||||
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/.config/scripts/screenrotationacw.sh"
|
||||
{""}
|
||||
)
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "hyprctl dispatch killactive"
|
||||
{""}
|
||||
)
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/.config/scripts/screenrotationwcw.sh"
|
||||
{""}
|
||||
)
|
||||
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/.config/scripts/workspacefocus/focusright.sh"
|
||||
{""}
|
||||
)
|
||||
|
||||
))
|
||||
|
||||
(defwidget music []
|
||||
|
|
@ -54,33 +90,44 @@
|
|||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/Dotfiles/desktopenvs/hyprland/scripts/playpause.sh"
|
||||
{music != "" ? " ${music}" : " None"}))
|
||||
{music != "" ? " ${music}" : " None"}))
|
||||
|
||||
(defwidget osk []
|
||||
(button :class "music round"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "~/.config/scripts/onscreenkb.sh"
|
||||
{""}
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget metric [label value onchange onclick]
|
||||
(box :orientation "h"
|
||||
:class "metric"
|
||||
:space-evenly false
|
||||
:hexpand true
|
||||
(button :class "label" :onclick onclick label)
|
||||
(scale :min 0
|
||||
:max 101
|
||||
:active {onchange != ""}
|
||||
:value value
|
||||
:onchange onchange)))
|
||||
:onchange onchange
|
||||
:hexpand true)))
|
||||
|
||||
(deflisten workspaces "hyprland-workspaces _")
|
||||
|
||||
(defwidget workspaceWidget [monitor]
|
||||
(eventbox :onscroll "hyprctl dispatch workspace `echo {} | sed 's/up/+/\' | sed 's/down/-/'`1"
|
||||
(eventbox :onscroll "hyprctl eval \"hl.dsp.focus({workspace='$(echo {} | sed 's/up/r+/;s/down/r-/')1'})\""
|
||||
(box :class "workspaces"
|
||||
:space-evenly false
|
||||
:width 20
|
||||
(for i in {workspaces[monitor].workspaces}
|
||||
(button
|
||||
:width 20
|
||||
:onclick "hyprctl dispatch workspace ${i.id}"
|
||||
:onclick "hyprctl eval 'hl.dsp.focus({workspace=${i.id}})'"
|
||||
:class "${i.class}"
|
||||
{i.name == "special:magic" ? "" : "${i.name}"})))))
|
||||
{i.name == "special:magic" ? "" : "${i.name}"})))))
|
||||
|
||||
|
||||
(deflisten workspace-old "~/Dotfiles/desktopenvs/hyprland/scripts/workspace")
|
||||
|
|
@ -107,13 +154,13 @@
|
|||
(defwidget clock []
|
||||
(box :class "clock"
|
||||
:tooltip {calender}
|
||||
(label :text {"${time}"})
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
(label :text " ")
|
||||
(label :text {time})
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defpoll calender :interval "600s"
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/calender-fix.sh")
|
||||
|
||||
(defpoll disks :interval "600s"
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/dysk-phydisks.sh")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue