feat: structure for eww dots

This commit is contained in:
hesam-init 2024-06-28 13:16:38 +03:30
parent b1175b0018
commit d8f781cb27
58 changed files with 445 additions and 445 deletions

View file

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 256 KiB

View file

Before

Width:  |  Height:  |  Size: 251 KiB

After

Width:  |  Height:  |  Size: 251 KiB

View file

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

View file

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

View file

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 325 B

View file

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

View file

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 523 B

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 949 B

After

Width:  |  Height:  |  Size: 949 B

View file

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 561 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 378 B

After

Width:  |  Height:  |  Size: 378 B

View file

@ -1 +1 @@
@import "./themes/everblush.scss";
@import "./assets/themes/everblush.scss";

View file

@ -1,20 +0,0 @@
.heading {
font-size: 25px;
color: $accent;
margin: 5px;
}
.dmpdcontrol {
margin: 10px;
}
.dmpdcontrol label {
font-size: 20px;
margin: 0px 8px;
}
.dicons label {
font-size: 25px;
margin-right: 6px;
}

View file

@ -1,11 +1,11 @@
@import "./colors.scss";
@import "./src/bar/styles.scss";
// @import "./bottom_bar/bar.scss";
@import "./control_panel/control_panel.scss";
@import "./dashboard/dashboard.scss";
@import "./dock/dock.scss";
@import "./desktop/desktop.scss";
@import "./src/sidebar/styles.scss";
@import "./src/control-panel/styles.scss";
@import "./src/dashboard/styles.scss";
@import "./src/dock/styles.scss";
@import "./src/desktop/styles.scss";
@import "./notification/notification.scss";
// @import "./src/bottom-bar/styles.scss";
* {
all: unset;
@ -110,7 +110,7 @@ checkbutton:checked {
}
entry {
// image: url('./image/screenshot.png');
// image: url('./assets/image/screenshot.png');
padding: 5px;
margin: 5px;
border-radius: 5px;

View file

@ -1,48 +1,5 @@
(include "./src/utils/_revealer.yuck")
(include "./src/_pollers.yuck")
(include "./src/_variables.yuck")
(deflisten workspacejson
:initial '[{"focused": true, "empty": false, "name": 1}, {"focused": false, "empty": true, "name": 2}, {"focused": false, "empty": true, "name": 3}, {"focused": false, "empty": true, "name": 4}, {"focused": false, "empty": true, "name": 5}]'
"./scripts/workspace.py")
;; used mainly in control panel and dashboard
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
(defpoll weatherjson
:initial '{
"FeelsLikeC": "0",
"FeelsLikeF": "0",
"cloudcover": "0",
"humidity": "0",
"localObsDateTime": "2000-00-00 07:27 AM",
"observation_time": "07:27 AM",
"precipInches": "0.0",
"precipMM": "0.0",
"pressure": "0",
"pressureInches": "0",
"temp_C": "0",
"temp_F": "0",
"uvIndex": "0",
"visibility": "0",
"visibilityMiles": "0",
"weatherCode": "727",
"weatherDesc": [{"value": "Idk"}],
"weatherIconUrl": [{"value": ""}],
"winddir16Point": "",
"winddirDegree": "0",
"windspeedKmph": "0",
"windspeedMiles": "0",
"icon": "idk",
"hourly": []
}'
:interval "1h"
:run-while revealcontrolpanel
"./scripts/weather.py")
(defpoll datehour :initial "12" :interval "30m" "date +'%H'")
(defpoll notesc :interval "2s" :run-while reveal4 "cat -s ~/Documents/fuck.txt")
(defpoll quotejson :interval "1h" `./scripts/quote.py`)
(deflisten timerdis `./scripts/timer.py subscribe`)
(include "./src/_definitions.yuck")
;; dock
(deflisten tasksjson :initial "[]" "./scripts/tasklist.py")
@ -59,33 +16,9 @@
(defvar borderpixel 2)
(defvar caffeine false)
; Notifications
(deflisten notifications :initial '{
"count": 0,
"dnd": false,
"notifications": [],
"popups": []
}'
"./scripts/notifCatch"
)
;; cava pipe ("borrowed from tail-r")
;; (deflisten cavajson :initial "[]" "./scripts/cava_pipe.sh")
;; playerctl
(deflisten psong "playerctl metadata --format '{{ title }}' -F")
(deflisten partist "playerctl metadata --format '{{ artist }}' -F")
(deflisten pcover "./scripts/pollcover.sh")
(deflisten pstatus "playerctl status -F")
(deflisten ptime
:initial '{
"position": 0,
"duration": 0,
"readable": "0:00"
}'
"playerctl -F metadata -f '{ \"position\": {{position/1000000}}, \"duration\": {{mpris:length/1000000}}, \"readable\": \"{{duration(position)}}/{{duration(mpris:length)}}\" }'")
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
;; wallpaper thing
(defvar wallpapers "[]")
@ -94,11 +27,18 @@
(defpoll theme :interval "24h" "./scripts/toggletheme")
(include "./src/bar/main.yuck")
;; (include "./bottom_bar/bar.yuck")
(include "./control_panel/control_panel.yuck")
(include "./dashboard/dashboard.yuck")
(include "./dock/dock.yuck")
(include "./desktop/desktop.yuck")
;; (include "./src/bottom_bar/bar.yuck")
(include "./src/sidebar/main.yuck")
(include "./src/control-panel/main.yuck")
(include "./src/control-panel/windowswitcher.yuck")
(include "./src/wallpapers/main.yuck")
(include "./src/dashboard/main.yuck")
(include "./src/dock/main.yuck")
(include "./src/desktop/main.yuck")
(include "./notification/notification.yuck")
(include "./wallpapers/wallpapers.yuck")

View file

@ -27,7 +27,7 @@
(centerbox
:orientation "h"
:class "notifbar"
(image :halign "start" :image-width 30 :image-height 30 :path {noti.icon != "null" ? noti.icon : "./image/idk.svg"})
(image :halign "start" :image-width 30 :image-height 30 :path {noti.icon != "null" ? noti.icon : "./assets/image/idk.svg"})
(scroll
:halign "center"
:valign "center"
@ -51,7 +51,7 @@
:height 80
:space-evenly false
:spacing 10
(image :image-width 80 :image-height 80 :visible {noti.image != "null"} :path {noti.image != "null" ? noti.image : "./image/idk.svg"})
(image :image-width 80 :image-height 80 :visible {noti.image != "null"} :path {noti.image != "null" ? noti.image : "./assets/image/idk.svg"})
(button
:onclick "./scripts/notifManage --dismiss ${noti.id}"

View file

@ -0,0 +1,97 @@
(defvar revealVolume false)
(defvar revealMicrophone false)
(defvar revealBrightness false)
(defvar revealControlpanel false)
(defvar reveal1 false)
(defvar reveal2 false)
(defvar reveal3 false)
(defvar reveal4 false)
(defvar reveal5 false)
(defvar reveal6 false)
(defvar revealweather false)
(defvar revealsystray false)
; Workspaces
(defvar show_no_of_windows false)
(deflisten workspacesjson :initial "[]" "./scripts/workspaces get-all-workspaces")
(defpoll current_workspace :initial "0" :interval "50ms" "./scripts/workspaces get-active-workspace")
; Notifications
(deflisten notifications :initial '{
"count": 0,
"dnd": false,
"notifications": [],
"popups": []
}'
"./scripts/notifCatch"
)
; Playerctl
(deflisten psong "playerctl metadata --format '{{ title }}' -F")
(deflisten partist "playerctl metadata --format '{{ artist }}' -F")
(deflisten pcover "./scripts/pollcover.sh")
(deflisten pstatus "playerctl status -F")
(deflisten ptime
:initial '{
"position": 0,
"duration": 0,
"readable": "0:00"
}'
"playerctl -F metadata -f '{ \"position\": {{position/1000000}}, \"duration\": {{mpris:length/1000000}}, \"readable\": \"{{duration(position)}}/{{duration(mpris:length)}}\" }'")
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
(defpoll thour :initial "0" :interval "60s" "date +'%I'")
(defpoll tmin :initial "0" :interval "60s" "date +'%M'")
(defpoll tpm :initial "0" :interval "60s" "date +'%p'")
(defpoll volumemute :initial "false" :interval "1s" "pamixer --get-mute")
(defpoll volume :initial "0" :interval "1s" "pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%'")
(defpoll mic_volume :initial "0" :interval "1s" "pactl get-source-volume @DEFAULT_SOURCE@ | awk '{print $5}' | tr -d '%'")
(defpoll brightness :initial "0" :interval "2s" "brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
(defpoll wifi_icon :initial "" :interval "30s" "./scripts/wifi --ICON")
(defpoll wifi_essid :initial "" :interval "30s" "./scripts/wifi --ESSID")
(defpoll wifi_radio :initial "off" :interval "2s" "nmcli radio wifi")
(defpoll calendar_day :initial "1" :interval "20h" "date '+%d'")
(defpoll calendar_year :initial "2000" :interval "20h" "date '+%Y'")
(defpoll bat0 :initial "0" :interval "30s" "bash ./scripts/sys_info --bat")
(defpoll baticon :initial "" :interval "30s" "bash ./scripts/sys_info --baticon")
(defpoll batstat :interval "30s" "cat /sys/class/power_supply/BAT0/status")
(defpoll homedir :initial "" :interval "24h" "echo ~")
; Controlpanel
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
(deflisten timerdis "./scripts/timer.py subscribe")
(defpoll weatherjson
:initial '{
"FeelsLikeC": "0",
"FeelsLikeF": "0",
"cloudcover": "0",
"humidity": "0",
"localObsDateTime": "2000-00-00 07:27 AM",
"observation_time": "07:27 AM",
"precipInches": "0.0",
"precipMM": "0.0",
"pressure": "0",
"pressureInches": "0",
"temp_C": "0",
"temp_F": "0",
"uvIndex": "0",
"visibility": "0",
"visibilityMiles": "0",
"weatherCode": "727",
"weatherDesc": [{"value": "Idk"}],
"weatherIconUrl": [{"value": ""}],
"winddir16Point": "",
"winddirDegree": "0",
"windspeedKmph": "0",
"windspeedMiles": "0",
"icon": "idk",
"hourly": []
}'
:interval "1h"
:run-while revealcontrolpanel
"./scripts/weather.py")
(defpoll datehour :initial "12" :interval "30m" "date +'%H'")
(defpoll notesc :interval "2s" :run-while reveal4 "cat -s ~/Documents/fuck.txt")
(defpoll quotejson :interval "1h" `./scripts/quote.py`)

View file

@ -1,16 +0,0 @@
(defpoll thour :initial "0" :interval "60s" "date +'%I'")
(defpoll tmin :initial "0" :interval "60s" "date +'%M'")
(defpoll tpm :initial "0" :interval "60s" "date +'%p'")
(defpoll volumemute :initial "false" :interval "1s" "pamixer --get-mute")
(defpoll volume :initial "0" :interval "1s" "pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%'")
(defpoll mic_volume :initial "0" :interval "1s" "pactl get-source-volume @DEFAULT_SOURCE@ | awk '{print $5}' | tr -d '%'")
(defpoll brightness :initial "0" :interval "2s" "brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
(defpoll wifi_icon :initial "" :interval "30s" "./scripts/wifi --ICON")
(defpoll wifi_essid :initial "" :interval "30s" "./scripts/wifi --ESSID")
(defpoll wifi_radio :initial "off" :interval "2s" "nmcli radio wifi")
(defpoll calendar_day :initial "1" :interval "20h" "date '+%d'")
(defpoll calendar_year :initial "2000" :interval "20h" "date '+%Y'")
(defpoll bat0 :initial "0" :interval "30s" "bash ./scripts/sys_info --bat")
;; (defpoll baticon :initial "" :interval "30s" "bash ./scripts/sys_info --baticon")
;; (defpoll batstat :interval "30s" "cat /sys/class/power_supply/BAT0/status")
(defpoll homedir :initial "" :interval "24h" "echo ~")

View file

@ -1,13 +0,0 @@
(defvar revealVolume false)
(defvar revealMicrophone false)
(defvar revealBrightness false)
(defvar reveal1 false)
(defvar reveal2 false)
(defvar reveal3 false)
(defvar reveal4 false)
(defvar reveal5 false)
(defvar reveal6 false)
(defvar revealweather false)
(defvar revealsystray false)
(defvar revealcontrolpanel false)

View file

@ -1,3 +1,5 @@
(include "./src/bottom-bar/sidectl.yuck")
(defwindow bar
:geometry (geometry
:x "0%"
@ -175,7 +177,7 @@
:valign "center"
(eventbox
:onclick "${EWW_CMD} update reveal1=false reveal2=false reveal3=${!reveal3}"
(image :path { pcover == "" ? "./image/emptympd.png" : pcover } :image-width 30 :image-height 30 :style "padding: 0px 5px;"))
(image :path { pcover == "" ? "./assets/image/emptympd.png" : pcover } :image-width 30 :image-height 30 :style "padding: 0px 5px;"))
(button :onclick "playerctl previous"
(label :class "icon" :text "󰒮"))
(button :onclick "playerctl play-pause"
@ -212,4 +214,3 @@
;; :max 100
;; :flipped true))))
(include "./bottom_bar/sidectl.yuck")

View file

@ -171,7 +171,7 @@
:class "unbarwidget"
:space-evenly false
:spacing 20
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./image/emptympd.png" : pcover })
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover })
(box
:orientation "v"
:space-evenly false

View file

@ -1,3 +1,5 @@
(include "./src/control-panel/windowswitcher.yuck")
(defwindow control_panel
:geometry (geometry
:x 10
@ -217,7 +219,7 @@
:valign "start"
:halign "fill"
:hexpand true
(image :style "margin: 10px;" :image-width 80 :image-height 80 :path "./image/fieshidle.gif")
(image :style "margin: 10px;" :image-width 80 :image-height 80 :path "./assets/image/fieshidle.gif")
(scroll
:hscroll true
:vscroll false
@ -304,7 +306,7 @@
(image
:image-width 50
:image-height 50
:path "./image/weather/${hour.icon}.svg")
:path "./assets/image/weather/${hour.icon}.svg")
(box
:orientation "v"
:space-evenly false
@ -325,7 +327,7 @@
:image-width 100
:image-height 100
:style "margin: 10px;"
:path "./image/weather/${weatherjson.icon}.svg")
:path "./assets/image/weather/${weatherjson.icon}.svg")
(scroll
:hscroll true
:vscroll false
@ -474,7 +476,7 @@
:halign "center"
:valign "center"
:spacing 10
(image :image-width 100 :image-height 100 :path { pcover == "" ? "./image/emptympd.png" : pcover })
(image :image-width 100 :image-height 100 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover })
(box
:orientation "v"
:space-evenly false
@ -499,5 +501,3 @@
(label :text { pstatus == "Playing" ? "" : ""} ))
(button :onclick "playerctl next"
(label :text "󰒭")))))))
(include "./control_panel/windowswitcher.yuck")

View file

@ -1,5 +1,4 @@
;; Dashboard design is made by tsukki9696
(defwindow dashboard
:geometry (geometry
:x 0
@ -16,7 +15,7 @@
:class "popup"
:space-evenly false
:orientation "v"
(duser :name "Failed" :tag "failed.sh" :pfp "./image/roundpfp.png")
(duser :name "Failed" :tag "failed.sh" :pfp "./assets/image/roundpfp.png")
(box
:space-evenly true
:orientation "h"

View file

@ -0,0 +1,19 @@
.heading {
font-size: 25px;
color: $accent;
margin: 5px;
}
.dmpdcontrol {
margin: 10px;
}
.dmpdcontrol label {
font-size: 20px;
margin: 0px 8px;
}
.dicons label {
font-size: 25px;
margin-right: 6px;
}

View file

@ -30,12 +30,12 @@
(defwidget imagesicon [name]
(eventbox
:onclick "feh ./image/desktop/${name}.png"
:onclick "feh ./assets/image/desktop/${name}.png"
:class "desktopbox"
(box
:orientation "v"
:space-evenly false
:height 100
:valign "end"
(image :width 100 :height 100 :image-width 80 :image-height 80 :path "./image/desktop/${name}.png")
(image :width 100 :height 100 :image-width 80 :image-height 80 :path "./assets/image/desktop/${name}.png")
(label :class "desktoptext" :text "${name}.png"))))

View file

@ -19,7 +19,7 @@
:space-evenly false
(revealer
:transition "slideright"
:reveal revealcontrolpanel
:reveal revealControlpanel
(control_widget))
(centerbox
:class "barwidget"
@ -69,23 +69,17 @@
; (battery)
))
(defvar show_no_of_windows false)
(deflisten workspacesdata :initial "[]" "./scripts/workspaces get-all-workspaces")
(defpoll current_workspace :initial "0" :interval "50ms" "./scripts/workspaces get-active-workspace")
(defwidget workspaces []
(eventbox
:cursor "pointer"
:onscroll "./scripts/workspaces change {} ${current_workspace}"
:onhover "eww update show_no_of_windows=true"
:onhoverlost "eww update show_no_of_windows=false"
:onhover "${EWW_CMD} update show_no_of_windows=true"
:onhoverlost "${EWW_CMD} update show_no_of_windows=false"
(box
:class "workspaces"
:space-evenly false
:orientation "v"
(for workspace in {workspacesdata}
(for workspace in {workspacesjson}
(button
:onclick "hyprctl dispatch workspace ${workspace.id}"
(box
@ -109,7 +103,7 @@
;; :onclick "~/.config/eww/meowidgets/scripts/launch"
;; :onclick "~/.config/eww/meowayland/scripts/launch"
;; :onclick "./scripts/pop control"
:onclick "${EWW_CMD} update revealcontrolpanel=${ !revealcontrolpanel }"
:onclick "${EWW_CMD} update revealControlpanel=${ !revealControlpanel }"
:onrightclick "${EWW_CMD} open wallpaperselect --toggle"
:cursor "pointer"
(label :text "" :halign "center" :class "launchicon" :style "padding: 2px 0px;"))))
@ -205,7 +199,7 @@
:spacing 5
(eventbox
:onclick "${EWW_CMD} open music --toggle"
(image :path { pcover == "" ? "./image/emptympd.png" : pcover } :image-width 20 :image-height 20))
(image :path { pcover == "" ? "./assets/image/emptympd.png" : pcover } :image-width 20 :image-height 20))
(button :onclick "playerctl previous"
(label :class "picon" :text "󰒮"))
(button :onclick "playerctl play-pause"
@ -313,7 +307,7 @@
:class "unbarwidget"
:space-evenly false
:spacing 20
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./image/emptympd.png" : pcover })
(image :style "margin: 5px;" :image-height 190 :image-width 190 :path { pcover == "" ? "./assets/image/emptympd.png" : pcover })
(box
:orientation "v"
:space-evenly false

View file

@ -8,7 +8,6 @@
:anchor "center")
:stacking "overlay"
:monitor 0
:focusable true
(box
:class "popup"
(wallpaperselectwidget)))
@ -46,7 +45,7 @@
:style "margin: 50px 0px 5px 0px;"
:hexpand false
:vexpand false
:path "./image/fieshidle.gif"
:path "./assets/image/fieshidle.gif"
:visible {arraylength(wallpapers) == 0})
(label