This commit is contained in:
end-4
2024-02-22 15:35:06 +07:00
commit 8db26e9707
4220 changed files with 208544 additions and 0 deletions
@@ -0,0 +1,26 @@
(deflisten awin
; :run-while win_ws_open
`scripts/activewin`
)
(defwidget activewindow []
(eventbox
(box
:space-evenly false
:class "activewin"
(label
:limit-width 50
:text "➜ "
)
(revealer
:transition "slideright"
:reveal "${!music_reveal}"
:duration "300ms"
(label
:limit-width 50
:text "${awin}"
)
)
)
)
)
@@ -0,0 +1,77 @@
(defvar sys_menu_open true)
(deflisten audiojson
:initial "initial-value"
`scripts/audiolevels`
)
(defwidget audiolevels[]
(box
:space-evenly false
:orientation "v"
:class "sliders"
(label
:text "Volume mixer"
:xalign 0
:style "font-weight: bold;"
)
(for i in audiojson
(eventbox
:onscroll "pactl set-sink-input-volume ${i.sink} $(echo {} | sed -e \"s/up/+10/g\" -e \"s/down/-10/g\")%"
:onrightclick "pactl set-sink-input-volume ${i.sink} 100%"
(box
:space-evenly false
:orientation "v"
; (label :class "time" :text "DEBUG:${i}")
(centerbox
:space-evenly false
:orientation "h"
; :halign "center"
(label
:xalign 0
:class "audiotext"
:limit-width 42
:style "font-size: 13pt; padding-bottom: 2px;"
:text "${i.name} (#${i.sink})"
)
(label
:xalign 0
:class "audiotext"
:limit-width 30
:style "font-size: 13pt; padding-bottom: 2px;"
:text ""
)
(box :orientation "v"
(label
:xalign 1
:class "audiotext"
:style "font-size: 13pt; padding-bottom: 2px;"
:text "${i.volume}%"
)
)
)
(box
:class "volume-slider-box"
:space-evenly false
(eventbox
; :class "volume-icon"
:onclick "pactl set-sink-input-volume ${i.sink} 0%"
:onscroll "pactl set-sink-input-volume ${i.sink} $(echo {} | sed -e \"s/up/+10/g\" -e \"s/down/-10/g\")%"
:onrightclick "pactl set-sink-input-volume ${i.sink} 100%"
(label
:style "font-family: 'Material Symbols Rounded';"
:text "${volume.icon}"
)
)
(scale
:class "sliderbg"
:value {i.volume}
:class "volume-bar slider"
:onchange "pactl set-sink-input-volume ${i.sink} {}%"
:tooltip "${i.name}: ${i.volume}%"
)
)
)
)
)
)
)
@@ -0,0 +1,13 @@
(defwidget bluetooth []
(eventbox
:onrightclick "gnome-control-center bluetooth"
(button
:class "module-bt module icon"
:onclick "blueberry"
:onrightclick "gnome-control-center bluetooth"
:tooltip "${bluetooth.text} ${bluetooth.batt_icon}"
:style "color: ${bluetooth.color};"
{bluetooth.icon}
)
)
)
+15
View File
@@ -0,0 +1,15 @@
(defwidget bright []
(box
:class "module"
(eventbox
:class "bright-icon"
:onscroll "echo {} | sed -e 's/down/-U 5/g' -e 's/up/-A 5/g' | xargs light"
(label
:valign "start"
:text {brightness.icon}
:class "bright-icon icon"
:tooltip "brightness ${round(brightness.level, 0)}%"
)
)
)
)
+60
View File
@@ -0,0 +1,60 @@
(defvar date_rev false)
(defwidget clock_module []
(eventbox
:onhover "${EWW_CMD} update date_rev=true"
:onhoverlost "${EWW_CMD} update popup='none' && ${EWW_CMD} update date_rev=false"
:onclick "${EWW_CMD} update popup='calendar'"
:class "${popup == 'calendar' ? 'calendar-win' : ''}"
; clock-module
(box
:space-evenly false
:orientation "v"
(box
:class "module"
:valign "start"
:space-evenly false
:orientation "h"
(box
:space-evenly false
(label
:text {time.hour}
:class "clock hour")
(label
:text ":"
:class "clock")
(label
:text {time.minute}
:class "clock minute"))
(revealer
:transition "slideright"
:reveal true ; Replace with "date_rev" for reveal on hover
:duration "250ms"
:class "date-clock"
(button
:class "date-clock"
:onclick "${EWW_CMD} update popup='calendar'"
"${time.day}, ${time.date}"
)
)
)
(revealer
:reveal "${popup == 'calendar'}"
:transition "slideright"
:duration "0ms"
(revealer
:reveal "${popup == 'calendar'}"
:transition "crossfade"
:duration "0ms"
(revealer
:reveal "${popup == 'calendar'}"
:transition "slidedown"
:duration "0ms"
(calendar)
)
)
)
)
)
)
+177
View File
@@ -0,0 +1,177 @@
(deflisten mcover
'scripts/music cover'
)
(defwidget music-module []
(eventbox
:class "${popup == 'music' ? 'music-window' : ''}"
:style "${popup == 'music' ? 'border-color: ${mcover.color.colors.color4}; background-color: ${mcover.color.colors.color0}' : ''}"
:onhoverlost "${EWW_CMD} update popup='none'"
(box
:valign "start"
:space-evenly false
:orientation "v"
(revealer
; :reveal "${popup != 'music'}"
:reveal true
:transition "slidedown"
(eventbox
:class "music-ctl"
:onhover "${EWW_CMD} update music_reveal=true && ${EWW_CMD} update date_rev=true"
:onhoverlost "${EWW_CMD} update music_reveal=false && ${EWW_CMD} update date_rev=false"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
; :onclick "${EWW_CMD} open --toggle music"
:onclick "${EWW_CMD} update popup='music'"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next"
(box
:class "music-ctl"
:space-evenly false
(label :class "music-icon" :text "")
(revealer
:transition "slideright"
:reveal "${music_reveal || popup == 'music'}"
:duration "300ms"
:class "music-ctl-revealer"
; :onclick "${EWW_CMD} open --toggle music"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:limit-width 20
(eventbox
:class "music-ctl-revealer"
; :onclick "${EWW_CMD} open --toggle music"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
(label
:class "music-title"
:style "${popup == 'music' ? 'color: ${mcover.color.colors.color4}' : ''}"
:limit-width 50
:text "${music.title == '' ? 'Not playing' : music.title}"
)
)
)
(revealer
:transition "slideright"
:reveal music_reveal
:duration "300ms"
:class "music-ctl-revealer"
; :onclick "${EWW_CMD} open --toggle music"
(box
:class "icon"
:style "font-family: SF Mono Nerd Font; ${popup == 'music' ? 'color: ${mcover.color.colors.color4}' : ''}"
; (button
; :class "song-button"
; {music.title} "" {music.status} "")
; (button :class "song-button" :onclick "playerctl previous" {music.title})
(button
:class "song-button"
:style "font-family: 'Material Symbols Rounded'; "
:onclick "playerctl previous" ""
)
(button
:class "song-button"
:onclick "playerctl play-pause"
:style "font-family: 'Material Symbols Rounded'; "
"${music.status != '' ? music.status : ''}"
)
(button
:class "song-button"
:style "font-family: 'Material Symbols Rounded'; "
:onclick "playerctl next"
""
)
)
)
)
)
)
(revealer
:reveal "${popup == 'music'}"
:transition "slideright"
:duration "0ms"
(revealer
:reveal "${popup == 'music'}"
:transition "crossfade"
:duration "0ms"
(revealer
:reveal "${popup == 'music'}"
:transition "slidedown"
:duration "0ms"
(box
; :class "music-window"
:space-evenly false
:orientation "h"
; :style "color: ${mcover.color.colors.color4};"
(box ; Cover art
:class "music-cover-art"
:style "background-image: url('${mcover.image}');"
)
(box ;
:orientation "v"
:class "music-box"
(label
:class "music-title"
:wrap true
:text "${music.title == '' ? 'Not playing' : music.title}"
:style "color: ${mcover.color.colors.color4}; font-weight: bold;"
:limit-width 35
)
(label
:class "music-artist"
:wrap true
:text "${music.artist}"
:style "color: ${mcover.color.colors.color4};"
)
(centerbox
:halign "center"
:class "music-button-box icon"
(button
:class "song-button"
:style "font-family: 'Material Symbols Rounded'; "
:onclick "playerctl previous" ""
)
(button
:class "song-button"
:onclick "playerctl play-pause"
:style "font-family: 'Material Symbols Rounded'; "
"${music.status != '' ? music.status : ''}"
)
(button
:class "song-button"
:style "font-family: 'Material Symbols Rounded'; "
:onclick "playerctl next"
""
)
)
(box
(label
:style "color: ${mcover.color.colors.color4};"
:xalign 0
:class "music-time"
:text "${music.position_time}"
)
(label
:style "color: ${mcover.color.colors.color4};"
:xalign 1
:class "music-time"
:text "${music.length}"
)
)
(box
:class "music-bar"
:style "color: ${mcover.color.colors.color4};"
(scale
; :style "color: ${mcover.color.colors.color4};"
:value {music.position}
:class "track-scale"
; :onchange "playerctl position `bc <<< \"{} * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:style "highlight {background-color: ${mcover.color.colors.color4};}"
)
)
)
)
)
)
)
)
)
)
+30
View File
@@ -0,0 +1,30 @@
; (defwidget net []
; (button
; :class "net-icon"
; :onclick "iwgtk &"
; :onrightclick "gnome-control-center network &"
; :tooltip {net.essid}
; :style "color: ${net.color};"
; {net.icon}
; )
; )
(defwidget net []
(box
:class "module"
(eventbox
:class "net-icon"
:onclick "iwgtk &"
:onrightclick "gnome-control-center network &"
:tooltip {net.essid}
; :style "color: ${net.color};"
(label
:valign "start"
:text {net.icon}
:class "net-icon"
:tooltip {net.essid}
; :style "color: ${net.color};"
)
)
)
)
+394
View File
@@ -0,0 +1,394 @@
(defvar sys_rev false)
(defvar force_sys_rev false)
; (defvar sys_rev true)
(defwidget sys []
(eventbox
:class "${popup == 'system-menu' ? 'system-menu-box' : 'sysbar'}"
; :onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:onhover "${EWW_CMD} update sys_rev=true"
:onclick "${EWW_CMD} update popup='system-menu'"
:onhoverlost "${EWW_CMD} update popup='none' sys_rev=false"
:onrightclick "${EWW_CMD} update force_sys_rev=${!force_sys_rev}"
:onmiddleclick "${EWW_CMD} open --toggle overview"
(box
:space-evenly false
:orientation "v"
(box
:class "module"
:space-evenly false
:spacing 5
:halign "end"
(syscpu)
(sysmem)
(sysbatt)
(settingscog)
)
(revealer
:reveal "${popup == 'system-menu'}"
:transition "slideright"
:duration "0ms"
(revealer
:reveal "${popup == 'system-menu'}"
:transition "crossfade"
:duration "0ms"
(revealer
:reveal "${popup == 'system-menu'}"
:transition "slidedown"
:duration "0ms"
(box
:space-evenly false
(eventbox
; :onhoverlost "${EWW_CMD} update popup='none'"
(box
; :class "system-menu-box"
:space-evenly false
:orientation "v"
(box
:class "top-row"
:space-evenly false
(label :class "time" :text "${time.hour}:${time.minute}")
(box
:class "date-box"
:space-evenly false
(label :class "date" :text "${time.day},")
(label :class "date" :text "${time.date}")
)
)
(box
:class "system-row"
:space-evenly false
(box
:class "wifi-box"
:space-evenly false
:orientation "v"
(box
:class "element"
:space-evenly false
(button
; :class "wifi-button"
:onclick "scripts/net toggle"
:style "font-family: Material Symbols Rounded;"
{net.icon}
)
(label :class "separator" :text "|")
(button
:class "wifi-arrow-btn"
:style "font-family: Material Symbols Rounded;"
:onclick "nm-connection-editor &"
""
)
)
(label :style "font-size: 12pt;" :class "sys-toggle" :text {net.essid} :xalign 0.5 :limit-width 15)
)
(box
:class "bluetooth-box"
:space-evenly false
:orientation "v"
(box
:class "element icon"
:space-evenly false
(button
:class "bluetooth-button"
:onclick "scripts/bluetooth toggle"
:style "font-family: 'Material Symbols Rounded';"
{bluetooth.icon}
)
(label :class "separator" :text "|")
(button
:class "bluetooth-arrow-btn"
:onclick "blueberry"
""
)
)
(label
:style "font-size: 12pt;"
:text {bluetooth.text}
:xalign 0.5
:class "sys-toggle"
:tooltip "${bluetooth.text} ${bluetooth.batt_icon}"
:limit-width 15
)
)
(box
:class "airplane-box"
:space-evenly false
:orientation "v"
(box
:class "element"
(button
:class "airplane-button"
:onclick "scripts/airplane toggle"
airplane
)
)
(label :style "font-size: 12pt;" :text "Airplane Mode" :xalign 0.5 :limit-width 16)
)
(box
:space-evenly false
:orientation "v"
(box
:class "element"
(button
:halign "end"
:onclick "wlogout -p layer-shell &"
""
)
)
(label
:style "font-size: 12pt;"
:text "Power"
:class "sys-toggle"
:xalign 0.5
:limit-width 16
)
)
)
(audiolevels)
(box
:class "system-info-box"
:style "margin-bottom: 17px;"
; cpu
(box
:class "sys-box"
:space-evenly false
:halign "start"
(circular-progress
:value "${EWW_CPU.avg}"
:class "sys-cpu"
:thickness 3
(label
:text ""
:class "sys-icon-cpu icon")
)
(box
:orientation "v"
:vexpand false
(label
:text "CPU"
:halign "start"
:class "sys-text-cpu"
:style "font-size: 12pt;"
)
(label
:text "${round(EWW_CPU.avg,2)}%"
:halign "start"
:class "sys-text-sub"
:style "font-size: 12pt;"
)
(label
:text "${EWW_CPU.cores[0].freq} MHz"
:halign "start"
:class "sys-text-sub"
:style "font-size: 12pt;"
)
)
)
; memory
(box
:class "sys-box"
:space-evenly false
:halign "end"
(circular-progress
:value {memory.percentage}
:class "sys-mem"
:thickness 3
(label
:text ""
:class "sys-icon-mem icon"
)
)
(box
:orientation "v"
(label :style "font-size: 12pt;" :text "Memory" :halign "start" :class "sys-text-mem")
(label :style "font-size: 12pt;" :text "${memory.used} / ${memory.total}" :halign "start" :class "sys-text-sub")
(label :style "font-size: 12pt;" :text "Swap ${memory.swapused} / ${memory.swaptotal}" :halign "start" :class "sys-text-sub")
)
)
)
)
)
)
)
)
)
)
)
)
(defwidget syscpu []
(revealer
:reveal "${popup == 'system-menu' || force_sys_rev}"
:transition "slideleft"
:duration "300ms"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
(eventbox
:class "cpubar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(box
:class "cpubar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(circular-progress
:value "${EWW_CPU.avg}"
:class "cpubar"
:thickness 3
:start-at 75
(button
:tooltip "CPU: ${round(EWW_CPU.avg,0)}%"
:onclick "${EWW_CMD} update popup='system-menu'"
(label :class "icon-text" :text "")
)
)
(revealer
:transition "slideright"
:reveal "${sys_rev || popup == 'system-menu' || force_sys_rev}"
:duration "300ms"
:class "sys-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
(cpumenu)
)
)
)
)
)
(defwidget sysmem []
(eventbox
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:class "membar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(box
:class "membar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(circular-progress
:value {memory.percentage}
:class "membar"
:thickness 3
:start-at 75
(button
:tooltip "RAM: ${round(memory.percentage,0)}%"
:onclick "${EWW_CMD} update popup='system-menu'"
(label :class "icon-text" :text "")
)
)
; Separate swap usage circle
; (circular-progress
; :value {memory.swappercentage}
; :class "membar"
; :thickness 2
; :start-at 75
; (button
; :tooltip "Swap: ${round(memory.swappercentage,0)}%"
; :onclick "${EWW_CMD} update popup='system-menu'"
; (label :class "icon-text" :text "")
; )
; )
(revealer
:transition "slideright"
:reveal "${sys_rev || popup == 'system-menu' || force_sys_rev}"
:duration "300ms"
:class "sys-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
(memmenu)
)
)
)
)
(defwidget sysbatt []
(eventbox
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:class "batbar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(box
:class "batbar"
:space-evenly false
:onclick "${EWW_CMD} update popup='system-menu'"
(circular-progress
:value "${EWW_BATTERY["BATT"].capacity}"
:class "batbar-circle"
:thickness 3
:start-at 75
:style "border-radius: 99px; color: ${battery.circolor}; background-color: ${battery.cirbgcolor}"
(button
:tooltip "Battery: ${EWW_BATTERY["BATT"].capacity}%"
:onclick "${EWW_CMD} update popup='system-menu'"
:style "border-radius: 99px; color: ${battery.color}; background-color: ${battery.bgcolor};"
(label :class "icon-text" :text "")
)
)
(revealer
:transition "slideright"
:reveal true
:duration "300ms"
:class "sys-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
(sysmenu)
)
)
)
)
(defwidget cpumenu[]
(eventbox
:class "cpu-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
(label :class "cpu-menu" :text "${round(EWW_CPU.avg,0)}%")
)
)
(defwidget memmenu[]
(eventbox
; :class "mem-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
:onrightclick "foot btm"
(box
; :class "mem-menu"
:space-evenly false
(label :class "mem-menu-left" :text "${memory.used}")
(label :class "mem-menu-mid" :text "")
(label :class "mem-menu-right" :text "${memory.swapused}")
)
)
)
(defwidget sysmenu[]
(eventbox
:class "sys-menu"
:onclick "${EWW_CMD} update popup='system-menu'"
:style "color: ${battery.color}"
(box
:space-evenly false
(label :class "sys-menu-charge" :text "${battery.quickicon}")
(label :class "batt-percentage" :text "${EWW_BATTERY["BATT"].capacity}%")
)
)
)
(defwidget settingscog[]
(eventbox
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:class "settings-icon"
(revealer
:transition "slideright"
:reveal true
:duration "300ms"
:onclick "${EWW_CMD} update popup='system-menu'"
(button
:class "sys-menu-button"
:onclick "${EWW_CMD} update popup='system-menu'"
" "
)
)
)
)
@@ -0,0 +1,22 @@
(defvar bright_reveal false)
(defvar bt_rev false)
(defvar music_reveal false)
(defvar notif_rev false)
(defvar net_rev false)
(defvar time_rev false)
(defvar vol_reveal false)
(defpoll time :interval "5s" `date +'{"date": "%d/%m", "hour": "%H", "minute": "%M", "day": "%A"}'`)
(deflisten airplane "scripts/airplane")
(deflisten battery "scripts/battery")
(deflisten bluetooth "scripts/bluetooth")
(deflisten brightness "scripts/brightness")
(deflisten memory "scripts/memory")
(deflisten music "scripts/music")
(deflisten music_cover "scripts/music cover")
(deflisten notifications "scripts/notifications")
(deflisten notif_icons :initial `{"icon": "󰆄", "toggle_icon": ""}` "scripts/notifications icons")
(deflisten net "scripts/net")
(deflisten volume "scripts/volume")
(deflisten workspace "scripts/workspaces")
+33
View File
@@ -0,0 +1,33 @@
(defwidget volume-module []
(box
:class "vol-menu"
(eventbox
; :class "vol-menu"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:onrightclick "pavucontrol"
:onclick "scripts/volume mute SINK"
(box
(label
; :class "vol-menu"
:tooltip "volume ${volume.percent}%"
:style "font-family: 'Material Symbols Rounded';"
:text "${volume.icon}"
:valign "start"
)
(label :valign "start" :text "${volume.percent}%")
)
)
; (volmenu)
)
)
(defwidget volmenu[]
(eventbox
:class "vol-menu"
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
:onrightclick "pavucontrol"
:onclick "scripts/volume mute SINK"
:valign "start"
(label :class "vol-menu" :text "${volume.percent}%")
)
)
+111
View File
@@ -0,0 +1,111 @@
(defvar win_ws_open false)
(defvar wsloop "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]")
(deflisten winjson
`scripts/winlist`
)
(deflisten winicons
`scripts/appicons`
)
(deflisten winnums
`scripts/winnumbers`
)
(defwidget win-ws[]
(eventbox
; :onhoverlost "${EWW_CMD} close win-workspace"
(box
:space-evenly false
:orientation "v"
:class "system-menu-box"
; :style "background-color: $bg; color: #A9B1D6; padding-bottom: .6rem; background-color: ${awin == winjson[i].title ? '#7AA2F7' : '$bg'};"
:style "background-color: $bg; color: #A9B1D6; padding-bottom: .6rem; background-color: $bg};"
; (label :text "${winjson}" ) ; DEBUG
(label
:class "winws-title"
:text "Activities"
:xalign 0.5
)
(for i in winnums
(eventbox
:class "winws-evbox"
:onscroll "hyprctl dispatch movetoworkspacesilent $((${winjson[i].workspace.id}$(echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\"))),address:${winjson[i].address}"
:onclick "hyprctl dispatch focuswindow address:${winjson[i].address} && ${EWW_CMD} close win-workspace"
:onmiddleclick "hyprctl dispatch closewindow address:${winjson[i].address}"
(centerbox ;App icon & info
:class "winws"
:space-evenly false
:orientation "h"
(box
:space-evenly false
:orientation "h"
(label
:class "appicon"
:style "background-image: url(\"${winicons[i]}\");"
:text ""
)
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:class "wintext"
:text "${winjson[i].title}"
:limit-width 44
:xalign 0
)
(label
:halign "start"
:class "winsubtext"
:text "${winjson[i].class}"
:limit-width 35
:xalign 0
)
)
)
(label
:class "wintext"
:text ""
:limit-width 1
:xalign 0
)
(box ; Workspace number
:space-evenly false
:orientation "h"
:halign "end"
:style "padding-left: 30px;"
(label
:halign "end"
:class "wintext"
; :text "[ ${winjson[i].workspace.id} ]"
:xalign 1
)
(for w in wsloop
(button
:onclick "hyprctl dispatch movetoworkspacesilent ${w+1},address:${winjson[i].address}"
:class "wschoose"
:style "font-size: 16pt; color: ${(winjson[i].workspace.id == w+1) ? mcover.color.colors.color7 : 'rgba(108, 112, 134, 0.5)'};"
; "hyprctl dispatch movetoworkspacesilent ${w},address:${winjson[i].address}"
"${ws-icons[w]}"
; "●"
)
)
)
)
)
)
)
)
)
(defwidget winctl []
(box
:space-evenly false
:orientation "h"
(eventbox
:valign "start"
; :class "winctl module"
:onscroll "hyprctl dispatch splitratio $(echo {} | sed -e \"s/up/-0.1/g\" -e \"s/down/+0.1/g\")"
(label :class "winctl" :text "[ Split ]")
)
)
)
@@ -0,0 +1,27 @@
(defvar ws-icons '["❶", "❷", "❸", "❹", "❺", "❻", "❼", "❽", "❾", "❿"]')
(defwidget workspaces []
(eventbox
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
:onmiddleclick "${EWW_CMD} open --toggle overview"
:onrightclick "${EWW_CMD} open --toggle overview"
(box
:class "module workspaces"
:spacing 0
:space-evenly false
(for i in workspace
(button
:onclick "hyprctl dispatch workspace ${i.num}"
:class "ws"
:style "color: ${i.clr};"
"${ws-icons[i.num - 1]}"
; "●"
)
)
)
)
)
; ①②③④⑤⑥⑦⑧⑨⑩