forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
(defwidget activewindow []
|
||||
(box
|
||||
:valign "center"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
:onhover "${EWW_CMD} update rev_center_ws=true"
|
||||
(box
|
||||
:space-evenly false
|
||||
:class "activewin"
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal "${!music_reveal}"
|
||||
:duration "300ms"
|
||||
(label
|
||||
:limit-width 40
|
||||
:text "${awin.title}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
+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 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}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
+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}
|
||||
)
|
||||
)
|
||||
)
|
||||
+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)}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
(defwidget clock_module []
|
||||
(eventbox
|
||||
:onmiddleclick "scripts/toggle-dashfs.sh &"
|
||||
:onrightclick "scripts/toggle-dashfs.sh &"
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-U 3/g' -e 's/up/-A 3/g' | xargs light) && scripts/brightness osd"
|
||||
:onclick "scripts/toggle-onotify.sh &"
|
||||
:onhover "${EWW_CMD} update calendar_hover=true"
|
||||
:onhoverlost "${EWW_CMD} update calendar_hover=false"
|
||||
(box
|
||||
:class "module-button-pad-center"
|
||||
; Time and date
|
||||
(box
|
||||
:orientation "v" :space-evenly false
|
||||
:valign "center"
|
||||
:class "module-timedate module module-button${rev_calendar ? '-true' : (calendar_hover ? '-hover' : '')}"
|
||||
:style "padding: 0 10px;"
|
||||
(box
|
||||
:space-evenly false :valign "end"
|
||||
:orientation "v"
|
||||
:class "timedate-time"
|
||||
(label :text "${time.hour}" :class "clock hour")
|
||||
(label :text "܅" :class "clock"
|
||||
:style "
|
||||
margin-top: -5px;
|
||||
margin-bottom: -15px;
|
||||
"
|
||||
)
|
||||
(label :text {time.minute} :class "clock minute")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
(defwidget editmode []
|
||||
(eventbox
|
||||
:cursor "col-resize"
|
||||
:onhover "${EWW_CMD} update edit_hover=true"
|
||||
:onhoverlost "${EWW_CMD} update edit_hover=false"
|
||||
:onscroll "hyprctl dispatch splitratio $(echo {} | sed -e \"s/up/-0.1/g\" -e \"s/down/+0.1/g\")"
|
||||
:onmiddleclick "scripts/toggle-compactmode.sh"
|
||||
:onrightclick "scripts/toggle-compactmode.sh --toggle --border 0"
|
||||
(checkbox
|
||||
:class "module-button${editing ? '-true' : (edit_hover ? '-hover' : '')} 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)"
|
||||
(image
|
||||
:path "images/svg/tournaments.svg"
|
||||
:image-height 33
|
||||
:image-width 33
|
||||
:style "
|
||||
margin-left: -5.5px;
|
||||
"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"controls": {
|
||||
"at": [
|
||||
960,
|
||||
65
|
||||
],
|
||||
"size": [
|
||||
530,
|
||||
70
|
||||
]
|
||||
},
|
||||
"capture": {
|
||||
"at": [
|
||||
202,
|
||||
131.5
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
197
|
||||
]
|
||||
},
|
||||
"audio": {
|
||||
"at": [
|
||||
202,
|
||||
644.5
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
789
|
||||
]
|
||||
},
|
||||
"performance": {
|
||||
"at": [
|
||||
1718,
|
||||
932
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
230
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"controls": {
|
||||
"at": [
|
||||
495,
|
||||
30
|
||||
],
|
||||
"size": [
|
||||
930,
|
||||
70
|
||||
]
|
||||
},
|
||||
"capture": {
|
||||
"at": [
|
||||
33,
|
||||
33
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
197
|
||||
]
|
||||
},
|
||||
"audio": {
|
||||
"at": [
|
||||
33,
|
||||
250
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
589
|
||||
]
|
||||
},
|
||||
"performance": {
|
||||
"at": [
|
||||
1250,
|
||||
604
|
||||
],
|
||||
"size": [
|
||||
338,
|
||||
230
|
||||
]
|
||||
}
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
(defwidget osu-music-module []
|
||||
(eventbox
|
||||
: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 || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
||||
|
||||
:onhover "${EWW_CMD} update music_hover=true"
|
||||
:onhoverlost "${EWW_CMD} update music_hover=false"
|
||||
|
||||
(box
|
||||
:space-evenly false :orientation "v"
|
||||
:class "module-button-pad-center"
|
||||
(box
|
||||
:space-evenly false :orientation "v"
|
||||
:class "module-button${music_open ? '-true' : (music_hover ? '-hover' : '')}"
|
||||
(revealer ; dummy keep alive
|
||||
:reveal false
|
||||
:duration "0ms"
|
||||
:transition "slidedown"
|
||||
; (label :text "${mcover.image} ${cavajson[0]}")
|
||||
(label :angle 270 :text "${mcover.image}")
|
||||
)
|
||||
(box
|
||||
:space-evenly false
|
||||
:valign "start" :orientation "v"
|
||||
:class "osu-music-box"
|
||||
(overlay
|
||||
(box
|
||||
:halign "center" :valign "center"
|
||||
:class "bar-music-cover"
|
||||
:style "background-image: url('eww_covers/cover_art_default')"
|
||||
)
|
||||
(box
|
||||
:halign "center" :valign "center"
|
||||
:class "bar-music-cover"
|
||||
:style "background-image: url('${mcover.image}')"
|
||||
)
|
||||
(label
|
||||
:class "bar-music-state"
|
||||
:halign "center" :valign "center"
|
||||
; :angle 270
|
||||
:style "
|
||||
font-size: 18pt;
|
||||
margin-bottom: -1px;
|
||||
color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
"
|
||||
:text "${mplay == 'Playing' ? '' : ''}"
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:transition "slidedown"
|
||||
; :reveal "${(music_reveal || osd_vol || (mname.title != '')) && !focus}"
|
||||
:reveal true
|
||||
:duration "300ms"
|
||||
:class "music-ctl-revealer"
|
||||
: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"
|
||||
(eventbox
|
||||
: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"
|
||||
(box
|
||||
:space-evenly false :orientation "v"
|
||||
; (box
|
||||
; :space-evenly false :orientation "h"
|
||||
; :halign "center"
|
||||
; :class "music-ctl-revealer"
|
||||
; :vexpand true
|
||||
; (label
|
||||
; :class "music-title-bar"
|
||||
; :limit-width 50 :yalign 0
|
||||
; :angle 270
|
||||
; :style "
|
||||
; color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
; "
|
||||
; :text "${mname.title == '' ? 'Not playing' : mname.title}"
|
||||
; )
|
||||
; (revealer
|
||||
; :transition "slidedown"
|
||||
; :reveal "${mname.artist != ''}"
|
||||
; :duration "20ms"
|
||||
; (label
|
||||
; :class "music-artist-bar"
|
||||
; :limit-width 50
|
||||
; :yalign 0
|
||||
; :angle 270
|
||||
; :style "font-size: 11pt; font-family: 'Rubik';
|
||||
; color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
; "
|
||||
; :text "${mname.artist}"
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
(revealer
|
||||
:reveal {music_hover}
|
||||
:transition "slideup"
|
||||
:duration "400ms"
|
||||
(revealer
|
||||
:reveal {music_hover}
|
||||
:transition "crossfade"
|
||||
:duration "400ms"
|
||||
(centerbox
|
||||
:class "music-button-box-bar"
|
||||
:orientation "v"
|
||||
(button
|
||||
:class "song-button-bar"
|
||||
:style "
|
||||
font-size: 30pt;
|
||||
color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
"
|
||||
:onclick "playerctl previous" ""
|
||||
)
|
||||
(button
|
||||
:class "song-button-bar"
|
||||
:style "
|
||||
font-size: 30pt;
|
||||
color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
"
|
||||
:onclick "playerctl play-pause"
|
||||
"${music.status != '' ? music.status : ''}"
|
||||
)
|
||||
(button
|
||||
:class "song-button-bar"
|
||||
:style "
|
||||
font-size: 30pt;
|
||||
color: ${mcover.color.colors.color7 == 'null' ? 'white' : mcover.color.colors.color7};
|
||||
"
|
||||
:onclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
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};"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
[
|
||||
{"name": "File Explorer", "exec": "gtk-launch org.gnome.Nautilus.desktop &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/nautilus.svg"},
|
||||
{"name": "Firefox", "exec": "gtk-launch firefox &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/firefox.svg"},
|
||||
{"name": "Terminal", "exec": "gtk-launch org.codeberg.dnkl.foot.desktop &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/foot.svg"},
|
||||
{"name": "Paint", "exec": "gtk-launch org.kde.kolourpaint.desktop &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/kolourpaint.svg"},
|
||||
{"name": "Settings", "exec": "gtk-launch org.gnome.Settings.desktop &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/gnome-control-center.svg"},
|
||||
{"name": "Notepad", "exec": "gtk-launch org.gnome.TextEditor &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/org.gnome.TextEditor.svg"}
|
||||
],
|
||||
[
|
||||
{"name": "Clock", "exec": "gtk-launch org.gnome.clocks &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/gnome-clocks.svg"},
|
||||
{"name": "Edge", "exec": "/usr/bin/microsoft-edge-stable --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4 &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/microsoft-edge.svg"},
|
||||
{"name": "Visual Studio Code", "exec": "code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/code.svg"},
|
||||
{"name": "Calculator", "exec": "gtk-launch org.gnome.Calculator &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/org.gnome.Calculator.svg"},
|
||||
{"name": "GitHub Desktop", "exec": "gtk-launch github-desktop &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/github-desktop.svg"},
|
||||
{"name": "Photos", "exec": "gtk-launch org.gnome.eog &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/eog.svg"}
|
||||
],
|
||||
[
|
||||
{"name": "VLC Media Player", "exec": "gtk-launch vlc &", "icon": "/usr/share/icons/Win11-dark/apps/scalable/vlc.svg"}
|
||||
]
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
[
|
||||
{"name": "This is NOT Windows 11", "subtext": "Check out my configs", "exec": "xdg-open 'https://github.com/end-4/dots-hyprland/tree/main' &", "icon": "images/icons/github.svg"},
|
||||
{"name": "Get Hyprland help", "subtext": "+ chance to be called a retard", "exec": "xdg-open 'https://discord.com/invite/hQ9XvMUjjr' &", "icon": "images/icons/discord.png"}
|
||||
],
|
||||
[
|
||||
{"name": "r/unixporn", "subtext": "The best kinda porn", "exec": "xdg-open 'https://www.reddit.com/r/unixporn/' &", "icon": "images/icons/reddit.svg"}
|
||||
]
|
||||
]
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
(defwidget searchbutton []
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
:class "osettings-toggle-button-${open_overview}"
|
||||
:onclick "scripts/toggle-overview.sh"
|
||||
:onmiddleclick "scripts/toggle-overview.sh"
|
||||
:onrightclick "scripts/toggle-overview.sh"
|
||||
(box
|
||||
:class "module-button-pad-center"
|
||||
(image
|
||||
:path "images/svg/search.svg"
|
||||
:image-width 33
|
||||
:image-height 33
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Executable
+368
@@ -0,0 +1,368 @@
|
||||
(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%"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "module"
|
||||
:space-evenly false
|
||||
:spacing 5
|
||||
:valign "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
|
||||
(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
|
||||
:valign "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
|
||||
:valign "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"
|
||||
:valign "start"
|
||||
:class "sys-text-cpu"
|
||||
:style "font-size: 12pt;"
|
||||
)
|
||||
(label
|
||||
:text "${round(EWW_CPU.avg,2)}%"
|
||||
:valign "start"
|
||||
:class "sys-text-sub"
|
||||
:style "font-size: 12pt;"
|
||||
)
|
||||
(label
|
||||
:text "${EWW_CPU.cores[0].freq} MHz"
|
||||
:valign "start"
|
||||
:class "sys-text-sub"
|
||||
:style "font-size: 12pt;"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
; memory
|
||||
(box
|
||||
:class "sys-box"
|
||||
:space-evenly false
|
||||
:valign "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" :valign "start" :class "sys-text-mem")
|
||||
(label :style "font-size: 12pt;" :text "${memory.used} / ${memory.total}" :valign "start" :class "sys-text-sub")
|
||||
(label :style "font-size: 12pt;" :text "Swap ${memory.swapused} / ${memory.swaptotal}" :valign "start" :class "sys-text-sub")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget syscpu []
|
||||
(revealer
|
||||
:reveal "${((popup == 'system-menu' || EWW_CPU.avg>= 50) || force_sys_rev)}"
|
||||
:transition "slideup"
|
||||
: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
|
||||
(box
|
||||
:class "cpubar"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(circular-progress
|
||||
:value "${EWW_CPU.avg}"
|
||||
:class "cpubar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
(box
|
||||
:tooltip "CPU: ${round(EWW_CPU.avg,0)}%"
|
||||
:class "inside-circle"
|
||||
(label :class "icon-text" :text "")
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:transition "slidedown"
|
||||
: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
|
||||
:class "membar"
|
||||
:space-evenly false
|
||||
(box
|
||||
:class "membar"
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(circular-progress
|
||||
:value {memory.percentage}
|
||||
:class "membar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
(box
|
||||
:class "inside-circle"
|
||||
:tooltip "RAM: ${round(memory.percentage,0)}%"
|
||||
(label :class "icon-text" :text "")
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:transition "slidedown"
|
||||
:reveal "${sys_rev || 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
|
||||
(box
|
||||
:orientation "v" :space-evenly false
|
||||
:class "batbar"
|
||||
(circular-progress
|
||||
:value "${EWW_BATTERY["BATT"].capacity}"
|
||||
:class "batbar-circle"
|
||||
:thickness 4
|
||||
:start-at 75
|
||||
:style "border-radius: 99px; color: ${battery.circolor};"
|
||||
(box
|
||||
:class "inside-circle"
|
||||
: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 "slidedown"
|
||||
:reveal true
|
||||
:duration "300ms"
|
||||
:class "sys-menu"
|
||||
(sysmenu)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget cpumenu[]
|
||||
(eventbox
|
||||
:class "cpu-menu"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false :orientation "v"
|
||||
(label :angle 270 :class "cpu-menu icon" :text "")
|
||||
(label :angle 270 :class "cpu-menu" :text "${round(EWW_CPU.avg,0)}%")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget memmenu[]
|
||||
(eventbox
|
||||
(box
|
||||
:space-evenly false :orientation "v"
|
||||
(label :angle 270 :class "mem-menu-left" :text "")
|
||||
(label :angle 270 :class "mem-menu-left" :text "${memory.used}")
|
||||
(label :angle 270 :class "mem-menu-mid" :text "")
|
||||
(label :angle 270 :class "mem-menu-right" :text "${memory.swapused}")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget sysmenu[]
|
||||
(eventbox
|
||||
:style "color: ${battery.color}"
|
||||
(box
|
||||
:space-evenly false :orientation "h"
|
||||
:spacing -3
|
||||
:halign "center"
|
||||
:style "margin-left: -5px;"
|
||||
:class "sys-batt-charge-box"
|
||||
(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 "slidedown"
|
||||
: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,34 @@
|
||||
[
|
||||
{
|
||||
"address": [],
|
||||
"class": "org.gnome.Nautilus",
|
||||
"count": 0,
|
||||
"icon": "/usr/share/icons/Win11-dark/apps/scalable/nautilus.svg",
|
||||
"workspace": [],
|
||||
"exec": "nautilus --new-window &"
|
||||
},
|
||||
{
|
||||
"address": [],
|
||||
"class": "firefox",
|
||||
"count": 0,
|
||||
"icon": "/usr/share/icons/Win11-dark/apps/scalable/firefox.svg",
|
||||
"workspace": [],
|
||||
"exec": "firefox &"
|
||||
},
|
||||
{
|
||||
"address": [],
|
||||
"class": "Code",
|
||||
"count": 0,
|
||||
"icon": "/usr/share/icons/Win11-dark/apps/scalable/code.svg",
|
||||
"workspace": [],
|
||||
"exec": "code --password-store=gnome --enable-features=UseOzonePlatform --ozone-platform=wayland &"
|
||||
},
|
||||
{
|
||||
"address": [],
|
||||
"class": "foot",
|
||||
"count": 0,
|
||||
"icon": "/usr/share/icons/Win11-dark/apps/scalable/foot.svg",
|
||||
"workspace": [],
|
||||
"exec": "foot &"
|
||||
}
|
||||
]
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
(defwidget taskbar []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
(for app in tasks
|
||||
(overlay
|
||||
(eventbox
|
||||
:class "taskbar-button-only"
|
||||
:onclick "${app.count > 0 ? ('hyprctl dispatch workspace ' + app.workspace[0] + ' &') : (app.exec)}"
|
||||
; :tooltip "${app.class}"
|
||||
; :onclick "hyprctl dispatch workspace ${app.workspace[0]} && hyprctl dispatch focusdow address:${app.address[0]} &"
|
||||
(box
|
||||
:class "taskbar-button-pad"
|
||||
(box
|
||||
:class "taskbaricon"
|
||||
:style "
|
||||
background-image: url('${app.icon}');
|
||||
${app.class == awin.class ? 'background-color: rgba(108, 112, 134, 0.4); border: 1px solid rgba(108, 112, 134, 0.15); border-top: 1px solid rgba(108, 112, 134, 0.15);' : ''}
|
||||
"
|
||||
)
|
||||
)
|
||||
)
|
||||
(box :class "taskbar-indicator-${app.class == awin.class ? 'true' : (app.count > 0 ? 'false' : 'none')}")
|
||||
)
|
||||
)
|
||||
; Dummy keep alive
|
||||
(revealer :transition "slideright" :reveal false (label :text {awin.class}))
|
||||
)
|
||||
)
|
||||
+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}');"
|
||||
)
|
||||
)
|
||||
)
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
; Const and bg scripts
|
||||
(defvar FILE_BROWSER "nautilus")
|
||||
(defvar RES_WIDTH 1920)
|
||||
(defvar RES_HEIGHT 1080)
|
||||
(defvar BG_ZOOM 1.2)
|
||||
(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 weekdays '[{"day":"Mo","today":"0"},{"day":"Tu","today":"0"},{"day":"We","today":"0"},{"day":"Th","today":"0"},{"day":"Fr","today":"0"},{"day":"Sa","today":"0"},{"day":"Su","today":"0"}]')
|
||||
(defvar ws-icons '["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]')
|
||||
(deflisten ICON_GET `scripts/get_open_icons`)
|
||||
|
||||
; Vars
|
||||
(defvar music_reveal false)
|
||||
(defvar oquery "")
|
||||
(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 overview_hover_name "Activities Overview")
|
||||
(defvar overview_query "")
|
||||
(defvar overview_results "")
|
||||
(defvar open_overview false)
|
||||
(defvar popup "none")
|
||||
(defvar right_hover false)
|
||||
(defvar ontf_hover false)
|
||||
(defvar music_hover false)
|
||||
(defvar edit_hover false)
|
||||
(defvar themer_hover false)
|
||||
(defvar calendar_hover false)
|
||||
(defvar rev_center_ws true)
|
||||
(defvar music_open false)
|
||||
(defvar themer_open false)
|
||||
(defvar focus false)
|
||||
(defvar win_hover false)
|
||||
(defvar winnotif_hover false)
|
||||
(defvar winactions_hover false)
|
||||
(defvar winstart_allapps false)
|
||||
(defvar monthshift 0)
|
||||
(defvar calendartitle '')
|
||||
(defvar winsearch '')
|
||||
(defvar winsearch_results "")
|
||||
(defvar winsearch_actions "")
|
||||
(defvar winsearch_actions_type "")
|
||||
(defvar winsearch_prefix "")
|
||||
(defvar allapps '')
|
||||
(defvar allapps_get '')
|
||||
(defvar compact false)
|
||||
(defvar resource_metric "cpu")
|
||||
|
||||
; Dynamic animation: different for open and close
|
||||
(defvar rev_wincalendar true)
|
||||
(defvar rev_winactions false)
|
||||
(defvar rev_winnotif false)
|
||||
(defvar rev_winstart false)
|
||||
(defvar rev_winpowermenu false)
|
||||
(defvar rev_ostg false)
|
||||
(defvar rev_ontf false)
|
||||
(defvar rev_themer false)
|
||||
(defvar rev_dash false)
|
||||
(defvar rev_calendar false)
|
||||
(defvar rev_wingamebar false)
|
||||
(defvar rev_winnews false)
|
||||
(defvar rev_dashfs false)
|
||||
(defvar rev_bottombar false)
|
||||
|
||||
(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)
|
||||
(defvar anim_open_calendar true)
|
||||
(defvar anim_open_winactions true)
|
||||
(defvar anim_open_winnotif true)
|
||||
(defvar anim_open_winstart true)
|
||||
(defvar anim_open_winpowermenu true)
|
||||
(defvar anim_open_wingamebar true)
|
||||
(defvar anim_open_winnews true)
|
||||
(defvar anim_open_dashfs true)
|
||||
(defvar anim_open_bottombar true)
|
||||
|
||||
; Time
|
||||
(defpoll time :interval "5s" `date +'{"date": "%d/%m", "hour": "%H", "minute": "%M", "monthname": "%B", "day": "%A", "year": "%Y"}'`)
|
||||
(defpoll day_only :interval "5s" "date '+%e' | sed 's/ //g'")
|
||||
(defpoll time12 :interval "10s" `date '+%l:%M %^P' | sed 's/am/AM/g' | sed 's/pm/PM/g'`)
|
||||
|
||||
; 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": "", "paused": false, "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 "scripts/music name")
|
||||
(deflisten mplay "playerctl -F metadata -f '{{status}}'")
|
||||
(deflisten wsjsona "scripts/overview-wrapper1")
|
||||
(deflisten wsjsonb "scripts/overview-wrapper2")
|
||||
; (deflisten appoverview "scripts/overview-wrapper")
|
||||
; (deflisten wsthumbs "scripts/overview-thumbnails") ; slow, so nope
|
||||
(deflisten activews :initial 1 "scripts/activews")
|
||||
(deflisten tasks "scripts/taskbarloop")
|
||||
(deflisten pinnedapps "cat modules/pinned-apps.json | gojq -c -M")
|
||||
(deflisten recommended "cat modules/recommended.json | gojq -c -M")
|
||||
(deflisten gamebarwidgets "cat modules/gamebar.json | gojq -c -M")
|
||||
(deflisten audiodevice `pactl --format=json list sinks | gojq -c -r '.[0]["description"]'`)
|
||||
(deflisten cavajson `scripts/cavajson`)
|
||||
(deflisten mousepos `scripts/mousetrack`)
|
||||
|
||||
(defvar username_default "username")
|
||||
(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", "Amazing XXXmas. Cute femboy was fucked\\\nin the ass under the Christmas tree"]`)
|
||||
(defvar quote_author `["- vaxry", "- vaxry", "- Hyprland community, 2022"]`)
|
||||
|
||||
; Fetch stuff
|
||||
(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 :interval "5m" :initial "username" `whoami`)
|
||||
(defpoll hostname :interval "5m" :initial "distro" `uname -n`)
|
||||
(defpoll wm :interval "5m" :initial "Hyprland" `echo $XDG_CURRENT_DESKTOP`)
|
||||
(defpoll diskfreepercent :interval "5m" `echo $(df --output=pcent / | tr -dc '0-9')`)
|
||||
(defpoll diskused :interval "5m" `df -h --output=used / | awk 'NR==2{print $1}'`)
|
||||
(defpoll diskfree :interval "5m" `df -h --output=avail / | awk 'NR==2{print $1}'`)
|
||||
(defpoll disksize :interval "5m" `df -h --output=size / | awk 'NR==2{print $1}'`)
|
||||
(deflisten cpuname `cat /proc/cpuinfo | grep 'model name' | awk -F: '{print $2}' | head -n 1`)
|
||||
(defpoll waifu_get :interval "5m" `python3 scripts/waifupics.py`)
|
||||
(defpoll calendar :interval "15m" `eww update monthshift=0 && eww update calendartitle="$(date '+%B %Y')" && scripts/calendarlayout`)
|
||||
+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 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}%")
|
||||
)
|
||||
)
|
||||
+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 ]")
|
||||
)
|
||||
)
|
||||
)
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
(defwidget winstarticon []
|
||||
(eventbox
|
||||
:class "winbutton-only thewinbutton"
|
||||
:onclick "scripts/toggle-winstart.sh &"
|
||||
:onmiddleclick "playerctl play-pause"
|
||||
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
||||
: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"
|
||||
(box
|
||||
:class "winbutton-pad"
|
||||
(box
|
||||
:class "winstarticon-${rev_winstart} winbutton-${rev_winstart}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget winactions []
|
||||
(eventbox
|
||||
:class "winbutton"
|
||||
:onhover "${EWW_CMD} update winactions_hover=true &"
|
||||
:onhoverlost "${EWW_CMD} update winactions_hover=false &"
|
||||
:onclick "scripts/toggle-winactions.sh &"
|
||||
:onscroll "echo $(echo {} | sed -e 's/down/-U 3/g' -e 's/up/-A 3/g' | xargs light) && scripts/brightness osd &"
|
||||
(box
|
||||
:class "winbutton-pad"
|
||||
(box
|
||||
:class "wintimedate winbutton-${winactions_hover || rev_winactions}"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(image :class "winicon" :path "images/svg/dark/wifi${net.level}.svg")
|
||||
(image :class "winicon" :path "images/svg/dark/vol${volume.audio == 1 ? round(volume.percent / 33, 0) : 'mute'}.svg")
|
||||
(image :class "winicon" :path "images/svg/dark/bat${round(battery.percentage / 10, 0)}.svg")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget windate []
|
||||
(eventbox
|
||||
:class "winbutton"
|
||||
:onhover "${EWW_CMD} update winnotif_hover=true &"
|
||||
:onhoverlost "${EWW_CMD} update winnotif_hover=false &"
|
||||
:onclick "scripts/toggle-winnotif.sh &"
|
||||
: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"
|
||||
(box
|
||||
:class "winbutton-pad"
|
||||
(box
|
||||
:class "wintimedate winbutton-${winnotif_hover || rev_winnotif}"
|
||||
:space-evenly false
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(box
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "wintime"
|
||||
(label :text "${time.hour}" :class "winbartext")
|
||||
(label :text ":" :class "winbartext")
|
||||
(label :text {time.minute} :class "winbartext")
|
||||
)
|
||||
(label
|
||||
:class "winbartext"
|
||||
:text "${time.date}/${time.year}"
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {arraylength(notifications) > 0}
|
||||
:transition "slideleft"
|
||||
:duration "200ms"
|
||||
:class "dummy${notifications[0].id}"
|
||||
(box
|
||||
:halign "center"
|
||||
:valign "center"
|
||||
:class "winnotif-badge"
|
||||
(label :class "winbartext" :text "${arraylength(notifications)}")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget wintaskbar []
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||
(for app in tasks
|
||||
(overlay
|
||||
(eventbox
|
||||
:class "winbutton-only"
|
||||
:onclick "${app.count > 0 ? ('hyprctl dispatch workspace ' + app.workspace[0] + ' &') : (app.exec)}"
|
||||
; :tooltip "${app.class}"
|
||||
; :onclick "hyprctl dispatch workspace ${app.workspace[0]} && hyprctl dispatch focuswindow address:${app.address[0]} &"
|
||||
(box
|
||||
:class "winbutton-pad"
|
||||
(box
|
||||
:class "wintaskbaricon"
|
||||
:style "
|
||||
background-image: url('${app.icon}');
|
||||
${app.class == awin.class ? 'background-color: rgba(108, 112, 134, 0.4); border: 1px solid rgba(108, 112, 134, 0.15); border-top: 1px solid rgba(108, 112, 134, 0.15);' : ''}
|
||||
"
|
||||
)
|
||||
)
|
||||
)
|
||||
(box :class "wintaskbar-indicator-${app.class == awin.class ? 'true' : (app.count > 0 ? 'false' : 'none')}")
|
||||
)
|
||||
)
|
||||
; Dummy keep alive
|
||||
(revealer :transition "slideright" :reveal false (label :text {awin.class}))
|
||||
)
|
||||
)
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
(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 "module workspaces"
|
||||
:spacing 0
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(for i in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${i.num}"
|
||||
:class "ws"
|
||||
(label
|
||||
:valign "center"
|
||||
:class "ws-text"
|
||||
:style "font-size: 13pt; background-color: ${i.clr};"
|
||||
:text "${ws-icons[i.num - 1]}"
|
||||
)
|
||||
; "●"
|
||||
)
|
||||
)
|
||||
)
|
||||
; Use a separate indicator for active workspace (animations, yay) (and more performant)
|
||||
(button
|
||||
:class "ws"
|
||||
:style "
|
||||
margin-top: ${31 * (activews - 1)}px;
|
||||
margin-bottom: ${31 * (10 - activews)}px;
|
||||
"
|
||||
(label
|
||||
:valign "center"
|
||||
:class "ws-text ws-text-active"
|
||||
:style "font-size: 13pt;"
|
||||
:text "${activews}"
|
||||
)
|
||||
; "●"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspaces_top []
|
||||
(box
|
||||
(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 &"
|
||||
:halign "center"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
; Only displays workspace state (has windows or not)
|
||||
(box
|
||||
:class "workspaces-top"
|
||||
:spacing 0
|
||||
:space-evenly false
|
||||
(for i in workspace
|
||||
(button
|
||||
:onclick "hyprctl dispatch workspace ${i.num}"
|
||||
:class "ws-top"
|
||||
:valign "end"
|
||||
(label
|
||||
:valign "center"
|
||||
:class "ws-text-top"
|
||||
:style "font-size: 1pt; background-color: ${i.clr};"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
; Use a separate indicator for active workspace (animations, yay) (and more performant)
|
||||
(button
|
||||
:class "ws-active-top"
|
||||
:style "
|
||||
margin-left: ${31 * (activews - 1)}px;
|
||||
margin-right: ${31 * (10 - activews)}px;
|
||||
margin-top: -5px;
|
||||
"
|
||||
(label
|
||||
:valign "center"
|
||||
:class "ws-text-top ws-text-active"
|
||||
:style "font-size: 1pt;"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
; ①②③④⑤⑥⑦⑧⑨⑩
|
||||
Reference in New Issue
Block a user