Add all of iogamaster modules

This commit is contained in:
2024-06-15 09:59:52 +02:00
parent c97f22254a
commit fa99b32cad
120 changed files with 3587 additions and 254 deletions

View File

@@ -0,0 +1,48 @@
(defwidget metrics []
(box :class "system" :orientation "h" :space-evenly false :halign "end"
(_battery)
(metric :label "󰘚"
:value {EWW_RAM.used_mem_perc}
:onchange "")
(metric :label "󰋊"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "")
))
(defwidget metric [label value onchange]
(box :orientation "h"
:class "metric"
:space-evenly false
(box :class "label" label)
(scale :min 0
:max 151
:active {onchange != ""}
:value value
:onchange onchange)))
(defpoll battery-percent :interval "30s"
:initial ''
"./scripts/battery-percent")
(defpoll battery-status :interval "5s"
:initial ''
"./scripts/battery-status")
(defwidget _battery []
(box :class "bat-box" :space-evenly false :spacing 8
:visable {battery-status != ''}
(label :text {battery-status == 'Charging' ? "󰂄" :
battery-percent < 10 ? "󰂃" :
battery-percent < 20 ? "󰁻" :
battery-percent < 30 ? "󰁼" :
battery-percent < 40 ? "󰁽" :
battery-percent < 50 ? "󰁾" :
battery-percent < 60 ? "󰁿" :
battery-percent < 70 ? "󰂀" :
battery-percent < 80 ? "󰂁" :
battery-percent < 90 ? "󰂂" : "󰁹"})))
(defpoll time :interval "1s"
"date '+%H:%M'")

View File

@@ -0,0 +1,9 @@
(defwidget music []
(box :class "music"
:orientation "h"
:space-evenly false
:halign "center"
{music != "" ? "󰽰 ${music}" : ""}))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ title }} - {{ artist }}' || true")

View File

@@ -0,0 +1,13 @@
(defwidget workspaces []
(eventbox
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
(box
:class "module workspaces"
:spacing 10
(for i in workspace
(button
:onclick "hyprctl dispatch workspace ${i.number}"
:class "ws"
:style "color: ${i.color};"
"●")))))
(deflisten workspace "./scripts/workspace")