mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 20:20:41 +00:00
Initial commit
This commit is contained in:
parent
b912871070
commit
a3e01caebf
157 changed files with 9696 additions and 0 deletions
29
home/.config/eww/modules/battery.yuck
Normal file
29
home/.config/eww/modules/battery.yuck
Normal file
|
@ -0,0 +1,29 @@
|
|||
(defpoll battery
|
||||
:interval "2s"
|
||||
:initial '{"percent":"0","plugged":"false","status":"N/A","capacity_icon":"","extra_icon":"","manufacturer":"N/A","model_name":"N/A","technology":"N/A","energy_now":"0","enerfy_full":"0","enerfy_full_design":"0","cycle_count":"0","critical":"false","full":"false"}'
|
||||
`scripts/battery`)
|
||||
|
||||
(defwidget battery_module []
|
||||
(eventbox
|
||||
:class "module battery"
|
||||
|
||||
(box
|
||||
:class {battery.critical ? "critical" : battery.full ? "full" : "normal"}
|
||||
(box
|
||||
:space-evenly false
|
||||
:class {battery.plugged ? "plugged" : "unplugged" }
|
||||
|
||||
(box
|
||||
:class "icon"
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "extra"
|
||||
:text {battery.extra_icon})
|
||||
(label
|
||||
:text {battery.capacity_icon}))
|
||||
(label
|
||||
:class "value"
|
||||
:text "${battery.percent}%"
|
||||
)
|
||||
))))
|
19
home/.config/eww/modules/bitcoin.yuck
Normal file
19
home/.config/eww/modules/bitcoin.yuck
Normal file
|
@ -0,0 +1,19 @@
|
|||
(defpoll bitcoin
|
||||
:interval "5m"
|
||||
:initial "$N/A"
|
||||
`~/.local/bin/scripts/cli/bitcoin`)
|
||||
|
||||
(defwidget bitcoin_module []
|
||||
(eventbox
|
||||
:onclick "~/.local/bin/scripts/cli/bitcoin | xargs -I_ ${EWW_CMD} update bitcoin=_"
|
||||
:class "module bitcoin"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text "ﴑ")
|
||||
(label :text {bitcoin}))
|
||||
)
|
||||
)
|
22
home/.config/eww/modules/clock.yuck
Normal file
22
home/.config/eww/modules/clock.yuck
Normal file
|
@ -0,0 +1,22 @@
|
|||
(defpoll time
|
||||
:interval "5s"
|
||||
:initial '{"date": "01 Jan", "hour": "00", "minute": "00", "day": "Monday"}'
|
||||
`date +'{"date": "%d %b", "hour": "%H", "minute": "%M", "day": "%A"}'`)
|
||||
|
||||
(defwidget clock_module []
|
||||
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} open --toggle calendar"
|
||||
:tooltip {time.day}
|
||||
:class "module clock"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text "")
|
||||
(label
|
||||
:class "value"
|
||||
:text "${time.date} ${time.hour}:${time.minute}"))
|
||||
))
|
15
home/.config/eww/modules/cpu.yuck
Normal file
15
home/.config/eww/modules/cpu.yuck
Normal file
|
@ -0,0 +1,15 @@
|
|||
(defwidget cpu_module []
|
||||
(eventbox
|
||||
:class "module cpu"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text " ")
|
||||
(label
|
||||
:class "value"
|
||||
:text "${round(EWW_CPU.avg,2)}%"
|
||||
)
|
||||
)))
|
23
home/.config/eww/modules/kernel.yuck
Normal file
23
home/.config/eww/modules/kernel.yuck
Normal file
|
@ -0,0 +1,23 @@
|
|||
; TODO: Figure out how to store this one-time
|
||||
|
||||
(defpoll kernel
|
||||
:interval "10000h"
|
||||
:initial 'N/A'
|
||||
; `uname -r | sed -r 's/(.+)-arch(.+)/\\1/'`
|
||||
`uname -r`)
|
||||
|
||||
(defwidget kernel_module []
|
||||
(eventbox
|
||||
:class "module kernel"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text " ")
|
||||
(label
|
||||
:class "value"
|
||||
:text {kernel}
|
||||
)
|
||||
)))
|
15
home/.config/eww/modules/memory.yuck
Normal file
15
home/.config/eww/modules/memory.yuck
Normal file
|
@ -0,0 +1,15 @@
|
|||
(defwidget memory_module []
|
||||
(eventbox
|
||||
:class "module memory"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text " ")
|
||||
(label
|
||||
:class "value"
|
||||
:text "${round(EWW_RAM.used_mem / 1000000,1)}G: ${round(EWW_RAM.used_mem_perc,0)}%"
|
||||
)
|
||||
)))
|
3
home/.config/eww/modules/nightlight.yuck
Normal file
3
home/.config/eww/modules/nightlight.yuck
Normal file
|
@ -0,0 +1,3 @@
|
|||
(deflisten nightlight
|
||||
:initial `{"running": false,"temperature": 0}`
|
||||
`scripts/nightlight --state`)
|
29
home/.config/eww/modules/uptime.yuck
Normal file
29
home/.config/eww/modules/uptime.yuck
Normal file
|
@ -0,0 +1,29 @@
|
|||
(defpoll uptime
|
||||
:interval "1m"
|
||||
:initial 'N/A'
|
||||
`uptime -p | sed \\
|
||||
-e 's/^up //' \\
|
||||
-e 's/ years\\?,\\?/y/' \\
|
||||
-e 's/ months\\?,\\?/m/' \\
|
||||
-e 's/ weeks\\?,\\?/w/' \\
|
||||
-e 's/ days\\?,\\?/d/' \\
|
||||
-e 's/ hours\\?,\\?/h/' \\
|
||||
-e 's/ minutes\\?,\\?/m/' \\
|
||||
-e 's/ seconds\\?,\\?/s/' \\
|
||||
| cut -d' ' -f-2`)
|
||||
|
||||
(defwidget uptime_module []
|
||||
(eventbox
|
||||
:class "module uptime"
|
||||
|
||||
(box
|
||||
:space-evenly false
|
||||
|
||||
(label
|
||||
:class "icon"
|
||||
:text " ")
|
||||
(label
|
||||
:class "value"
|
||||
:text {uptime}
|
||||
)
|
||||
)))
|
44
home/.config/eww/modules/volume.yuck
Normal file
44
home/.config/eww/modules/volume.yuck
Normal file
|
@ -0,0 +1,44 @@
|
|||
(defvar mic_rev false)
|
||||
|
||||
(deflisten volume
|
||||
:initial '{ "speaker_vol": "100", "speaker_mute": false, "speaker_icon": "", "microphone_mute": false, "microphone_vol": "100", "microphone_icon": "" }'
|
||||
`scripts/volume loop`)
|
||||
|
||||
(defwidget volume_module []
|
||||
(box
|
||||
:class "module volume"
|
||||
:space-evenly false
|
||||
|
||||
(eventbox
|
||||
:onscroll "scripts/volume setvol SOURCE 0.5 {}"
|
||||
:onclick "scripts/volume togglemute SOURCE"
|
||||
:onrightclick "${terminal} pulsemixer &"
|
||||
:onhover "${EWW_CMD} update mic_rev=true"
|
||||
:onhoverlost "${EWW_CMD} update mic_rev=false"
|
||||
:class "microphone"
|
||||
(box
|
||||
(label
|
||||
:class "icon"
|
||||
:text {volume.microphone_icon})
|
||||
(label
|
||||
:visible {mic_rev && !volume.microphone_mute}
|
||||
:class "value"
|
||||
:text "${volume.microphone_vol}%")
|
||||
))
|
||||
|
||||
(eventbox
|
||||
:onscroll "scripts/volume setvol SINK 0.5 {}"
|
||||
:onclick "scripts/volume togglemute SINK"
|
||||
:onrightclick "${terminal} pulsemixer &"
|
||||
:class "speaker"
|
||||
(box
|
||||
(label
|
||||
:class "icon"
|
||||
:text {volume.speaker_icon})
|
||||
(label
|
||||
:visible {!volume.speaker_mute}
|
||||
:class "value"
|
||||
:text "${volume.speaker_vol}%")
|
||||
))
|
||||
|
||||
))
|
15
home/.config/eww/modules/window_name.yuck
Normal file
15
home/.config/eww/modules/window_name.yuck
Normal file
|
@ -0,0 +1,15 @@
|
|||
(deflisten window_name
|
||||
:initial `{"class":"","name":"","formatted_name":""}`
|
||||
`scripts/window_name`)
|
||||
|
||||
; Consider making the window name clickable, opening up a full window that's showing
|
||||
; the selected window details (class, unformatted name, and perhaps even more, like
|
||||
; xwayland status, ...)
|
||||
(defwidget window_name_module []
|
||||
(box
|
||||
:class "module window_name"
|
||||
|
||||
(label
|
||||
:class "value"
|
||||
:text "${window_name.formatted_name}")
|
||||
))
|
26
home/.config/eww/modules/workspaces.yuck
Normal file
26
home/.config/eww/modules/workspaces.yuck
Normal file
|
@ -0,0 +1,26 @@
|
|||
(deflisten workspaces
|
||||
:initial `[{"id": 1,"name": "N/A","monitor": "N/A","windows": 1,"hasfullscreen": false,"lastwindow": "N/A","lastwindowtitle": "N/A","format_name": "N/A","active": true}]`
|
||||
`scripts/workspaces --loop`)
|
||||
|
||||
|
||||
; (defwidget sep []
|
||||
; (label :class "separ module" :text "|"))
|
||||
|
||||
|
||||
; Consider making the window name clickable, opening up a full window that's showing
|
||||
; the selected window details (class, unformatted name, and perhaps even more, like
|
||||
; xwayland status, ...)
|
||||
(defwidget workspaces_module []
|
||||
(box
|
||||
:class "module workspaces"
|
||||
|
||||
(for workspace in workspaces
|
||||
(eventbox
|
||||
:class {workspace.active ? 'focused' : workspace.windows > 0 ? 'active' : 'inactive'}
|
||||
:onclick `scripts/workspaces --switch ${workspace.id}`
|
||||
|
||||
(label
|
||||
:class "value"
|
||||
:text {workspace.format_name}))
|
||||
)
|
||||
))
|
Loading…
Add table
Add a link
Reference in a new issue