forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
(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}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
(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 Outlined';"
|
||||
: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}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+13
@@ -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}
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
(defwidget bright []
|
||||
(box
|
||||
:class "module"
|
||||
(eventbox
|
||||
:class "bright-icon"
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-U 5/g' -e 's/up/-A 5/g' | xargs light) && scripts/bright osd"
|
||||
(label
|
||||
:valign "start"
|
||||
:text {brightness.icon}
|
||||
:class "bright-icon icon"
|
||||
:tooltip "brightness ${round(brightness.level, 0)}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
(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' : ''}"
|
||||
:style "${rev_ontf ? 'background-color: #838383;' : ''}"
|
||||
; clock-module
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "module"
|
||||
:valign "start"
|
||||
:orientation "v"
|
||||
:style "min-width: 115px;"
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
(label :text "${time.hour}" :class "clock hour")
|
||||
(label :text ":" :class "clock")
|
||||
(label :text {time.minute} :class "clock minute")
|
||||
)
|
||||
(button
|
||||
:style "background"
|
||||
:halign "start"
|
||||
:valign "start"
|
||||
: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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
(defwidget editmode []
|
||||
(eventbox
|
||||
:onscroll "hyprctl dispatch splitratio $(echo {} | sed -e \"s/up/-0.1/g\" -e \"s/down/+0.1/g\")"
|
||||
:cursor "col-resize"
|
||||
:onmiddleclick "scripts/toggle-compactmode.sh"
|
||||
:onrightclick "scripts/toggle-compactmode.sh --enable --border 0"
|
||||
(checkbox
|
||||
:class "edit-mode-checkbox edit-mode-checkbox-${editing}"
|
||||
:onchecked "scripts/editmode.sh enable"
|
||||
:onunchecked "scripts/editmode.sh disable"
|
||||
:tooltip "Edit mode (middle-click to move, right-click to resize windows)"
|
||||
(label :class "icon editmode" :text "")
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
(defwidget osu-music-module []
|
||||
(eventbox
|
||||
:class "dummy-${mcover}" ; Dummy class to keep the listener active
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%) && scripts/volume osd"
|
||||
:onclick "scripts/toggle-music.sh &"
|
||||
:onmiddleclick "playerctl play-pause"
|
||||
:onrightclick "playerctl next"
|
||||
:onhover "${EWW_CMD} update music_hover=true"
|
||||
:onhoverlost "${EWW_CMD} update music_hover=false"
|
||||
(box
|
||||
:space-evenly false
|
||||
:class "module module-music"
|
||||
(box
|
||||
:class "icon-music icon-square-${music_hover || music_open}"
|
||||
(label :class "icon button-${music_hover || music_open}" :text "")
|
||||
)
|
||||
; Song name
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal "${music_reveal || osd_vol}"
|
||||
:duration "300ms"
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%) && scripts/volume osd"
|
||||
:limit-width 20
|
||||
(eventbox
|
||||
:class "music-ctl-revealer music-ctl-revealer-${music_hover || music_open}"
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%) && scripts/volume osd"
|
||||
(label
|
||||
:class "music-title-bar"
|
||||
:limit-width 50
|
||||
; :style "color: ${mcover.color.colors.color4};"
|
||||
:text "${mname == '' ? 'Not playing' : mname}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
(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};"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+464
@@ -0,0 +1,464 @@
|
||||
(defwidget rectangular-progress
|
||||
[value]
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:class "rect-progress-box"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(scale
|
||||
:class "rect-progress-h-u"
|
||||
:orientation "h"
|
||||
:value "${value <= 25 ? (value * 4) : 100}"
|
||||
)
|
||||
(scale
|
||||
:class "rect-progress-v-r"
|
||||
:orientation "v"
|
||||
:value "${value > 25 ? (value <= 50 ? ((value - 25) * 4) : 100) : 0}"
|
||||
)
|
||||
(scale
|
||||
:flipped true
|
||||
:class "rect-progress-h-d"
|
||||
:orientation "h"
|
||||
:value "${value > 50 ? (value <= 75 ? ((value - 50) * 4) : 100) : 0}"
|
||||
)
|
||||
(scale
|
||||
:flipped true
|
||||
:class "rect-progress-v-l"
|
||||
:orientation "v"
|
||||
:value "${value > 75 ? ((value - 75) * 4) : 0}"
|
||||
)
|
||||
; (scale
|
||||
; :class "rect-progress"
|
||||
; :orientation "h"
|
||||
; ; :value "${value > 50 ? (value <= 75 ? ((value - 50) * 4) : 100) : 0}"
|
||||
; :value "${value}"
|
||||
; )
|
||||
; (scale
|
||||
; :class "rect-progress"
|
||||
; :orientation "v"
|
||||
; ; :value "${value > 75 ? (value - 75 * 4) : 0}"
|
||||
; :value "${value}"
|
||||
; )
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(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 ""
|
||||
: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 Outlined;"
|
||||
{net.icon}
|
||||
)
|
||||
(label :class "separator" :text "|")
|
||||
(button
|
||||
:class "wifi-arrow-btn"
|
||||
:style "font-family: Material Symbols Outlined;"
|
||||
: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 Outlined';"
|
||||
{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 || EWW_CPU.avg>= 50) && !right_hover}"
|
||||
: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
|
||||
(circular-progress
|
||||
:value "${EWW_CPU.avg}"
|
||||
:class "cpubar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
(button
|
||||
:tooltip "CPU: ${round(EWW_CPU.avg,0)}%"
|
||||
:onclick "${EWW_CMD} update popup='system-menu'"
|
||||
:class "inside-circle"
|
||||
(label :class "icon-text" :text "")
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal "${sys_rev || popup == 'system-menu' || force_sys_rev || EWW_CPU.avg>= 50}"
|
||||
: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'"
|
||||
(box
|
||||
:class "icon-square icon-mem"
|
||||
:space-evenly false
|
||||
(circular-progress
|
||||
:value {memory.percentage}
|
||||
:class "membar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
(button
|
||||
:class "inside-circle"
|
||||
: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 || memory.percentage + memory.swappercentage >= 120}"
|
||||
: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'"
|
||||
; (box
|
||||
; ; :style " min-width: 100px;"
|
||||
; (rectangular-progress
|
||||
; :value "${volume.percent}"
|
||||
; )
|
||||
; )
|
||||
(box
|
||||
:class "icon-batt"
|
||||
:style "background-color: $colorbatt;"
|
||||
(circular-progress
|
||||
:value "${EWW_BATTERY["BATT"].capacity}"
|
||||
:class "batbar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
:style "border-radius: 99px;"
|
||||
(button
|
||||
:class "inside-circle"
|
||||
:tooltip "Battery: ${EWW_BATTERY["BATT"].capacity}%"
|
||||
:onclick "${EWW_CMD} update popup='system-menu'"
|
||||
:style "border-radius: 99px; background-color: ${battery.bgcolor};"
|
||||
(label :class "icon-text" :text "")
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal true
|
||||
:duration "300ms"
|
||||
:class "sys-menu"
|
||||
(sysmenu)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget cpumenu[]
|
||||
(eventbox
|
||||
:class "cpu-menu"
|
||||
:onclick "${EWW_CMD} update popup='system-menu'"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(label :class "cpu-menu icon" :text "")
|
||||
(label :class "cpu-menu" :text "${round(EWW_CPU.avg,0)}%")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget memmenu[]
|
||||
(eventbox
|
||||
; :class "mem-menu"
|
||||
:onclick "${EWW_CMD} update popup='system-menu'"
|
||||
(box
|
||||
; :class "mem-menu"
|
||||
:space-evenly false
|
||||
(label :class "mem-menu-left" :text "")
|
||||
(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}%")
|
||||
; (revealer
|
||||
; :reveal "${popup == 'system-menu' || force_sys_rev}"
|
||||
; :transition "slideright"
|
||||
; :duration "300ms"
|
||||
; :class "sys-menu"
|
||||
; (label :class "batt-percentage" :text " | ${battery.wattage} | ${battery.status}")
|
||||
; )
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(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'"
|
||||
" "
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
(defwidget user []
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
:style "padding-left: 28px; padding-right: 22px;"
|
||||
(label
|
||||
:class "username"
|
||||
:style "margin-right: 5px;"
|
||||
:text "${username == "" ? username_default : username}"
|
||||
)
|
||||
(box
|
||||
:class "userpic"
|
||||
:style "background-image: url('/var/lib/AccountsService/icons/${username == "" ? username_default : username}');"
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+85
@@ -0,0 +1,85 @@
|
||||
; Const
|
||||
(defvar FILE_BROWSER "nautilus")
|
||||
(defvar RES_WIDTH 1920)
|
||||
(defvar RES_HEIGHT 1080)
|
||||
(defvar OVERVIEW_SCALE 0.18)
|
||||
(defvar OVERVIEW_SCALE_TEXT 0.45)
|
||||
(defvar OVERVIEW_SCALE_SUBTEXT 0.35)
|
||||
(defvar wsloop "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]")
|
||||
(defvar ws-icons '["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]')
|
||||
|
||||
; Vars
|
||||
(defvar music_reveal false)
|
||||
(defvar oquery "")
|
||||
(defvar rev_ostg false)
|
||||
(defvar sys_menu_open true)
|
||||
(defvar date_rev false)
|
||||
(defvar sys_rev false)
|
||||
(defvar force_sys_rev false)
|
||||
(defvar editing false)
|
||||
(defvar osd_track false)
|
||||
(defvar osd_vol false)
|
||||
(defvar osd_bright false)
|
||||
(defvar selected '')
|
||||
(defvar rev_ontf false)
|
||||
(defvar overview_hover_name "Activities Overview")
|
||||
(defvar overview_query "")
|
||||
(defvar overview_results "")
|
||||
(defvar rev_themer false)
|
||||
(defvar rev_dash false)
|
||||
(defvar open_overview false)
|
||||
(defvar popup "none")
|
||||
(defvar right_hover false)
|
||||
(defvar ontf_hover false)
|
||||
(defvar music_hover false)
|
||||
(defvar themer_hover false)
|
||||
(defvar music_open false)
|
||||
(defvar themer_open false)
|
||||
|
||||
; Dynamic animation: different for open and close
|
||||
(defvar anim_open_ostg true)
|
||||
(defvar anim_open_ontf true)
|
||||
(defvar anim_open_search true)
|
||||
(defvar anim_open_themer true)
|
||||
(defvar anim_open_music true)
|
||||
(defvar anim_open_dash true)
|
||||
|
||||
; Time
|
||||
(defpoll time :interval "5s" `date +'{"date": "%d/%m", "hour": "%H", "minute": "%M", "day": "%A"}'`)
|
||||
|
||||
; Listeners
|
||||
(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")
|
||||
(deflisten winjson `scripts/winlist`)
|
||||
(deflisten winicons `scripts/appicons`)
|
||||
(deflisten winnums `scripts/winnumbers`)
|
||||
(deflisten hyprjson `scripts/hyprsettings`)
|
||||
(deflisten awin `scripts/activewin`)
|
||||
(deflisten audiojson `scripts/audiolevels`)
|
||||
(deflisten mcover 'scripts/music cover')
|
||||
(deflisten mname `playerctl --follow metadata --format '{{ title }}'`) ; Workaround for music player: wont run full music script when music window not open
|
||||
(deflisten wsjsona `scripts/overview1`)
|
||||
(deflisten wsjsonb `scripts/overview2`)
|
||||
; (deflisten wsthumbs `scripts/overview-thumbnails`) ; slow, so nope
|
||||
(deflisten activews :initial 1 `scripts/activews`)
|
||||
|
||||
(defvar username_default "end")
|
||||
(defvar quote_content `["haha pointers hee hee i love pointe-\\\nProcess Vaxry exited with signal SIGSEGV", "I have a hentai anal gif playing in my base"]`)
|
||||
(defvar quote_author `["- vaxer", "- vaxer"]`)
|
||||
|
||||
(defpoll uptime :interval "1m" "uptime -p | sed -e 's/up //;s/ hours,/h/;s/ minutes/m/'")
|
||||
(defpoll packages :interval "5m" `pacman -Q | wc -l`)
|
||||
(defpoll kernel :interval "5m" `uname -r`)
|
||||
(defpoll username :initial "end" :interval "5m" `whoami`)
|
||||
(defpoll hostname :initial "eavouros" :interval "5m" `uname -n`)
|
||||
(defpoll wm :interval "5m" `echo $XDG_CURRENT_DESKTOP`)
|
||||
Executable
+33
@@ -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 Outlined';"
|
||||
: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}%")
|
||||
)
|
||||
)
|
||||
Executable
+99
@@ -0,0 +1,99 @@
|
||||
(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 ]")
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
(defwidget workspaces []
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
:onmiddleclick "scripts/toggle-overview.sh &"
|
||||
:onrightclick "scripts/toggle-overview.sh &"
|
||||
(overlay
|
||||
; Only displays workspace state (has windows or not)
|
||||
(box
|
||||
:class "workspaces"
|
||||
:space-evenly false
|
||||
(for i in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${i.num}"
|
||||
:class "ws"
|
||||
(label :class "ws-text" :style "margin-top: -6px; font-size: 32px; color: ${i.clr};" :text "◆")
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "workspaces"
|
||||
:space-evenly false
|
||||
(for i in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${i.num}"
|
||||
:class "ws"
|
||||
(label :class "ws-text" :style "font-size: 12pt;" :text "${ws-icons[i.num - 1]}")
|
||||
)
|
||||
)
|
||||
)
|
||||
; Use a separate indicator for active workspace (animations, yay) (and more performant)
|
||||
(button
|
||||
:class "ws-active"
|
||||
:style "
|
||||
margin-left: ${32 * (activews - 1)}px;
|
||||
margin-right: ${32 * (10 - activews)}px;
|
||||
"
|
||||
(label :class "ws-active" :style "margin-top: -6px; font-size: 32px;" :text "◆")
|
||||
)
|
||||
(button
|
||||
:class "ws-active"
|
||||
:style "
|
||||
margin-left: ${32 * (activews - 1)}px;
|
||||
margin-right: ${32 * (10 - activews)}px;
|
||||
"
|
||||
(label :class "ws-text" :style "font-size: 13pt;" :text "${activews}")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
; ①②③④⑤⑥⑦⑧⑨⑩
|
||||
Reference in New Issue
Block a user