feat(eww-touch): restyle bar with pill aesthetic, tighter sizing, responsive slider

- Switch font to 16pt with proportionally scaled padding/margins
- Full pill border-radius (999px) on all widgets
- Circular buttons (50%) for OSK, drawer, close, workspace, screen rotation
- Volume slider expands to fill available bar width (hexpand)
- Workspace buttons use focusleft.sh / focusright.sh scripts
- Add space between clock icon and time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-06-02 09:15:41 +02:00
parent c8a476d2af
commit 9d7c7a5932
2 changed files with 27 additions and 69 deletions

View File

@ -1,7 +1,7 @@
* { * {
all: unset; // Unsets everything so you can style everything from scratch all: unset; // Unsets everything so you can style everything from scratch
font-family: Agave Nerd Font Mono, sans-serif; font-family: Agave Nerd Font Mono, sans-serif;
font-size: 17pt; font-size: 14pt;
} }
tooltip { tooltip {
@ -9,7 +9,7 @@ tooltip {
border-width: 3px; border-width: 3px;
background: #1a1a1a; background: #1a1a1a;
color: #5018dd; color: #5018dd;
border-radius: 35px; border-radius: 25px;
} }

View File

@ -6,82 +6,46 @@
:geometry (geometry :x "0%" :geometry (geometry :x "0%"
:y "1%" :y "1%"
:width "99%" :width "99%"
:height "5%" :height "20px"
:anchor "top center") :anchor "top center")
:exclusive true :exclusive true
(bar :monitor_ monitor)) (bar :monitor_ monitor))
(defpoll battery :interval "2s" (defpoll battery :interval "2s"
"~/.config/scripts/batteryperc") "~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc")
(defwidget bar [monitor_] (defwidget bar [monitor_]
(centerbox :orientation "h" (centerbox :orientation "h"
(winsworks :monitor monitor_) (winsworks :monitor monitor_)
(screenrotate ) (music)
(sidestuff))) (sidestuff)))
(defwidget winsworks [monitor] (defwidget winsworks [monitor]
(box :orientation "h" :space-evenly false :halign "start" (box :orientation "h" :space-evenly false :halign "start"
(osk)
(box :class "music" {"${battery}"}) (box :class "music" {"${battery}"})
(button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music" {""}) (workspaceWidget :monitor monitor)
(metric :label "󰓃 " (button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music" {" ${activewindow}"})
:value volume
:onchange "pactl set-sink-volume @DEFAULT_SINK@ {}%"
:onclick "killall pavucontrol || hyprctl eval 'hl.dsp.exec_cmd(\"[tag +mixer] pavucontrol\")'")
) )
) )
(defwidget sidestuff [] (defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end" (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) (clock)
(systray :class "music" :orientation "h" :spacing 2 :space-evenly true) (systray :class "music" :orientation "h" :spacing 2 :space-evenly true)
))
(defwidget screenrotate []
(box :orientation "h" :space-evenly false :halign "center"
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/workspacefocus/focusleft.sh"
{""}
)
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/screenrotationacw.sh"
{"󱞧"}
)
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "hyprctl dispatch 'hl.dsp.window.close()'"
{""}
)
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/screenrotationwcw.sh"
{"󱞫"}
)
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/workspacefocus/focusright.sh"
{""}
)
)) ))
(defwidget music [] (defwidget music []
@ -92,15 +56,6 @@
:onclick "~/Dotfiles/desktopenvs/hyprland/scripts/playpause.sh" :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/playpause.sh"
{music != "" ? " ${music}" : " None"})) {music != "" ? " ${music}" : " None"}))
(defwidget osk []
(button :class "music"
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/onscreenkb.sh"
{" 󰌌"}
)
)
(defwidget metric [label value onchange onclick] (defwidget metric [label value onchange onclick]
(box :orientation "h" (box :orientation "h"
@ -116,14 +71,14 @@
(deflisten workspaces "hyprland-workspaces _") (deflisten workspaces "hyprland-workspaces _")
(defwidget workspaceWidget [monitor] (defwidget workspaceWidget [monitor]
(eventbox :onscroll "hyprctl eval \"hl.dsp.focus({workspace='$(echo {} | sed 's/up/r+/;s/down/r-/')1'})\"" (eventbox :onscroll "hyprctl dispatch workspace `echo {} | sed 's/up/+/\' | sed 's/down/-/'`1"
(box :class "workspaces" (box :class "workspaces"
:space-evenly false :space-evenly false
:width 20 :width 20
(for i in {workspaces[monitor].workspaces} (for i in {workspaces[monitor].workspaces}
(button (button
:width 20 :width 20
:onclick "hyprctl eval 'hl.dsp.focus({workspace=${i.id}})'" :onclick "hyprctl dispatch workspace ${i.id}"
:class "${i.class}" :class "${i.class}"
{i.name == "special:magic" ? "󱂬" : "󱂬${i.name}"}))))) {i.name == "special:magic" ? "󱂬" : "󱂬${i.name}"})))))
@ -156,6 +111,9 @@
) )
) )
(defpoll calender :interval "600s" (defpoll calender :interval "600s"
"~/Dotfiles/desktopenvs/hyprland/scripts/calender-fix.sh") "~/Dotfiles/desktopenvs/hyprland/scripts/calender-fix.sh")
(defpoll disks :interval "600s"
"~/Dotfiles/desktopenvs/hyprland/scripts/dysk-phydisks.sh")