make directories implicit

This commit is contained in:
willifan 2025-01-13 12:03:27 +01:00
parent 7b8e7c3b27
commit 54b0942de6
44 changed files with 285 additions and 285 deletions

View file

@ -18,10 +18,10 @@ pkgs.rustPlatform.buildRustPackage {
pkgs.libxkbcommon pkgs.libxkbcommon
]; ];
# installPhase = '' postInstall = ''
# mkdir -p $out/bin mkdir -p $out/bin
# cp clients $out/bin/clients cp -r $src/eww $out/bin/eww
#''; '';
meta = with pkgs.lib; { meta = with pkgs.lib; {
description = "utils for my desktop"; description = "utils for my desktop";

View file

@ -12,79 +12,79 @@
(defwidget normalWorkspaces [monitor] (defwidget normalWorkspaces [monitor]
(box (box
:space-evenly false :space-evenly false
:spacing 3 :spacing 3
:valign "center" :valign "center"
:height 20 :height 20
(for workspace in workspaces (for workspace in workspaces
(workspace (workspace
:activeOn {workspace.normal.activeOn} :activeOn {workspace.normal.activeOn}
:occupied {workspace.normal.occupied} :occupied {workspace.normal.occupied}
:id {workspace.normal.id} :id {workspace.normal.id}
:cmd {workspace.normal.id} :cmd {workspace.normal.id}
:icon {workspace.normal.icon} :icon {workspace.normal.icon}
:monitor {monitor})))) :monitor {monitor}))))
;; right ;; right
(defwidget cpu [] (defwidget cpu []
(icon (icon
:widgetclass "cpu" :widgetclass "cpu"
:hover "${round(EWW_CPU.avg, 1)}%" :hover "${round(EWW_CPU.avg, 1)}%"
:percentage {round(EWW_CPU.avg, 1)} :percentage {round(EWW_CPU.avg, 1)}
:image "../images/cpu.png")) :image "./images/cpu.png"))
(defwidget ram [] (defwidget ram []
(icon (icon
:widgetclass "ram" :widgetclass "ram"
:hover "${round(EWW_RAM.used_mem /(1024*1024*1024), 1)} GiB | ${round(EWW_RAM.used_mem_perc, 1)}%" :hover "${round(EWW_RAM.used_mem /(1024*1024*1024), 1)} GiB | ${round(EWW_RAM.used_mem_perc, 1)}%"
:percentage {round(EWW_RAM.used_mem_perc, 1)} :percentage {round(EWW_RAM.used_mem_perc, 1)}
:image "../images/ram.png")) :image "./images/ram.png"))
(defwidget audio [] (defwidget audio []
(icon (icon
:widgetclass {volume.muted == 1 ? "muted" : "volume"} :widgetclass {volume.muted == 1 ? "muted" : "volume"}
:hover "${volume.volume}%" :hover "${volume.volume}%"
:percentage {volume.volume >= 0 && volume.volume <= 100 ? volume.volume : 0} :percentage {volume.volume >= 0 && volume.volume <= 100 ? volume.volume : 0}
:image {volume.muted == 1 ? "../images/volumeMuted.png" : "../images/volume.png"})) :image {volume.muted == 1 ? "./images/volumeMuted.png" : "./images/volume.png"}))
(defwidget brightness [] (defwidget brightness []
(icon (icon
:widgetclass "brightness" :widgetclass "brightness"
:hover "${brightnessValue / 960}%" :hover "${brightnessValue / 960}%"
:percentage {brightnessValue / 960} :percentage {brightnessValue / 960}
:image "../images/brightness.png")) :image "./images/brightness.png"))
(defwidget network [] (defwidget network []
(icon (icon
:widgetclass "network" :widgetclass "network"
:hover {network.name} :hover {network.name}
:percentage "100" :percentage "100"
:image "../images/${network.image}.png")) :image "./images/${network.image}.png"))
(defwidget bluetooth [] (defwidget bluetooth []
(icon (icon
:widgetclass "bluetooth" :widgetclass "bluetooth"
:hover {bluetooth.name} :hover {bluetooth.name}
:percentage {bluetooth.battery} :percentage {bluetooth.battery}
:image "../images/bluetooth.png")) :image "./images/bluetooth.png"))
(defwidget battery [] (defwidget battery []
(icon (icon
:widgetclass {EWW_BATTERY.BAT1.status == "Charging" ? "battery" : EWW_BATTERY.total_avg > 25 ? "battery" : "batteryLow"} :widgetclass {EWW_BATTERY.BAT1.status == "Charging" ? "battery" : EWW_BATTERY.total_avg > 25 ? "battery" : "batteryLow"}
:hover "${round(EWW_BATTERY.total_avg, 1)}%" :hover "${round(EWW_BATTERY.total_avg, 1)}%"
:percentage {EWW_BATTERY.total_avg <= 90 ? round(EWW_BATTERY.total_avg, 1)/0.9 : 100} :percentage {EWW_BATTERY.total_avg <= 90 ? round(EWW_BATTERY.total_avg, 1)/0.9 : 100}
:image {EWW_BATTERY.BAT1.status == "Charging" ? "../images/charging.png" : EWW_BATTERY.total_avg > 25 ? "../images/battery.png" : "../images/batteryLow.png"})) :image {EWW_BATTERY.BAT1.status == "Charging" ? "./images/charging.png" : EWW_BATTERY.total_avg > 25 ? "./images/battery.png" : "./images/batteryLow.png"}))
(defwidget power [] (defwidget power []
(icon (icon
:widgetclass "power" :widgetclass "power"
:hover "placeholder" :hover "placeholder"
:percentage "0" :percentage "0"
:image "../images/power.png")) :image "./images/power.png"))
@ -92,243 +92,243 @@
;; Widget blocks ;; Widget blocks
(defwidget media [] (defwidget media []
(box (box
:class "smallBox" :class "smallBox"
:height 20 :height 20
:valign "center" :valign "center"
:spacing 1 :spacing 1
:space-evenly false :space-evenly false
(space) (space)
(label (label
:text "${media.title} - ${media.artist}" :text "${media.title} - ${media.artist}"
:tooltip "${media.title} - ${media.artist} | ${media.album}" :tooltip "${media.title} - ${media.artist} | ${media.album}"
:truncate true) :truncate true)
(space))) (space)))
(defwidget processing [] (defwidget processing []
(eventbox (eventbox
:onclick 'hyprctl dispatch exec "[float; pin; size 40% 40%; move 100%-41% 40] kitty bpytop -b proc"' :onclick 'hyprctl dispatch exec "[float; pin; size 40% 40%; move 100%-41% 40] kitty bpytop -b proc"'
:class "smallBox" :class "smallBox"
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(box (box
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(smallSpacer) (smallSpacer)
(cpu) (cpu)
(space) (space)
(ram) (ram)
(smallSpacer)))) (smallSpacer))))
(defwidget controlls [] (defwidget controlls []
(eventbox (eventbox
:onclick 'hyprctl dispatch exec "[float; pin; size 40% 40%; move 100%-41% 40] kitty pulsemixer"' :onclick 'hyprctl dispatch exec "[float; pin; size 40% 40%; move 100%-41% 40] kitty pulsemixer"'
:class "smallBox" :class "smallBox"
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(box (box
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(smallSpacer) (smallSpacer)
(audio) (audio)
(space) (space)
(brightness) (brightness)
(smallSpacer)))) (smallSpacer))))
(defwidget wireless [] (defwidget wireless []
(eventbox (eventbox
:onclick "`networkmanager_dmenu`" :onclick "`networkmanager_dmenu`"
:class "smallBox" :class "smallBox"
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(box (box
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 24 :height 24
(smallSpacer) (smallSpacer)
(network) (network)
(space) (space)
(bluetooth) (bluetooth)
(smallSpacer)))) (smallSpacer))))
(defwidget energy [] (defwidget energy []
(eventbox (eventbox
:onclick `wlogout -r 25 -c 25 -m 300 &` :onclick `wlogout -r 25 -c 25 -m 300 &`
:class "smallBox" :class "smallBox"
:valign "center" :valign "center"
:height 20 :height 20
(box (box
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 20 :height 20
(smallSpacer) (smallSpacer)
(battery) (battery)
(space) (space)
(power) (power)
(smallSpacer)))) (smallSpacer))))
;; Boxes ;; Boxes
(defwidget timeBox [] (defwidget timeBox []
(box (box
:class "barbox" :class "barbox"
:spacing 3 :spacing 3
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 30 :height 30
(space) (space)
(testtime) (testtime)
(space))) (space)))
(defwidget mediaBox [] (defwidget mediaBox []
(box (box
:class "barbox" :class "barbox"
:visible {media.status == "Playing" ? true : false} :visible {media.status == "Playing" ? true : false}
:spacing 3 :spacing 3
:space-evenly false :space-evenly false
:halign "end" :halign "end"
:valign "center" :valign "center"
:height 30 :height 30
(space) (space)
(media) (media)
(space))) (space)))
(defwidget start [] (defwidget start []
(box (box
:orientation "h" :orientation "h"
:space-evenly false :space-evenly false
:height 30 :height 30
:halign "start" :halign "start"
:valign "center" :valign "center"
:spacing 3 :spacing 3
(timeBox) (timeBox)
(mediaBox) (mediaBox)
(box))) (box)))
(defwidget center [monitor] (defwidget center [monitor]
(box (box
:class "barbox" :class "barbox"
:orientation "h" :orientation "h"
:space-evenly false :space-evenly false
:spacing 3 :spacing 3
:height 30 :height 30
:halign "center" :halign "center"
:valign "center" :valign "center"
(space) (space)
(workspace (workspace
:activeOn {workspaces[0].special.activeOn} :activeOn {workspaces[0].special.activeOn}
:occupied {workspaces[0].special.occupied} :occupied {workspaces[0].special.occupied}
:id {workspaces[0].special.id} :id {workspaces[0].special.id}
:icon {workspaces[0].special.icon} :icon {workspaces[0].special.icon}
:monitor {monitor}) :monitor {monitor})
(workspace (workspace
:activeOn {workspaces[1].special.activeOn} :activeOn {workspaces[1].special.activeOn}
:occupied {workspaces[1].special.occupied} :occupied {workspaces[1].special.occupied}
:id {workspaces[1].special.id} :id {workspaces[1].special.id}
:icon {workspaces[1].special.icon} :icon {workspaces[1].special.icon}
:monitor {monitor}) :monitor {monitor})
(seperator) (seperator)
(normalWorkspaces (normalWorkspaces
:monitor {monitor}) :monitor {monitor})
(seperator) (seperator)
(workspace (workspace
:activeOn {workspaces[2].special.activeOn} :activeOn {workspaces[2].special.activeOn}
:occupied {workspaces[2].special.occupied} :occupied {workspaces[2].special.occupied}
:id {workspaces[2].special.id} :id {workspaces[2].special.id}
:icon {workspaces[2].special.icon} :icon {workspaces[2].special.icon}
:monitor {monitor}) :monitor {monitor})
(workspace (workspace
:activeOn {workspaces[3].special.activeOn} :activeOn {workspaces[3].special.activeOn}
:occupied {workspaces[3].special.occupied} :occupied {workspaces[3].special.occupied}
:id {workspaces[3].special.id} :id {workspaces[3].special.id}
:icon {workspaces[3].special.icon} :icon {workspaces[3].special.icon}
:monitor {monitor}) :monitor {monitor})
(space))) (space)))
(defwidget end [] (defwidget end []
(box
:orientation "h"
:space-evenly false
:spacing 3
:height 30
:valign "center"
:halign "end"
(box (box
:orientation "h" :class "barbox"
:space-evenly false :space-evenly false
:spacing 3 :spacing 2
:height 30 (space)
:valign "center" (testtime
:halign "end" :timezone "US/Eastern"
(box :image "./images/USTime.png")
:class "barbox" (seperator)
:space-evenly false (testtime
:spacing 2 :timezone "Asia/Seoul"
(space) :image "./images/SamGuk-by_Sang_Min.png")
(testtime (space))
:timezone "US/Eastern" (box
:image "../images/USTime.png") :class "barbox"
(seperator) :spacing 2
(testtime :orientation "h"
:timezone "Asia/Seoul" :space-evenly false
:image "../images/SamGuk-by_Sang_Min.png") :height 30
(space)) :valign "center"
(box :halign "end"
:class "barbox"
:spacing 2 (space)
:orientation "h" ;; (systray
:space-evenly false ;; :spacing 2
:height 30 ;; :orientation "h"
:valign "center" ;; :space-evenly true
:halign "end" ;; :icon-size 16)
;;
(space) ;; (seperator)
;; (systray
;; :spacing 2 (processing)
;; :orientation "h"
;; :space-evenly true (seperator)
;; :icon-size 16)
;; (controlls)
;; (seperator)
(seperator)
(processing)
(wireless)
(seperator)
(seperator)
(controlls)
(energy)
(seperator)
(space))))
(wireless)
(seperator)
(energy)
(space))))
(defwidget bar [monitor] (defwidget bar [monitor]
(centerbox (centerbox
:orientation "h" :orientation "h"
(start) (start)
(center (center
:monitor {monitor}) :monitor {monitor})
(end))) (end)))
(defwindow bar [monitor width height] (defwindow bar [monitor width height]
:monitor {monitor} :monitor {monitor}
:geometry (geometry :geometry (geometry
:x "0%" :x "0%"
:y "5px" :y "5px"
:width "${width}px" :width "${width}px"
:height "${height}px" :height "${height}px"
:anchor "top center") :anchor "top center")
:stacking "fg" :stacking "fg"
:exclusive true :exclusive true
(bar (bar
:monitor {monitor})) :monitor {monitor}))

View file

Before

Width:  |  Height:  |  Size: 734 KiB

After

Width:  |  Height:  |  Size: 734 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -1,25 +1,25 @@
(deflisten brightnessValue (deflisten brightnessValue
:initial "0" :initial "0"
`../ewwScripts/brightness.sh`) `./scripts/brightness.sh`)
(deflisten network (deflisten network
:initial '{"name":"No Connection","image":"n.A."}' :initial '{"name":"No Connection","image":"n.A."}'
`../ewwScripts/network.sh`) `./scripts/network.sh`)
(deflisten workspaces (deflisten workspaces
:initial '' :initial ''
`../ewwScripts/client`) `./scripts/client`)
(defpoll bluetooth (defpoll bluetooth
:initial '{"name":"","battery":"0"}' :initial '{"name":"","battery":"0"}'
:interval "2s" :interval "2s"
`../ewwScripts/bluetooth.sh`) `./scripts/bluetooth.sh`)
(deflisten volume (deflisten volume
:initial '{"volume":"0","muted":"0"}' :initial '{"volume":"0","muted":"0"}'
`../ewwScripts/volume.sh`) `./scripts/volume.sh`)
(defpoll media (defpoll media
:initial '{"status":"","name":""}' :initial '{"status":"","name":""}'
:interval "2s" :interval "2s"
`../ewwScripts/media.sh`) `./scripts/media.sh`)

View file

@ -12,7 +12,7 @@ use smithay_client_toolkit::{
use wayland_client::{globals::registry_queue_init, protocol::wl_output, Connection, QueueHandle}; use wayland_client::{globals::registry_queue_init, protocol::wl_output, Connection, QueueHandle};
const CONFIG_DIR: &str = "/home/willifan/.config/desktop-utils/eww"; const CONFIG_DIR: &str = "./eww";
fn main() -> Result<(), Box<dyn Error>> { fn main() -> Result<(), Box<dyn Error>> {
// We initialize the logger for the purpose of debugging. // We initialize the logger for the purpose of debugging.