eww
This commit is contained in:
parent
863b0522ec
commit
6c4b9dab68
5 changed files with 72 additions and 22 deletions
|
|
@ -3,7 +3,7 @@ $text-color: rgba(255, 255, 255, 1);
|
||||||
$main-color: rgba(255, 0, 0, 1);
|
$main-color: rgba(255, 0, 0, 1);
|
||||||
$accent-color: rgba(0, 255, 0, 1);
|
$accent-color: rgba(0, 255, 0, 1);
|
||||||
|
|
||||||
$font-size: 2.5rem;
|
$font-size: 1.25rem;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0.25rem;
|
margin: 0.25rem;
|
||||||
|
|
@ -15,3 +15,7 @@ window {
|
||||||
|
|
||||||
font-size: $font-size;
|
font-size: $font-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.workspace {
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,21 +12,37 @@
|
||||||
:exclusive false
|
:exclusive false
|
||||||
:focusable false
|
:focusable false
|
||||||
|
|
||||||
(workspaces)
|
(topbar)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget topbar []
|
||||||
|
(centerbox :class="topbar"
|
||||||
|
("a")
|
||||||
|
{time}
|
||||||
|
(workspaces)
|
||||||
|
(utils)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget utils []
|
||||||
|
(box :class="utils"
|
||||||
|
("a")
|
||||||
|
{battery}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
(box :class="workspaces"
|
(box :class="workspaces"
|
||||||
("a")
|
("a")
|
||||||
(button :onclick "hyprctl dispatch workspace 1" { workspace == 1 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 1" { workspace == 1 ? "◆" : windows-1 })
|
||||||
(button :onclick "hyprctl dispatch workspace 2" { workspace == 2 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 2" { workspace == 2 ? "◆" : windows-2 })
|
||||||
(button :onclick "hyprctl dispatch workspace 3" { workspace == 3 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 3" { workspace == 3 ? "◆" : windows-3 })
|
||||||
(button :onclick "hyprctl dispatch workspace 4" { workspace == 4 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 4" { workspace == 4 ? "◆" : windows-4 })
|
||||||
(button :onclick "hyprctl dispatch workspace 5" { workspace == 5 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 5" { workspace == 5 ? "◆" : windows-5 })
|
||||||
(button :onclick "hyprctl dispatch workspace 6" { workspace == 6 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 6" { workspace == 6 ? "◆" : windows-6 })
|
||||||
(button :onclick "hyprctl dispatch workspace 7" { workspace == 7 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 7" { workspace == 7 ? "◆" : windows-7 })
|
||||||
(button :onclick "hyprctl dispatch workspace 8" { workspace == 8 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 8" { workspace == 8 ? "◆" : windows-8 })
|
||||||
(button :onclick "hyprctl dispatch workspace 9" { workspace == 9 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 9" { workspace == 9 ? "◆" : windows-9 })
|
||||||
(button :onclick "hyprctl dispatch workspace 10" { workspace == 10 ? "◆" : "◇" })
|
(button :class "workspace" :onclick "hyprctl dispatch workspace 10" { workspace == 10 ? "◆" : windows-10 })
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
7
modules/wm/hyprland/config/eww/scripts/battery.sh
Executable file
7
modules/wm/hyprland/config/eww/scripts/battery.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cap=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
|
|
||||||
|
charge=$(cat /sys/class/power_supply/BAT1/status)
|
||||||
|
|
||||||
|
[[ $charge == "Discharging" ]] && echo -$cap% || echo +$cap%
|
||||||
7
modules/wm/hyprland/config/eww/scripts/windows.sh
Executable file
7
modules/wm/hyprland/config/eww/scripts/windows.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $(hyprctl -j clients | jq '.[].workspace.id' | grep -w $1 | wc -l) -eq 0 ]; then
|
||||||
|
echo "⬦"
|
||||||
|
else
|
||||||
|
echo "⟐"
|
||||||
|
fi
|
||||||
|
|
@ -1,9 +1,25 @@
|
||||||
|
; ---- TIME ----
|
||||||
(defpoll time
|
(defpoll time
|
||||||
:interval "1s"
|
:interval "1s"
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"date +'%H:%M:%S'"
|
"date +'%H:%M:%S'"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ---- SYSTRAY ----
|
||||||
|
(defpoll battery
|
||||||
|
:interval "10s"
|
||||||
|
:initial-value ""
|
||||||
|
"./scripts/battery.sh"
|
||||||
|
)
|
||||||
|
|
||||||
|
(defpoll wifi
|
||||||
|
:interval "1s"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
; ---- WORKSPACES ----
|
||||||
(defpoll workspace
|
(defpoll workspace
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
|
|
@ -13,59 +29,59 @@
|
||||||
(defpoll windows-1
|
(defpoll windows-1
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 1 | wc -l"
|
"./scripts/windows.sh 1"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-2
|
(defpoll windows-2
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 2 | wc -l"
|
"./scripts/windows.sh 2"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-3
|
(defpoll windows-3
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 3 | wc -l"
|
"./scripts/windows.sh 3"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-4
|
(defpoll windows-4
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 4 | wc -l"
|
"./scripts/windows.sh 4"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-5
|
(defpoll windows-5
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 5 | wc -l"
|
"./scripts/windows.sh 5"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-6
|
(defpoll windows-6
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 6 | wc -l"
|
"./scripts/windows.sh 6"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-7
|
(defpoll windows-7
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 7 | wc -l"
|
"./scripts/windows.sh 7"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-8
|
(defpoll windows-8
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 8 | wc -l"
|
"./scripts/windows.sh 8"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-9
|
(defpoll windows-9
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 9 | wc -l"
|
"./scripts/windows.sh 9"
|
||||||
)
|
)
|
||||||
|
|
||||||
(defpoll windows-10
|
(defpoll windows-10
|
||||||
:interval '0.1s'
|
:interval '0.1s'
|
||||||
:initial-value ""
|
:initial-value ""
|
||||||
"hyprctl -j clients | jq '[].workspace.id' | grep -w 10 | wc -l"
|
"./scripts/windows.sh 10"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue